OSDN Git Service

import 0.9.3
authorhylom <hylom@silver.local>
Thu, 3 Dec 2009 11:58:48 +0000 (20:58 +0900)
committerhylom <hylom@silver.local>
Thu, 3 Dec 2009 11:58:48 +0000 (20:58 +0900)
636 files changed:
AUTHORS [new file with mode: 0644]
BUILD [new file with mode: 0644]
BuildContribsDarwin.sh [new file with mode: 0755]
COPYING [new file with mode: 0644]
CREDITS [new file with mode: 0644]
DownloadMacOsXContribBinaries.sh [new file with mode: 0755]
Doxyfile [new file with mode: 0644]
Jamfile [new file with mode: 0644]
Jamrules [new file with mode: 0644]
MacOsXContribBinariesVersion.txt [new file with mode: 0644]
Makefile [new file with mode: 0644]
Makefile.config [new file with mode: 0644]
NEWS [new file with mode: 0644]
THANKS [new file with mode: 0644]
TRANSLATIONS [new file with mode: 0644]
configure [new file with mode: 0755]
contrib/Jamfile [new file with mode: 0644]
contrib/Makefile [new file with mode: 0644]
contrib/patch-a52dec.patch [new file with mode: 0644]
contrib/patch-faac-cygwin.patch [new file with mode: 0644]
contrib/patch-faad2-libtool22.patch [new file with mode: 0644]
contrib/patch-ffmpeg-cygwin.patch [new file with mode: 0644]
contrib/patch-ffmpeg-latm.patch [new file with mode: 0644]
contrib/patch-ffmpeg-mpegleak.patch [new file with mode: 0644]
contrib/patch-ffmpeg-solaris.patch [new file with mode: 0644]
contrib/patch-ffmpeg.patch [new file with mode: 0644]
contrib/patch-libdca.patch [new file with mode: 0644]
contrib/patch-libdvdread-css-vlc-dylib.patch [new file with mode: 0644]
contrib/patch-libdvdread-cygwin.patch [new file with mode: 0644]
contrib/patch-libmpeg2.patch [new file with mode: 0644]
contrib/patch-mpeg4ip-ac3.patch [new file with mode: 0644]
contrib/patch-mpeg4ip-colr.patch [new file with mode: 0644]
contrib/patch-mpeg4ip-nasm-2.00-configure.patch [new file with mode: 0644]
contrib/patch-mpeg4ip-pascal-str.patch [new file with mode: 0644]
contrib/patch-mpeg4ip.patch [new file with mode: 0644]
contrib/patch-x264-aq.patch [new file with mode: 0644]
contrib/patch-x264-cygwin.patch [new file with mode: 0644]
contrib/patch-x264-idr.patch [new file with mode: 0644]
contrib/patch-x264-linux.patch [new file with mode: 0644]
contrib/patch-x264-solaris.patch [new file with mode: 0644]
contrib/patch-xvidcore-cygwin.patch [new file with mode: 0644]
contrib/patch-xvidcore-fdct.patch [new file with mode: 0644]
contrib/patch-xvidcore-macosx.patch [new file with mode: 0644]
contrib/patch-xvidcore-nasm-2.00-configure.patch [new file with mode: 0644]
contrib/patch_mpeg4ip_cygwin.patch [new file with mode: 0644]
contrib/version_a52dec.txt [new file with mode: 0644]
contrib/version_bzip2.txt [new file with mode: 0644]
contrib/version_faac.txt [new file with mode: 0644]
contrib/version_faad2.txt [new file with mode: 0644]
contrib/version_ffmpeg.txt [new file with mode: 0644]
contrib/version_lame.txt [new file with mode: 0644]
contrib/version_libdca.txt [new file with mode: 0644]
contrib/version_libdvdcss.txt [new file with mode: 0644]
contrib/version_libdvdread.txt [new file with mode: 0644]
contrib/version_libmkv.txt [new file with mode: 0644]
contrib/version_libmp4v2.txt [new file with mode: 0644]
contrib/version_libogg.txt [new file with mode: 0644]
contrib/version_libsamplerate.txt [new file with mode: 0644]
contrib/version_libtheora.txt [new file with mode: 0644]
contrib/version_libvorbis.txt [new file with mode: 0644]
contrib/version_mpeg2dec.txt [new file with mode: 0644]
contrib/version_mpeg4ip.txt [new file with mode: 0644]
contrib/version_qt.txt [new file with mode: 0644]
contrib/version_x264.txt [new file with mode: 0644]
contrib/version_xvidcore.txt [new file with mode: 0644]
contrib/version_zlib.txt [new file with mode: 0644]
gtk/.cvsignore [new file with mode: 0644]
gtk/AUTHORS [new file with mode: 0644]
gtk/COPYING [new file with mode: 0644]
gtk/ChangeLog [new file with mode: 0644]
gtk/INSTALL [new file with mode: 0644]
gtk/Jamfile [new file with mode: 0644]
gtk/Makefile.am [new file with mode: 0644]
gtk/NEWS [new file with mode: 0644]
gtk/README [new file with mode: 0644]
gtk/TODO.tasks [new file with mode: 0644]
gtk/autogen.sh [new file with mode: 0755]
gtk/configure.ac [new file with mode: 0644]
gtk/ghb.anjuta [new file with mode: 0644]
gtk/ghb.spec [new file with mode: 0644]
gtk/po/.cvsignore [new file with mode: 0644]
gtk/po/ChangeLog [new file with mode: 0644]
gtk/po/LINGUAS [new file with mode: 0644]
gtk/po/POTFILES.in [new file with mode: 0644]
gtk/src/.cvsignore [new file with mode: 0644]
gtk/src/Makefile.am [new file with mode: 0644]
gtk/src/appcast.c [new file with mode: 0644]
gtk/src/appcast.h [new file with mode: 0644]
gtk/src/audiohandler.c [new file with mode: 0644]
gtk/src/audiohandler.h [new file with mode: 0644]
gtk/src/callbacks.c [new file with mode: 0644]
gtk/src/callbacks.h [new file with mode: 0644]
gtk/src/create_resources.c [new file with mode: 0644]
gtk/src/ghb-dvd.c [new file with mode: 0644]
gtk/src/ghb-dvd.h [new file with mode: 0644]
gtk/src/ghb.desktop [new file with mode: 0644]
gtk/src/ghb.ui [new file with mode: 0644]
gtk/src/ghbcellrenderertext.c [new file with mode: 0644]
gtk/src/ghbcellrenderertext.h [new file with mode: 0644]
gtk/src/hb-activity.32.png [new file with mode: 0644]
gtk/src/hb-add-queue.32.png [new file with mode: 0644]
gtk/src/hb-backend.c [new file with mode: 0644]
gtk/src/hb-backend.h [new file with mode: 0644]
gtk/src/hb-canceled.16.png [new file with mode: 0644]
gtk/src/hb-complete.16.png [new file with mode: 0644]
gtk/src/hb-drawer.32.png [new file with mode: 0644]
gtk/src/hb-edit.32.png [new file with mode: 0644]
gtk/src/hb-icon.128.png [new file with mode: 0644]
gtk/src/hb-icon.64.png [new file with mode: 0644]
gtk/src/hb-pause.32.png [new file with mode: 0644]
gtk/src/hb-play.32.png [new file with mode: 0644]
gtk/src/hb-pref.32.png [new file with mode: 0644]
gtk/src/hb-queue-delete.16.png [new file with mode: 0644]
gtk/src/hb-queue-job.16.png [new file with mode: 0644]
gtk/src/hb-queue-pass1.16.png [new file with mode: 0644]
gtk/src/hb-queue-pass2.16.png [new file with mode: 0644]
gtk/src/hb-queue-subtitle.16.png [new file with mode: 0644]
gtk/src/hb-queue.32.png [new file with mode: 0644]
gtk/src/hb-remove.32.png [new file with mode: 0644]
gtk/src/hb-source.32.png [new file with mode: 0644]
gtk/src/hb-stop.32.png [new file with mode: 0644]
gtk/src/hb-working0.16.png [new file with mode: 0644]
gtk/src/hb-working1.16.png [new file with mode: 0644]
gtk/src/hb-working2.16.png [new file with mode: 0644]
gtk/src/hb-working3.16.png [new file with mode: 0644]
gtk/src/hb-working4.16.png [new file with mode: 0644]
gtk/src/hb-working5.16.png [new file with mode: 0644]
gtk/src/icon_tools.c [new file with mode: 0644]
gtk/src/icon_tools.h [new file with mode: 0644]
gtk/src/icons.c [new file with mode: 0644]
gtk/src/icons.h [new file with mode: 0644]
gtk/src/ini_to_plist.c [new file with mode: 0644]
gtk/src/internal_defaults.xml [new file with mode: 0644]
gtk/src/main.c [new file with mode: 0644]
gtk/src/makedeps.c [new file with mode: 0644]
gtk/src/marshalers.c [new file with mode: 0644]
gtk/src/marshalers.h [new file with mode: 0644]
gtk/src/marshalers.list [new file with mode: 0644]
gtk/src/plist.c [new file with mode: 0644]
gtk/src/plist.h [new file with mode: 0644]
gtk/src/preset_xlat.c [new file with mode: 0644]
gtk/src/presets.c [new file with mode: 0644]
gtk/src/presets.h [new file with mode: 0644]
gtk/src/queuehandler.c [new file with mode: 0644]
gtk/src/queuehandler.h [new file with mode: 0644]
gtk/src/quotestring.c [new file with mode: 0644]
gtk/src/renderer_button.c [new file with mode: 0644]
gtk/src/renderer_button.h [new file with mode: 0644]
gtk/src/resource_data.h [new file with mode: 0644]
gtk/src/resources.c [new file with mode: 0644]
gtk/src/resources.h [new file with mode: 0644]
gtk/src/resources.list [new file with mode: 0644]
gtk/src/resources.plist [new file with mode: 0644]
gtk/src/settings.c [new file with mode: 0644]
gtk/src/settings.h [new file with mode: 0644]
gtk/src/standard_presets.xml [new file with mode: 0644]
gtk/src/values.c [new file with mode: 0644]
gtk/src/values.h [new file with mode: 0644]
gtk/src/widget_deps [new file with mode: 0644]
gtk/src/widget_reverse_deps [new file with mode: 0644]
gtk/src/x264handler.c [new file with mode: 0644]
gtk/src/x264handler.h [new file with mode: 0644]
gtk/todo [new file with mode: 0644]
jam [new file with mode: 0755]
libhb/Jamfile [new file with mode: 0644]
libhb/Makefile [new file with mode: 0644]
libhb/common.c [new file with mode: 0644]
libhb/common.h [new file with mode: 0644]
libhb/deblock.c [new file with mode: 0644]
libhb/deca52.c [new file with mode: 0644]
libhb/decavcodec.c [new file with mode: 0644]
libhb/decdca.c [new file with mode: 0644]
libhb/declpcm.c [new file with mode: 0644]
libhb/decmpeg2.c [new file with mode: 0644]
libhb/decomb.c [new file with mode: 0644]
libhb/decsub.c [new file with mode: 0644]
libhb/deinterlace.c [new file with mode: 0644]
libhb/demuxmpeg.c [new file with mode: 0644]
libhb/denoise.c [new file with mode: 0644]
libhb/detelecine.c [new file with mode: 0644]
libhb/dvd.c [new file with mode: 0644]
libhb/encavcodec.c [new file with mode: 0644]
libhb/encfaac.c [new file with mode: 0644]
libhb/enclame.c [new file with mode: 0644]
libhb/enctheora.c [new file with mode: 0644]
libhb/encvorbis.c [new file with mode: 0644]
libhb/encx264.c [new file with mode: 0644]
libhb/encxvid.c [new file with mode: 0644]
libhb/fifo.c [new file with mode: 0644]
libhb/hb.c [new file with mode: 0644]
libhb/hb.h [new file with mode: 0644]
libhb/internal.h [new file with mode: 0644]
libhb/ipodutil.cpp [new file with mode: 0644]
libhb/lang.c [new file with mode: 0644]
libhb/lang.h [new file with mode: 0644]
libhb/muxavi.c [new file with mode: 0644]
libhb/muxcommon.c [new file with mode: 0644]
libhb/muxmkv.c [new file with mode: 0644]
libhb/muxmp4.c [new file with mode: 0644]
libhb/muxogm.c [new file with mode: 0644]
libhb/ports.c [new file with mode: 0644]
libhb/ports.h [new file with mode: 0644]
libhb/reader.c [new file with mode: 0644]
libhb/render.c [new file with mode: 0644]
libhb/scan.c [new file with mode: 0644]
libhb/stream.c [new file with mode: 0755]
libhb/sync.c [new file with mode: 0644]
libhb/update.c [new file with mode: 0644]
libhb/work.c [new file with mode: 0644]
macosx/ChapterTitles.h [new file with mode: 0644]
macosx/ChapterTitles.m [new file with mode: 0644]
macosx/Controller.h [new file with mode: 0644]
macosx/Controller.mm [new file with mode: 0644]
macosx/English.lproj/AdvancedView.xib [new file with mode: 0644]
macosx/English.lproj/InfoPlist.strings [new file with mode: 0644]
macosx/English.lproj/MainMenu.xib [new file with mode: 0644]
macosx/English.lproj/OutputPanel.xib [new file with mode: 0644]
macosx/English.lproj/PictureSettings.xib [new file with mode: 0644]
macosx/English.lproj/Preferences.xib [new file with mode: 0644]
macosx/English.lproj/Queue.xib [new file with mode: 0644]
macosx/Growl.framework/Growl [new symlink]
macosx/Growl.framework/Headers [new symlink]
macosx/Growl.framework/Resources [new symlink]
macosx/Growl.framework/Versions/A/Growl [new file with mode: 0755]
macosx/Growl.framework/Versions/A/Headers/Growl.h [new file with mode: 0644]
macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h [new file with mode: 0644]
macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h [new file with mode: 0644]
macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h [new file with mode: 0644]
macosx/Growl.framework/Versions/A/Resources/Info.plist [new file with mode: 0644]
macosx/Growl.framework/Versions/Current [new symlink]
macosx/HBAdvancedController.h [new file with mode: 0644]
macosx/HBAdvancedController.m [new file with mode: 0644]
macosx/HBCore.h [new file with mode: 0644]
macosx/HBCore.m [new file with mode: 0644]
macosx/HBDVDDetector.h [new file with mode: 0644]
macosx/HBDVDDetector.m [new file with mode: 0644]
macosx/HBImageAndTextCell.h [new file with mode: 0644]
macosx/HBImageAndTextCell.m [new file with mode: 0644]
macosx/HBOutputPanelController.h [new file with mode: 0644]
macosx/HBOutputPanelController.m [new file with mode: 0644]
macosx/HBOutputRedirect.h [new file with mode: 0644]
macosx/HBOutputRedirect.m [new file with mode: 0644]
macosx/HBPreferencesController.h [new file with mode: 0644]
macosx/HBPreferencesController.m [new file with mode: 0644]
macosx/HBPresets.h [new file with mode: 0644]
macosx/HBPresets.m [new file with mode: 0644]
macosx/HBQueueController.h [new file with mode: 0644]
macosx/HBQueueController.mm [new file with mode: 0644]
macosx/HandBrake.icns [new file with mode: 0644]
macosx/HandBrake.plist [new file with mode: 0644]
macosx/HandBrake.xcodeproj/project.pbxproj [new file with mode: 0644]
macosx/InstantHandBrake/Device.h [new file with mode: 0644]
macosx/InstantHandBrake/Device.m [new file with mode: 0644]
macosx/InstantHandBrake/DeviceController.h [new file with mode: 0644]
macosx/InstantHandBrake/DeviceController.m [new file with mode: 0644]
macosx/InstantHandBrake/Devices/AppleTV.ihbdevice [new file with mode: 0644]
macosx/InstantHandBrake/Devices/PSP.ihbdevice [new file with mode: 0644]
macosx/InstantHandBrake/Devices/iPod.ihbdevice [new file with mode: 0644]
macosx/InstantHandBrake/DriveDetector.h [new file with mode: 0644]
macosx/InstantHandBrake/DriveDetector.m [new file with mode: 0644]
macosx/InstantHandBrake/English.lproj/Express.xib [new file with mode: 0644]
macosx/InstantHandBrake/English.lproj/InfoPlist.strings [new file with mode: 0644]
macosx/InstantHandBrake/Express.plist [new file with mode: 0644]
macosx/InstantHandBrake/ExpressController.h [new file with mode: 0644]
macosx/InstantHandBrake/ExpressController.m [new file with mode: 0644]
macosx/InstantHandBrake/HBCore.h [new file with mode: 0644]
macosx/InstantHandBrake/HBCore.m [new file with mode: 0644]
macosx/InstantHandBrake/InstantHandBrake.xcodeproj/project.pbxproj [new file with mode: 0644]
macosx/InstantHandBrake/Open.tiff [new file with mode: 0644]
macosx/InstantHandBrake/Preset.h [new file with mode: 0644]
macosx/InstantHandBrake/Preset.m [new file with mode: 0644]
macosx/InstantHandBrake/WhiteBox.h [new file with mode: 0644]
macosx/InstantHandBrake/WhiteBox.m [new file with mode: 0644]
macosx/InstantHandBrake/libhb.xcodeproj/project.pbxproj [new file with mode: 0644]
macosx/InstantHandBrake/main.mm [new file with mode: 0644]
macosx/PictureController.h [new file with mode: 0644]
macosx/PictureController.mm [new file with mode: 0644]
macosx/Sparkle.framework/Headers [new symlink]
macosx/Sparkle.framework/Resources [new symlink]
macosx/Sparkle.framework/Sparkle [new symlink]
macosx/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/NSString+extras.h [new file with mode: 0755]
macosx/Sparkle.framework/Versions/A/Headers/RSS.h [new file with mode: 0755]
macosx/Sparkle.framework/Versions/A/Headers/SUAppcast.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/SUConstants.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/SUStatusController.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/SUUpdater.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/SUUtilities.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Headers/Sparkle.h [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/Info.plist [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings [new file with mode: 0644]
macosx/Sparkle.framework/Versions/A/Sparkle [new file with mode: 0755]
macosx/Sparkle.framework/Versions/Current [new symlink]
macosx/genstrings.sh [new file with mode: 0755]
macosx/i18n/Localizable.strings [new file with mode: 0644]
macosx/i18n/de.strings [new file with mode: 0644]
macosx/i18n/es.strings [new file with mode: 0644]
macosx/i18n/fr.strings [new file with mode: 0644]
macosx/i18n/it.strings [new file with mode: 0644]
macosx/i18n/ja.strings [new file with mode: 0644]
macosx/i18n/nl.strings [new file with mode: 0644]
macosx/i18n/pl.strings [new file with mode: 0644]
macosx/i18n/pt.strings [new file with mode: 0644]
macosx/i18n/ru.strings [new file with mode: 0644]
macosx/icons/ActivityWindow.tiff [new file with mode: 0644]
macosx/icons/AddToQueue.tiff [new file with mode: 0644]
macosx/icons/Brushed Window.tiff [new file with mode: 0644]
macosx/icons/Delete.png [new file with mode: 0644]
macosx/icons/DeleteHighlight.png [new file with mode: 0644]
macosx/icons/DeleteHighlightPressed.png [new file with mode: 0644]
macosx/icons/DeletePressed.png [new file with mode: 0644]
macosx/icons/Drawer.tiff [new file with mode: 0644]
macosx/icons/EncodeCanceled.png [new file with mode: 0644]
macosx/icons/EncodeComplete.png [new file with mode: 0644]
macosx/icons/EncodeWorking0.png [new file with mode: 0644]
macosx/icons/EncodeWorking1.png [new file with mode: 0644]
macosx/icons/EncodeWorking2.png [new file with mode: 0644]
macosx/icons/EncodeWorking3.png [new file with mode: 0644]
macosx/icons/EncodeWorking4.png [new file with mode: 0644]
macosx/icons/EncodeWorking5.png [new file with mode: 0644]
macosx/icons/Info.png [new file with mode: 0644]
macosx/icons/JobLarge.png [new file with mode: 0644]
macosx/icons/JobPassFirstSmall.png [new file with mode: 0644]
macosx/icons/JobPassLarge.png [new file with mode: 0644]
macosx/icons/JobPassSecondSmall.png [new file with mode: 0644]
macosx/icons/JobPassSmall.png [new file with mode: 0644]
macosx/icons/JobPassSubtitleSmall.png [new file with mode: 0644]
macosx/icons/JobPassUnknownSmall.png [new file with mode: 0644]
macosx/icons/JobSmall.png [new file with mode: 0644]
macosx/icons/Pause.tiff [new file with mode: 0644]
macosx/icons/Play.tiff [new file with mode: 0644]
macosx/icons/Queue.tiff [new file with mode: 0644]
macosx/icons/Reveal.png [new file with mode: 0644]
macosx/icons/RevealHighlight.png [new file with mode: 0644]
macosx/icons/RevealHighlightPressed.png [new file with mode: 0644]
macosx/icons/RevealPressed.png [new file with mode: 0644]
macosx/icons/Source.tiff [new file with mode: 0644]
macosx/icons/Stop.tiff [new file with mode: 0644]
macosx/icons/pref-audio.tiff [new file with mode: 0644]
macosx/icons/pref-picture.tiff [new file with mode: 0644]
macosx/main.mm [new file with mode: 0644]
qt4/encodewidget.cpp [new file with mode: 0644]
qt4/encodewidget.h [new file with mode: 0644]
qt4/encodewidget.ui [new file with mode: 0644]
qt4/faderwidget.cpp [new file with mode: 0644]
qt4/faderwidget.h [new file with mode: 0644]
qt4/main.cpp [new file with mode: 0644]
qt4/qhandbrake.cpp [new file with mode: 0644]
qt4/qhandbrake.h [new file with mode: 0644]
qt4/qhandbrakewizard.cpp [new file with mode: 0644]
qt4/qhandbrakewizard.h [new file with mode: 0644]
qt4/qtHB.pro [new file with mode: 0644]
qt4/scanwidget.cpp [new file with mode: 0644]
qt4/scanwidget.h [new file with mode: 0644]
qt4/scanwidget.ui [new file with mode: 0644]
scripts/manicure.rb [new file with mode: 0755]
scripts/tst.aspect [new file with mode: 0755]
test/BUILDSHARED [new file with mode: 0644]
test/Makefile [new file with mode: 0644]
test/fakexcode.cpp [new file with mode: 0644]
test/parsecsv.c [new file with mode: 0644]
test/parsecsv.h [new file with mode: 0644]
test/test.c [new file with mode: 0644]
win/C#/Functions/AppcastReader.cs [new file with mode: 0644]
win/C#/Functions/Encode.cs [new file with mode: 0644]
win/C#/Functions/Main.cs [new file with mode: 0644]
win/C#/Functions/QueryParser.cs [new file with mode: 0644]
win/C#/Functions/Queue.cs [new file with mode: 0644]
win/C#/Functions/SystemInfo.cs [new file with mode: 0644]
win/C#/HandBrakeCS.csproj [new file with mode: 0644]
win/C#/HandBrakeCS.sln [new file with mode: 0644]
win/C#/Installer/Installer.nsi [new file with mode: 0644]
win/C#/Parsing/AudioTrack.cs [new file with mode: 0644]
win/C#/Parsing/Chapter.cs [new file with mode: 0644]
win/C#/Parsing/DVD.cs [new file with mode: 0644]
win/C#/Parsing/Parser.cs [new file with mode: 0644]
win/C#/Parsing/Subtitle.cs [new file with mode: 0644]
win/C#/Parsing/Title.cs [new file with mode: 0644]
win/C#/Presets/PresetsHandler.cs [new file with mode: 0644]
win/C#/Presets/preset.cs [new file with mode: 0644]
win/C#/Program.cs [new file with mode: 0644]
win/C#/Properties/AssemblyInfo.cs [new file with mode: 0644]
win/C#/Properties/Resources.Designer.cs [new file with mode: 0644]
win/C#/Properties/Resources.resx [new file with mode: 0644]
win/C#/Properties/Settings.Designer.cs [new file with mode: 0644]
win/C#/Properties/Settings.settings [new file with mode: 0644]
win/C#/Resources/ActivityWindow.png [new file with mode: 0644]
win/C#/Resources/ActivityWindow_small.png [new file with mode: 0644]
win/C#/Resources/AddToQueue.png [new file with mode: 0644]
win/C#/Resources/General Preferences.png [new file with mode: 0644]
win/C#/Resources/Help16.png [new file with mode: 0644]
win/C#/Resources/Movies.png [new file with mode: 0644]
win/C#/Resources/Movies_Small.png [new file with mode: 0644]
win/C#/Resources/Output_Small.png [new file with mode: 0644]
win/C#/Resources/Pause.png [new file with mode: 0644]
win/C#/Resources/Play.png [new file with mode: 0644]
win/C#/Resources/Pref_Small.png [new file with mode: 0644]
win/C#/Resources/Queue.png [new file with mode: 0644]
win/C#/Resources/Queue_Small.png [new file with mode: 0644]
win/C#/Resources/SplashScreen.jpg [new file with mode: 0644]
win/C#/Resources/copy.png [new file with mode: 0644]
win/C#/Resources/disc_small.png [new file with mode: 0644]
win/C#/Resources/folder.png [new file with mode: 0644]
win/C#/Resources/hb16.png [new file with mode: 0644]
win/C#/Resources/hb32.png [new file with mode: 0644]
win/C#/Resources/info16.png [new file with mode: 0644]
win/C#/Resources/logo128.png [new file with mode: 0644]
win/C#/Resources/logo64.png [new file with mode: 0644]
win/C#/Resources/save.png [new file with mode: 0644]
win/C#/Resources/stop.png [new file with mode: 0644]
win/C#/app.config [new file with mode: 0644]
win/C#/frmAbout.Designer.cs [new file with mode: 0644]
win/C#/frmAbout.cs [new file with mode: 0644]
win/C#/frmAbout.resx [new file with mode: 0644]
win/C#/frmActivityWindow.Designer.cs [new file with mode: 0644]
win/C#/frmActivityWindow.cs [new file with mode: 0644]
win/C#/frmActivityWindow.resx [new file with mode: 0644]
win/C#/frmAddPreset.Designer.cs [new file with mode: 0644]
win/C#/frmAddPreset.cs [new file with mode: 0644]
win/C#/frmAddPreset.resx [new file with mode: 0644]
win/C#/frmDownload.Designer.cs [new file with mode: 0644]
win/C#/frmDownload.cs [new file with mode: 0644]
win/C#/frmDownload.resx [new file with mode: 0644]
win/C#/frmMain.Designer.cs [new file with mode: 0644]
win/C#/frmMain.cs [new file with mode: 0644]
win/C#/frmMain.resx [new file with mode: 0644]
win/C#/frmMain/PresetLoader.cs [new file with mode: 0644]
win/C#/frmMain/QueryGenerator.cs [new file with mode: 0644]
win/C#/frmMain/x264Panel.cs [new file with mode: 0644]
win/C#/frmOptions.Designer.cs [new file with mode: 0644]
win/C#/frmOptions.cs [new file with mode: 0644]
win/C#/frmOptions.resx [new file with mode: 0644]
win/C#/frmQueue.Designer.cs [new file with mode: 0644]
win/C#/frmQueue.cs [new file with mode: 0644]
win/C#/frmQueue.resx [new file with mode: 0644]
win/C#/frmReadDVD.Designer.cs [new file with mode: 0644]
win/C#/frmReadDVD.cs [new file with mode: 0644]
win/C#/frmReadDVD.resx [new file with mode: 0644]
win/C#/frmSplashScreen.Designer.cs [new file with mode: 0644]
win/C#/frmSplashScreen.cs [new file with mode: 0644]
win/C#/frmSplashScreen.resx [new file with mode: 0644]
win/C#/frmUpdater.Designer.cs [new file with mode: 0644]
win/C#/frmUpdater.cs [new file with mode: 0644]
win/C#/frmUpdater.resx [new file with mode: 0644]
win/C#/handbrakepineapple.ico [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..3352092
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,98 @@
+AUTHORS file for HandBrake <http://handbrake.fr/>
+
+Eric Petit <titer@m0k.org>
+ + Core (construct, multithreading, BeOS/OS X/Linux ports)
+ + MPEG demuxer
+ + MPEG-2, AC3 and MPGA decoders (w/ libmpeg2/liba52/libavcodec)
+ + LPCM "decoder"
+ + MPEG-4, MP3 and AAC encoders (w/ libavcodec/libxvidcore/libmp3lame/
+   libfaac)
+ + AC-3 pass-through
+ + AVI muxer
+ + MP4 muxer (w/ libmp4v2)
+ + BeOS interface
+ + OS X interface
+ + French translation
+
+Laurent Aimar <fenrir@via.ecp.fr>
+ + H264 and Vorbis encoders (w/ libx264/libvorbis)
+ + OGG/OGM muxer (w/ libogg)
+ + Gtk2 interface
+ + wxWidgets interface
+
+John Allen (?) <johnallenemail@gmail.com> (johnallen)
+ + Core enhancements
+ + Threading enhancements
+ + Simplified Mac OS X GUI
+
+Joe Crain <joe@dynaflashtech.net> (dynaflash)
+ + Mac OS X GUI enhancements/rewrite
+
+Damiano Galassi <damiog@gmail.com> (ritsuka)
+ + Mac OS X GUI enhancements
+
+Edward Groenendaal <eddyg.hb@myreflection.org> (eddyg)
+ + Major bug fixes
+ + Subtitle scan & Colour
+ + Performance improvements
+
+Rodney Hester <rhester@multics.dynalias.com> (rhester)
+ + iPod firmware 1.2+ 640x480 MPEG-4/H.264 support
+
+Andrew Kimpton <awk@awkward.org> (awk)
+ + MPEG Audio fixes
+ + MPEG Stream Support
+
+Chris Lee <clee@kde.org>
+ + PAR/anamorphic support
+ + dvdread enhancements
+ + Linux GUI
+
+Chris Long <chris.long@mac.com> (chrislong)
+ + iPod firmware 1.2+ 640x480 MPEG-4/H.264 support
+
+Brian Mario <Unknown> (brianmario)
+ + Windows GUI
+
+Maurj <handbrake@maurj.com> (maurj)
+ + Dolby Surround and Dolby Pro Logic II mixdowns
+ + 6-channel AAC audio from 5.1 source
+ + Mono AAC audio from mono source
+ + PAR/anamorphic support in mp4 file format
+ + Chapter markers in mp4 file format
+ + Mac OS X GUI enhancements
+ + Support for DTS audio sources
+
+Mirkwood <mirkwood07@gmail.com> (mirkwood)
+ + Windows CLI port
+
+Nyx <unknown> (Nyx)
+ + Frame re-ordering and flushing in mp4
+
+Philippe Rigaux <pri@nopapers.org> (prigaux)
+ + 3rd party library integration
+ + Mac OS X GUI enhancements
+ + PAR/anamorphic support
+ + Universal binary build process
+ + Conversion from jam to make for compiles
+
+Jonathon Rubin <jb.rubin@gmail.com> (jbrjake)
+ + Massive core enhancements
+ + Significant improvements to H.264 support
+
+Scott <sr55ww@googlemail.com> (sr55)
+ + Windows GUI
+ + Windows CLI port
+
+Chris Thoman <cthoman@gmail.com> (huevos_rancheros)
+ + Ported video filters from libmpcodec
+
+Mark Krenek <markkrenek@mac.com> (travistex)
+ + Mac OS X GUI enhancements
+ + Mac OS X GUI Queueing system
+
+Van Jacobson <vanj.hb@gmail.com> (van)
+ + Auto-typing MPEG stream files
+ + Minor bug fixing in MPEG stream support
+ + Minor dvd reader fixes
+ + Chapter mark bug fixes
diff --git a/BUILD b/BUILD
new file mode 100644 (file)
index 0000000..edd841e
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,85 @@
+$Id: BUILD,v 1.11 2005/10/23 01:35:59 titer Exp $
+
+BUILD file for HandBrake <http://handbrake.fr/>
+
+Building HandBrake with make
+=============================
+
+Step 1: get needed tools
+==============
+
++ gcc and g++
+    There are usually included in your OS' dev tools. On BeOS/Zeta, the
+    default gcc isn't enough, gcc 2.95.3 is required.
+
++ nasm (Only for x86. On Mac OS X Intel, Xcode 2.4.1 include it)
+
+Cygwin:
+       See Trac > Windows Compile Guide
+
+Step 2: configuration
+==============
+
+The HB_BUILD and HB_VERSION are defined in a single file, the Makefile correct the values in Xcode too.
+
+The file where the informations are stored is Makefile.config
+
+Step 3: build
+==============
+
+Run `make'. This will build libhb, Handbrake and HandBrakeCLI as Universal Binary.
+This build method use precompiled contrib libraries. Script to build those binaries are provided too.
+All the build is handled by Xcode 2.4.1, should work on powerPC and Intel Macs.
+
+# To build under Cygwin simply use the command:
+make HandbrakeCLI
+
+This will download pre-compiled libaries and build the handbrake source.
+
+-----------------------------------------------------------------------------------------------------
+
+Building HandBrake with jam
+=============================
+
+You can build HandBrake on BeOS, MacOS X, Linux, and on Windows using Cygwin.
+If you'd like to port it to another OS, email me (titer@m0k.org).
+
+Step 1: get needed tools
+==============
+
++ gcc and g++
+    There are usually included in your OS' dev tools. On BeOS/Zeta, the
+    default gcc isn't enough, gcc 2.95.3 is required.
+
++ jam
+    I use 2.5rc3, earlier versions might cause issues.
+    On BeOS, you can download it at <http://www.haiku-os.org/develop.php>.
+    On OS X, you cannot use the modified jam shipped with the developer
+    tools, use the one included in the Handbrake svn checkout instead.
+    On Cygwin, get the jam source from
+    http://public.perforce.com/public/jam/index.html,
+    compile it with gcc in Cygwin, and put the jam executable somewhere on
+    your path.
+
++ nasm (Only for x86. On Mac OS X Intel, Xcode 2.4.1 include it)
+
++ libtool, autoconf, automake
+    To build libdca (the DTS audio extraction library) on Mac OS X via jam, you'll
+    need to update the default Mac OS X versions of libtool, autoconf and automake.
+    Compilation has been seen to work with libtool and libtool-shlibs v1.5.22-1000,
+    autoconf v2.60-4, and automake v1.9.6-3.  You can update these tools using Fink.
+    Download the Fink 0.8.1 Binary Installer for your platform (PowerPC or Intel)
+    from http://www.finkproject.org/download/index.php?phpLang=en and install Fink
+    using the installer.  If you want to use a GUI to run Fink, you can install
+    FinkCommander.  Download the FinkCommander 0.5.4 installer from
+    http://finkcommander.sourceforge.net/ and install from the disk image.  You can
+    install libtool, libtool-shlibs, autoconf and automake using FinkCommander.
+
+Cygwin:
+       See Trac > Windows Compile Guide
+
+Step 2: build
+==============
+
+Run `./configure && jam'. This will build every library HandBrake
+requires, then HandBrake itself.
diff --git a/BuildContribsDarwin.sh b/BuildContribsDarwin.sh
new file mode 100755 (executable)
index 0000000..736d7cd
--- /dev/null
@@ -0,0 +1,72 @@
+#!/bin/sh
+# This script build the contrib libs
+# This used on MaxOs X to generate a universal version of the contrib libraries
+# The new building process for HandBrake is to download a precompiled universal contrib folder
+# and use them to build universal binaries of HandBrake
+# pri: 01/28/07
+# ########################################################################
+# Parameters:
+# Package Version  (Version must be incremented to ensure that each of trunk/branches use the correct version)
+# IP of the other platform host
+# Username to connect with (passwordless must be setup between the 2 machines)
+# 
+# ie:  ./BuildContribsDarwin.sh 0001 192.168.0.150 toto
+#
+# #########################################################################
+# The script will connect to the other computer, download and build all of the contrib libraries
+# and in the same time download and compile the contrib libraries on the native system
+# My setup to do that is Mac Pro Intel as native and a Mac mini G4 ppc as foreign
+#
+# Native is the master computer, it sends compile commands to the foreign, get the library, then do a lipo 
+# to assemble both versions and put a universal binary version of the library in contrib/lib folder
+#
+# Once all of the contrib libraries are builded, a contribbin-darwin-${version}.tar.gz file is created, this file must
+# be uploaded to the ftp server so Xcode will be able to build universal binaries of the HandBrake, HandBrakeCLI and libhb
+#
+# ##########################################################################
+# SSH passwordless setup instructions
+# 1) log on native using terminal
+# 2) ssh-keygen -t rsa
+# 3) leave passphrase empty (hit return)
+# 4) copy the $HOME/.ssh/id_rsa.pub to foreign machine $HOME/.ssh/authorized_keys
+# ##########################################################################
+export VERSION=$1
+export IP=$2
+export USERNAME=$3
+export REPOS=svn://svn.handbrake.fr/HandBrake/trunk
+# ##########################################################################
+# Launch the build on the foreign system
+# ##########################################################################
+ssh $USERNAME@$IP "rm -rf HBBUILDTMP ; mkdir HBBUILDTMP ; svn co $REPOS HBBUILDTMP ; cd HBBUILDTMP ; ./configure ; cd contrib ; cp ../config.jam . ; ../jam ; touch BUILDTERMINATED" &
+./configure
+cd contrib
+rm -rf lib include *tar.gz bin share man native foreign
+cp ../config.jam .
+# Use the new UB jam to be shure to use the correct version to build libraries (native on each system)
+../jam
+mkdir native
+mv lib native
+mkdir lib
+mkdir foreign
+# wait until the foreign build is done :)
+wait
+echo the foreign build is done, transferring files to native computer:
+cd foreign
+mkdir lib
+cd lib
+scp $USERNAME@$IP:/Users/$USERNAME/HBBUILDTMP/contrib/lib/*a .
+for lib in `ls *.a`
+do     
+       echo ... lipo contrib libraries: $lib
+       lipo -create $lib ../../native/lib/$lib -output ../../lib/$lib
+done;
+
+cd ../..
+echo $VERSION > DarwinContribVersion.txt
+echo Creating contribbin-darwin-$VERSION.tar.gz
+tar zcvf contribbin-darwin-$VERSION.tar.gz lib include  DarwinContribVersion.txt
+echo Done....
+ls -l contribbin-darwin-$VERSION.tar.gz
+cd ..
+echo $VERSION > MacOsXContribBinariesVersion.txt
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..d60c31a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/CREDITS b/CREDITS
new file mode 100644 (file)
index 0000000..52fbad5
--- /dev/null
+++ b/CREDITS
@@ -0,0 +1,160 @@
+CREDITS file for HandBrake <http://handbrake.fr/>
+
+HandBrake uses many cool libraries from the GNU/Linux world.
+Thank their authors!
+
+liba52 authors:
+  Aaron Holtzman
+  Michel Lespinasse
+  Gildas Bazin
+  Billy Biggs
+  Eduard Hasenleithner
+  HÃ¥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çois Revol
+  Dieter Shirley
+  Juan J. Sierralta
+  Lionel Ulmer
+
+libdts authors:
+  Gildas Bazin
+  Sam Hocevar
+
+libdvdcss authors:
+  Billy Biggs
+  Stéphane Borel
+  HÃ¥kan Hjort
+  Samuel Hocevar
+  Eugenio Jarosiewicz
+  Jon Lech Johansen
+  Markus Kuespert
+  Pascal Levesque
+  Steven M. Schultz
+  David Siebörger
+  Alex Strelnikov
+  German Tischler
+  Gildas Bazin
+
+libdvdread authors:
+  Björn Englund
+  HÃ¥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á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
+  sergent@io.com
+  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Ã¥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
diff --git a/DownloadMacOsXContribBinaries.sh b/DownloadMacOsXContribBinaries.sh
new file mode 100755 (executable)
index 0000000..29e2828
--- /dev/null
@@ -0,0 +1,34 @@
+#! /bin/sh
+
+# Incremented every time a new contrib package is available
+VERSION=`cat MacOsXContribBinariesVersion.txt`
+
+if [ -f contrib/DarwinContribVersion.txt ]; then
+  if [ "`cat contrib/DarwinContribVersion.txt`" = $VERSION ]; then
+    echo "Contribs are up to date."
+    exit 0
+  fi
+fi
+
+HOST=download.m0k.org
+#HOST=download.mediafork.dynalias.com
+#HOST=sr55.ashosted.com
+FILE=contribbin-darwin-$VERSION.tar.gz
+#URL=http://$HOST/contrib/$FILE
+URL=http://$HOST/handbrake/contrib/$FILE
+# Check for internet connectivity
+if ! host $HOST > /dev/null 2>&1; then
+  echo "Please connect to the Internet (could not resolve $HOST)."
+  exit 1
+fi
+
+# Look for something that can handle an HTTP download
+  WGET="curl -L -O"
+
+# Get and install the package
+echo "Getting contribs ($VERSION)..."
+( cd contrib && rm -f $FILE && $WGET $URL && rm -Rf lib include && \
+  tar xzf $FILE && ranlib lib/*.a ) || exit 1
+
+exit 0
+
diff --git a/Doxyfile b/Doxyfile
new file mode 100644 (file)
index 0000000..56ff5a8
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,275 @@
+# Doxyfile 1.5.1
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = libhb
+PROJECT_NUMBER         = 
+OUTPUT_DIRECTORY       = ./documentation
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+USE_WINDOWS_ENCODING   = NO
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = YES
+STRIP_FROM_PATH        = /Applications/
+STRIP_FROM_INC_PATH    = 
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = YES
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+SEPARATE_MEMBER_PAGES  = NO
+TAB_SIZE               = 8
+ALIASES                = 
+OPTIMIZE_OUTPUT_FOR_C  = YES
+OPTIMIZE_OUTPUT_JAVA   = NO
+BUILTIN_STL_SUPPORT    = NO
+DISTRIBUTE_GROUP_DOC   = NO
+SUBGROUPING            = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = YES
+EXTRACT_STATIC         = YES
+EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_METHODS  = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = NO
+CASE_SENSE_NAMES       = NO
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+SHOW_DIRECTORIES       = NO
+FILE_VERSION_FILTER    = 
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = ./libhb
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.d \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.mm \
+                         *.dox \
+                         *.py \
+                         *.C \
+                         *.CC \
+                         *.C++ \
+                         *.II \
+                         *.I++ \
+                         *.H \
+                         *.HH \
+                         *.H++ \
+                         *.CS \
+                         *.PHP \
+                         *.PHP3 \
+                         *.M \
+                         *.MM \
+                         *.PY
+RECURSIVE              = NO
+EXCLUDE                = 
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = 
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = *
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = 
+INPUT_FILTER           = 
+FILTER_PATTERNS        = 
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = YES
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION    = YES
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS              = NO
+VERBATIM_HEADERS       = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = NO
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            = 
+HTML_STYLESHEET        = 
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = NO
+CHM_FILE               = 
+HHC_LOCATION           = 
+GENERATE_CHI           = NO
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = YES
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = NO
+USE_PDFLATEX           = NO
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_OUTPUT             = xml
+XML_SCHEMA             = 
+XML_DTD                = 
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = NO
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = 
+PREDEFINED             = 
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = 
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = NO
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = YES
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+GROUP_GRAPHS           = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = NO
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+CALLER_GRAPH           = NO
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = /Applications/Doxygen.app/Contents/Resources/
+DOTFILE_DIRS           = 
+MAX_DOT_GRAPH_WIDTH    = 1024
+MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 1000
+DOT_TRANSPARENT        = NO
+DOT_MULTI_TARGETS      = NO
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+SEARCHENGINE           = NO
diff --git a/Jamfile b/Jamfile
new file mode 100644 (file)
index 0000000..ac3e794
--- /dev/null
+++ b/Jamfile
@@ -0,0 +1,98 @@
+# $Id: Jamfile,v 1.86 2005/11/04 13:09:40 titer Exp $
+#
+# This file is part of the HandBrake source code.
+# Homepage: <http://handbrake.fr/>.
+# It may be used under the terms of the GNU General Public License.
+
+SubDir TOP ;
+
+# libhb + contrib libraries
+HANDBRAKE_LIBS = libhb.a
+          contrib/lib/liba52.a        contrib/lib/libavformat.a
+          contrib/lib/libavcodec.a    contrib/lib/libavutil.a
+          contrib/lib/libdca.a        contrib/lib/libdvdread.a
+          contrib/lib/libmp4v2.a      contrib/lib/libfaac.a
+          contrib/lib/libmp3lame.a    contrib/lib/libmpeg2.a
+          contrib/lib/libvorbis.a     contrib/lib/libvorbisenc.a
+          contrib/lib/libogg.a        contrib/lib/libsamplerate.a
+          contrib/lib/libx264.a       contrib/lib/libxvidcore.a
+          contrib/lib/libmkv.a        contrib/lib/libswscale.a
+          contrib/lib/libtheora.a     contrib/lib/libfaad.a ;
+
+if $(OS) = UNKNOWN
+{
+    OS = CYGWIN ;
+}
+
+if $(OS) = CYGWIN
+{
+    HANDBRAKE_LIBS = $(HANDBRAKE_LIBS) contrib/lib/libbz2.a contrib/lib/libz.a ;
+}
+
+if $(CSS) = 1
+{
+    HANDBRAKE_LIBS = $(HANDBRAKE_LIBS) contrib/lib/libdvdcss.a ;
+}
+
+# Interfaces
+CLI_BIN = HandBrakeCLI ;
+CLI_SRC = test/test.c 
+          test/parsecsv.c ;
+BEOS_BIN = HandBrake ;
+BEOS_SRC = beos/HBApp.cpp beos/MainWindow.cpp beos/ScanWindow.cpp
+           beos/PicWindow.cpp beos/Stepper.cpp beos/QueueWindow.cpp ;
+WX_BIN   = wxHB ;
+WX_SRC   = wx/hbWizard.cpp wx/wxHB.cpp ;
+UI_BIN   = $(CLI_BIN) $(BEOS_BIN) $(WX_BIN) ;
+UI_SRC   = $(CLI_SRC) $(BEOS_SRC) $(WX_SRC) ;
+
+# CLI app
+# Don't build the CLI from here if MACOSX, let xcode build it :)
+if $(OS) != MACOSX
+{
+       Main $(CLI_BIN) : $(CLI_SRC) ;
+}
+
+if $(OS) = BEOS
+{
+    Main HandBrake : $(BEOS_SRC) ;
+
+    BeOSPackage HandBrake-$(HB_VERSION)-BeOS.zip : HandBrake ;
+    HB_PACKAGES += HandBrake-$(HB_VERSION)-BeOS.zip ;
+}
+if $(OS) = MACOSX
+{
+    OSX_SRC = macosx/main.mm macosx/Controller.h macosx/Controller.mm
+              macosx/PictureController.h macosx/PictureController.mm
+              macosx/HBQueueController.h macosx/HBQueueController.mm
+              macosx/HBAdvancedController.h macosx/HBAdvancedController.m
+              macosx/HBImageAndTextCell.h macosx/HBImageAndTextCell.m
+              macosx/HBPreferencesController.h macosx/HBPreferencesController.m
+              macosx/HBPresets.h macosx/HBPresets.m
+              macosx/English.lproj/InfoPlist.strings ;
+              
+    OSXApp HandBrake.app : $(OSX_SRC) $(HANDBRAKE_LIBS) ;
+    
+    # Package
+    OSXPackage HandBrake-$(HB_VERSION)-OSX.zip : HandBrake.app ;
+    HB_PACKAGES += HandBrake-$(HB_VERSION)-OSX.zip ;
+}
+if $(OS) = LINUX
+{
+    # WX UI outdated
+    #SystemLibraries $(WX_BIN) : -lpthread `wx-config --libs` ;
+    #ObjectC++Flags  $(WX_SRC) : `wx-config --cflags` ;
+    #Main            $(WX_BIN) : $(WX_SRC) ;
+}
+
+if $(OS) != MACOSX
+{
+       ObjectHdrs     $(UI_SRC) : $(TOP)/libhb ;
+       LinkLibraries  $(UI_BIN) : $(HANDBRAKE_LIBS) ;
+}
+# Packages
+NotFile package ;
+Depends package : $(HB_PACKAGES) ;
+
+SubInclude TOP contrib ;
+SubInclude TOP libhb ;
diff --git a/Jamrules b/Jamrules
new file mode 100644 (file)
index 0000000..490aa87
--- /dev/null
+++ b/Jamrules
@@ -0,0 +1,101 @@
+# $Id: Jamrules,v 1.59 2005/11/04 16:06:21 titer Exp $
+#
+# This file is part of the HandBrake source code.
+# Homepage: <http://handbrake.fr/>.
+# It may be used under the terms of the GNU General Public License.
+
+include config.jam ;
+
+if ! $(DEFINES)
+{
+    Exit "Please run ./configure first." ;
+}
+
+# This line needs to be manually bumped for each release.
+HB_VERSION  = 0.9.3 ;
+
+# If the user configured with the --snapshot argument,
+# generate  version and build numbers that include
+# the svn revision and are marked as unstable.
+if $(SNAPSHOT) = 1
+{
+HB_VERSION = "svn$(SVN_REV)" ;
+HB_BUILD = "$(BUILD_DATE)01" ;
+APPCAST_URL = "http://handbrake.fr/appcast_unstable.xml" ;
+}
+else
+{
+HB_BUILD = "$(BUILD_DATE)00" ;
+APPCAST_URL = "http://handbrake.fr/appcast.xml" ;
+}
+
+DEFINES    += HB_VERSION=\\\"$(HB_VERSION)\\\" HB_BUILD=$(HB_BUILD) ;
+LANGUAGES   = fr de it pl ru nl es pt ja ;
+RM          = rm -rf ;
+
+# Build HandBrake.app using Xcode --
+# Getting the right version and build numbers
+# requires editing the .plist and specifying
+# extra CFLAGs.
+rule OSXApp
+{
+    Depends     exe   : $(<) ;
+    Depends     $(<)  : $(>) ;
+    Clean       clean : $(1) macosx/build ;
+}
+actions OSXApp
+{
+    $(RM) $(<) macosx/build/HandBrake.app && \
+      ( cd macosx && \
+        xcodebuild HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" APPCAST_URL="$(APPCAST_URL)" -target libhb -target HandBrake -target HandBrakeCLI ) && \
+      for i in $(LANGUAGES) ; do \
+        ( cd $(<)/Contents/Resources && \
+          cp -r English.lproj $i.lproj && \
+          cp ../../../macosx/i18n/$i.strings \
+            $i.lproj/Localizable.strings ) \
+      done ;
+}
+rule OSXPackage 
+{
+    Depends $(<) : $(>) ;
+}   
+actions OSXPackage
+{                 
+    rm -rf $(<) "HandBrake $(HB_VERSION)" && \
+      mkdir "HandBrake $(HB_VERSION)" && \
+      cp AUTHORS "HandBrake $(HB_VERSION)/AUTHORS.txt" && \
+      cp COPYING "HandBrake $(HB_VERSION)/COPYING.txt" && \
+      cp CREDITS "HandBrake $(HB_VERSION)/CREDITS.txt" && \
+      cp THANKS "HandBrake $(HB_VERSION)/THANKS.txt" && \
+      ( echo "[InternetShortcut]" && \
+        echo "URL=http://handbrake.fr/" ) > \
+        "HandBrake $(HB_VERSION)/HandBrake Homepage.url" && \
+      ( echo "[InternetShortcut]" && \
+        echo "URL=http://forum.handbrake,fr/" ) > \
+        "HandBrake $(HB_VERSION)/HandBrake Forums.url" && \
+      ( echo "[InternetShortcut]" && \
+        echo "URL=http://handbrake.fr/?article=development" ) > \
+        "HandBrake $(HB_VERSION)/Contribute.url" && \
+      cp -r HandBrake.app "HandBrake $(HB_VERSION)" && \
+      zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \
+      rm -rf "HandBrake $(HB_VERSION)"
+}
+
+rule BeOSPackage 
+{
+    Depends         $(<) : $(>) ;
+    BuildBeOSPackage $(<) ;
+}   
+actions BuildBeOSPackage
+{                 
+    rm -rf $(<) "HandBrake $(HB_VERSION)" && \
+      mkdir "HandBrake $(HB_VERSION)" && \
+      cp AUTHORS "HandBrake $(HB_VERSION)/AUTHORS.txt" && \
+      cp COPYING "HandBrake $(HB_VERSION)/COPYING.txt" && \
+      cp CREDITS "HandBrake $(HB_VERSION)/CREDITS.txt" && \
+      cp THANKS "HandBrake $(HB_VERSION)/THANKS.txt" && \
+      xres -o HandBrake beos/HandBrake.rsrc && \
+      cp HandBrake "HandBrake $(HB_VERSION)" && \
+      zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \
+      rm -rf "HandBrake $(HB_VERSION)"
+}
diff --git a/MacOsXContribBinariesVersion.txt b/MacOsXContribBinariesVersion.txt
new file mode 100644 (file)
index 0000000..c978718
--- /dev/null
@@ -0,0 +1 @@
+0022
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..10a1a76
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,148 @@
+include Makefile.config
+
+SYSTEM = $(shell uname -s)
+
+# Special case for Mac OS X: everything is handled from the Xcode project
+
+#
+# Darwin
+#
+ifeq ($(SYSTEM),Darwin)
+
+snapshot:   clean unstable-libhb/hbversion.h snapshot-app
+official:   clean force-hbversion app
+
+force-hbversion:
+       rm -f libhb/hbversion.h
+
+all:    clean app
+
+all-chunky:    clean app-chunky
+
+test:  clean cli
+
+dev:   clean internal
+
+ub-app:    libhb/hbversion.h
+       (./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast.xml" build | sed '/^$$/d'  )
+
+app: contrib/.contrib libhb/hbversion.h
+               ( cd macosx ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration Deployment HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" CURRENT_PROJECT_VERSION="$(HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast.xml" build | sed '/^$$/d' )
+
+contrib/.contrib:
+       @$(MAKE) --no-print-directory -C contrib all
+
+snapshot-app: contrib/.contrib libhb/hbversion.h
+       ( cd macosx ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration Deployment HB_BUILD="$(SNAP_HB_BUILD)" HB_VERSION="$(SNAP_HB_VERSION)" CURRENT_PROJECT_VERSION="$(SNAP_HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast_unstable.xml" build | sed '/^$$/d' )
+
+app-chunky: libhb/hbversion.h
+       (./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -alltargets -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast.xml" build | sed '/^$$/d'  )
+
+cli:    libhb/hbversion.h
+       (./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -target libhb -target HandBrakeCLI -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" build | sed '/^$$/d' )
+
+clean:
+       (cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' ; rm -f libhb/hbversion.h ; rm -f contrib/config.cache )
+
+mrproper:
+       (rm -rf libhb/hbversion.h contrib/*tar.gz contrib/include contrib/lib contrib/DarwinContribVersion.txt ; cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' )
+
+release:
+       (rm -rf HandBrake HandBrake*dmg ; mkdir -p HandBrake/api HandBrake/doc HandBrake/doc/pdf; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/doc ; cp -rp pdf/ HandBrake/doc/pdf/ ; cp -rp HandBrake.app HandBrake ; cp -rp libhb/libhb.dylib HandBrake/api ; cp -rp libhb/hb.h libhb/common.h libhb/ports.h HandBrake/api ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake  -format UDZO HandBrake-$(HB_VERSION)-MacOS_UB.dmg ; rm -rf HandBrake )
+
+gui-release:
+       (rm -rf HandBrake HandBrake*GUI_UB.dmg ; mkdir -p HandBrake/docs ; cp AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrake.app HandBrake  ; hdiutil create -srcfolder HandBrake  -format UDBZ HandBrake-$(HB_VERSION)-MacOSX.4_GUI_UB.dmg ; rm -rf HandBrake )
+
+cli-release:
+       (rm -rf HandBrake HandBrake*CLI_UB.dmg ; mkdir -p HandBrake/docs ; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake  -format UDZO HandBrake-$(HB_VERSION)-MacOSX.3_CLI_UB.dmg ; rm -rf HandBrake )
+
+gui-snapshot-release:
+       (rm -rf HandBrake HandBrake*GUI_UB.dmg ; mkdir -p HandBrake/docs ; cp AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrake.app HandBrake  ; hdiutil create -srcfolder HandBrake  -format UDBZ HandBrake-$(SNAP_HB_VERSION)-MacOSX.5_GUI_UB.dmg ; rm -rf HandBrake )
+
+cli-snapshot-release:
+       (rm -rf HandBrake HandBrake*CLI_UB.dmg ; mkdir -p HandBrake/docs ; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake  -format UDZO HandBrake-$(SNAP_HB_VERSION)-MacOSX.5_CLI_UB.dmg ; rm -rf HandBrake )
+
+endif
+
+#
+# Linux
+#
+ifeq ($(SYSTEM),Linux)
+
+snapshot: unstable-libhb/hbversion.h all
+
+official: force-hbversion all
+
+force-hbversion:
+       rm -f libhb/hbversion.h
+
+all:   contrib/.contrib libhb/hbversion.h HandBrakeCLI
+       (rm -rf HandBrake HandBrake*.tar.gz ; mkdir -p HandBrake/api HandBrake/doc; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/doc ;  cp -rp libhb/hb.h libhb/common.h libhb/ports.h HandBrake/api ; cp -rp HandBrakeCLI HandBrake ; tar zcvf HandBrake-$(HB_VERSION)_i386.tar.gz HandBrake ; rm -rf HandBrake )
+
+contrib/.contrib:
+       @$(MAKE) --no-print-directory -C contrib all
+
+libhb/libhb.a: libhb/hbversion.h
+       @$(MAKE) --no-print-directory -C libhb all
+
+HandBrakeCLI: libhb/libhb.a
+       @$(MAKE) --no-print-directory -C test all
+
+clean:
+       @$(MAKE) --no-print-directory -C libhb clean
+       @$(MAKE) --no-print-directory -C test clean
+       @rm libhb/hbversion.h
+       @rm -f contrib/config.cache
+
+mrproper: clean
+       @$(MAKE) --no-print-directory -C contrib mrproper
+
+endif
+
+#
+# Cygwin
+#
+ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT)
+
+all:    contrib/.contrib HandBrakeCLI
+
+contrib/.contrib:
+       @$(MAKE) --no-print-directory -C contrib all
+
+libhb/libhb.a: unstable-libhb/hbversion.h
+       @$(MAKE) --no-print-directory -C libhb all
+
+HandBrakeCLI: libhb/libhb.a
+       @$(MAKE) --no-print-directory -C test all
+       
+clean:
+       @$(MAKE) --no-print-directory -C libhb clean
+       @$(MAKE) --no-print-directory -C test clean
+       @rm libhb/hbversion.h
+
+mrproper: clean
+       @$(MAKE) --no-print-directory -C contrib mrproper
+
+endif
+
+libhb/hbversion.h:
+       echo "#ifndef HB_BUILD" > libhb/hbversion.h
+       echo "#define HB_BUILD $(HB_BUILD)" >> libhb/hbversion.h
+       echo "#endif" >> libhb/hbversion.h
+       echo "#ifndef HB_VERSION" >> libhb/hbversion.h
+       echo "#define HB_VERSION \"$(HB_VERSION)\"" >> libhb/hbversion.h
+       echo "#endif" >> libhb/hbversion.h
+       echo "#ifndef HB_APPCAST_URL" >> libhb/hbversion.h
+       echo "#define APPCAST_URL \"http://handbrake.fr/appcast.xml\"" >> libhb/hbversion.h
+       echo "#endif" >> libhb/hbversion.h
+
+unstable-libhb/hbversion.h:
+       echo "#ifndef HB_BUILD" > libhb/hbversion.h
+       echo "#define HB_BUILD $(SNAP_HB_BUILD)" >> libhb/hbversion.h
+       echo "#endif" >> libhb/hbversion.h
+       echo "#ifndef HB_VERSION" >> libhb/hbversion.h
+       echo "#define HB_VERSION \"$(SNAP_HB_VERSION)\"" >> libhb/hbversion.h
+       echo "#endif" >> libhb/hbversion.h
+       echo "#ifndef HB_APPCAST_URL" >> libhb/hbversion.h
+       echo "#define APPCAST_URL \"http://handbrake.fr/appcast_unstable.xml\"" >> libhb/hbversion.h
+       echo "#endif" >> libhb/hbversion.h
diff --git a/Makefile.config b/Makefile.config
new file mode 100644 (file)
index 0000000..4ae9bcc
--- /dev/null
@@ -0,0 +1,22 @@
+# This line needs to be manually bumped for each release.
+HB_VERSION = 0.9.3
+
+# Use the current date for the build number
+HB_BUILD = $(shell date "+%Y%m%d")00
+
+# Do the same for snapshots but mark as unstable
+SNAP_HB_BUILD = $(shell date "+%Y%m%d")01
+
+# For snapshots add the svn revision number to the HB_VERSION
+SNAP_HB_VERSION = svn$(shell svnversion)
+
+# The working path is needed for editing the MacGui .plist
+FULL_PATH = $(shell pwd)
+BUILD_DATE = $(shell date "+%Y%m%d")
+
+HB_DEFPPC = $(shell uname -a | grep ppc > /dev/null ; echo RES$$?)
+ifeq ($(HB_DEFPPC), RES0)
+HB_DEFPPC = "-DWORDS_BIGENDIAN"
+else
+HB_DEFPPC = 
+endif
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..e3c750d
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,560 @@
+NEWS file for HandBrake <http://handbrake.fr/>
+
+Changes between 0.9.2 and 0.9.3:
+
+0.9.3 Snapshot 5 -> 0.9.3 Final
+- Better PMT processing
+- Basic underlying support for live previews (encode from a seek point for a set number of frames)
+- Better searching for IDR frames in H.264 streams
+- Preset changes (iPhone goes CRF, some old Apple presets resurrected as Legacy)
+- Assorted bug fixes
+
+0.9.3 Snapshot 4 -> 0.9.3 Snapshot 5 (r1913)
+Core Library
+- VC-1 stream input
+- Newer libmp4v2, which fixes the issue with output > 2 gigs in Linux
+- Proper allocation for preview frames
+- Avoids corruption of previews of sources that use widths that aren't cleanly divisible by 8
+- Decodes DTS internally instead of using ffmpeg, to allow mixdowns
+- Better support for DTS in MKV files with implicit timestamps or large timestamp errors
+- Ensures proper chroma size by rounding up when dealing with odd dimensions
+- Ensures "auto" samplerate sends a valid value to faac (22050, 24000, 32000, 44100, or 48000)
+- Bumped Theora to 1.0 final
+- Bumped x264 to r1024, which includes Nehalem optimizations as well as speed boosts for things such as b-adapt=2
+
+Mac GUI
+- Allows multibyte characters in chapter titles
+
+Windows GUI
+- Fixes issue parsing presets that use maxWidth and maxHeight (-X and -Y)
+- DRC defaults to 1 now
+- Chapter markers disabled for non-DVD sources
+- Makes sure Normal preset gets loaded
+- Fixes arithmetic overflow crash when scanning
+
+Linux GUI
+- Update checker
+- Limits range of chapters to encode to the number of chapters on the DVD
+- Disabled entry of dimensions larger than the source
+
+CLI
+- Allows overriding of audio (tracks, bitrates, samplerates, codecs, mixdowns) and x264 options in built-in presets
+
+Documentation
+- Documentation updates have begun on the wiki, although they are not yet complete
+
+0.9.3 Snapshot 3 -> 0.9.3 Snapshot 4 (r1896)
+Core Library
+- Converts video in other color spaces to YUV420 (this means DV support)
+- Official, standards-based AC3-in-MP4
+- Tries to base the AV timing for streams off audio when possible
+- Keeps some audio fixes for lost packets in over the air streams from interfering with other sources
+- Handles rendering of sources where the picture resolution changes mid-stream (this fixes the long-standing bug reading a particular episode of Doctor Who)
+- Wider window for clock references (AV sync)
+- Fixed a crash when closing out data for AAC encoding on aborted encodes
+- Rejiggered verbose activity log display to be more laconic by default
+- Updated x264 to r1016, which means b-rdo and bime are gone and replaced with new subme modes
+- DTS and HDMV DTS audio support in streams
+- Doesn't show the audio track button on iPhones/iPod Touches unless there's more than 1 track
+- Tries to avoid garbage data from AC3 sync by searching for two agreeing packets
+- As the MPEG4IP project is defunct, switched to an independently maintained libmp4v2 which has folded in all our cumbersome patches
+- Fixed SunOS compilation
+- Fixed conflict between maxHeight and maxWidth and loose anamorphic
+- Warn in the log when titles are being ignored during scan for lack of audio
+- Fixed bug with Slow/Slowest deinterlacing and decomb which could leave a flickering line at the top or bottom of the screen
+- Extracts audio and subtitle types from DVD sources, to do things like label commentary tracks
+- Better handling of the beginning of AVI and WMV sources that start after time 0
+- Optimize MP4 for web download works with AC3 tracks now
+
+Mac GUI
+- Nested presets
+- Individual activity logs for each encode (stored by default in ~/Application Support/HandBrake, can be co-located with encoded file destination by preference)
+- Allows reading from ZFS volumes
+- Fixed target size mode. It keeps breaking itself. Maybe it should just be put out of its misery...
+- Assorted other improvements
+
+Windows GUI
+- Nested presets
+- Individual activity logs for each encode
+- Slow and slower deinterlacing and decomb work now in Windows
+- Added resizeable update window
+- Fixed parsing of non-DVD source audio formats
+- Restored Copy to Clipboard to the Activity Log Window, among other enhancements to it
+- Fixed bug with MKV presets showing up as .m4v
+- Assorted other improvements
+
+Linux GUI (GTK)
+- Nested presets
+- Individual activity logs for each encode
+- Allows pending queue items to be removed, and reloaded in the main window for editing
+- Better handling of HD previews
+- Assorted other improvements
+
+CLI
+- Updated presets to the equivalent of the nested ones in the GUIs
+- Allows setting custom audio track names in MP4 files
+- Allows selection of the COLR atom in MP4 files, between Bt.601 and Bt.709
+- Fixed reading of device paths in OS X
+
+A special note on the new presets (they're collapsible-triangle-folder-thing-errific!)
+- Deux Six Quatre, Blind, Broke, and Bedlam are gone. They were dead weight.
+- iPod Low-Rez is now iPod Classic & iPod Nano
+- iPod High-Rez is now iPod Legacy
+- iPhone / iPod Touch is now iPhone & iPod Touch, so take care CLI users
+- Animation and Television now use the decomb and detelecine (VFR) filters
+- High Profile presets now use psy-trellis and the new subme 9 mode with B-frame RD refinement
+- AppleTV is now CRF, so sizes will vary with content
+- PS3 preset should be fixed
+- Constant Quality Rate still needs its quality % lowered, probably
+
+The keen reader is already asking "iPod Legacy? WTF is iPod High-Rez called iPod Legacy now?"
+
+The answer is Universal.
+
+The Universal preset is designed to play on all modern iPods (anything newer than the iPod 5.5G). It also plays on iPhones. It also plays on AppleTVs. It should also play just about anywhere else, hence the name. It is full anamorphic DVD resolution--no tricks with downscaling like stuff from the iTunes Store. It includes chapters, and has the first audio track in both AAC (DPL2 downmixed) and AC3 pass-thru, just like the AppleTV preset. In fact, it should give the same quality as the AppleTV preset, but faster...and at a larger file size. Like the AppleTV preset, it used CRF, so sizes will vary.
+
+0.9.3 Snapshot2 -> 0.9.3 Snapshot 3 (r1797)
+Core Library:
+- Universal input support, utilizing libavcodec from the FFmpeg project for decoding non-MPEG-2 video
+- Newer, faster, better version of the x264 codec, including psychovisual optimizations
+- Better AV sync through full compliance with the MPEG Standard Target Decoder timing model
+- More accurate auto-cropping
+- Support for New Zealand and Norwegian HDTV broadcasts (H.264 and AAC-LATM in MPEG-TS)
+- Detelecine is now "VFR detelecine" by default, dropping some frames and extending others to make up lost time, old behavior of keeping duplicate frames is enabled by selecting a framerate besides "Same as source"
+- Threaded deinterlacing in Slow and Slower modes
+- Threaded and entirely rewritten decomb filter
+- Better audio resampling interpolator
+- Better gamma in QuickTime through the use of the COLR MP4 atom
+- Better constant quality encoding when using FFmpeg
+- Hopefully better cache and virtual memory performance by recycling buffers that were most recently used instead of least
+- Fix for MP4s with "negative duration" errors.
+- Set the detelecine filter to work better with PAL by using "loose" breaks
+- Fix for missing initial H.264 NAL units, improves reliability of 8x8dct
+- Fix for subtitle-scan with XviD encoding
+- Fix for crash at the end of 2nd pass using x264
+- Deblock filter works now
+- Rewritten update system, so the core library can read a portion of Sparkle appcasts.
+- Updates for libsamplerate, libogg, xvidcore, libtheora, libmpeg2, lame, faac, and of course ffmpeg and x264.
+
+Mac GUI
+- Entirely rewritten and far more flexible queue that can be saved between sessions, capable of preserving queued items after a crash
+- Now requires vlc 0.9.xx to read protected dvd's in the users /Applications folder
+- Fix for 4x3 loose anamorphic to keep it from downscaling
+- Countless other improvements
+
+Windows GUI
+- Resolution calculation
+- Better preset bar
+- Better queue (including queue recovery feature)
+- Better activity log window
+- Improved UI (layout changes, animated x264 options, DVD drive detection, duration displayed)
+- More options - includes support for custom auto name format & starting the CLI minimized
+- Countless other improvements
+
+Linux GUI (GTK)
+- It's alive!
+
+Known Issues in Snapshot 3
+- Possibility of a flickering line at the top or bottom of the frame after Slow or Slower deinterlacing or decombing
+- Input bitrate display may be off by a factor of 100 for H.264-in-TS sources
+- Constant Quality Rate preset probably needs a lower quality level (60% - 55%)
+- With non-DVD sources that don't have AC3 audio, you can't encode 1 input audio track to multiple output audio tracks
+- Slow and Slower deinterlacing and decombing are BROKEN in Windows
+- QuickTime won't read Xvid-in-MP4 output, although VLC will
+- Windows GUI does not detect all audio tracks from non-DVD sources
+
+0.9.3 Snapshot 1 -> 0.9.3 Snapshot 2 (r1477)
+Core Library:
+- Anamorphic PAR for the AVI container
+- Allow constant frame rates when they different from the source's frame rate (otherwise pass through the variable MPEG-2 frame durations )
+- Decomb filter (selectively deinterlaces when it sees interlacing in the frame)
+- Filter bug fixed, that would skip any filters after detelecine, if VFR wasn't enabled
+- Loose anamorphic + FFmpeg video bug fixed
+
+Windows GUI:
+- Title dropdown list bug fixed
+- Missing log file bug fixed
+
+CLI:
+- Default audio samplerate changed to 48kHz, audio bitrate changed to 160kbps.
+- Samplerate entry bug fixed
+
+0.9.2 -> 0.9.3 Snapshot 1 (r1457)
+Core Library:
+- New audio subsystem (no more AAC+AC3, control each track's codec and settings individually)
+- Removed libdvdcss (HandBrake no longer decrypts DVDs on its own, will use VLC to do so if it's available)
+- Added Theora encoder
+- Fixed x264-in-avi and ffmpeg-in-avi
+- Fixed xvid
+- More accurate scaling
+- Major sync improvements
+- Major stream improvements
+- AAC+AC3 support in MKV
+- MKV seeking fixes
+- Make sure subtitles get displayed long enough to read them
+- Updated VBV 2-pass and VBV 1-pass patch for x264
+- Adaptive Quantization for x264
+- Recover from bad preview scans
+- Recover from invalid PGNs
+- Fixed vorbis bitrate control
+- Snapshot builds
+
+Mac:
+- New audio interface
+- Loads libdvdcss from VLC at runtime if it's present on the user's system
+- No more general-purpose "Codecs" menu -- set video and audio codecs individually
+- More robust preset system, in preparation for nested presets
+- Made 64-bit MP4 file widget more prominent
+- Only allow useful x264 options in the advanced tab
+- Various fixes and improvements
+
+Windows:
+- New x264 tab
+- New audio interface
+- Various fixes and improvements
+
+CLI:
+- New audio interface
+
+Changes between 0.9.1 and 0.9.2:
+
+CORE
+
+- AC3 in MP4 support
+- Multi-track audio support for Apple devices
+- Better handling of audio discontinuities
+- More flexible, "loose" anamorphic
+- Variable frame rate encoding
+- MP4 optimization for progressive downloads
+- Dynamic range compression for encoding from AC3 audio
+- Ability to encode an audio stream and pass it through at the same time
+- iPhone-compatible anamorphic (pasp atom)
+- Robust program and transport stream support
+- Better handling of DVD read errors from invalid VOB units
+- Detects and works around missing end of cell markers
+- Recovers from loss of signal in a stream
+- Drops subtitles less often
+- Keeps chapter markers in better sync and prevents duplicates
+- Better handling of B-Frames
+- Tunes FIFO sizes by CPU count
+- Finally squashes the bug that cut off the end of movies
+- Preset changes
+- Standardizes on standard out for progress and standard error for everything else.
+- Correct channel counts when passing AC3 audio to Matroska
+- Tag MP4 files as encoded with HandBrake
+- No more merging short chapters
+- Newer copies of x264,
+- VBV 2-pass patch for x264
+- Sets keyframes for x264 by frame rate.
+- Support for >2GB MKV files in Linux
+- Code audio languages in a way QuickTime understands
+- Better subtitle positioning
+- Fewer crashes in 2-pass encoding
+
+MAC
+
+- Leopard Only
+- Sparkle
+- Reads .eyetv files as well as .dvdmedia files
+- Much better queue
+- More white space
+- Code restructuring
+- Activity window logging, complete with a "black box recorder" for crashes
+- Ability to open a single title for a DVD instead of scanning the whole thing
+- Warns people when they try to queue up two files with the same name
+- Maintains picture filter states between jobs
+- .xib Interface Builder files SVN can track
+- Switches to NSImageView for previews, so no more useless OpenGL effects
+- Temporary loss of localizations for foreign languages (the old system was broken anyway)
+- Separate filter settings for every queued job
+
+WIN
+
+- Revamped preset system
+- Sparkle-compatible update checker
+- Activity log window
+- CLI built-in preset parsing
+- No more admin rights required in Vista
+- Handles more display resolutions
+
+CLI
+
+- Built-in presets
+- Short names for denoising (weak, medium, strong) and deinterlacing (fast, slow, slower) 
+- Solaris port
+- No more x264b30 (use -e x264 -I -x level=30:cabac=0 instead or better yet an iPod preset)
+- Chapter marker .csv input fixed
+- CRF as default quality mode for x264, now -q is CRF and if you want CQP add -Q to it
+
+Changes between 0.9.0 and 0.9.1:
+
+       Core HandBrake Changes:
+       + Added: Forced subtitle support
+       + Added: 6-channel Vorbis audio
+       + Changed: Much better buffer management, leading to impressive speed-ups all over the place
+       + Changed: Color subtitles now display in color, instead of being transparent.
+       + Changed: All errors to stderr with hb_log() instead of to stdout with fprintf()
+       + Changed: Accept stream input where the file type is in caps (.VOB instead of just .vob, etc)
+       + Changed: Better quality Vorbis codec (AoTuV)
+       + Changed: Faster (threaded) ffmpeg
+       + Changed: Force x264 to use a key frame at chapter markers
+       + Changed: Try to recover from bad preview scans instead of crashing
+       + Fixed: No more hanging when using MKV with chapter markers
+       + Fixed: "Same as source" FPS now works correctly when the end-credits of a progressive film are interlaced.
+       + Fixed: "Slow" deinterlacing no longer doubles up the chapter markers
+       + Fixed: Proper display of fading subtitles
+       + Fixed: Nasty artifacts from inaccurate rounding in the video scaler
+       + Fixed: Improved compatibility with streams that have missing/misplaced PMTs
+       Assorted other changes
+       
+       Mac Changes:
+       + Changed: Bigger buffer for the Activity Log
+       + Changed: Redesigned Queueing window
+       + Changed: Redesigned Preferences window
+       + Changed: Structural reorganization of the code into more segmented files
+       + Fixed: Closing the main window no longer causes HandBrake to quit
+       + Fixed: Changing dimensions in Picture Settings no longer causes a crash
+       + Fixed: Target size bitrate calculation
+       + Fixed: Picture Settings previews now scale to display resolution and screen size
+       Assorted other changes
+       
+       Windows Changes:
+       + Added: More robust exception handling
+       + Added: On-completion options to shutdown, suspend, etc
+       + Added: Turn tooltips on or off
+       + Changed: Open source, NullSoft installer
+       + Fixed: Add-to-queue issues
+       + Fixed: Foreign language issues
+       Assorted other changes
+       
+Changes between 0.8.5b1 and 0.9.0:
+
+       Core HandBrake Changes
+       + Added: Matroska (MKV) container output
+       + Added: Limited MPEG-2 transport stream (.VOB and .TS) input support
+       + Added: Option to write MP4 files larger than 4GB
+       + Added: Video filters (pullup, yadif, mcdeint, hqdn3d, pp7)
+       + Added: DTS audio input
+       + Changed: Switched to Lanczos scaling from libswscale
+       + Changed: Precise chapter marker location
+       + Changed: Newer libraries
+       + Changed: Much faster (threaded) iPod encoding
+       + Changed: "Same as source" works differently (better?) now
+       + Fixed: Audio drops should be thoroughly banished now
+       + Fixed: MP2 audio support
+       Assorted other changes
+       
+       CLI Changes:
+       + Added: Chapter naming
+       + Added: Many new command line options for subtitles and filters.
+       + Added: Turbo for 2-pass x264 encodes
+       Assorted other changes
+       
+       Mac Changes:
+       + Added: Chapter naming
+       + Added: Growl support
+       + Added: Advanced x264 settings tab
+       + Added: Logging window
+       + Added: Turbo for 2-pass x264 encodes
+       + Added: Many new presets
+       + Added: Unified toolbar
+       + Changed: Default settings
+       + Changed: Further integration of the queue and active queuing
+       + Changed: Browse DVDs like any other volumes
+       + Fixed: No more floating window syndrome (Mac)
+       + Fixed: Presets retain "magic sauce" when you change settings
+       Assorted other changes
+       
+       Windows Changes:
+       + Changed: New C#-based Windows GUI front-end
+       + Changed: Improved queuing
+       + Changed: DVD information parser
+       Assorted other changes
+
+Changes between 0.8.0b1 and 0.8.5b1
+
+       Core HandBrake Changes
+       + Added: iTunes-style chapter markers.
+       + Added: 5.1 AAC surround sound.
+       + Added: Dolby Pro Logic I and II downmixing of discrete surround sound.
+       + Added: 1-channel AAC sound from monophonic sources.
+       + Added: Advanced x264 options. (including High Profile support)
+       + Added: B-frames in x264 + .mp4
+       + Added: PPC Linux Support.
+       + Added: Preserve language IDs from the DVD in .mp4
+       + Added: Snapshot build method.
+       + Added: Anamorphic video display in QuickTime.
+       + Changed: Renamed back to HandBrake.
+       + Changed: Libraries updated.
+       + Changed: Enabled Update Checker.
+       + Fixed: Multiple Audio tracks.
+       + Fixed: Sped up DVD scanning time by being nicer to libdvdread.
+       + Fixed: .dmg is now mountable in Mac OS X versions older than 10.4
+       + Fixed: Proper output size from x264 in target size mode.
+       + Fixed: Allows output sizes larger than 2 gigs in Linux.
+       + Fixed: Several small memory leaks have been plugged.
+       + Fixed: Fixes for 64-bit systems.
+       + Fixed: Keep Aspect Ratio is no longer forced, so user-set height values are respected.
+
+       CLI Interface Changes
+       + Added: Customize maximum width and height while keeping aspect ratio
+       + Changed: Much prettier help screen
+       + Changed: HBTest/MediaForkCLI renamed to HandBrakeCLI
+       + Fixed: Better display of audio and subtitle ids
+
+       Mac GUI Changes
+       + Added: Presets! Includes initial ones for AppleTV, iPod, and PS3.
+       + Added: Preference option to auto-name output files with the DVD name and title number.
+       + Added: Preset support for x264 options.
+       + Changed: Remembers last destination path.
+       + Changed: Remembers last source path.
+       + Changed: Copy and paste in text fields.
+       + Changed: Updates target size more quickly.
+       + Changed: Mac GUI no longer retains target size values between enqueued jobs. (http://HandBrake.m0k.org/forum/viewtopic.php?t=249)
+       + Fixed: Preview frames are no longer distorted in anamorphic mode.
+       + Fixed: Mac GUI no longer floats above other windows.
+       + Fixed: Browse by file no longer dims the browse button preventing you from changing browse locations without switching back and forth between it and drive selection. (http://HandBrake.m0k.org/forum/viewtopic.php?t=342)
+       + Fixed: Makes sure destination directory is valid.
+       + Fixed: Fills in the file save field with the current output name instead of leaving it blank.
+       + Fixed: Update destination field with the current path instead of using the last one, which could have been a DVD.
+
+       Windows GUI Changes Ã± Version 2.2 beta 1
+       + Added: A few presets for the iPod in the menu.
+       + Added: Ability to set default settings for all program encode options. 
+       + Added: Ability to turn off Automatic Update check on start-up. See Tools > Options
+       + Added: Mod 16 check on the Height and Width boxes. 
+       + Added: Check the amount of hard disk space left is not running low when saving file. 
+       + Added: Option to have a Read DVD window showup on start-up.
+       + Added: Ã¬View DVD dataî Menu item in the tools menu. 
+       + Added: Links to the Homepage, forum, wiki and documentation page in the Help menu.
+       + Added: Chapter markers check box (New feature in 0.8.5b1 CLI)
+       + Changed: View DVD Information no longer appears after clicking the Ã¬Browseî button. 
+       + Changed: A few changes to the GUI - replaced textboxes with Dropdowns which auto-populate. 
+       + Changed: Auto Crop and Aspect text now automatically update when a new title is selected.
+       + Changed: Several tweaks to the GUI design, remove a few text items that are no longer needed.
+       + Changed: Ability to Queue videos enabled with completely re-written code. 
+       + Changed: Ability to queue stuff up while the encoding process is running. 
+       + Changed: Ability to remove items from the encode queue while is running. 
+       + Changed: Anamorphic option blanks out resolution boxes. 
+       + Changed: Re-written update checker. 
+       + Changed: Ability to turn off update check on start-up in Tools > Options
+       + Changed: Auto Crop option now fills in figures into text boxes when selected. 
+       + Changed: Mp4 now default output file extension.
+       + Changed: Enabled 5.1 AAC option.
+       + Changed: Enabled h264 advanced options. 
+       + Changed: Updated the FAQ.
+       + Changed: Included new version of HandBrake. Version 0.8.5b1.
+       + Fixed: Pixel Ratio Not being saved with the profile.
+       + Removed: Both Ã¬View Dataî buttons on the Title Selection Window.
+       + Removed: The Ã¬Read DVDî button. -  Automatically reads the DVD after selecting a source now.
+       + Removed: The Help and Support window. Been replaced with a few Web Links.
+
+
+Changes between 0.7.1 and 0.8.0
+ + MediaFork project forked from HandBrake source <http://handbrake.m0k.org/>
+ + Updated libraries (meaning better quality, hopefully fewer bugs, and increased speeds)
+ + iPod 5.5G support
+ + Revamped graphical interface (Mac OS X)
+ + Anamorphic encoding with pixel aspect ratio
+ + Brighter color reproduction in QuickTime
+ + Lists disks by DVD name instead of by drive name (Mac OS X)
+ + Titles output movies based on the DVD name (Mac OS X)
+ + 32Khz audio output
+ + Constant rate factor encoding with x264
+ + New preference item to turn deinterlacing on by default (Mac OS X)
+ + New preference item to select the default audio language (Mac OS X)
+ + Bugfix for reading straight from a DVD
+
+Changes between 0.7.0 and 0.7.1
+ + Universal Binary for PPC and Intel
+ + Bugfixes for missing subtitles, audio glitches with LPCM tracks and more
+
+Changes between 0.7.0-beta3 and 0.7.0
+ + Multithreaded H.264 encoding with x264
+ + Added option for H.264 Baseline (suitable for iPods)
+ + (Very) experimental queue support
+ + Fixes for some DVD titles HandBrake would not recognize
+ + Fixes audio gliches when encoding from LPCM tracks
+
+Changes between 0.6.2 and 0.7.0-beta3
+ + Chapters selection
+ + Custom framerate
+ + Subtitle support
+ + Check for updates
+ + Custom aspect ratio
+ + Audio samplerate selection
+ + mp4/H.264 output
+ + Proper NTSC support
+ + AC3 pass-through
+ + Progress bar in the dock icon (OS X)
+ + 2-pass H.264 encoding
+ + Constant quality encoding
+ + Grayscale encoding
+ + Up-to-date BeOS UI
+
+Changes between 0.6.1 and 0.6.2
+ + Support for DVDs with MPEG audio tracks
+ + Rewrote the DVD navigation code
+ + High quality resampler included
+ + Better AVI compliance
+ + Updated encoders
+ + Internal improvements
+ + Bugfixes
+
+Changes between 0.6.0 and 0.6.1
+ + Fixed LPCM endianness issue
+
+Changes between 0.5.2 and 0.6.0
+ + MP4 and OGM output
+ + AAC and Vorbis encoding
+ + Experimental H264 encoding
+ + LPCM DVDs support
+ + Autocrop
+ + GTK2 linux interface
+ + OS X interface localization
+
+Changes between 0.5.1 and 0.5.2
+ + Bugfixes
+
+Changes between 0.5 and 0.5.1
+ + 2-pass XviD encoding
+ + Bugfixes
+
+Changes between 0.4 and 0.5
+ + Bugfixes, rewrite of large parts of the core
+ + XviD encoding (1-pass only)
+
+Changes between 0.3 and 0.4
+ + Better multithreading
+ + Allow the user to specify a target size instead of bitrate
+ + Misc GUI enhancements
+ + Use low-priority threads on OS X
+
+Changes between 0.2 and 0.3
+ + OSX & Linux ports
+ + Allow 2-pass encoding
+ + Many internal changes & fixes
+
+Changes between 0.1.1 and 0.2
+ + Fixed a major bug that made HandBrake probably crash after ~ 15
+   minutes encoded
+ + Fixed a few minor memory leaks
+
+Changes between 0.1 and 0.1.1
+ + Fixed a stupid bug that prevented to scan volumes correctly if
+   FAT/NTFS/etc volumes were mounted
+
+Changes between 0.1-alpha2 and 0.1 :
+ + Automatically detect ripped DVDs on BFS volumes
+ + Allow picture cropping and resizing
+ + Allow dual-audio encoding
+ + Created files are quite compliant now (tested with OSX/Quicktime
+   and BSPlayer)
+ + Better A/V sync with some DVDs
+
+Changes between 0.1-alpha and 0.1-alpha2 :
+ + Show length for each title
+ + Fixed the screwed-audio bug
+ + Many bugfixes...
+
+First version is 0.1-alpha.
diff --git a/THANKS b/THANKS
new file mode 100644 (file)
index 0000000..cb388ae
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,70 @@
+THANKS file for HandBrake <http://handbrake.fr/>
+
+Several people noticeably contributed to MediaFork and HandBrake development
+without writing code (submitting/checking translations, DVD samples, etc).
+Let's thank them here!
+
+Chris (audley)
+ + Inspiration and example of patching mpeg4ip for iPod atom support
+
+Omar Ahmad Bhatti
+ + Intensive beta testing, suggestions. Convinced me to port HandBrake
+   to OS X, which finally was a pretty good idea.
+
+Hanna Bauer
+Adrien Marquette
+Norbert Rittel
+ + German translation
+
+Paul Bénéchet
+Luidgi Esposito
+Andrea Gianarro
+Emilio Gelosi
+ + Italian translation
+
+Adam
+ + Polish translation
+
+Nik Roby
+ + Russian translation
+
+Leendert
+ + Dutch translation
+
+Eric Kornblum
+ + Sent me a sample DVD with LPCM tracks
+
+migol Superkid
+ + Spanish translation
+
+pgjw
+ + Portuguese translation
+
+cygma
+ + Japanese translation
+
+Michelle De Sio
+ + Sent me a sample DVD with MPEG audio tracks
+
+Ian Rickard
+ + Enhanced icon
+
+Sébastien Noël
+ + Debian packages (http://www.twolife.org/debian/repository.php)
+
+People who sent me an iTunes gift certificate: a BIG thanks!
+
+Paul (baggss)
+ + Forum Moderator
+Du'Wayne Caviness (Cavalicious)
+ + Forum Moderator
+Edward Jackson. (TedJ)
+ + Forum Moderator
+Chuck (cvk_b)
+ + Testing Team Member
+
+Nate Thompson (nightstrm)
+ + Forum Moderator
\ No newline at end of file
diff --git a/TRANSLATIONS b/TRANSLATIONS
new file mode 100644 (file)
index 0000000..c882588
--- /dev/null
@@ -0,0 +1,23 @@
+$Id: TRANSLATIONS,v 1.2 2004/03/22 18:20:30 titer Exp $
+
+TRANSLATIONS file for HandBrake <http://handbrake.fr/>
+
+Translating HandBrake
+=====================
+
+***** HandBrake does not currently have a localization scheme for any of its interfaces.
+***** Information below is obsolete and only useful for historical purposes:
+
+Only the OS X interface of HandBrake can be translated at the moment.
+Localization is not implemented in BeOS and GTK GUIs.
+
+HandBrake uses the NSLocalizedString() OS X function to translate every
+item in the interface. Therefore, you don't need (and mustn't) modify
+the nib files. All you have to do is to write a Localizable.strings for
+your language. You can get it (for the latest release) at
+<http://handbrake.m0k.org/Localizable.strings>.
+
+Edit it with Xcode, save it to HandBrake/macosx/i18n/xx.strings (where
+'xx' are the two letters representing your language), then add 'xx' to
+the language list in the Jamrules file.
+
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..224b2b2
--- /dev/null
+++ b/configure
@@ -0,0 +1,151 @@
+#! /bin/sh
+
+CC="gcc"
+CXX="g++"
+CCFLAGS="$CCFLAGS -Wall -g"
+OPTIM="$OPTIM -O3 -funroll-loops"
+LINKLIBS="-lz -lbz2"
+MAKE=make
+
+# System-specific flags
+SYSTEM=`uname -s`
+case $SYSTEM in
+  BeOS)
+    CCFLAGS="$CCFLAGS -Wno-multichar"
+    DEFINES="$DEFINES SYS_BEOS"
+    LINKLIBS="$LINKLIBS -lbe -ltracker"
+
+    RELEASE=`uname -r`
+    case $RELEASE in
+      6.0|5.0.4) # Zeta or R5 / BONE beta 7
+        SYSTEM="$SYSTEM / BONE"
+        LINKLIBS="$LINKLIBS -lbind -lsocket"
+        ;;
+      5.0*)      # R5 / net_server
+        SYSTEM="$SYSTEM / net_server"
+        DEFINES="$DEFINES BEOS_NETSERVER"
+        LINKLIBS="$LINKLIBS -lnet"
+        ;;
+      *)
+        echo "Unsupported BeOS version"
+        exit 1 ;;
+    esac
+    ;;
+
+  Darwin)
+    DEFINES="$DEFINES SYS_DARWIN USE_PTHREAD"
+    LINKLIBS="$LINKLIBS -lpthread"
+    ;;
+
+  FreeBSD)
+    DEFINES="$DEFINES SYS_FREEBSD USE_PTHREAD"
+    LINKLIBS="$LINKLIBS -pthread"
+    ;;
+
+  NetBSD)
+    DEFINES="$DEFINES SYS_NETBSD USE_PTHREAD"
+    LINKLIBS="$LINKLIBS -lpthread"
+    ;;
+
+  Linux)
+    DEFINES="$DEFINES SYS_LINUX USE_PTHREAD _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64"
+    LINKLIBS="$LINKLIBS -lpthread -ldl"
+    ;;
+
+  CYGWIN*)
+    DEFINES="$DEFINES SYS_CYGWIN USE_PTHREAD"
+    LINKLIBS="$LINKLIBS -lpthread"
+    ;;
+  SunOS)
+    DEFINES="$DEFINES SYS_SunOS USE_PTHREAD _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64"
+    LINKLIBS="$LINKLIBS -lpthread -lsocket -lnsl"
+    ;;
+
+  *)
+    echo "Unsupported operating system"
+    exit 1 ;;
+esac
+echo
+echo "System: $SYSTEM"
+
+# Check for endianness (we need to define WORDS_BIGENDIAN for libdvdread)
+cat > testconf.c << EOF
+int main()
+{
+    int i = 1;
+    return *( (char *) &i );
+}
+EOF
+if ( $CC -o testconf testconf.c && ./testconf ) > /dev/null 2>&1
+then
+  echo "Endian: big"
+  DEFINES="$DEFINES WORDS_BIGENDIAN"
+else
+  echo "Endian: little"
+fi
+rm -f testconf.c testconf
+
+#
+# Use Gnu make when available over the built in make
+#
+if ( make --version | grep GNU ) > /dev/null 2>&1
+then
+MAKE=make
+elif ( gmake --version | grep GNU ) > /dev/null 2>&1
+then
+MAKE=gmake
+else
+MAKE=make
+fi
+
+# Unless the user wants a release build, configure for SVN snapshots
+if test "$1" = "--release" || test "$2" = "--release"; then
+    SNAPSHOT=0
+else
+    SNAPSHOT=1
+fi
+
+# We fought the law and the law won
+if test "$1" = "--libdvdcss" || test "$2" = "--libdvdcss"; then
+    CSS=1
+else
+    CSS=0
+fi
+
+# Generating the HB_BUILD and HB_VERSION for snapshots requires
+# the build date, working path, and current SVN revision. 
+BUILD_DATE=`date +%Y%m%d`
+FULL_PATH=`pwd`
+SVN_REV=`svnversion`
+
+# Generate config.jam
+rm -f config.jam
+cat << EOF > config.jam
+CC       = $CC ;
+C++      = $CXX ;
+LINK     = $CXX ;
+CCFLAGS  = $CCFLAGS ;
+C++FLAGS = $CCFLAGS ;
+OPTIM    = $OPTIM ;
+DEFINES  = $DEFINES ;
+LINKLIBS = $LINKLIBS ;
+MAKE     = $MAKE ;
+SNAPSHOT = $SNAPSHOT ;
+BUILD_DATE = $BUILD_DATE ;
+FULL_PATH = $FULL_PATH ;
+SVN_REV = $SVN_REV ;
+CSS      = $CSS ;
+EOF
+
+echo
+echo "Don't run configure by hand, make runs it automatically."
+echo
+echo "No, really. That's it. Just type 'make' and hit return."
+echo
+echo "You're supposed to be building with make, not jam."
+echo "If you were going to use jam--which you shouldn't--you'd run:"
+echo " './jam' on a Mac, or"
+echo " 'jam' on Linux or Windows"
+echo
+echo "To make jam, boil fruit with sugar and an acid until pectins are released."
+echo
diff --git a/contrib/Jamfile b/contrib/Jamfile
new file mode 100644 (file)
index 0000000..d50a934
--- /dev/null
@@ -0,0 +1,491 @@
+SubDir TOP contrib ;
+
+# Use curl on Mac OS X since it's always installed, and assume wget
+# is installed for all other systems
+if $(OS) = MACOSX
+{
+    WGET = curl -q -L -o ;
+}
+else
+{
+    WGET = wget -O ;
+}
+
+if $(OS) = UNKNOWN
+{
+    OS = CYGWIN ;
+}
+
+if $(OS) = SOLARIS
+{
+    PATCH = gpatch ;
+    STRIP = echo ;
+}
+else
+{
+    PATCH = patch ;
+    STRIP = strip -S ;
+}
+
+# Wget rule: downloads $(<) from the link in $(>)
+rule Wget
+{
+    Depends $(<) : $(>) ;
+}
+actions Wget
+{
+    $(RM) $(<) &&
+    $(WGET) $(<) `cat $(>)` &&
+    ( touch $(<) || true )
+}
+
+# liba52
+rule LibA52
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibA52
+{
+
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf a52dec && (gzip -dc a52dec.tar.gz | tar xf -) && 
+    cd a52dec && $(PATCH) -p1 < ../patch-a52dec.patch &&
+    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) && $(MAKE) install &&
+    $(STRIP) $CONTRIB/lib/liba52.a
+}
+Wget   $(SUBDIR)/a52dec.tar.gz : $(SUBDIR)/version_a52dec.txt ;
+LibA52 $(SUBDIR)/lib/liba52.a  : $(SUBDIR)/a52dec.tar.gz ;
+
+# FAAD2
+rule LibFaad2
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+
+actions LibFaad2
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf faad2 && (gzip -dc faad2.tar.gz | tar xf -) &&
+    cd faad2 && $(PATCH) -p1 < ../patch-faad2-libtool22.patch &&
+    ./bootstrap && ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared && $(MAKE) && $(MAKE) install
+}
+Wget     $(SUBDIR)/faad2.tar.gz    : $(SUBDIR)/version_faad2.txt ;
+LibFaad2 $(SUBDIR)/lib/libfaad.a : $(SUBDIR)/faad2.tar.gz ;
+
+# libavcodec
+rule LibAvCodec
+{
+    FFMPEG_PATCH = "$(PATCH) -p0 < ../patch-ffmpeg.patch" ;
+    FFMPEG_PATCH += " && $(PATCH) -p0 < ../patch-ffmpeg-latm.patch " ;
+    FFMPEG_PATCH += " && $(PATCH) -p0 < ../patch-ffmpeg-mpegleak.patch " ;
+    if $(OS) = CYGWIN
+    {
+        FFMPEG_PATCH += " && $(PATCH) -p1 < ../patch-ffmpeg-cygwin.patch " ;
+    }
+    else if $(OS) = SOLARIS
+    {
+        FFMPEG_PATCH += " && $(PATCH) -p1 < ../patch-ffmpeg-solaris.patch " ;
+    } 
+
+    if $(OS) = SOLARIS
+    {
+       #
+       # Not all of ffmpeg works on Solaris - disable the bits that
+       # don't. When we get new versions of FFMPEG we can try enabling
+       # then again.
+       #
+       FFMPEG_EXTRA_OPTIONS = "--disable-vis --disable-demuxer=mpc8 --disable-vhook --disable-network" ;
+    }
+
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibAvCodec
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf ffmpeg && (gzip -dc ffmpeg.tar.gz | tar xf -) &&
+    cd ffmpeg && $(FFMPEG_PATCH) &&
+    ./configure --prefix=$CONTRIB --enable-gpl --enable-pthreads --enable-swscale \
+        --disable-shared --enable-static --disable-encoders \
+        --enable-encoder=mpeg4 --enable-encoder=ac3 --enable-encoder=snow \
+        --enable-libfaad --disable-ffmpeg --disable-ffserver \
+        --disable-muxers --enable-muxer=ipod --disable-bsfs \
+        --extra-cflags="-I$CONTRIB/include" \
+        --extra-ldflags="-L$CONTRIB/lib" $(FFMPEG_EXTRA_OPTIONS) &&
+    $(MAKE) && $(MAKE) install &&
+    $(STRIP) $CONTRIB/lib/libavcodec.a
+}
+Wget       $(SUBDIR)/ffmpeg.tar.gz    : $(SUBDIR)/version_ffmpeg.txt ;
+LibAvCodec $(SUBDIR)/lib/libavcodec.a : $(SUBDIR)/ffmpeg.tar.gz ;
+
+rule LibAvUtil
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibAvUtil
+{
+    $(STRIP) $(<)
+}
+LibAvUtil $(SUBDIR)/lib/libavutil.a : $(SUBDIR)/lib/libavcodec.a ;
+LibAvUtil $(SUBDIR)/lib/libavformat.a : $(SUBDIR)/lib/libavcodec.a ;
+LibAvUtil $(SUBDIR)/lib/libswscale.a : $(SUBDIR)/lib/libavcodec.a ;
+
+# HandBrake does not include a DVD decrypting library,
+# so if a user requests it, let them download and compile it from a 3rd party
+if $(CSS) = 1
+{
+    # libdvdcss
+    # We need libdvdcss.so for libdvdread's configure to work...
+    rule LibDvdCss
+    {
+        Depends $(<) : $(>) ;
+        Depends lib  : $(<) ;
+    }
+    actions LibDvdCss
+    {
+        cd `dirname $(>)` && CONTRIB=`pwd` &&
+        rm -rf libdvdcss-1.2.9 && (gzip -dc libdvdcss.tar.gz | tar xf - ) && 
+        cd libdvdcss-1.2.9 &&
+        ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) && $(MAKE) install &&
+        $(STRIP) $CONTRIB/lib/libdvdcss.a
+    }
+    Wget      $(SUBDIR)/libdvdcss.tar.gz : $(SUBDIR)/version_libdvdcss.txt ;
+    LibDvdCss $(SUBDIR)/lib/libdvdcss.a  : $(SUBDIR)/libdvdcss.tar.gz ;
+}
+
+# libdca
+rule LibDCA
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibDCA
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf libdca && (gzip -dc libdca.tar.gz | tar xf - ) && 
+    cd libdca && $(PATCH) -p1 < ../patch-libdca.patch &&
+    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) && $(MAKE) install &&
+    $(STRIP) $CONTRIB/lib/libdca.a
+}
+Wget   $(SUBDIR)/libdca.tar.gz : $(SUBDIR)/version_libdca.txt ;
+LibDCA $(SUBDIR)/lib/libdca.a  : $(SUBDIR)/libdca.tar.gz ;
+
+# libdvdread
+rule LibDvdRead
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+    
+    if $(OS) = MACOSX
+    {
+        DVDREAD_PATCH = "$(PATCH) -p0 < ../patch-libdvdread-css-vlc-dylib.patch &&" ;
+    }
+       
+    if $(OS) = CYGWIN
+    {
+        DVDREAD_PATCH = "$(PATCH) -p1 < ../patch-libdvdread-cygwin.patch &&" ;
+    }
+    
+}
+if $(CSS) = 1 # Include CSS support in libdvdread if requested
+{
+    actions LibDvdRead
+    {
+        cd `dirname $(>)` && CONTRIB=`pwd` &&
+        rm -rf libdvdread && (gzip -dc libdvdread.tar.gz | tar xf - ) && 
+        cd libdvdread &&
+        ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --with-libdvdcss=$CONTRIB &&
+        $(MAKE) && $(MAKE) install &&
+        $(STRIP) $CONTRIB/lib/libdvdread.a
+    }
+}
+else {
+    # Cygwin/Windows doesn't use CSS as of now, so don't include it on the
+    # configure line.
+    # MacOSX uses a dylib for CSS, so it doesn't need including there either.
+    actions LibDvdRead
+    {
+        cd `dirname $(>)` && CONTRIB=`pwd` &&
+        rm -rf libdvdread && (gzip -dc libdvdread.tar.gz | tar xf - ) &&
+        cd libdvdread && $(DVDREAD_PATCH)
+        ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared &&
+        $(MAKE) && $(MAKE) install &&
+        $(STRIP) $CONTRIB/lib/libdvdread.a
+    }
+}
+Wget       $(SUBDIR)/libdvdread.tar.gz : $(SUBDIR)/version_libdvdread.txt ;
+LibDvdRead $(SUBDIR)/lib/libdvdread.a  : $(SUBDIR)/libdvdread.tar.gz ;
+
+# libfaac
+rule LibFaac
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+       if $(OS) = CYGWIN
+    {
+        CYGWIN_PATCH = "$(PATCH) -p1 < ../patch-faac-cygwin.patch &&" ;
+    }
+}
+actions LibFaac
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf faac && (gzip -dc faac.tar.gz | tar xf - ) && cd faac && $(CYGWIN_PATCH) ./bootstrap &&
+    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --enable-static --without-mp4v2 &&
+    $(MAKE) && $(MAKE) install &&
+    $(STRIP) $CONTRIB/lib/libfaac.a
+}
+Wget    $(SUBDIR)/faac.tar.gz   : $(SUBDIR)/version_faac.txt ;
+LibFaac $(SUBDIR)/lib/libfaac.a : $(SUBDIR)/faac.tar.gz ;
+
+# libmp3lame
+rule LibMp3Lame
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibMp3Lame
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf lame && (gzip -dc lame.tar.gz | tar xf - ) && cd lame &&
+    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared &&
+    $(MAKE) && $(MAKE) install &&
+    $(STRIP) $CONTRIB/lib/libmp3lame.a
+}
+Wget       $(SUBDIR)/lame.tar.gz      : $(SUBDIR)/version_lame.txt ;
+LibMp3Lame $(SUBDIR)/lib/libmp3lame.a : $(SUBDIR)/lame.tar.gz ;
+
+# libmp4v2
+rule LibMp4v2
+{
+    LIBMP4V2_PATCH = "" ;
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibMp4v2
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf libmp4v2 && (gzip -dc libmp4v2.tar.gz | tar xf - ) &&
+    cd libmp4v2 && $(LIBMP4V2_PATCH) ./configure --prefix=$CONTRIB &&
+    $(MAKE) && make install &&
+    $(STRIP) $CONTRIB/lib/libmp4v2.a
+}
+Wget     $(SUBDIR)/libmp4v2.tar.gz : $(SUBDIR)/version_libmp4v2.txt ;
+LibMp4v2 $(SUBDIR)/lib/libmp4v2.a : $(SUBDIR)/libmp4v2.tar.gz ;
+
+rule LibMkv
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibMkv
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf libmkv && (gzip -dc libmkv.tar.gz | tar xf - ) && 
+    cd libmkv &&
+    ./configure --disable-shared --enable-static --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache &&
+    $(MAKE) && $(MAKE) install &&
+    $(STRIP) $CONTRIB/lib/libmkv.a
+}
+Wget    $(SUBDIR)/libmkv.tar.gz : $(SUBDIR)/version_libmkv.txt ;
+LibMkv  $(SUBDIR)/lib/libmkv.a  : $(SUBDIR)/libmkv.tar.gz ;
+
+# libmpeg2
+rule LibMpeg2
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibMpeg2
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf mpeg2dec && (gzip -dc mpeg2dec.tar.gz | tar xf - ) && 
+    cd mpeg2dec &&
+    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --disable-sdl --without-x &&
+    $(MAKE) && $(MAKE) install &&
+    $(STRIP) $CONTRIB/lib/libmpeg2.a
+}
+Wget     $(SUBDIR)/mpeg2dec.tar.gz : $(SUBDIR)/version_mpeg2dec.txt ;
+LibMpeg2 $(SUBDIR)/lib/libmpeg2.a  : $(SUBDIR)/mpeg2dec.tar.gz ;
+
+# libogg
+rule LibOgg
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibOgg
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf libogg && (gzip -dc libogg.tar.gz | tar xf - ) && 
+    cd libogg &&
+    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared &&
+    $(MAKE) && $(MAKE) install &&
+    $(STRIP) $CONTRIB/lib/libogg.a
+}
+Wget   $(SUBDIR)/libogg.tar.gz : $(SUBDIR)/version_libogg.txt ;
+LibOgg $(SUBDIR)/lib/libogg.a  : $(SUBDIR)/libogg.tar.gz ;
+
+# libsamplerate
+rule LibSampleRate
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibSampleRate
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf libsamplerate && (gzip -dc libsamplerate.tar.gz | tar xf - ) && 
+    cd libsamplerate &&
+    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared &&
+    $(MAKE) && $(MAKE) install &&
+    $(STRIP) $CONTRIB/lib/libsamplerate.a
+}
+Wget          $(SUBDIR)/libsamplerate.tar.gz : $(SUBDIR)/version_libsamplerate.txt ;
+LibSampleRate $(SUBDIR)/lib/libsamplerate.a  : $(SUBDIR)/libsamplerate.tar.gz ;
+
+# libvorbis
+rule LibVorbis
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibVorbis
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf libvorbis && (gzip -dc libvorbis.tar.gz | tar xf - ) &&
+    cd libvorbis &&
+    ./configure --prefix=$CONTRIB --with-ogg=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared &&
+    $(MAKE) && $(MAKE) install &&
+    $(STRIP) $CONTRIB/lib/libvorbis.a
+}
+Wget      $(SUBDIR)/libvorbis.tar.gz : $(SUBDIR)/version_libvorbis.txt ;
+LibVorbis $(SUBDIR)/lib/libvorbis.a  : $(SUBDIR)/libvorbis.tar.gz ;
+
+rule LibVorbisEnc
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibVorbisEnc
+{
+    $(STRIP) $(<)
+}
+LibVorbisEnc $(SUBDIR)/lib/libvorbisenc.a : $(SUBDIR)/lib/libvorbis.a ;
+
+# libtheora
+rule LibTheora
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibTheora
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` && rm -rf libtheora &&
+    (gzip -dc libtheora.tar.gz | tar xf - ) && cd libtheora &&
+    HAVE_PKG_CONFIG="no" && export HAVE_PKG_CONFIG &&
+    ./configure --prefix=$CONTRIB --with-ogg=$CONTRIB --with-vorbis=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared \
+            --disable-oggtest --disable-vorbistest --disable-sdltest --disable-examples &&
+    $(MAKE) && $(MAKE) install &&
+    $(STRIP) $CONTRIB/lib/libtheora.a
+}
+Wget      $(SUBDIR)/libtheora.tar.gz : $(SUBDIR)/version_libtheora.txt ;
+LibTheora $(SUBDIR)/lib/libtheora.a  : $(SUBDIR)/libtheora.tar.gz ;
+
+# libx264
+rule LibX264
+{
+    LIBX264_PATCH = "" ;
+    if $(OS) = CYGWIN
+    {
+        LIBX264_PATCH += "$(PATCH) -p1 < ../patch-x264-cygwin.patch && " ;
+    }
+    else if $(OS) = SOLARIS
+    {
+        LIBX264_PATCH += " $(PATCH) -p1 < ../patch-x264-solaris.patch && " ;
+    }
+    LIBX264_PATCH += "$(PATCH) -p0 < ../patch-x264-idr.patch && " ;
+       Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibX264
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf x264 && (gzip -dc x264.tar.gz | tar xf - ) && 
+    cd x264 && $(LIBX264_PATCH)
+    bash ./configure --prefix=$CONTRIB --enable-pthread &&
+    $(MAKE) libx264.a && cp libx264.a $CONTRIB/lib/ && cp x264.h $CONTRIB/include/ && $(STRIP) $CONTRIB/lib/libx264.a
+}
+Wget    $(SUBDIR)/x264.tar.gz   : $(SUBDIR)/version_x264.txt ;
+LibX264 $(SUBDIR)/lib/libx264.a : $(SUBDIR)/x264.tar.gz ;
+
+# libxvidcore
+rule LibXvidCore
+{
+    LIBXVIDCORE_PATCH = "" ;
+    if $(OS) = MACOSX
+    {
+        LIBXVIDCORE_PATCH = "$(PATCH) -p1 < ../patch-xvidcore-macosx.patch && " ;
+    }
+    else if $(OS) = CYGWIN
+    {
+        LIBXVIDCORE_PATCH = "$(PATCH) -p1 < ../patch-xvidcore-cygwin.patch && " ;
+    }
+    LIBXVIDCORE_PATCH += "$(PATCH) -p1 < ../patch-xvidcore-nasm-2.00-configure.patch && " ;
+    LIBXVIDCORE_PATCH += "$(PATCH) -p1 < ../patch-xvidcore-fdct.patch && " ;
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+actions LibXvidCore
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf xvidcore && (gzip -dc xvidcore.tar.gz | tar xf - ) &&
+    cd xvidcore && $(LIBXVIDCORE_PATCH)
+    cd build/generic/ && ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) libxvidcore.a &&
+    cp ./=build/libxvidcore.a $CONTRIB/lib/ &&
+    cp ../../src/xvid.h $CONTRIB/include/ &&
+    $(STRIP) $CONTRIB/lib/libxvidcore.a
+}
+Wget        $(SUBDIR)/xvidcore.tar.gz   : $(SUBDIR)/version_xvidcore.txt ;
+LibXvidCore $(SUBDIR)/lib/libxvidcore.a : $(SUBDIR)/xvidcore.tar.gz ;
+
+# zlib
+if $(OS) = CYGWIN
+{
+    rule Zlib
+    {
+        Depends $(<) : $(>) ;
+        Depends lib  : $(<) ;
+    }
+    actions Zlib
+    {
+        cd `dirname $(>)` && CONTRIB=`pwd` &&
+        rm -rf zlib && (gzip -dc zlib.tar.gz | tar xf - ) &&
+        cd zlib && ./configure --prefix=$CONTRIB &&
+        $(MAKE) && $(MAKE) install && touch $CONTRIB/.contrib &&
+        $(STRIP) $CONTRIB/lib/libz.a
+    }
+    Wget  $(SUBDIR)/zlib.tar.gz : $(SUBDIR)/version_zlib.txt ;
+    Zlib  $(SUBDIR)/lib/libz.a  : $(SUBDIR)/zlib.tar.gz ;
+}
+
+# bzip2
+if $(OS) = CYGWIN
+{
+    rule BZip2
+    {
+        Depends $(<) : $(>) ;
+        Depends lib  : $(<) ;
+    }
+    actions BZip2
+    {
+        cd `dirname $(>)` && CONTRIB=`pwd` &&
+        rm -rf bzip2 && (gzip -dc bzip2.tar.gz | tar xf - ) &&
+        cd bzip2 && $(MAKE) && $(MAKE) install && cp libbz2.a $CONTRIB/lib/ &&
+        $(STRIP) $CONTRIB/lib/libbz2.a
+    }
+    Wget  $(SUBDIR)/bzip2.tar.gz : $(SUBDIR)/version_bzip2.txt ;
+    BZip2  $(SUBDIR)/lib/libbz2.a  : $(SUBDIR)/bzip2.tar.gz ;
+}
diff --git a/contrib/Makefile b/contrib/Makefile
new file mode 100644 (file)
index 0000000..1855ed0
--- /dev/null
@@ -0,0 +1,49 @@
+# Contrib Makefile
+
+SYSTEM = $(shell uname -s)
+
+# Special case for Mac OS X: everything is handled from the Xcode project
+ifeq ($(SYSTEM),Darwin)
+
+all:   .contrib
+
+.contrib:
+       ( cd .. ; ./configure ; cd contrib ; cp -f ../config.jam . ; ../jam )
+
+clean: 
+       ( echo "Do a make mrproper to remove the contrib libraries )
+
+mrproper: 
+       (rm -rf lib ; rm -rf include )
+
+endif
+
+ifeq ($(SYSTEM),Linux)
+
+all:   .contrib
+
+.contrib:
+       ( cd .. ; ./configure ; cd contrib ; cp -f ../config.jam . ; jam )
+
+clean: 
+       ( echo "Do a make mrproper to remove the contrib libraries )
+
+mrproper: 
+       (rm -rf lib ; rm -rf include )
+
+endif
+
+ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT)
+
+all:   .contrib
+
+.contrib:    
+       ( cd .. ; ./configure ; cd contrib ; cp -f ../config.jam . ; jam.exe )
+
+clean:
+       ( echo "Do a make mrproper to remove the contrib libraries )
+
+mrproper: clean
+       (rm -rf lib ; rm -rf include ; rm -f .contrib)
+
+endif
diff --git a/contrib/patch-a52dec.patch b/contrib/patch-a52dec.patch
new file mode 100644 (file)
index 0000000..cf1c8a6
--- /dev/null
@@ -0,0 +1,114 @@
+diff -Naur a52dec_original/include/a52.h a52dec_patched/include/a52.h
+--- a52dec_original/include/a52.h      2002-01-28 05:37:54.000000000 +0000
++++ a52dec_patched/include/a52.h       2007-04-04 19:12:57.000000000 +0100
+@@ -48,6 +48,10 @@
+ #define A52_LFE 16
+ #define A52_ADJUST_LEVEL 32
++// this next constant can be ORed with A52_DOLBY to tell liba52 to use 5.0 DPLII matrix encoding,
++// rather than just 4.0 Dolby Surround matrix encoding
++#define A52_USE_DPLII 64
++
+ a52_state_t * a52_init (uint32_t mm_accel);
+ sample_t * a52_samples (a52_state_t * state);
+ int a52_syncinfo (uint8_t * buf, int * flags,
+diff -Naur a52dec_original/liba52/a52_internal.h a52dec_patched/liba52/a52_internal.h
+--- a52dec_original/liba52/a52_internal.h      2002-07-28 02:52:06.000000000 +0100
++++ a52dec_patched/liba52/a52_internal.h       2007-04-04 19:11:43.000000000 +0100
+@@ -93,6 +93,10 @@
+ #define LEVEL_45DB 0.5946035575013605
+ #define LEVEL_6DB 0.5
++// these next two constants are used for DPL matrix encoding in downmix.c
++#define LEVEL_SQRT_1_2 0.5
++#define LEVEL_SQRT_3_4 0.8660254037844386
++
+ #define EXP_REUSE (0)
+ #define EXP_D15   (1)
+ #define EXP_D25   (2)
+diff -Naur a52dec_original/liba52/downmix.c a52dec_patched/liba52/downmix.c
+--- a52dec_original/liba52/downmix.c   2002-01-28 05:37:54.000000000 +0000
++++ a52dec_patched/liba52/downmix.c    2007-04-06 13:47:49.000000000 +0100
+@@ -34,6 +34,7 @@
+ int a52_downmix_init (int input, int flags, sample_t * level,
+                     sample_t clev, sample_t slev)
+ {
++
+     static uint8_t table[11][8] = {
+       {A52_CHANNEL,   A52_DOLBY,      A52_STEREO,     A52_STEREO,
+        A52_STEREO,    A52_STEREO,     A52_STEREO,     A52_STEREO},
+@@ -148,6 +149,9 @@
+           break;
+       }
++      // add the DPLII flag back into the output if it was passed in
++      output = output | (flags & A52_USE_DPLII);
++
+     return output;
+ }
+@@ -418,17 +422,46 @@
+     }
+ }
+-static void mix32toS (sample_t * samples, sample_t bias)
++static void mix32toS (sample_t * samples, sample_t bias, int use_dpl2)
+ {
+-    int i;
+-    sample_t common, surround;
+-    for (i = 0; i < 256; i++) {
+-      common = samples[i + 256] + bias;
+-      surround = samples[i + 768] + samples[i + 1024];
+-      samples[i] += common - surround;
+-      samples[i + 256] = samples[i + 512] + common + surround;
+-    }
++      if (use_dpl2 == 1) {
++
++              int i;
++              sample_t cc, Lt, Rt, Ls, Rs, Lss, Rss;
++      
++              for (i = 0; i < 256; i++) {
++      
++                      cc = samples[i + 256] * LEVEL_3DB;
++              
++                      Lt = samples[i] + cc;
++                      Rt = samples[i + 512] + cc;
++              
++                      Ls = samples[i + 768];
++                      Rs = samples[i + 1024];
++                      
++                      Lss = (LEVEL_SQRT_3_4 * Ls) - (LEVEL_SQRT_1_2 * Rs);
++                      Rss = -(LEVEL_SQRT_1_2 * Ls) + (LEVEL_SQRT_3_4 * Rs);
++              
++                      samples[i] = bias + Lt + Lss;
++                      samples[i + 256] = bias + Rt + Rss;
++      
++              }
++
++      } else {
++
++              int i;
++              sample_t common, surround;
++      
++              for (i = 0; i < 256; i++) {
++              common = samples[i + 256] + bias;
++              surround = samples[i + 768] + samples[i + 1024];
++              samples[i] += common - surround;
++              samples[i + 256] = samples[i + 512] + common + surround;
++              }
++
++      }
++
+ }
+ static void move2to1 (sample_t * src, sample_t * dest, sample_t bias)
+@@ -533,7 +566,7 @@
+       break;
+     case CONVERT (A52_3F2R, A52_DOLBY):
+-      mix32toS (samples, bias);
++      mix32toS (samples, bias, ((output & A52_USE_DPLII) == A52_USE_DPLII));
+       break;
+     case CONVERT (A52_3F1R, A52_3F):
diff --git a/contrib/patch-faac-cygwin.patch b/contrib/patch-faac-cygwin.patch
new file mode 100644 (file)
index 0000000..d54b08d
--- /dev/null
@@ -0,0 +1,12 @@
+diff -Naur faac2/include/faac.h faac3/include/faac.h
+--- faac/include/faac.h        2004-07-04 13:12:06.000000000 +0100
++++ faac/include/faac.h        2008-08-17 19:56:29.734375000 +0100
+@@ -50,7 +50,7 @@
+ typedef void *faacEncHandle;
+ #ifndef HAVE_INT32_T
+-typedef int int32_t;
++//typedef int int32_t;
+ #endif
+ /*
diff --git a/contrib/patch-faad2-libtool22.patch b/contrib/patch-faad2-libtool22.patch
new file mode 100644 (file)
index 0000000..4eab084
--- /dev/null
@@ -0,0 +1,13 @@
+Index: faad2/configure.in
+===================================================================
+--- faad2.orig/configure.in
++++ faad2/configure.in
+@@ -18,7 +18,7 @@ dnl Checks for programs.
+ AC_PROG_CC
+ AC_PROG_CPP
+ dnl disable for mpeg4ip plugin
+-dnl AC_PROG_CXX
++AC_PROG_CXX
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
diff --git a/contrib/patch-ffmpeg-cygwin.patch b/contrib/patch-ffmpeg-cygwin.patch
new file mode 100644 (file)
index 0000000..b6ca99f
--- /dev/null
@@ -0,0 +1,15 @@
+diff -Naur ffmpeg/libavcodec/mpegaudiodec.c ffmpeg-patched/libavcodec/mpegaudiodec.c
+--- ffmpeg/libavcodec/mpegaudiodec.c   2006-09-23 14:22:06.000000000 -0400
++++ ffmpeg-patched/libavcodec/mpegaudiodec.c   2007-01-01 18:31:51.156250000 -0500
+@@ -401,9 +401,9 @@
+         for(i=0; i<512*16; i++){
+             int exponent= (i>>4);
+             double f= pow(i&15, 4.0 / 3.0) * pow(2, (exponent-400)*0.25 + FRAC_BITS + 5);
+-            expval_table[exponent][i&15]= llrint(f);
++            expval_table[exponent][i&15]= lrint(f);
+             if((i&15)==1)
+-                exp_table[exponent]= llrint(f);
++                exp_table[exponent]= lrint(f);
+         }
+         for(i=0;i<7;i++) {
diff --git a/contrib/patch-ffmpeg-latm.patch b/contrib/patch-ffmpeg-latm.patch
new file mode 100644 (file)
index 0000000..5a50318
--- /dev/null
@@ -0,0 +1,893 @@
+Index: libavcodec/Makefile
+===================================================================
+--- libavcodec/Makefile        (revision 14016)
++++ libavcodec/Makefile        (working copy)
+@@ -322,7 +322,7 @@
+ OBJS-$(CONFIG_LIBDIRAC_DECODER)        += libdiracdec.o
+ OBJS-$(CONFIG_LIBDIRAC_ENCODER)        += libdiracenc.o libdirac_libschro.o
+ OBJS-$(CONFIG_LIBFAAC)                 += libfaac.o
+-OBJS-$(CONFIG_LIBFAAD)                 += libfaad.o
++OBJS-$(CONFIG_LIBFAAD)                 += libfaad.o latmaac.o
+ OBJS-$(CONFIG_LIBGSM)                  += libgsm.o
+ OBJS-$(CONFIG_LIBMP3LAME)              += libmp3lame.o
+ OBJS-$(CONFIG_LIBSCHROEDINGER_DECODER) += libschroedingerdec.o libschroedinger.o libdirac_libschro.o
+@@ -333,7 +333,7 @@
+ OBJS-$(CONFIG_LIBXVID)                 += libxvidff.o libxvid_rc.o
+-OBJS-$(CONFIG_AAC_PARSER)              += aac_parser.o aac_ac3_parser.o mpeg4audio.o
++OBJS-$(CONFIG_AAC_PARSER)              += aac_parser.o aac_ac3_parser.o mpeg4audio.o latm_parser.o
+ OBJS-$(CONFIG_AC3_PARSER)              += ac3_parser.o ac3tab.o aac_ac3_parser.o
+ OBJS-$(CONFIG_CAVSVIDEO_PARSER)        += cavs_parser.o
+ OBJS-$(CONFIG_DCA_PARSER)              += dca_parser.o
+Index: libavcodec/latmaac.c
+===================================================================
+--- libavcodec/latmaac.c       (revision 0)
++++ libavcodec/latmaac.c       (revision 0)
+@@ -0,0 +1,624 @@
++/*
++ * copyright (c) 2008 Paul Kendall <paul@kcbbs.gen.nz>
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg 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
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++/**
++ * @file latmaac.c
++ * LATM wrapped AAC decoder
++ */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <math.h>
++#include <sys/types.h>
++
++#include "parser.h"
++#include "bitstream.h"
++#include "mpeg4audio.h"
++#include "neaacdec.h"
++
++#define min(a,b) ((a)<(b) ? (a) : (b))
++
++
++/*
++    Note: This decoder filter is intended to decode LATM streams transferred
++    in MPEG transport streams which are only supposed to contain one program.
++    To do a more complex LATM demuxing a separate LATM demuxer should be used.
++*/
++
++#define AAC_NONE 0            // mode not detected (or indicated in mediatype)
++#define AAC_LATM 1            // LATM packets (ISO/IEC 14496-3  1.7.3 Multiplex layer)
++
++#define SYNC_LATM 0x2b7            // 11 bits
++
++#define MAX_SIZE 8*1024
++
++typedef struct AACConfig
++{
++    uint8_t    extra[64];            // should be way enough
++    int        extrasize;
++
++    int        audioObjectType;
++    int        samplingFrequencyIndex;
++    int        samplingFrequency;
++    int        channelConfiguration;
++    int        channels;
++} AACConfig;
++
++typedef struct AACParser
++{
++    AACConfig          config;
++    uint8_t            frameLengthType;
++    uint16_t           muxSlotLengthBytes;
++
++    uint8_t            audio_mux_version;
++    uint8_t            audio_mux_version_A;
++    int                taraFullness;
++    uint8_t            config_crc;
++    int64_t            other_data_bits;
++
++    int                mode;
++    int                offset;        // byte offset in "buf" buffer
++    uint8_t            buf[MAX_SIZE]; // allocated buffer
++    int                count;         // number of bytes written in buffer
++} AACParser;
++
++typedef struct AACDecoder 
++{
++    AACParser          *parser;
++    faacDecHandle      aac_decoder;
++    int                open;
++    uint32_t           in_samplerate;
++    uint8_t            in_channels;
++} AACDecoder;
++
++typedef struct {
++    AACDecoder*        decoder;
++} FAACContext;
++
++static inline int64_t latm_get_value(GetBitContext *b)
++{
++    uint8_t bytesForValue = get_bits(b, 2);
++    int64_t value = 0;
++    int i;
++    for (i=0; i<=bytesForValue; i++) {
++        value <<= 8;
++        value |= get_bits(b, 8);
++    }
++    return value;
++}
++
++static void readGASpecificConfig(struct AACConfig *cfg, GetBitContext *b, PutBitContext *o)
++{
++    int framelen_flag = get_bits(b, 1);
++    put_bits(o, 1, framelen_flag);
++    int dependsOnCoder = get_bits(b, 1);
++    put_bits(o, 1, dependsOnCoder);
++    int ext_flag;
++    int delay;
++    int layerNr;
++
++    if (dependsOnCoder) {
++        delay = get_bits(b, 14);
++        put_bits(o, 14, delay);
++    }
++    ext_flag = get_bits(b, 1);
++    put_bits(o, 1, ext_flag);
++    if (!cfg->channelConfiguration) {
++        // program config element
++        // TODO:
++    }
++
++    if (cfg->audioObjectType == 6 || cfg->audioObjectType == 20) {
++        layerNr = get_bits(b, 3);
++        put_bits(o, 3, layerNr);
++    }
++    if (ext_flag) {
++        if (cfg->audioObjectType == 22) {
++            skip_bits(b, 5);                    // numOfSubFrame
++            skip_bits(b, 11);                    // layer_length
++
++            put_bits(o, 16, 0);
++        }
++        if (cfg->audioObjectType == 17 ||
++            cfg->audioObjectType == 19 ||
++            cfg->audioObjectType == 20 ||
++            cfg->audioObjectType == 23) {
++
++            skip_bits(b, 3);                    // stuff
++            put_bits(o, 3, 0);
++        }
++
++        skip_bits(b, 1);                        // extflag3
++        put_bits(o, 1, 0);
++    }
++}
++
++static int readAudioSpecificConfig(struct AACConfig *cfg, GetBitContext *b)
++{
++    PutBitContext o;
++    init_put_bits(&o, cfg->extra, sizeof(cfg->extra));
++
++    // returns the number of bits read
++    int ret = 0;
++    int sbr_present = -1;
++
++    // object
++    cfg->audioObjectType = get_bits(b, 5);
++        put_bits(&o, 5, cfg->audioObjectType);
++    if (cfg->audioObjectType == 31) {
++        uint8_t n = get_bits(b, 6);
++        put_bits(&o, 6, n);
++        cfg->audioObjectType = 32 + n;
++    }
++
++    cfg->samplingFrequencyIndex = get_bits(b, 4);
++    cfg->samplingFrequency = ff_mpeg4audio_sample_rates[cfg->samplingFrequencyIndex];
++    put_bits(&o, 4, cfg->samplingFrequencyIndex);
++    if (cfg->samplingFrequencyIndex == 0x0f) {
++        uint32_t f = get_bits_long(b, 24);
++        put_bits(&o, 24, f);
++        cfg->samplingFrequency = f;
++    }
++    cfg->channelConfiguration = get_bits(b, 4);
++    put_bits(&o, 4, cfg->channelConfiguration);
++    cfg->channels = ff_mpeg4audio_channels[cfg->channelConfiguration];
++
++    if (cfg->audioObjectType == 5) {
++        sbr_present = 1;
++
++        // TODO: parsing !!!!!!!!!!!!!!!!
++    }
++
++    switch (cfg->audioObjectType) {
++    case 1:
++    case 2:
++    case 3:
++    case 4:
++    case 6:
++    case 7:
++    case 17:
++    case 19:
++    case 20:
++    case 21:
++    case 22:
++    case 23:
++        readGASpecificConfig(cfg, b, &o);
++        break;
++    }
++
++    if (sbr_present == -1) {
++        if (cfg->samplingFrequency <= 24000) {
++            cfg->samplingFrequency *= 2;
++        }            
++    }
++
++    // count the extradata
++    ret = put_bits_count(&o);
++    align_put_bits(&o);
++    flush_put_bits(&o);
++    cfg->extrasize = (ret + 7) >> 3;
++    return ret;
++}
++
++static void readStreamMuxConfig(struct AACParser *parser, GetBitContext *b)
++{
++    parser->audio_mux_version_A = 0;
++    parser->audio_mux_version = get_bits(b, 1);
++    if (parser->audio_mux_version == 1) {                // audioMuxVersion
++        parser->audio_mux_version_A = get_bits(b, 1);
++    }
++
++    if (parser->audio_mux_version_A == 0) {
++        if (parser->audio_mux_version == 1) {
++            parser->taraFullness = latm_get_value(b);
++        }
++        get_bits(b, 1);                    // allStreamSameTimeFraming = 1
++        get_bits(b, 6);                    // numSubFrames = 0
++        get_bits(b, 4);                    // numPrograms = 0
++
++        // for each program
++        get_bits(b, 3);                    // numLayer = 0
++
++        // for each layer
++        if (parser->audio_mux_version == 0) {
++            // audio specific config.
++            readAudioSpecificConfig(&parser->config, b);
++        } else {
++            int ascLen = latm_get_value(b);
++            ascLen -= readAudioSpecificConfig(&parser->config, b);
++
++            // fill bits
++            while (ascLen > 16) {
++                skip_bits(b, 16);
++                ascLen -= 16;
++            }
++            skip_bits(b, ascLen);                    
++        }
++
++        // these are not needed... perhaps
++        int frame_length_type = get_bits(b, 3);
++        parser->frameLengthType = frame_length_type;
++        if (frame_length_type == 0) {
++            get_bits(b, 8);
++        } else if (frame_length_type == 1) {
++            get_bits(b, 9);
++        } else if (frame_length_type == 3 ||
++            frame_length_type == 4 ||
++            frame_length_type == 5) {
++            int celp_table_index = get_bits(b, 6);
++        } else if (frame_length_type == 6 ||
++            frame_length_type == 7) {
++            int hvxc_table_index = get_bits(b, 1);
++        }
++
++        // other data
++        parser->other_data_bits = 0;
++        if (get_bits(b, 1)) {
++            // other data present
++            if (parser->audio_mux_version == 1) {
++                parser->other_data_bits = latm_get_value(b);
++            } else {
++                // other data not present
++                parser->other_data_bits = 0;
++                int esc, tmp;
++                do {
++                    parser->other_data_bits <<= 8;
++                    esc = get_bits(b, 1);
++                    tmp = get_bits(b, 8);
++                    parser->other_data_bits |= tmp;
++                } while (esc);
++            }
++        }
++
++        // CRC
++        if (get_bits(b, 1)) {
++            parser->config_crc = get_bits(b, 8);
++        }
++    } else {
++        // tbd
++    }
++}
++
++static void readPayloadLengthInfo(struct AACParser *parser, GetBitContext *b)
++{
++    uint8_t tmp;
++    if (parser->frameLengthType == 0) {
++        parser->muxSlotLengthBytes = 0;
++        do {
++            tmp = get_bits(b, 8);
++            parser->muxSlotLengthBytes += tmp;
++        } while (tmp == 255);
++    } else {
++        if (parser->frameLengthType == 5 ||
++            parser->frameLengthType == 7 ||
++            parser->frameLengthType == 3) {
++            get_bits(b, 2);
++        }
++    }
++}
++
++static void readAudioMuxElement(struct AACParser *parser, GetBitContext *b, uint8_t *payload, int *payloadsize)
++{
++    uint8_t    use_same_mux = get_bits(b, 1);
++    if (!use_same_mux) {
++        readStreamMuxConfig(parser, b);
++    }
++
++    if (parser->audio_mux_version_A == 0) {
++        int j;
++
++        readPayloadLengthInfo(parser, b);
++
++        // copy data
++        for (j=0; j<parser->muxSlotLengthBytes; j++) {
++            *payload++ = get_bits(b, 8);
++        }
++        *payloadsize = parser->muxSlotLengthBytes;
++
++        // ignore otherdata
++    } else {
++        // TBD
++    }
++}
++
++static int readAudioSyncStream(struct AACParser *parser, GetBitContext *b, int size, uint8_t *payload, int *payloadsize)
++{
++    // ISO/IEC 14496-3 Table 1.28 - Syntax of AudioMuxElement()
++    if (get_bits(b, 11) != 0x2b7) return -1;        // not LATM
++    int muxlength = get_bits(b, 13);
++
++    if (3+muxlength > size) return 0;            // not enough data
++
++    readAudioMuxElement(parser, b, payload, payloadsize);
++
++    // we don't parse anything else here...
++    return (3+muxlength);
++}
++
++
++static void flush_buf(struct AACParser *parser, int offset) {
++    int bytes_to_flush = min(parser->count, offset);
++    int left = (parser->count - bytes_to_flush);
++
++    if (bytes_to_flush > 0) {
++        if (left > 0) {
++            memcpy(parser->buf, parser->buf+bytes_to_flush, left);
++            parser->count = left;
++        } else {
++            parser->count = 0;
++        }
++    }
++}
++
++static struct AACParser *latm_create_parser()
++{
++    struct AACParser *parser = (struct AACParser *)av_malloc(sizeof(struct AACParser));
++    memset(parser, 0, sizeof(struct AACParser));
++    return parser;
++}
++
++static void latm_destroy_parser(struct AACParser *parser)
++{
++    av_free(parser);
++}
++
++static void latm_flush(struct AACParser *parser)
++{
++    parser->offset = 0;
++    parser->count = 0;
++}
++
++static void latm_write_data(struct AACParser *parser, uint8_t *data, int len)
++{
++    // buffer overflow check... just ignore the data before
++    if (parser->count + len > MAX_SIZE) {
++        flush_buf(parser, parser->offset);
++        parser->offset = 0;
++        if (parser->count + len > MAX_SIZE) {
++            int to_flush = (parser->count+len) - MAX_SIZE;
++            flush_buf(parser, to_flush);
++        }
++    }
++
++    // append data
++    memcpy(parser->buf+parser->count, data, len);
++    parser->count += len;
++}
++
++static int latm_parse_packet(struct AACParser *parser, uint8_t *data, int maxsize)
++{
++    /*
++        Return value is either number of bytes parsed or
++        -1 when failed.
++        0 = need more data.
++    */
++
++    uint8_t    *start = parser->buf + parser->offset;
++    int        bytes  = parser->count - parser->offset;
++    GetBitContext    b;
++    init_get_bits(&b, start, bytes);
++
++    if (parser->mode == AAC_LATM) {
++        int outsize = 0;
++        int    ret = readAudioSyncStream(parser, &b, bytes, data, &outsize);
++
++        if (ret < 0) return -1;
++        if (ret == 0) return 0;
++
++        // update the offset
++        parser->offset += ret;
++        return outsize;
++    }
++
++    // check for syncwords
++    while (bytes > 2) {
++        if (show_bits(&b, 11) == SYNC_LATM) {
++            // we must parse config first...
++            int outsize = 0;
++
++            // check if there is a complete packet available...
++            int ret = readAudioSyncStream(parser, &b, bytes, data, &outsize);
++            if (ret < 0) return -1;
++            if (ret == 0) return 0;
++            parser->offset += ret;
++
++            parser->mode = AAC_LATM;
++            return outsize;
++        }
++        skip_bits(&b, 8);
++        parser->offset++;
++        bytes--;
++    }
++    return 0;
++}
++
++static void aac_filter_close(AACDecoder *decoder)
++{
++    if (decoder->aac_decoder) {
++        NeAACDecClose(decoder->aac_decoder);
++        decoder->aac_decoder = NULL;
++    }
++    decoder->open = 0;
++}
++
++static int aac_decoder_open(AACDecoder *decoder)
++{
++    if (decoder->aac_decoder) return 0;
++
++    decoder->aac_decoder = NeAACDecOpen();
++    if (!decoder->aac_decoder) return -1;
++
++    // are we going to initialize from decoder specific info ?
++    if (decoder->parser->config.extrasize > 0) {
++        char ret = NeAACDecInit2(decoder->aac_decoder, (unsigned char*)decoder->parser->config.extra, decoder->parser->config.extrasize, &decoder->in_samplerate, &decoder->in_channels);
++        if (ret < 0) {
++            aac_filter_close(decoder);        // gone wrong ?
++            return -1;
++        }
++        decoder->open = 1;
++    } else {
++        // we'll open the decoder later...
++        decoder->open = 0;
++    }
++    return 0;
++}
++
++AACDecoder *aac_filter_create()
++{
++    AACDecoder *decoder = (AACDecoder *)av_malloc(sizeof(AACDecoder));
++    decoder->parser = latm_create_parser();
++    decoder->aac_decoder = NULL;
++    decoder->open = 0;
++    return (void *)decoder;
++}
++
++void aac_filter_destroy(AACDecoder *decoder)
++{
++    aac_filter_close(decoder);
++    latm_destroy_parser(decoder->parser);
++    av_free(decoder);
++}
++
++int aac_filter_receive(AACDecoder *decoder, void *out, int *out_size, uint8_t *data, int size)
++{
++    uint8_t    tempbuf[32*1024];
++    int        ret;
++    int        consumed = size;
++    int        decoded;
++    int        max_size = *out_size;
++    
++    *out_size = 0;
++
++    //-------------------------------------------------------------------------
++    // Multiplex Parsing
++    //-------------------------------------------------------------------------
++
++    latm_write_data(decoder->parser, data, size);
++
++    do {
++        ret = latm_parse_packet(decoder->parser, tempbuf, sizeof(tempbuf));
++                if (ret < 0) {
++                        latm_flush(decoder->parser);
++                        return consumed;
++                }
++        if (ret == 0) return consumed;
++
++        data = tempbuf;
++        size = ret;
++
++        //-------------------------------------------------------------------------
++        // Initialize decoder (if necessary)
++        //-------------------------------------------------------------------------
++        if (!decoder->open) {
++            aac_filter_close(decoder);
++            if (decoder->parser->mode == AAC_LATM) {
++                ret = aac_decoder_open(decoder);
++                if (ret < 0) return consumed;
++            }
++
++            if(!decoder->open) return consumed;
++        }
++
++        //-------------------------------------------------------------------------
++        // Decode samples
++        //-------------------------------------------------------------------------
++        NeAACDecFrameInfo    info;
++        void *buf = NeAACDecDecode(decoder->aac_decoder, &info, data, size);
++
++        if (buf) {
++            decoder->in_samplerate = info.samplerate;
++            decoder->in_channels = info.channels;
++
++            //---------------------------------------------------------------------
++            // Deliver decoded samples
++            //---------------------------------------------------------------------
++
++            // kram dekoduje 16-bit. my vypustame 16-bit. takze by to malo byt okej
++            decoded = info.samples * sizeof(short);
++
++            // napraskame tam sample
++            *out_size += decoded;
++            if(*out_size > max_size) {
++                av_log(NULL, AV_LOG_ERROR, "overflow!\n");
++            } else {
++                memcpy(out, buf, decoded);
++                out = (unsigned char *)out + decoded;
++            }
++        } else {
++            // need more data
++            break;
++        }
++
++    } while (1);    // decode all packets
++    return consumed;
++}
++
++void aac_filter_getinfo(AACDecoder *decoder, int *sample_rate, int *channels)
++{
++    if(!decoder->open) return;
++    *sample_rate = decoder->in_samplerate;
++    *channels = decoder->in_channels;
++}
++
++static int faac_decode_init(AVCodecContext *avctx)
++{
++    FAACContext *s = avctx->priv_data;
++    avctx->frame_size = 360;
++    avctx->sample_rate = 48000;
++    avctx->channels = 2;
++    avctx->bit_rate = 8192 * 8 * avctx->sample_rate / avctx->frame_size;
++    s->decoder = aac_filter_create();
++    return 0;
++}
++
++static int faac_decode_frame(AVCodecContext *avctx,
++                             void *data, int *data_size,
++                             uint8_t *buf, int buf_size)
++{
++    FAACContext *s = avctx->priv_data;
++    int ret;
++
++    if (s->decoder == NULL) faac_decode_init(avctx);
++    ret = aac_filter_receive(s->decoder, data, data_size, buf, buf_size);
++    aac_filter_getinfo(s->decoder, &(avctx->sample_rate), &(avctx->channels));
++    return ret;
++}
++
++static int faac_decode_end(AVCodecContext *avctx)
++{
++    FAACContext *s = avctx->priv_data;
++    if(s->decoder != NULL) {
++        aac_filter_destroy(s->decoder);
++    }
++    return 0;
++}
++
++AVCodec libfaad2_decoder = {
++    .name = "AAC_LATM",
++    .type = CODEC_TYPE_AUDIO,
++    .id = CODEC_ID_AAC_LATM,
++    .priv_data_size = sizeof (FAACContext),
++    .init = faac_decode_init,
++    .close = faac_decode_end,
++    .decode = faac_decode_frame,
++    .long_name = "AAC over LATM",
++};
++
+Index: libavcodec/latm_parser.c
+===================================================================
+--- libavcodec/latm_parser.c   (revision 0)
++++ libavcodec/latm_parser.c   (revision 0)
+@@ -0,0 +1,128 @@
++/*
++ * LATM parser
++ * Copyright (c) 2008 Paul Kendall <paul@kcbbs.gen.nz>
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg 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
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++/**
++ * @file latm_parser.c
++ * LATM parser
++ */
++
++#include "parser.h"
++
++#define LATM_HEADER     0x56e000      // 0x2b7 (11 bits)
++#define LATM_MASK       0xFFE000      // top 11 bits
++#define LATM_SIZE_MASK  0x001FFF      // bottom 13 bits
++
++typedef struct LATMParseContext{
++    ParseContext pc;
++    int count;
++} LATMParseContext;
++
++/**
++ * finds the end of the current frame in the bitstream.
++ * @return the position of the first byte of the next frame, or -1
++ */
++static int latm_find_frame_end(AVCodecParserContext *s1, const uint8_t *buf,
++                               int buf_size) {
++    LATMParseContext *s = s1->priv_data;
++    ParseContext *pc = &s->pc;
++    int pic_found, i;
++    uint32_t state;
++
++    pic_found = pc->frame_start_found;
++    state = pc->state;
++
++    i = 0;
++    if(!pic_found){
++        for(i=0; i<buf_size; i++){
++            state = (state<<8) | buf[i];
++            if((state & LATM_MASK) == LATM_HEADER){
++                i++;
++                s->count = - i;
++                pic_found=1;
++                break;
++            }
++        }
++    }
++
++    if(pic_found){
++        /* EOF considered as end of frame */
++        if (buf_size == 0)
++            return 0;
++        if((state & LATM_SIZE_MASK) - s->count <= buf_size) {
++            pc->frame_start_found = 0;
++            pc->state = -1;
++            return (state & LATM_SIZE_MASK) - s->count;
++      }
++    }
++
++    s->count += buf_size;
++    pc->frame_start_found = pic_found;
++    pc->state = state;
++    return END_NOT_FOUND;
++}
++
++static int latm_parse(AVCodecParserContext *s1,
++                           AVCodecContext *avctx,
++                           const uint8_t **poutbuf, int *poutbuf_size,
++                           const uint8_t *buf, int buf_size)
++{
++    LATMParseContext *s = s1->priv_data;
++    ParseContext *pc = &s->pc;
++    int next;
++
++    if(s1->flags & PARSER_FLAG_COMPLETE_FRAMES){
++        next = buf_size;
++    }else{
++        next = latm_find_frame_end(s1, buf, buf_size);
++
++        if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
++            *poutbuf = NULL;
++            *poutbuf_size = 0;
++            return buf_size;
++        }
++    }
++    *poutbuf = buf;
++    *poutbuf_size = buf_size;
++    return next;
++}
++
++static int latm_split(AVCodecContext *avctx,
++                           const uint8_t *buf, int buf_size)
++{
++    int i;
++    uint32_t state= -1;
++
++    for(i=0; i<buf_size; i++){
++        state= (state<<8) | buf[i];
++        if((state & LATM_MASK) == LATM_HEADER)
++            return i-2;
++    }
++    return 0;
++}
++
++AVCodecParser aac_latm_parser = {
++    { CODEC_ID_AAC_LATM },
++    sizeof(LATMParseContext),
++    NULL,
++    latm_parse,
++    ff_parse_close,
++    latm_split,
++};
+Index: libavcodec/allcodecs.c
+===================================================================
+--- libavcodec/allcodecs.c     (revision 14016)
++++ libavcodec/allcodecs.c     (working copy)
+@@ -280,6 +280,7 @@
+     REGISTER_ENCDEC  (LIBDIRAC, libdirac);
+     REGISTER_ENCODER (LIBFAAC, libfaac);
+     REGISTER_DECODER (LIBFAAD, libfaad);
++    REGISTER_DECODER (LIBFAAD, libfaad2);
+     REGISTER_ENCDEC  (LIBGSM, libgsm);
+     REGISTER_ENCDEC  (LIBGSM_MS, libgsm_ms);
+     REGISTER_ENCODER (LIBMP3LAME, libmp3lame);
+@@ -294,6 +295,7 @@
+     /* parsers */
+     REGISTER_PARSER  (AAC, aac);
++    REGISTER_PARSER  (AAC, aac_latm);
+     REGISTER_PARSER  (AC3, ac3);
+     REGISTER_PARSER  (CAVSVIDEO, cavsvideo);
+     REGISTER_PARSER  (DCA, dca);
+Index: libavcodec/avcodec.h
+===================================================================
+--- libavcodec/avcodec.h       (revision 14016)
++++ libavcodec/avcodec.h       (working copy)
+@@ -259,4 +259,5 @@
+     CODEC_ID_AAC,
++    CODEC_ID_AAC_LATM,
+     CODEC_ID_AC3,
+     CODEC_ID_DTS,
+     CODEC_ID_VORBIS,
+Index: libavformat/mpegts.c
+===================================================================
+--- libavformat/mpegts.c       (revision 14016)
++++ libavformat/mpegts.c       (working copy)
+@@ -611,6 +611,7 @@
+         case STREAM_TYPE_VIDEO_H264:
+         case STREAM_TYPE_VIDEO_VC1:
+         case STREAM_TYPE_AUDIO_AAC:
++        case STREAM_TYPE_AUDIO_AAC_LATM:
+         case STREAM_TYPE_AUDIO_AC3:
+         case STREAM_TYPE_AUDIO_DTS:
+         case STREAM_TYPE_AUDIO_HDMV_DTS:
+@@ -832,7 +833,7 @@
+                     code = pes->header[3] | 0x100;
+                     if (!((code >= 0x1c0 && code <= 0x1df) ||
+                           (code >= 0x1e0 && code <= 0x1ef) ||
+-                          (code == 0x1bd) || (code == 0x1fd)))
++                          (code == 0x1bd) || (code == 0x1fa) || (code == 0x1fd)))
+                         goto skip;
+                     if (!pes->st) {
+                         /* allocate stream */
+@@ -948,6 +949,10 @@
+         codec_type = CODEC_TYPE_AUDIO;
+         codec_id = CODEC_ID_AAC;
+         break;
++    case STREAM_TYPE_AUDIO_AAC_LATM:
++        codec_type = CODEC_TYPE_AUDIO;
++        codec_id = CODEC_ID_AAC_LATM;
++        break;
+     case STREAM_TYPE_AUDIO_AC3:
+         codec_type = CODEC_TYPE_AUDIO;
+         codec_id = CODEC_ID_AC3;
+Index: libavformat/mpegts.h
+===================================================================
+--- libavformat/mpegts.h       (revision 14016)
++++ libavformat/mpegts.h       (working copy)
+@@ -50,6 +50,7 @@
+ #define STREAM_TYPE_PRIVATE_DATA    0x06
+ #define STREAM_TYPE_AUDIO_AAC       0x0f
+ #define STREAM_TYPE_VIDEO_MPEG4     0x10
++#define STREAM_TYPE_AUDIO_AAC_LATM  0x11
+ #define STREAM_TYPE_VIDEO_H264      0x1b
+ #define STREAM_TYPE_VIDEO_VC1       0xea
+Index: libavformat/mpeg.c
+===================================================================
+--- libavformat/mpeg.c (revision 14016)
++++ libavformat/mpeg.c (working copy)
+@@ -281,7 +281,7 @@
+     /* find matching stream */
+     if (!((startcode >= 0x1c0 && startcode <= 0x1df) ||
+           (startcode >= 0x1e0 && startcode <= 0x1ef) ||
+-          (startcode == 0x1bd) || (startcode == 0x1fd)))
++          (startcode == 0x1bd) || (startcode == 0x1fa) || (startcode == 0x1fd)))
+         goto redo;
+     if (ppos) {
+         *ppos = url_ftell(s->pb) - 4;
+@@ -439,6 +439,9 @@
+         } else if(es_type == STREAM_TYPE_AUDIO_AAC){
+             codec_id = CODEC_ID_AAC;
+             type = CODEC_TYPE_AUDIO;
++        } else if(es_type == STREAM_TYPE_AUDIO_AAC_LATM){
++            codec_id = CODEC_ID_AAC_LATM;
++            type = CODEC_TYPE_AUDIO;
+         } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){
+             codec_id = CODEC_ID_MPEG4;
+             type = CODEC_TYPE_VIDEO;
+Index: libavformat/mpeg.h
+===================================================================
+--- libavformat/mpeg.h (revision 14016)
++++ libavformat/mpeg.h (working copy)
+@@ -53,6 +53,7 @@
+ #define STREAM_TYPE_PRIVATE_DATA    0x06
+ #define STREAM_TYPE_AUDIO_AAC       0x0f
+ #define STREAM_TYPE_VIDEO_MPEG4     0x10
++#define STREAM_TYPE_AUDIO_AAC_LATM  0x11
+ #define STREAM_TYPE_VIDEO_H264      0x1b
+ #define STREAM_TYPE_AUDIO_AC3       0x81
diff --git a/contrib/patch-ffmpeg-mpegleak.patch b/contrib/patch-ffmpeg-mpegleak.patch
new file mode 100644 (file)
index 0000000..7490725
--- /dev/null
@@ -0,0 +1,58 @@
+Index: libavcodec/h264.c
+===================================================================
+--- libavcodec/h264.c  (revision 14820)
++++ libavcodec/h264.c  (working copy)
+@@ -3355,7 +3355,7 @@
+          * stream. Need to discard one frame. Prevents overrun of the
+          * short_ref and long_ref buffers.
+          */
+-        av_log(h->s.avctx, AV_LOG_ERROR,
++        av_log(h->s.avctx, AV_LOG_DEBUG,
+                "number of reference frames exceeds max (probably "
+                "corrupt input), discarding one\n");
+@@ -7557,7 +7557,7 @@
+     if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){
+         if (avctx->skip_frame >= AVDISCARD_NONREF || s->hurry_up) return 0;
+-        av_log(avctx, AV_LOG_ERROR, "no frame!\n");
++        av_log(avctx, AV_LOG_DEBUG, "no frame!\n");
+         return -1;
+     }
+Index: libavcodec/mpegvideo.c
+===================================================================
+--- libavcodec/mpegvideo.c     (revision 14820)
++++ libavcodec/mpegvideo.c     (working copy)
+@@ -779,19 +779,18 @@
+     }
+     av_log(s->avctx, AV_LOG_FATAL, "Internal error, picture buffer overflow\n");
+-    /* We could return -1, but the codec would crash trying to draw into a
+-     * non-existing frame anyway. This is safer than waiting for a random crash.
+-     * Also the return of this is never useful, an encoder must only allocate
+-     * as much as allowed in the specification. This has no relationship to how
+-     * much libavcodec could allocate (and MAX_PICTURE_COUNT is always large
+-     * enough for such valid streams).
+-     * Plus, a decoder has to check stream validity and remove frames if too
+-     * many reference frames are around. Waiting for "OOM" is not correct at
+-     * all. Similarly, missing reference frames have to be replaced by
+-     * interpolated/MC frames, anything else is a bug in the codec ...
+-     */
+-    abort();
+-    return -1;
++    /* XXX there seems to be a leak caused by h264 in mpeg transport
++     * streams: Over-the-air streams have a lot of errors. A picture
++     * may be marked as referenced but the actual references get lost
++     * so it never gets released. We take care of that here by releasing
++     * the oldest we have & reusing its slot. */
++    int oldest=0;
++    for(i=0; i<MAX_PICTURE_COUNT; i++){
++        if (s->picture[i].coded_picture_number < s->picture[oldest].coded_picture_number)
++            oldest = i;
++    }
++    s->avctx->release_buffer(s->avctx, (AVFrame*)&s->picture[oldest]);
++    return oldest;
+ }
+ static void update_noise_reduction(MpegEncContext *s){
diff --git a/contrib/patch-ffmpeg-solaris.patch b/contrib/patch-ffmpeg-solaris.patch
new file mode 100644 (file)
index 0000000..f5cd7d7
--- /dev/null
@@ -0,0 +1,25 @@
+--- ffmpeg/configure   Sat Jun  7 03:19:09 2008
++++ ffmpeg.solaris/configure   Thu Jun 19 12:10:48 2008
+@@ -50,6 +50,9 @@
+     exit 1
+ fi
++# Solaris must use the xpg4 version of grep
++PATH=/usr/xpg4/bin:$PATH
++
+ show_help(){
+   echo "Usage: configure [options]"
+   echo "Options: [defaults in brackets after descriptions]"
+@@ -1585,8 +1588,11 @@
+ check_cc <<EOF || die "endian test failed"
+ unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
+ EOF
+-od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
++#od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
++/usr/bin/tr -cd "BIGE" < $TMPO | grep -q 'B *I *G *E' && enable bigendian
++echo "BIGE=$bigendian"
++
+ # ---
+ # check availability of some header files
diff --git a/contrib/patch-ffmpeg.patch b/contrib/patch-ffmpeg.patch
new file mode 100644 (file)
index 0000000..e52731f
--- /dev/null
@@ -0,0 +1,18 @@
+Index: libavformat/tcp.c
+===================================================================
+--- libavformat/tcp.c  (revision 9814)
++++ libavformat/tcp.c  (working copy)
+@@ -88,11 +88,13 @@
+                 break;
+         }
++#ifndef __BEOS__
+         /* test error */
+         optlen = sizeof(ret);
+         getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen);
+         if (ret != 0)
+             goto fail;
++#endif
+     }
+     s->fd = fd;
+     return 0;
diff --git a/contrib/patch-libdca.patch b/contrib/patch-libdca.patch
new file mode 100644 (file)
index 0000000..cab8db2
--- /dev/null
@@ -0,0 +1,834 @@
+diff -Naur libdca/include/audio_out.h libdca_patched/include/audio_out.h
+--- libdca/include/audio_out.h 2007-05-02 10:05:03.000000000 +0100
++++ libdca_patched/include/audio_out.h 2007-05-02 10:09:42.000000000 +0100
+@@ -26,8 +26,8 @@
+ struct ao_instance_s {
+     int (* setup) (ao_instance_t * instance, int sample_rate, int * flags,
+-                 level_t * level, sample_t * bias);
+-    int (* play) (ao_instance_t * instance, int flags, sample_t * samples);
++                 dca_level_t * level, dca_sample_t * bias);
++    int (* play) (ao_instance_t * instance, int flags, dca_sample_t * samples);
+     void (* close) (ao_instance_t * instance);
+ };
+diff -Naur libdca/include/dca.h libdca_patched/include/dca.h
+--- libdca/include/dca.h       2007-05-02 10:05:03.000000000 +0100
++++ libdca_patched/include/dca.h       2007-05-02 10:09:36.000000000 +0100
+@@ -32,14 +32,14 @@
+ uint32_t mm_accel (void);
+ #if defined(LIBDCA_FIXED)
+-typedef int32_t sample_t;
+-typedef int32_t level_t;
++typedef int32_t dca_sample_t;
++typedef int32_t dca_level_t;
+ #elif defined(LIBDCA_DOUBLE)
+-typedef double sample_t;
+-typedef double level_t;
++typedef double dca_sample_t;
++typedef double dca_level_t;
+ #else
+-typedef float sample_t;
+-typedef float level_t;
++typedef float dca_sample_t;
++typedef float dca_level_t;
+ #endif
+ typedef struct dca_state_s dca_state_t;
+@@ -65,21 +65,24 @@
+ #define DCA_LFE 0x80
+ #define DCA_ADJUST_LEVEL 0x100
++#define DCA_OUT_DPLI  0x200
++#define DCA_OUT_DPLII 0x400
++
+ dca_state_t * dca_init (uint32_t mm_accel);
+ int dca_syncinfo (dca_state_t *state, uint8_t * buf, int * flags,
+                   int * sample_rate, int * bit_rate, int *frame_length);
+ int dca_frame (dca_state_t * state, uint8_t * buf, int * flags,
+-               level_t * level, sample_t bias);
++               dca_level_t * level, dca_sample_t bias);
+ void dca_dynrng (dca_state_t * state,
+-                 level_t (* call) (level_t, void *), void * data);
++                 dca_level_t (* call) (dca_level_t, void *), void * data);
+ int dca_blocks_num (dca_state_t * state);
+ int dca_block (dca_state_t * state);
+-sample_t * dca_samples (dca_state_t * state);
++dca_sample_t * dca_samples (dca_state_t * state);
+ void dca_free (dca_state_t * state);
+diff -Naur libdca/libao/audio_out_aif.c libdca_patched/libao/audio_out_aif.c
+--- libdca/libao/audio_out_aif.c       2007-05-02 10:05:04.000000000 +0100
++++ libdca_patched/libao/audio_out_aif.c       2007-05-02 10:09:41.000000000 +0100
+@@ -49,7 +49,7 @@
+ };
+ static int aif_setup (ao_instance_t * _instance, int sample_rate, int * flags,
+-                    level_t * level, sample_t * bias)
++                    dca_level_t * level, dca_sample_t * bias)
+ {
+     aif_instance_t * instance = (aif_instance_t *) _instance;
+@@ -78,7 +78,7 @@
+     buf[1] = value;
+ }
+-static int aif_play (ao_instance_t * _instance, int flags, sample_t * _samples)
++static int aif_play (ao_instance_t * _instance, int flags, dca_sample_t * _samples)
+ {
+     aif_instance_t * instance = (aif_instance_t *) _instance;
+     int16_t int16_samples[256*2];
+diff -Naur libdca/libao/audio_out_al.c libdca_patched/libao/audio_out_al.c
+--- libdca/libao/audio_out_al.c        2007-05-02 10:05:04.000000000 +0100
++++ libdca_patched/libao/audio_out_al.c        2007-05-02 10:09:41.000000000 +0100
+@@ -44,7 +44,7 @@
+ } al_instance_t;
+ static int al_setup (ao_instance_t * _instance, int sample_rate, int * flags,
+-                   level_t * level, sample_t * bias)
++                   dca_level_t * level, dca_sample_t * bias)
+ {
+     al_instance_t * instance = (al_instance_t *) _instance;
+@@ -59,7 +59,7 @@
+     return 0;
+ }
+-static int al_play (ao_instance_t * _instance, int flags, sample_t * _samples)
++static int al_play (ao_instance_t * _instance, int flags, dca_sample_t * _samples)
+ {
+     al_instance_t * instance = (al_instance_t *) _instance;
+     int16_t int16_samples[256*6];
+diff -Naur libdca/libao/audio_out_float.c libdca_patched/libao/audio_out_float.c
+--- libdca/libao/audio_out_float.c     2007-05-02 10:05:04.000000000 +0100
++++ libdca_patched/libao/audio_out_float.c     2007-05-02 10:09:40.000000000 +0100
+@@ -32,7 +32,7 @@
+ #include "audio_out_internal.h"
+ static int float_setup (ao_instance_t * instance, int sample_rate, int * flags,
+-                      level_t * level, sample_t * bias)
++                      dca_level_t * level, dca_sample_t * bias)
+ {
+     (void)instance;
+     (void)sample_rate;
+@@ -44,7 +44,7 @@
+ }
+ static int float_play (ao_instance_t * instance, int flags,
+-                     sample_t * _samples)
++                     dca_sample_t * _samples)
+ {
+ #if defined(LIBDCA_FIXED)
+     float samples[256 * 2];
+diff -Naur libdca/libao/audio_out_internal.h libdca_patched/libao/audio_out_internal.h
+--- libdca/libao/audio_out_internal.h  2007-05-02 10:05:04.000000000 +0100
++++ libdca_patched/libao/audio_out_internal.h  2007-05-02 10:09:40.000000000 +0100
+@@ -25,7 +25,7 @@
+ #ifdef LIBDCA_DOUBLE
+ typedef float convert_t;
+ #else
+-typedef sample_t convert_t;
++typedef dca_sample_t convert_t;
+ #endif
+ #ifdef LIBDCA_FIXED
+diff -Naur libdca/libao/audio_out_null.c libdca_patched/libao/audio_out_null.c
+--- libdca/libao/audio_out_null.c      2007-05-02 10:05:04.000000000 +0100
++++ libdca_patched/libao/audio_out_null.c      2007-05-02 10:09:39.000000000 +0100
+@@ -36,7 +36,7 @@
+ } null_instance_t;
+ static int null_setup (ao_instance_t * _instance, int sample_rate, int * flags,
+-                     level_t * level, sample_t * bias)
++                     dca_level_t * level, dca_sample_t * bias)
+ {
+     null_instance_t * instance = (null_instance_t *) _instance;
+@@ -48,7 +48,7 @@
+     return 0;
+ }
+-static int null_play (ao_instance_t * instance, int flags, sample_t * samples)
++static int null_play (ao_instance_t * instance, int flags, dca_sample_t * samples)
+ {
+     (void)instance; (void)flags; (void)samples;
+     return 0;
+diff -Naur libdca/libao/audio_out_oss.c libdca_patched/libao/audio_out_oss.c
+--- libdca/libao/audio_out_oss.c       2007-05-02 10:05:04.000000000 +0100
++++ libdca_patched/libao/audio_out_oss.c       2007-05-02 10:09:38.000000000 +0100
+@@ -68,7 +68,7 @@
+ } oss_instance_t;
+ static int oss_setup (ao_instance_t * _instance, int sample_rate, int * flags,
+-                    level_t * level, sample_t * bias)
++                    dca_level_t * level, dca_sample_t * bias)
+ {
+     oss_instance_t * instance = (oss_instance_t *) _instance;
+@@ -83,7 +83,7 @@
+     return 0;
+ }
+-static int oss_play (ao_instance_t * _instance, int flags, sample_t * _samples)
++static int oss_play (ao_instance_t * _instance, int flags, dca_sample_t * _samples)
+ {
+     oss_instance_t * instance = (oss_instance_t *) _instance;
+     int16_t int16_samples[256*6];
+diff -Naur libdca/libao/audio_out_peak.c libdca_patched/libao/audio_out_peak.c
+--- libdca/libao/audio_out_peak.c      2007-05-02 10:05:04.000000000 +0100
++++ libdca_patched/libao/audio_out_peak.c      2007-05-02 10:09:38.000000000 +0100
+@@ -16,7 +16,7 @@
+ } peak_instance_t;
+ static int peak_setup (ao_instance_t * _instance, int sample_rate, int * flags,
+-                     level_t * level, sample_t * bias)
++                     dca_level_t * level, dca_sample_t * bias)
+ {
+     peak_instance_t * instance = (peak_instance_t *) _instance;
+@@ -29,7 +29,7 @@
+     return 0;
+ }
+-static int peak_play (ao_instance_t * _instance, int flags, sample_t * samples)
++static int peak_play (ao_instance_t * _instance, int flags, dca_sample_t * samples)
+ {
+     peak_instance_t * instance = (peak_instance_t *) _instance;
+     int i;
+diff -Naur libdca/libao/audio_out_solaris.c libdca_patched/libao/audio_out_solaris.c
+--- libdca/libao/audio_out_solaris.c   2007-05-02 10:05:04.000000000 +0100
++++ libdca_patched/libao/audio_out_solaris.c   2007-05-02 10:09:37.000000000 +0100
+@@ -47,7 +47,7 @@
+ } solaris_instance_t;
+ static int solaris_setup (ao_instance_t * _instance, int sample_rate,
+-                        int * flags, level_t * level, sample_t * bias)
++                        int * flags, dca_level_t * level, dca_sample_t * bias)
+ {
+     solaris_instance_t * instance = (solaris_instance_t *) _instance;
+@@ -63,7 +63,7 @@
+ }
+ static int solaris_play (ao_instance_t * _instance, int flags,
+-                       sample_t * _samples)
++                       dca_sample_t * _samples)
+ {
+     solaris_instance_t * instance = (solaris_instance_t *) _instance;
+     int16_t int16_samples[256*2];
+diff -Naur libdca/libao/audio_out_wav.c libdca_patched/libao/audio_out_wav.c
+--- libdca/libao/audio_out_wav.c       2007-05-02 10:05:04.000000000 +0100
++++ libdca_patched/libao/audio_out_wav.c       2007-05-02 10:09:37.000000000 +0100
+@@ -87,7 +87,7 @@
+ };
+ static int wav_setup (ao_instance_t * _instance, int sample_rate, int * flags,
+-                      level_t * level, sample_t * bias)
++                      dca_level_t * level, dca_sample_t * bias)
+ {
+     wav_instance_t * instance = (wav_instance_t *) _instance;
+@@ -157,7 +157,7 @@
+ #include <stdio.h>
+-static int wav_play (ao_instance_t * _instance, int flags, sample_t * _samples)
++static int wav_play (ao_instance_t * _instance, int flags, dca_sample_t * _samples)
+ {
+     wav_instance_t * instance = (wav_instance_t *) _instance;
+     union
+diff -Naur libdca/libao/audio_out_win.c libdca_patched/libao/audio_out_win.c
+--- libdca/libao/audio_out_win.c       2007-05-02 10:05:04.000000000 +0100
++++ libdca_patched/libao/audio_out_win.c       2007-05-02 10:09:36.000000000 +0100
+@@ -55,7 +55,7 @@
+ } win_instance_t;
+ static int win_setup (ao_instance_t * _instance, int sample_rate, int * flags,
+-                    level_t * level, sample_t * bias)
++                    dca_level_t * level, dca_sample_t * bias)
+ {
+     win_instance_t * instance = (win_instance_t *) _instance;
+@@ -70,7 +70,7 @@
+     return 0;
+ }
+-static int win_play (ao_instance_t * _instance, int flags, sample_t * _samples)
++static int win_play (ao_instance_t * _instance, int flags, dca_sample_t * _samples)
+ {
+     win_instance_t * instance = (win_instance_t *) _instance;
+     int current_buffer;
+diff -Naur libdca/libdca/dca_internal.h libdca_patched/libdca/dca_internal.h
+--- libdca/libdca/dca_internal.h       2007-05-02 10:05:05.000000000 +0100
++++ libdca_patched/libdca/dca_internal.h       2007-05-02 10:09:35.000000000 +0100
+@@ -116,20 +116,20 @@
+     double subband_fir_noidea[DCA_PRIM_CHANNELS_MAX][64];
+     /* Audio output */
+-    level_t clev;            /* centre channel mix level */
+-    level_t slev;            /* surround channels mix level */
++    dca_level_t clev;            /* centre channel mix level */
++    dca_level_t slev;            /* surround channels mix level */
+     int output;              /* type of output */
+-    level_t level;           /* output level */
+-    sample_t bias;           /* output bias */
++    dca_level_t level;           /* output level */
++    dca_sample_t bias;           /* output bias */
+-    sample_t * samples;      /* pointer to the internal audio samples buffer */
++    dca_sample_t * samples;      /* pointer to the internal audio samples buffer */
+     int downmixed;
+     int dynrnge;             /* apply dynamic range */
+-    level_t dynrng;          /* dynamic range */
++    dca_level_t dynrng;          /* dynamic range */
+     void * dynrngdata;       /* dynamic range callback funtion and data */
+-    level_t (* dynrngcall) (level_t range, void * dynrngdata);
++    dca_level_t (* dynrngcall) (dca_level_t range, void * dynrngdata);
+     /* Bitstream handling */
+     uint32_t * buffer_start;
+@@ -155,19 +155,23 @@
+ #define LEVEL_45DB 0.5946035575013605
+ #define LEVEL_6DB 0.5
+-int dca_downmix_init (int input, int flags, level_t * level,
+-                      level_t clev, level_t slev);
+-int dca_downmix_coeff (level_t * coeff, int acmod, int output, level_t level,
+-                       level_t clev, level_t slev);
+-void dca_downmix (sample_t * samples, int acmod, int output, sample_t bias,
+-                  level_t clev, level_t slev);
+-void dca_upmix (sample_t * samples, int acmod, int output);
++// these next two constants are used for DPL matrix encoding in downmix.c
++#define LEVEL_SQRT_1_2 0.5
++#define LEVEL_SQRT_3_4 0.8660254037844386
++
++int dca_downmix_init (int input, int flags, dca_level_t * level,
++                      dca_level_t clev, dca_level_t slev);
++int dca_downmix_coeff (dca_level_t * coeff, int acmod, int output, dca_level_t level,
++                       dca_level_t clev, dca_level_t slev);
++void dca_downmix (dca_sample_t * samples, int acmod, int output, dca_sample_t bias,
++                  dca_level_t clev, dca_level_t slev);
++void dca_upmix (dca_sample_t * samples, int acmod, int output);
+ #define ROUND(x) ((int)((x) + ((x) > 0 ? 0.5 : -0.5)))
+ #ifndef LIBDCA_FIXED
+-typedef sample_t quantizer_t;
++typedef dca_sample_t quantizer_t;
+ #define SAMPLE(x) (x)
+ #define LEVEL(x) (x)
+ #define MUL(a,b) ((a) * (b))
+@@ -179,8 +183,8 @@
+ #else /* LIBDCA_FIXED */
+ typedef int16_t quantizer_t;
+-#define SAMPLE(x) (sample_t)((x) * (1 << 30))
+-#define LEVEL(x) (level_t)((x) * (1 << 26))
++#define SAMPLE(x) (dca_sample_t)((x) * (1 << 30))
++#define LEVEL(x) (dca_level_t)((x) * (1 << 26))
+ #if 0
+ #define MUL(a,b) ((int)(((int64_t)(a) * (b) + (1 << 29)) >> 30))
+diff -Naur libdca/libdca/downmix.c libdca_patched/libdca/downmix.c
+--- libdca/libdca/downmix.c    2007-05-02 10:05:05.000000000 +0100
++++ libdca_patched/libdca/downmix.c    2007-05-06 19:45:54.000000000 +0100
+@@ -33,8 +33,8 @@
+ #define CONVERT(acmod,output) (((output) << DCA_CHANNEL_BITS) + (acmod))
+-int dca_downmix_init (int input, int flags, level_t * level,
+-                    level_t clev, level_t slev)
++int dca_downmix_init (int input, int flags, dca_level_t * level,
++                    dca_level_t clev, dca_level_t slev)
+ {
+     static uint8_t table[11][10] = {
+         /* DCA_MONO */
+@@ -96,7 +96,7 @@
+       output = DCA_DOLBY;
+     if (flags & DCA_ADJUST_LEVEL) {
+-      level_t adjust;
++      dca_level_t adjust;
+       switch (CONVERT (input & 7, output)) {
+@@ -181,13 +181,16 @@
+       *level = MUL_L (*level, adjust);
+     }
++      // add the DPLI/DPLII flag back into the output if one was passed in
++      output = output | (flags & DCA_OUT_DPLI) | (flags & DCA_OUT_DPLII);
++
+     return output;
+ }
+-int dca_downmix_coeff (level_t * coeff, int acmod, int output, level_t level,
+-                     level_t clev, level_t slev)
++int dca_downmix_coeff (dca_level_t * coeff, int acmod, int output, dca_level_t level,
++                     dca_level_t clev, dca_level_t slev)
+ {
+-    level_t level_3db;
++    dca_level_t level_3db;
+     level_3db = MUL_C (level, LEVEL_3DB);
+@@ -344,7 +347,7 @@
+     return -1;        /* NOTREACHED */
+ }
+-static void mix2to1 (sample_t * dest, sample_t * src, sample_t bias)
++static void mix2to1 (dca_sample_t * dest, dca_sample_t * src, dca_sample_t bias)
+ {
+     int i;
+@@ -352,7 +355,7 @@
+       dest[i] += BIAS (src[i]);
+ }
+-static void mix3to1 (sample_t * samples, sample_t bias)
++static void mix3to1 (dca_sample_t * samples, dca_sample_t bias)
+ {
+     int i;
+@@ -360,7 +363,7 @@
+       samples[i] += BIAS (samples[i + 256] + samples[i + 512]);
+ }
+-static void mix4to1 (sample_t * samples, sample_t bias)
++static void mix4to1 (dca_sample_t * samples, dca_sample_t bias)
+ {
+     int i;
+@@ -369,7 +372,7 @@
+                           samples[i + 768]);
+ }
+-static void mix5to1 (sample_t * samples, sample_t bias)
++static void mix5to1 (dca_sample_t * samples, dca_sample_t bias)
+ {
+     int i;
+@@ -378,10 +381,10 @@
+                           samples[i + 768] + samples[i + 1024]);
+ }
+-static void mix3to2 (sample_t * samples, sample_t bias)
++static void mix3to2 (dca_sample_t * samples, dca_sample_t bias)
+ {
+     int i;
+-    sample_t common;
++    dca_sample_t common;
+     for (i = 0; i < 256; i++) {
+       common = BIAS (samples[i]);
+@@ -390,10 +393,10 @@
+     }
+ }
+-static void mix21to2 (sample_t * left, sample_t * right, sample_t bias)
++static void mix21to2 (dca_sample_t * left, dca_sample_t * right, dca_sample_t bias)
+ {
+     int i;
+-    sample_t common;
++    dca_sample_t common;
+     for (i = 0; i < 256; i++) {
+       common = BIAS (right[i + 256]);
+@@ -402,10 +405,10 @@
+     }
+ }
+-static void mix21toS (sample_t * samples, sample_t bias)
++static void mix21toS (dca_sample_t * samples, dca_sample_t bias)
+ {
+     int i;
+-    sample_t surround;
++    dca_sample_t surround;
+     for (i = 0; i < 256; i++) {
+       surround = samples[i + 512];
+@@ -414,10 +417,10 @@
+     }
+ }
+-static void mix31to2 (sample_t * samples, sample_t bias)
++static void mix31to2 (dca_sample_t * samples, dca_sample_t bias)
+ {
+     int i;
+-    sample_t common;
++    dca_sample_t common;
+     for (i = 0; i < 256; i++) {
+       common = BIAS (samples[i] + samples[i + 768]);
+@@ -426,23 +429,32 @@
+     }
+ }
+-static void mix31toS (sample_t * samples, sample_t bias)
++static void mix31toS (dca_sample_t * samples, dca_sample_t bias)
+ {
+-    int i;
+-    sample_t common, surround;
+-    for (i = 0; i < 256; i++) {
+-      common = BIAS (samples[i]);
+-      surround = samples[i + 768];
+-      samples[i] = samples[i + 256] + common - surround;
+-      samples[i + 256] = samples[i + 512] + common + surround;
+-    }
++      int i;
++      dca_sample_t cc, surround, Lt, Rt;
++
++      for (i = 0; i < 256; i++) {
++
++              cc = samples[i] * LEVEL_3DB;
++
++              surround = samples[i + 768];
++
++              Lt = samples[i + 256] + cc;
++              Rt = samples[i + 512] + cc;
++
++              samples[i] = Lt - surround;
++              samples[i + 256] = Rt + surround;
++
++      }
++
+ }
+-static void mix22toS (sample_t * samples, sample_t bias)
++static void mix22toS (dca_sample_t * samples, dca_sample_t bias)
+ {
+     int i;
+-    sample_t surround;
++    dca_sample_t surround;
+     for (i = 0; i < 256; i++) {
+       surround = samples[i + 512] + samples[i + 768];
+@@ -451,10 +463,10 @@
+     }
+ }
+-static void mix32to2 (sample_t * samples, sample_t bias)
++static void mix32to2 (dca_sample_t * samples, dca_sample_t bias)
+ {
+     int i;
+-    sample_t common;
++    dca_sample_t common;
+     for (i = 0; i < 256; i++) {
+       common = BIAS (samples[i]);
+@@ -463,20 +475,55 @@
+     }
+ }
+-static void mix32toS (sample_t * samples, sample_t bias)
++static void mix32toS (dca_sample_t * samples, dca_sample_t bias, int use_dpl2)
+ {
+-    int i;
+-    sample_t common, surround;
+-    for (i = 0; i < 256; i++) {
+-      common = BIAS (samples[i]);
+-      surround = samples[i + 768] + samples[i + 1024];
+-      samples[i] = samples[i + 256] + common - surround;
+-      samples[i + 256] = samples[i + 512] + common + surround;
+-    }
+-}
++      if (use_dpl2 == 1) {
+-static void move2to1 (sample_t * src, sample_t * dest, sample_t bias)
++              int i;
++              dca_sample_t cc, Lt, Rt, Ls, Rs, Lss, Rss;
++      
++              for (i = 0; i < 256; i++) {
++      
++                      cc = samples[i] * LEVEL_3DB;
++              
++                      Lt = samples[i + 256] + cc;
++                      Rt = samples[i + 512] + cc;
++              
++                      Ls = samples[i + 768];
++                      Rs = samples[i + 1024];
++                      
++                      Lss = (LEVEL_SQRT_3_4 * Ls) - (LEVEL_SQRT_1_2 * Rs);
++                      Rss = -(LEVEL_SQRT_1_2 * Ls) + (LEVEL_SQRT_3_4 * Rs);
++              
++                      samples[i] = Lt + Lss;
++                      samples[i + 256] = Rt + Rss;
++      
++              }
++
++      } else {
++
++              int i;
++              dca_sample_t cc, surround, Lt, Rt;
++      
++              for (i = 0; i < 256; i++) {
++
++                      cc = samples[i] * LEVEL_3DB;
++
++                      surround = samples[i + 768] + samples[i + 1024];
++
++                      Lt = samples[i + 256] + cc;
++                      Rt = samples[i + 512] + cc;
++
++                      samples[i] = Lt - surround;
++                      samples[i + 256] = Rt + surround;
++
++              }
++
++      }
++
++}
++static void move2to1 (dca_sample_t * src, dca_sample_t * dest, dca_sample_t bias)
+ {
+     int i;
+@@ -484,7 +531,7 @@
+       dest[i] = BIAS (src[i] + src[i + 256]);
+ }
+-static void zero (sample_t * samples)
++static void zero (dca_sample_t * samples)
+ {
+     int i;
+@@ -492,8 +539,8 @@
+       samples[i] = 0;
+ }
+-void dca_downmix (sample_t * samples, int acmod, int output, sample_t bias,
+-                level_t clev, level_t slev)
++void dca_downmix (dca_sample_t * samples, int acmod, int output, dca_sample_t bias,
++                dca_level_t clev, dca_level_t slev)
+ {
+     (void)clev;
+@@ -529,7 +576,7 @@
+       break;
+     case CONVERT (DCA_MONO, DCA_DOLBY):
+-      memcpy (samples + 256, samples, 256 * sizeof (sample_t));
++      memcpy (samples + 256, samples, 256 * sizeof (dca_sample_t));
+       break;
+     case CONVERT (DCA_3F, DCA_STEREO):
+@@ -576,7 +623,7 @@
+       break;
+     case CONVERT (DCA_3F2R, DCA_DOLBY):
+-      mix32toS (samples, bias);
++      mix32toS (samples, bias, 0);
+       break;
+     case CONVERT (DCA_3F1R, DCA_3F):
+@@ -594,7 +641,7 @@
+     case CONVERT (DCA_3F1R, DCA_2F1R):
+       mix3to2 (samples, bias);
+-      memcpy (samples + 512, samples + 768, 256 * sizeof (sample_t));
++      memcpy (samples + 512, samples + 768, 256 * sizeof (dca_sample_t));
+       break;
+     case CONVERT (DCA_2F2R, DCA_2F1R):
+@@ -608,30 +655,52 @@
+     case CONVERT (DCA_3F2R, DCA_3F1R):
+       mix2to1 (samples + 768, samples + 1024, bias);
++      /* deal with the special-case 5.0 to 4.0 DPL mix */
++    if (output & DCA_OUT_DPLI)
++    {
++              mix31toS (samples, bias);
++      }
+       break;
+     case CONVERT (DCA_2F1R, DCA_2F2R):
+-      memcpy (samples + 768, samples + 512, 256 * sizeof (sample_t));
++      memcpy (samples + 768, samples + 512, 256 * sizeof (dca_sample_t));
+       break;
+     case CONVERT (DCA_3F1R, DCA_2F2R):
+       mix3to2 (samples, bias);
+-      memcpy (samples + 512, samples + 768, 256 * sizeof (sample_t));
++      memcpy (samples + 512, samples + 768, 256 * sizeof (dca_sample_t));
+       break;
+     case CONVERT (DCA_3F2R, DCA_2F2R):
+       mix3to2 (samples, bias);
+-      memcpy (samples + 512, samples + 768, 256 * sizeof (sample_t));
+-      memcpy (samples + 768, samples + 1024, 256 * sizeof (sample_t));
++      memcpy (samples + 512, samples + 768, 256 * sizeof (dca_sample_t));
++      memcpy (samples + 768, samples + 1024, 256 * sizeof (dca_sample_t));
+       break;
+     case CONVERT (DCA_3F1R, DCA_3F2R):
+-      memcpy (samples + 1024, samples + 768, 256 * sizeof (sample_t));
++      memcpy (samples + 1024, samples + 768, 256 * sizeof (dca_sample_t));
++      break;
++
++      /* deal with the special-case DPL mixes */
++
++    case CONVERT (DCA_3F1R, DCA_3F1R):
++    if (output & DCA_OUT_DPLI)
++    {
++              mix31toS (samples, bias);
++      }
+       break;
++
++    case CONVERT (DCA_3F2R, DCA_3F2R):
++    if (output & DCA_OUT_DPLII)
++    {
++              mix32toS (samples, bias, 1);
++      }
++      break;
++
+     }
+ }
+-void dca_upmix (sample_t * samples, int acmod, int output)
++void dca_upmix (dca_sample_t * samples, int acmod, int output)
+ {
+     switch (CONVERT (acmod, output & DCA_CHANNEL_MASK)) {
+@@ -657,7 +726,7 @@
+     case CONVERT (DCA_3F, DCA_STEREO):
+     case CONVERT (DCA_3F, DCA_DOLBY):
+     mix_3to2:
+-      memcpy (samples + 512, samples + 256, 256 * sizeof (sample_t));
++      memcpy (samples + 512, samples + 256, 256 * sizeof (dca_sample_t));
+       zero (samples + 256);
+       break;
+@@ -684,11 +753,11 @@
+       zero (samples + 1024);
+     case CONVERT (DCA_3F1R, DCA_2F1R):
+     mix_31to21:
+-      memcpy (samples + 768, samples + 512, 256 * sizeof (sample_t));
++      memcpy (samples + 768, samples + 512, 256 * sizeof (dca_sample_t));
+       goto mix_3to2;
+     case CONVERT (DCA_3F2R, DCA_2F2R):
+-      memcpy (samples + 1024, samples + 768, 256 * sizeof (sample_t));
++      memcpy (samples + 1024, samples + 768, 256 * sizeof (dca_sample_t));
+       goto mix_31to21;
+     }
+ }
+diff -Naur libdca/libdca/parse.c libdca_patched/libdca/parse.c
+--- libdca/libdca/parse.c      2007-05-02 10:05:05.000000000 +0100
++++ libdca_patched/libdca/parse.c      2007-05-02 10:09:33.000000000 +0100
+@@ -59,12 +59,12 @@
+ static int decode_blockcode (int code, int levels, int *values);
+ static void qmf_32_subbands (dca_state_t * state, int chans,
+-                             double samples_in[32][8], sample_t *samples_out,
+-                             double rScale, sample_t bias);
++                             double samples_in[32][8], dca_sample_t *samples_out,
++                             double rScale, dca_sample_t bias);
+ static void lfe_interpolation_fir (int nDecimationSelect, int nNumDeciSample,
+-                                   double *samples_in, sample_t *samples_out,
+-                                   double rScale, sample_t bias );
++                                   double *samples_in, dca_sample_t *samples_out,
++                                   double rScale, dca_sample_t bias );
+ static void pre_calc_cosmod( dca_state_t * state );
+@@ -80,7 +80,7 @@
+     memset (state, 0, sizeof(dca_state_t));
+-    state->samples = (sample_t *) memalign (16, 256 * 12 * sizeof (sample_t));
++    state->samples = (dca_sample_t *) memalign (16, 256 * 12 * sizeof (dca_sample_t));
+     if (state->samples == NULL) {
+         free (state);
+         return NULL;
+@@ -97,7 +97,7 @@
+     return state;
+ }
+-sample_t * dca_samples (dca_state_t * state)
++dca_sample_t * dca_samples (dca_state_t * state)
+ {
+     return state->samples;
+ }
+@@ -207,7 +207,7 @@
+ }
+ int dca_frame (dca_state_t * state, uint8_t * buf, int * flags,
+-               level_t * level, sample_t bias)
++               dca_level_t * level, dca_sample_t bias)
+ {
+     int i, j;
+     static float adj_table[] = { 1.0, 1.1250, 1.2500, 1.4375 };
+@@ -996,7 +996,7 @@
+     {
+         dca_upmix (state->samples, state->amode, state->output);
+     } else
+-    if (state->prim_channels > dca_channels[state->output & DCA_CHANNEL_MASK])
++    if (state->prim_channels >= dca_channels[state->output & DCA_CHANNEL_MASK])
+     {
+         dca_downmix (state->samples, state->amode, state->output, state->bias,
+                      state->clev, state->slev);
+@@ -1142,8 +1142,8 @@
+ }
+ static void qmf_32_subbands (dca_state_t * state, int chans,
+-                             double samples_in[32][8], sample_t *samples_out,
+-                             double scale, sample_t bias)
++                             double samples_in[32][8], dca_sample_t *samples_out,
++                             double scale, dca_sample_t bias)
+ {
+     double *prCoeff;
+     int i, j, k;
+@@ -1224,8 +1224,8 @@
+ }
+ static void lfe_interpolation_fir (int nDecimationSelect, int nNumDeciSample,
+-                                   double *samples_in, sample_t *samples_out,
+-                                   double scale, sample_t bias)
++                                   double *samples_in, dca_sample_t *samples_out,
++                                   double scale, dca_sample_t bias)
+ {
+     /* samples_in: An array holding decimated samples.
+      *   Samples in current subframe starts from samples_in[0],
+@@ -1275,7 +1275,7 @@
+ }
+ void dca_dynrng (dca_state_t * state,
+-                 level_t (* call) (level_t, void *), void * data)
++                 dca_level_t (* call) (dca_level_t, void *), void * data)
+ {
+     state->dynrange = 0;
+     if (call) {
+diff -Naur libdca/src/dcadec.c libdca_patched/src/dcadec.c
+--- libdca/src/dcadec.c        2007-05-02 10:05:04.000000000 +0100
++++ libdca_patched/src/dcadec.c        2007-05-02 10:09:35.000000000 +0100
+@@ -280,15 +280,15 @@
+               }
+               bufpos = buf + length;
+           } else {
+-              level_t level;
+-              sample_t bias;
++              dca_level_t level;
++              dca_sample_t bias;
+               int i;
+               if (output->setup (output, sample_rate, &flags, &level, &bias))
+                   goto error;
+               if (!disable_adjust)
+                   flags |= DCA_ADJUST_LEVEL;
+-              level = (level_t) (level * gain);
++              level = (dca_level_t) (level * gain);
+               if (dca_frame (state, buf, &flags, &level, bias))
+                   goto error;
+               if (disable_dynrng)
diff --git a/contrib/patch-libdvdread-css-vlc-dylib.patch b/contrib/patch-libdvdread-css-vlc-dylib.patch
new file mode 100644 (file)
index 0000000..70c5bab
--- /dev/null
@@ -0,0 +1,11 @@
+--- dvdread/dvd_input.c        2005-09-19 09:43:08.000000000 -0400
++++ dvdread/patched-dvd_input.c        2008-03-19 12:47:16.000000000 -0400
+@@ -332,7 +332,7 @@
+ #else
+-  dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
++  dvdcss_library = dlopen("/Applications/VLC.app/Contents/MacOS/lib/libdvdcss.2.dylib", RTLD_LAZY);
+   if(dvdcss_library != NULL) {
+ #if defined(__OpenBSD__) && !defined(__ELF__)
diff --git a/contrib/patch-libdvdread-cygwin.patch b/contrib/patch-libdvdread-cygwin.patch
new file mode 100644 (file)
index 0000000..fbb1f12
--- /dev/null
@@ -0,0 +1,26 @@
+diff -Naur libdvdread/configure libdvdread/configure
+--- libdvdread/configure       2006-10-06 04:14:24.000000000 -0400
++++ libdvdread/configure       2008-10-04 08:51:17.153181000 -0400
+@@ -3550,9 +3550,6 @@
+ _ACEOF
+     ;;
+-  x*mingw32* | x*cygwin*)
+-    CFLAGS="${CFLAGS} -Dssize_t=long"
+-    ;;
+   x*)
+     ;;
+ esac
+diff -Naur libdvdread/configure.in libdvdread/configure.in
+--- libdvdread/configure.in    2006-10-06 04:12:31.000000000 -0400
++++ libdvdread/configure.in    2008-10-04 08:51:26.356306000 -0400
+@@ -15,9 +15,6 @@
+     CFLAGS="${CFLAGS} -no-cpp-precomp"
+     AC_DEFINE(__DARWIN__, 1, Have a Mac OS X system)
+     ;;
+-  x*mingw32* | x*cygwin*)
+-    CFLAGS="${CFLAGS} -Dssize_t=long"
+-    ;;
+   x*)
+     ;;
+ esac
\ No newline at end of file
diff --git a/contrib/patch-libmpeg2.patch b/contrib/patch-libmpeg2.patch
new file mode 100644 (file)
index 0000000..d5ab5bf
--- /dev/null
@@ -0,0 +1,33 @@
+diff -ur orig/header.c mpeg2dec/libmpeg2/header.c
+--- orig/header.c      2003-12-22 12:24:02.000000000 +0100
++++ mpeg2dec/libmpeg2/header.c 2004-08-02 18:07:50.000000000 +0200
+@@ -100,6 +100,9 @@
+     mpeg2dec->decoder.convert = NULL;
+     mpeg2dec->decoder.convert_id = NULL;
+     mpeg2dec->picture = mpeg2dec->pictures;
++    memset(&mpeg2dec->fbuf_alloc[0].fbuf, 0, sizeof(mpeg2_fbuf_t));
++    memset(&mpeg2dec->fbuf_alloc[1].fbuf, 0, sizeof(mpeg2_fbuf_t));
++    memset(&mpeg2dec->fbuf_alloc[2].fbuf, 0, sizeof(mpeg2_fbuf_t));
+     mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[0].fbuf;
+     mpeg2dec->fbuf[1] = &mpeg2dec->fbuf_alloc[1].fbuf;
+     mpeg2dec->fbuf[2] = &mpeg2dec->fbuf_alloc[2].fbuf;
+@@ -551,6 +554,7 @@
+       if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) {
+           picture->nb_fields = (buffer[3] & 2) ? 3 : 2;
+           flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0;
++          flags |= (buffer[3] &   2) ? PIC_FLAG_REPEAT_FIRST_FIELD : 0;
+       } else
+           picture->nb_fields = (buffer[3]&2) ? ((buffer[3]&128) ? 6 : 4) : 2;
+       break;
+diff -ur orig/mpeg2.h mpeg2dec/include/mpeg2.h
+--- orig/mpeg2.h       2003-12-22 13:13:35.000000000 +0100
++++ mpeg2dec/include/mpeg2.h   2004-02-18 13:50:13.000000000 +0100
+@@ -82,6 +82,7 @@
+ #define PIC_FLAG_COMPOSITE_DISPLAY 32
+ #define PIC_FLAG_SKIP 64
+ #define PIC_FLAG_TAGS 128
++#define PIC_FLAG_REPEAT_FIRST_FIELD 256
+ #define PIC_MASK_COMPOSITE_DISPLAY 0xfffff000
+ typedef struct mpeg2_picture_s {
+
diff --git a/contrib/patch-mpeg4ip-ac3.patch b/contrib/patch-mpeg4ip-ac3.patch
new file mode 100644 (file)
index 0000000..ea581c4
--- /dev/null
@@ -0,0 +1,343 @@
+diff -Naur mpeg4ip/lib/mp4v2/Makefile.am mpeg4ip-patched/lib/mp4v2/Makefile.am
+--- mpeg4ip/lib/mp4v2/Makefile.am      2008-02-14 14:44:36.000000000 +1300
++++ mpeg4ip-patched/lib/mp4v2/Makefile.am      2008-02-13 15:50:50.000000000 +1300
+@@ -10,6 +10,7 @@
+ libmp4v2_la_SOURCES = \
+       3gp.cpp \
++      atom_ac3.cpp \
+       atom_amr.cpp \
+       atom_avc1.cpp \
+       atom_avcC.cpp \
+@@ -33,6 +34,7 @@
+       atom_mp4s.cpp \
+       atom_mp4v.cpp \
+       atom_mvhd.cpp \
++      atom_name.cpp \
+       atom_pasp.cpp \
+       atom_root.cpp \
+       atom_rtp.cpp \
+diff -Naur mpeg4ip/lib/mp4v2/Makefile.in mpeg4ip-patched/lib/mp4v2/Makefile.in
+--- mpeg4ip/lib/mp4v2/Makefile.in      2008-02-14 14:44:36.000000000 +1300
++++ mpeg4ip-patched/lib/mp4v2/Makefile.in      2008-02-14 14:38:05.000000000 +1300
+@@ -55,7 +55,7 @@
+ am_libmp4v2_la_OBJECTS = 3gp.lo atom_amr.lo atom_avc1.lo atom_avcC.lo \
+       atom_d263.lo atom_damr.lo atom_dref.lo atom_elst.lo \
+       atom_enca.lo atom_encv.lo atom_free.lo atom_ftyp.lo \
+-      atom_gmin.lo atom_text.lo \
++      atom_gmin.lo atom_text.lo atom_ac3.lo \
+       atom_hdlr.lo atom_hinf.lo atom_hnti.lo atom_href.lo \
+       atom_mdat.lo atom_mdhd.lo atom_meta.lo atom_mp4a.lo \
+       atom_mp4s.lo atom_mp4v.lo atom_mvhd.lo atom_pasp.lo atom_root.lo \
+@@ -73,6 +73,7 @@
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/3gp.Plo ./$(DEPDIR)/atom_amr.Plo \
++@AMDEP_TRUE@  ./$(DEPDIR)/atom_ac3.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_avc1.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_avcC.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_d263.Plo \
+@@ -342,6 +343,7 @@
+ include_HEADERS = mp4.h
+ libmp4v2_la_SOURCES = \
+       3gp.cpp \
++      atom_ac3.cpp \
+       atom_amr.cpp \
+       atom_avc1.cpp \
+       atom_avcC.cpp \
+@@ -497,6 +499,7 @@
+       -rm -f *.tab.c
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/3gp.Plo@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_ac3.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_amr.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_avc1.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_avcC.Plo@am__quote@
+diff -Naur mpeg4ip/lib/mp4v2/atom_ac3.cpp mpeg4ip-patched/lib/mp4v2/atom_ac3.cpp
+--- mpeg4ip/lib/mp4v2/atom_ac3.cpp     1970-01-01 12:00:00.000000000 +1200
++++ mpeg4ip-patched/lib/mp4v2/atom_ac3.cpp     2008-02-14 14:29:52.000000000 +1300
+@@ -0,0 +1,51 @@
++/*
++ * The contents of this file are subject to the Mozilla Public
++ * License Version 1.1 (the "License"); you may not use this file
++ * except in compliance with the License. You may obtain a copy of
++ * the License at http://www.mozilla.org/MPL/
++ * 
++ * Software distributed under the License is distributed on an "AS
++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++ * implied. See the License for the specific language governing
++ * rights and limitations under the License.
++ * 
++ * The Original Code is MPEG4IP.
++ * 
++ * The Initial Developer of the Original Code is Cisco Systems Inc.
++ * Portions created by Cisco Systems Inc. are
++ * Copyright (C) Cisco Systems Inc. 2001.  All Rights Reserved.
++ * 
++ * Contributor(s): 
++ *            Dave Mackie             dmackie@cisco.com
++ */
++
++#include "mp4common.h"
++
++MP4Ac3Atom::MP4Ac3Atom() 
++      : MP4Atom("ac-3") 
++{
++
++    AddProperty( new MP4BytesProperty("data", 47));
++}
++
++void MP4Ac3Atom::Generate()
++{
++      MP4Atom::Generate();
++
++        // This is a nasty nasty hack because Apple haven't told us what is
++        // in the AC3 atom. So I've just copied this raw data from a sample
++        // file.
++        // I believe most of this is actually the same as the mp4a atom.
++        // I can play with this later to get it 100% right, for now this works.
++        static u_int8_t ac3[39] = {
++            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++            0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++            0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xbb,
++            0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 
++            0x64, 0x61, 0x63, 0x33, 0x10, 0x3d, 0x40,
++        };
++
++        m_pProperties[0]->SetReadOnly(false);
++        ((MP4BytesProperty*)m_pProperties[0])->
++            SetValue(ac3, sizeof(ac3));
++}
+diff -Naur mpeg4ip/lib/mp4v2/atom_meta.cpp mpeg4ip-patched/lib/mp4v2/atom_meta.cpp
+--- mpeg4ip/lib/mp4v2/atom_meta.cpp    2004-12-15 10:35:35.000000000 +1300
++++ mpeg4ip-patched/lib/mp4v2/atom_meta.cpp    2008-02-13 16:49:16.000000000 +1300
+@@ -43,20 +43,33 @@
+ MP4NameAtom::MP4NameAtom()
+     : MP4Atom("name")
+ {
+-      AddVersionAndFlags(); /* 0, 1 */
+-
+-    AddProperty(
+-        new MP4BytesProperty("metadata")); /* 2 */
++ 
+ }
+ void MP4NameAtom::Read() 
+ {
++    if (ATOMID(m_pParentAtom->GetType()) != ATOMID("udta")) {
+       // calculate size of the metadata from the atom size
+       ((MP4BytesProperty*)m_pProperties[2])->SetValueSize(m_size - 4);
++    }
+-      MP4Atom::Read();
++    MP4Atom::Read();
+ }
++void MP4NameAtom::Generate()
++{
++    if (ATOMID(m_pParentAtom->GetType()) == ATOMID("udta")) {
++        AddProperty(new MP4BytesProperty("value"));
++    } else {
++      AddVersionAndFlags(); /* 0, 1 */
++        
++        AddProperty(
++            new MP4BytesProperty("metadata")); /* 2 */
++    }
++    MP4Atom::Generate();
++}
++
++
+ MP4DataAtom::MP4DataAtom()
+     : MP4Atom("data")
+ {
+diff -Naur mpeg4ip/lib/mp4v2/atom_stsd.cpp mpeg4ip-patched/lib/mp4v2/atom_stsd.cpp
+--- mpeg4ip/lib/mp4v2/atom_stsd.cpp    2008-02-14 14:44:36.000000000 +1300
++++ mpeg4ip-patched/lib/mp4v2/atom_stsd.cpp    2008-02-13 14:52:10.000000000 +1300
+@@ -51,6 +51,7 @@
+       ExpectChildAtom("avc1", Optional, Many);
+       ExpectChildAtom("text", Optional, Many);
+       ExpectChildAtom("pasp", Optional, Many);
++      ExpectChildAtom("ac-3", Optional, Many);
+ }
+ void MP4StsdAtom::Read() 
+diff -Naur mpeg4ip/lib/mp4v2/atom_udta.cpp mpeg4ip-patched/lib/mp4v2/atom_udta.cpp
+--- mpeg4ip/lib/mp4v2/atom_udta.cpp    2003-08-05 09:59:56.000000000 +1200
++++ mpeg4ip-patched/lib/mp4v2/atom_udta.cpp    2008-02-13 16:25:08.000000000 +1300
+@@ -33,6 +33,7 @@
+ {
+       if (ATOMID(m_pParentAtom->GetType()) == ATOMID("trak")) {
+               ExpectChildAtom("hinf", Optional, OnlyOne);
++                ExpectChildAtom("name", Optional, OnlyOne);
+       }
+       MP4Atom::Read();
+diff -Naur mpeg4ip/lib/mp4v2/atoms.h mpeg4ip-patched/lib/mp4v2/atoms.h
+--- mpeg4ip/lib/mp4v2/atoms.h  2008-02-14 14:44:36.000000000 +1300
++++ mpeg4ip-patched/lib/mp4v2/atoms.h  2008-02-14 14:54:20.000000000 +1300
+@@ -146,6 +146,12 @@
+       void Generate();
+ };
++class MP4Ac3Atom : public MP4Atom {
++public:
++      MP4Ac3Atom();
++      void Generate();
++};
++
+ class MP4Mp4sAtom : public MP4Atom {
+ public:
+       MP4Mp4sAtom();
+@@ -267,6 +273,7 @@
+ public:
+     MP4NameAtom();
+     void Read();
++    void Generate();
+ };
+ class MP4RtpAtom : public MP4Atom {
+diff -Naur mpeg4ip/lib/mp4v2/mp4.cpp mpeg4ip-patched/lib/mp4v2/mp4.cpp
+--- mpeg4ip/lib/mp4v2/mp4.cpp  2008-02-14 14:44:36.000000000 +1300
++++ mpeg4ip-patched/lib/mp4v2/mp4.cpp  2008-02-13 17:16:33.000000000 +1300
+@@ -592,6 +592,25 @@
+       return MP4_INVALID_TRACK_ID;
+ }
++extern "C" MP4TrackId MP4AddAC3AudioTrack(
++      MP4FileHandle hFile, 
++      u_int32_t timeScale, 
++      MP4Duration sampleDuration, 
++      u_int8_t audioType)
++{
++      if (MP4_IS_VALID_FILE_HANDLE(hFile)) {
++              try {
++                      return ((MP4File*)hFile)->
++                              AddAC3AudioTrack(timeScale, sampleDuration, audioType);
++              }
++              catch (MP4Error* e) {
++                      PRINT_ERROR(e);
++                      delete e;
++              }
++      }
++      return MP4_INVALID_TRACK_ID;
++}
++
+ extern "C" MP4TrackId MP4AddEncAudioTrack(MP4FileHandle hFile, 
+                                         u_int32_t timeScale, 
+                                         MP4Duration sampleDuration,
+diff -Naur mpeg4ip/lib/mp4v2/mp4.h mpeg4ip-patched/lib/mp4v2/mp4.h
+--- mpeg4ip/lib/mp4v2/mp4.h    2008-02-14 14:44:36.000000000 +1300
++++ mpeg4ip-patched/lib/mp4v2/mp4.h    2008-02-13 17:15:24.000000000 +1300
+@@ -432,6 +432,12 @@
+       MP4Duration sampleDuration,
+       u_int8_t audioType DEFAULT(MP4_MPEG4_AUDIO_TYPE));
++MP4TrackId MP4AddAC3AudioTrack(
++      MP4FileHandle hFile, 
++      u_int32_t timeScale, 
++      MP4Duration sampleDuration,
++      u_int8_t audioType DEFAULT(MP4_MPEG4_AUDIO_TYPE));
++
+ typedef struct mp4v2_ismacryp_session_params {
+   u_int32_t  scheme_type;
+   u_int16_t  scheme_version;
+diff -Naur mpeg4ip/lib/mp4v2/mp4atom.cpp mpeg4ip-patched/lib/mp4v2/mp4atom.cpp
+--- mpeg4ip/lib/mp4v2/mp4atom.cpp      2008-02-14 14:44:36.000000000 +1300
++++ mpeg4ip-patched/lib/mp4v2/mp4atom.cpp      2008-02-13 16:03:41.000000000 +1300
+@@ -76,6 +76,8 @@
+     case 'a':
+       if (ATOMID(type) == ATOMID("avc1")) {
+       pAtom = new MP4Avc1Atom();
++      } else if (ATOMID(type) == ATOMID("ac-3")) {
++      pAtom = new MP4Ac3Atom();
+       } else if (ATOMID(type) == ATOMID("avcC")) {
+       pAtom = new MP4AvcCAtom();
+       } else if (ATOMID(type) == ATOMID("alis")) {
+diff -Naur mpeg4ip/lib/mp4v2/mp4file.cpp mpeg4ip-patched/lib/mp4v2/mp4file.cpp
+--- mpeg4ip/lib/mp4v2/mp4file.cpp      2008-02-14 14:44:36.000000000 +1300
++++ mpeg4ip-patched/lib/mp4v2/mp4file.cpp      2008-02-13 17:47:11.000000000 +1300
+@@ -1301,6 +1301,8 @@
+       AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "mp4a");
++        AddDescendantAtoms(MakeTrackName(trackId, NULL), "udta.name");
++
+       // stsd is a unique beast in that it has a count of the number 
+       // of child atoms that needs to be incremented after we add the mp4a atom
+       MP4Integer32Property* pStsdCountProperty;
+@@ -1337,6 +1339,60 @@
+       return trackId;
+ }
++MP4TrackId MP4File::AddAC3AudioTrack(
++      u_int32_t timeScale, 
++      MP4Duration sampleDuration, 
++      u_int8_t audioType)
++{
++      MP4TrackId trackId = AddTrack(MP4_AUDIO_TRACK_TYPE, timeScale);
++
++      AddTrackToOd(trackId);
++
++      SetTrackFloatProperty(trackId, "tkhd.volume", 1.0);
++
++      InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "smhd", 0);
++
++      AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "ac-3");
++
++        AddDescendantAtoms(MakeTrackName(trackId, NULL), "udta.name");
++
++      // stsd is a unique beast in that it has a count of the number 
++      // of child atoms that needs to be incremented after we add the mp4a atom
++      MP4Integer32Property* pStsdCountProperty;
++      FindIntegerProperty(
++              MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"),
++              (MP4Property**)&pStsdCountProperty);
++      pStsdCountProperty->IncrementValue();
++
++      //SetTrackIntegerProperty(trackId, 
++      //      "mdia.minf.stbl.stsd.ac-3.timeScale", timeScale);
++
++        //
++      //SetTrackIntegerProperty(trackId, 
++      //                      "mdia.minf.stbl.stsd.ac-3.esds.ESID", 
++#if 0
++                              // note - for a file, these values need to 
++                              // be 0 - wmay - 04/16/2003
++      //                      trackId
++#else
++        //            0
++#endif
++        //            );
++
++      //SetTrackIntegerProperty(trackId, 
++      //      "mdia.minf.stbl.stsd.ac-3.esds.decConfigDescr.objectTypeId", 
++      //      audioType);
++
++      //SetTrackIntegerProperty(trackId, 
++      //      "mdia.minf.stbl.stsd.ac-3.esds.decConfigDescr.streamType", 
++      //      MP4AudioStreamType);
++
++      m_pTracks[FindTrackIndex(trackId)]->
++              SetFixedSampleDuration(sampleDuration);
++
++      return trackId;
++}
++
+ MP4TrackId MP4File::AddEncAudioTrack(u_int32_t timeScale, 
+                                    MP4Duration sampleDuration, 
+                                    u_int8_t audioType,
+diff -Naur mpeg4ip/lib/mp4v2/mp4file.h mpeg4ip-patched/lib/mp4v2/mp4file.h
+--- mpeg4ip/lib/mp4v2/mp4file.h        2008-02-14 14:44:36.000000000 +1300
++++ mpeg4ip-patched/lib/mp4v2/mp4file.h        2008-02-13 17:17:11.000000000 +1300
+@@ -203,6 +203,11 @@
+               MP4Duration sampleDuration,
+               u_int8_t audioType);
++      MP4TrackId AddAC3AudioTrack(
++              u_int32_t timeScale, 
++              MP4Duration sampleDuration,
++              u_int8_t audioType);
++
+       MP4TrackId AddEncAudioTrack( // ismacryp
+               u_int32_t timeScale, 
+               MP4Duration sampleDuration,
diff --git a/contrib/patch-mpeg4ip-colr.patch b/contrib/patch-mpeg4ip-colr.patch
new file mode 100644 (file)
index 0000000..105267b
--- /dev/null
@@ -0,0 +1,223 @@
+diff -Nur -x Makefile -x config.log -x config.status -x libtool -x '*.Plo' -x '*.lo' ../handbrake/contrib/mpeg4ip/lib/mp4v2/Makefile.am mpeg4ip/lib/mp4v2/Makefile.am
+--- ../handbrake/contrib/mpeg4ip/lib/mp4v2/Makefile.am 2008-06-13 11:22:55.000000000 -0700
++++ mpeg4ip/lib/mp4v2/Makefile.am      2008-06-17 16:21:54.000000000 -0700
+@@ -14,6 +14,7 @@
+       atom_amr.cpp \
+       atom_avc1.cpp \
+       atom_avcC.cpp \
++      atom_colr.cpp \
+       atom_d263.cpp \
+       atom_damr.cpp \
+       atom_dref.cpp \
+diff -Nur -x Makefile -x config.log -x config.status -x libtool -x '*.Plo' -x '*.lo' ../handbrake/contrib/mpeg4ip/lib/mp4v2/Makefile.in mpeg4ip/lib/mp4v2/Makefile.in
+--- ../handbrake/contrib/mpeg4ip/lib/mp4v2/Makefile.in 2008-06-13 11:22:55.000000000 -0700
++++ mpeg4ip/lib/mp4v2/Makefile.in      2008-06-17 16:21:54.000000000 -0700
+@@ -53,7 +53,7 @@
+ LTLIBRARIES = $(lib_LTLIBRARIES)
+ libmp4v2_la_LIBADD =
+ am_libmp4v2_la_OBJECTS = 3gp.lo atom_amr.lo atom_avc1.lo atom_avcC.lo \
+-      atom_d263.lo atom_damr.lo atom_dref.lo atom_elst.lo \
++      atom_colr.lo atom_d263.lo atom_damr.lo atom_dref.lo atom_elst.lo \
+       atom_enca.lo atom_encv.lo atom_free.lo atom_ftyp.lo \
+       atom_gmin.lo atom_text.lo atom_ac3.lo \
+       atom_hdlr.lo atom_hinf.lo atom_hnti.lo atom_href.lo \
+@@ -76,6 +76,7 @@
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_ac3.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_avc1.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_avcC.Plo \
++@AMDEP_TRUE@  ./$(DEPDIR)/atom_colr.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_d263.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_damr.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_dref.Plo \
+@@ -347,6 +348,7 @@
+       atom_amr.cpp \
+       atom_avc1.cpp \
+       atom_avcC.cpp \
++      atom_colr.cpp \
+       atom_d263.cpp \
+       atom_damr.cpp \
+       atom_dref.cpp \
+@@ -503,6 +505,7 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_amr.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_avc1.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_avcC.Plo@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_colr.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_d263.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_damr.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_dref.Plo@am__quote@
+diff -Nur -x Makefile -x config.log -x config.status -x libtool -x '*.Plo' -x '*.lo' ../handbrake/contrib/mpeg4ip/lib/mp4v2/atom_colr.cpp mpeg4ip/lib/mp4v2/atom_colr.cpp
+--- ../handbrake/contrib/mpeg4ip/lib/mp4v2/atom_colr.cpp       1969-12-31 16:00:00.000000000 -0800
++++ mpeg4ip/lib/mp4v2/atom_colr.cpp    2008-06-18 13:51:37.000000000 -0700
+@@ -0,0 +1,45 @@
++/*
++ * The contents of this file are subject to the Mozilla Public
++ * License Version 1.1 (the "License"); you may not use this file
++ * except in compliance with the License. You may obtain a copy of
++ * the License at http://www.mozilla.org/MPL/
++ * 
++ * Software distributed under the License is distributed on an "AS
++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++ * implied. See the License for the specific language governing
++ * rights and limitations under the License.
++ * 
++ * The Original Code is MPEG4IP.
++ * 
++ * Contributer has declined to give copyright information, and gives
++ * it freely to the world.
++ * 
++ * Contributor(s): 
++ */
++
++#include "mp4common.h"
++
++MP4ColrAtom::MP4ColrAtom() 
++      : MP4Atom("colr") 
++{
++    MP4StringProperty* cpt = new MP4StringProperty("colorParameterType");
++    cpt->SetFixedLength(4);
++    AddProperty(cpt); /* 0 */
++
++      AddProperty( /* 1 */ new MP4Integer16Property("primariesIndex"));
++
++      AddProperty( /* 2 */ new MP4Integer16Property("transferFunctionIndex")); 
++
++      AddProperty( /* 3 */ new MP4Integer16Property("matrixIndex")); 
++}
++
++void MP4ColrAtom::Generate()
++{
++      MP4Atom::Generate();
++
++      ((MP4StringProperty*)m_pProperties[0])->SetValue("nclc");
++    // default to ITU BT.709 values
++      ((MP4Integer16Property*)m_pProperties[1])->SetValue(1);
++      ((MP4Integer16Property*)m_pProperties[2])->SetValue(1);
++      ((MP4Integer16Property*)m_pProperties[3])->SetValue(1);
++}
+diff -Nur -x Makefile -x config.log -x config.status -x libtool -x '*.Plo' -x '*.lo' ../handbrake/contrib/mpeg4ip/lib/mp4v2/atom_stsd.cpp mpeg4ip/lib/mp4v2/atom_stsd.cpp
+--- ../handbrake/contrib/mpeg4ip/lib/mp4v2/atom_stsd.cpp       2008-06-13 11:22:55.000000000 -0700
++++ mpeg4ip/lib/mp4v2/atom_stsd.cpp    2008-06-17 16:21:54.000000000 -0700
+@@ -52,6 +52,7 @@
+       ExpectChildAtom("text", Optional, Many);
+       ExpectChildAtom("pasp", Optional, Many);
+       ExpectChildAtom("ac-3", Optional, Many);
++      ExpectChildAtom("colr", Optional, Many);
+ }
+ void MP4StsdAtom::Read() 
+diff -Nur -x Makefile -x config.log -x config.status -x libtool -x '*.Plo' -x '*.lo' ../handbrake/contrib/mpeg4ip/lib/mp4v2/atoms.h mpeg4ip/lib/mp4v2/atoms.h
+--- ../handbrake/contrib/mpeg4ip/lib/mp4v2/atoms.h     2008-06-13 11:22:55.000000000 -0700
++++ mpeg4ip/lib/mp4v2/atoms.h  2008-06-17 16:21:54.000000000 -0700
+@@ -406,4 +406,10 @@
+     void Generate();
+ };
++class MP4ColrAtom : public MP4Atom {
++ public:
++    MP4ColrAtom();
++    void Generate();
++};
++
+ #endif /* __MP4_ATOMS_INCLUDED__ */
+diff -Nur -x Makefile -x config.log -x config.status -x libtool -x '*.Plo' -x '*.lo' ../handbrake/contrib/mpeg4ip/lib/mp4v2/mp4.cpp mpeg4ip/lib/mp4v2/mp4.cpp
+--- ../handbrake/contrib/mpeg4ip/lib/mp4v2/mp4.cpp     2008-06-13 11:22:55.000000000 -0700
++++ mpeg4ip/lib/mp4v2/mp4.cpp  2008-06-17 16:21:54.000000000 -0700
+@@ -1003,6 +1003,21 @@
+       return MP4_INVALID_TRACK_ID;
+ }
++extern "C" MP4TrackId MP4AddColr(
++      MP4FileHandle hFile, MP4TrackId refTrackId, u_int16_t pri, u_int16_t tran, u_int16_t mat)
++{
++      if (MP4_IS_VALID_FILE_HANDLE(hFile)) {
++              try {
++                      return ((MP4File*)hFile)->AddColr(refTrackId, pri, tran, mat);
++              }
++              catch (MP4Error* e) {
++                      PRINT_ERROR(e);
++                      delete e;
++              }
++      }
++      return MP4_INVALID_TRACK_ID;
++}
++
+ extern "C" MP4TrackId MP4CloneTrack(
+       MP4FileHandle srcFile, 
+diff -Nur -x Makefile -x config.log -x config.status -x libtool -x '*.Plo' -x '*.lo' ../handbrake/contrib/mpeg4ip/lib/mp4v2/mp4.h mpeg4ip/lib/mp4v2/mp4.h
+--- ../handbrake/contrib/mpeg4ip/lib/mp4v2/mp4.h       2008-06-13 11:22:55.000000000 -0700
++++ mpeg4ip/lib/mp4v2/mp4.h    2008-06-18 14:03:17.000000000 -0700
+@@ -559,6 +559,13 @@
+     u_int32_t hSpacing,
+     u_int32_t vSpacing);
++MP4TrackId MP4AddColr(
++      MP4FileHandle hFile, 
++      MP4TrackId refTrackId,
++    u_int16_t primary,
++    u_int16_t transfer,
++    u_int16_t matrix);
++
+ MP4TrackId MP4CloneTrack(
+       MP4FileHandle srcFile, 
+       MP4TrackId srcTrackId,
+diff -Nur -x Makefile -x config.log -x config.status -x libtool -x '*.Plo' -x '*.lo' ../handbrake/contrib/mpeg4ip/lib/mp4v2/mp4atom.cpp mpeg4ip/lib/mp4v2/mp4atom.cpp
+--- ../handbrake/contrib/mpeg4ip/lib/mp4v2/mp4atom.cpp 2008-06-13 11:22:55.000000000 -0700
++++ mpeg4ip/lib/mp4v2/mp4atom.cpp      2008-06-17 16:21:54.000000000 -0700
+@@ -90,6 +90,8 @@
+     case 'c':
+       if (ATOMID(type) == ATOMID("chap")) {
+       pAtom = new MP4TrefTypeAtom(type);
++      } else if (ATOMID(type) == ATOMID("colr")) {
++      pAtom = new MP4ColrAtom();
+         }
+         break;
+diff -Nur -x Makefile -x config.log -x config.status -x libtool -x '*.Plo' -x '*.lo' ../handbrake/contrib/mpeg4ip/lib/mp4v2/mp4file.cpp mpeg4ip/lib/mp4v2/mp4file.cpp
+--- ../handbrake/contrib/mpeg4ip/lib/mp4v2/mp4file.cpp 2008-06-13 11:22:55.000000000 -0700
++++ mpeg4ip/lib/mp4v2/mp4file.cpp      2008-06-17 16:21:54.000000000 -0700
+@@ -2000,6 +2000,33 @@
+       return trackId;
+ }
++MP4TrackId MP4File::AddColr(MP4TrackId trackId,
++                            u_int16_t primariesIndex,
++                            u_int16_t transferFunctionIndex,
++                            u_int16_t matrixIndex)
++{
++      // validate reference track id
++  (void)FindTrackIndex(trackId);
++    const char *format = GetTrackMediaDataName (trackId);
++    
++    if (!strcasecmp(format, "avc1"))
++    {
++        AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.avc1"), "colr");
++        SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.avc1.colr.primariesIndex", primariesIndex);
++        SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.avc1.colr.transferFunctionIndex", transferFunctionIndex);
++        SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.avc1.colr.matrixIndex", matrixIndex);
++    }
++    else if (!strcasecmp(format, "mp4v"))
++    {
++        AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.mp4v"), "colr");
++        SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.mp4v.colr.primariesIndex", primariesIndex);
++        SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.mp4v.colr.transferFunctionIndex", transferFunctionIndex);
++        SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.mp4v.colr.matrixIndex", matrixIndex);
++    }
++
++      return trackId;
++}
++
+ void MP4File::DeleteTrack(MP4TrackId trackId)
+ {
+       ProtectWriteOperation("MP4DeleteTrack");
+diff -Nur -x Makefile -x config.log -x config.status -x libtool -x '*.Plo' -x '*.lo' ../handbrake/contrib/mpeg4ip/lib/mp4v2/mp4file.h mpeg4ip/lib/mp4v2/mp4file.h
+--- ../handbrake/contrib/mpeg4ip/lib/mp4v2/mp4file.h   2008-06-13 11:22:55.000000000 -0700
++++ mpeg4ip/lib/mp4v2/mp4file.h        2008-06-17 16:21:54.000000000 -0700
+@@ -305,6 +305,7 @@
+       MP4TrackId AddChapterTextTrack(MP4TrackId refTrackId);
+       MP4TrackId AddPixelAspectRatio(MP4TrackId trackId, u_int32_t hSpacing, u_int32_t vSpacing);
++      MP4TrackId AddColr(MP4TrackId trackId, u_int16_t pri, u_int16_t tran, u_int16_t mat);
+       MP4SampleId GetTrackNumberOfSamples(MP4TrackId trackId);
diff --git a/contrib/patch-mpeg4ip-nasm-2.00-configure.patch b/contrib/patch-mpeg4ip-nasm-2.00-configure.patch
new file mode 100644 (file)
index 0000000..9baa8b5
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ruN mpeg4ip-orig/configure mpeg4ip/configure
+--- mpeg4ip-orig/configure     2005-05-18 16:03:25.000000000 -0600
++++ mpeg4ip/configure  2008-01-30 20:17:15.000000000 -0700
+@@ -27789,7 +27789,7 @@
+    if test x$USENASM = xtrue; then
+       echo "$as_me:$LINENO: checking nasm version..." >&5
+ echo $ECHO_N "checking nasm version...... $ECHO_C" >&6
+-      BILLSNASM_arg=`nasm -r | tr '.' ' '`
++      BILLSNASM_arg=`(nasm -r || nasm -v) | tr '.' ' '`
+         BILLSNASM_ret=`util/testnasm.sh $BILLSNASM_arg`
+       if test x$BILLSNASM_ret = x"yes"; then
+          USENASM=true
diff --git a/contrib/patch-mpeg4ip-pascal-str.patch b/contrib/patch-mpeg4ip-pascal-str.patch
new file mode 100644 (file)
index 0000000..4add6de
--- /dev/null
@@ -0,0 +1,24 @@
+--- lib/mp4v2/atom_avc1.cpp.orig   2007-07-24 02:19:41.000000000 -0400
++++ lib/mp4v2/atom_avc1.cpp   2007-07-24 02:19:44.000000000 -0400
+@@ -41,6 +41,7 @@
+       MP4StringProperty* pProp =
+               new MP4StringProperty("compressorName");
+       pProp->SetFixedLength(32);
++      pProp->SetCountedFormat(true);
+       pProp->SetValue("AVC Coding");
+       AddProperty(pProp); /* 6 */
+
+--- lib/mp4v2/mp4property.cpp.orig   2007-07-24 02:20:32.000000000 -0400
++++ lib/mp4v2/mp4property.cpp   2007-07-24 02:21:52.000000000 -0400
+@@ -391,6 +391,10 @@
+       if (m_useCountedFormat) {
+               pFile->WriteCountedString(m_values[index],
+                       (m_useUnicode ? 2 : 1), m_useExpandedCount);
++      if (m_fixedLength) {
++              pFile->WriteBytes((u_int8_t*)m_values[index],
++                      m_fixedLength - strlen(m_values[index]) - 1);
++              }
+       } else if (m_fixedLength) {
+               pFile->WriteBytes((u_int8_t*)m_values[index], m_fixedLength);
+       } else {
+    
diff --git a/contrib/patch-mpeg4ip.patch b/contrib/patch-mpeg4ip.patch
new file mode 100644 (file)
index 0000000..75f8bbf
--- /dev/null
@@ -0,0 +1,855 @@
+diff -Naur mpeg4ip/bootstrap mpeg4ip-patched/bootstrap
+--- mpeg4ip/bootstrap  2005-10-13 16:09:41.000000000 -0400
++++ mpeg4ip-patched/bootstrap  2008-01-17 12:05:42.000000000 -0500
+@@ -47,9 +47,9 @@
+ #
+ if test $target_system = "Linux"; then
+     have_faac=no
+-    if which faac >/dev/null 2>/dev/null; then
+-      have_faac=yes
+-    fi
++#    if which faac >/dev/null 2>/dev/null; then
++#     have_faac=yes
++#    fi
+     if test $have_faac = "yes"; then
+       # we have lame and faac - see if faac is built with mp4 support
+diff -Naur mpeg4ip/lib/mp4v2/Makefile.am mpeg4ip-patched/lib/mp4v2/Makefile.am
+--- mpeg4ip/lib/mp4v2/Makefile.am      2005-03-10 13:31:34.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/Makefile.am      2008-01-17 12:09:56.000000000 -0500
+@@ -21,6 +21,7 @@
+       atom_encv.cpp \
+       atom_free.cpp \
+       atom_ftyp.cpp \
++      atom_gmin.cpp \
+       atom_hdlr.cpp \
+       atom_hinf.cpp \
+       atom_hnti.cpp \
+@@ -32,6 +33,7 @@
+       atom_mp4s.cpp \
+       atom_mp4v.cpp \
+       atom_mvhd.cpp \
++      atom_pasp.cpp \
+       atom_root.cpp \
+       atom_rtp.cpp \
+       atom_s263.cpp \
+@@ -45,6 +47,7 @@
+       atom_stsc.cpp \
+       atom_stsd.cpp \
+       atom_stsz.cpp \
++      atom_text.cpp \
+       atom_tfhd.cpp \
+       atom_tkhd.cpp \
+       atom_treftype.cpp \
+diff -Naur mpeg4ip/lib/mp4v2/Makefile.in mpeg4ip-patched/lib/mp4v2/Makefile.in
+--- mpeg4ip/lib/mp4v2/Makefile.in      2005-05-18 18:03:05.000000000 -0400
++++ mpeg4ip-patched/lib/mp4v2/Makefile.in      2008-01-17 12:04:09.000000000 -0500
+@@ -55,6 +55,7 @@
+ am_libmp4v2_la_OBJECTS = 3gp.lo atom_amr.lo atom_avc1.lo atom_avcC.lo \
+       atom_d263.lo atom_damr.lo atom_dref.lo atom_elst.lo \
+       atom_enca.lo atom_encv.lo atom_free.lo atom_ftyp.lo \
++      atom_gmin.lo atom_text.lo \
+       atom_hdlr.lo atom_hinf.lo atom_hnti.lo atom_href.lo \
+       atom_mdat.lo atom_mdhd.lo atom_meta.lo atom_mp4a.lo \
+       atom_mp4s.lo atom_mp4v.lo atom_mvhd.lo atom_root.lo \
+@@ -82,6 +83,7 @@
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_encv.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_free.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_ftyp.Plo \
++@AMDEP_TRUE@  ./$(DEPDIR)/atom_gmin.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_hdlr.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_hinf.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_hnti.Plo \
+@@ -103,6 +105,7 @@
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_stsc.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_stsd.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_stsz.Plo \
++@AMDEP_TRUE@  ./$(DEPDIR)/atom_text.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_tfhd.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_tkhd.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_treftype.Plo \
+@@ -349,6 +352,7 @@
+       atom_encv.cpp \
+       atom_free.cpp \
+       atom_ftyp.cpp \
++      atom_gmin.cpp \
+       atom_hdlr.cpp \
+       atom_hinf.cpp \
+       atom_hnti.cpp \
+@@ -373,6 +377,7 @@
+       atom_stsc.cpp \
+       atom_stsd.cpp \
+       atom_stsz.cpp \
++      atom_text.cpp \
+       atom_tfhd.cpp \
+       atom_tkhd.cpp \
+       atom_treftype.cpp \
+@@ -501,6 +506,7 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_encv.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_free.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_ftyp.Plo@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_gmin.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_hdlr.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_hinf.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_hnti.Plo@am__quote@
+@@ -524,6 +530,7 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_stsc.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_stsd.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_stsz.Plo@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_text.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_tfhd.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_tkhd.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_treftype.Plo@am__quote@
+diff -Naur mpeg4ip/lib/mp4v2/atom_avc1.cpp mpeg4ip-patched/lib/mp4v2/atom_avc1.cpp
+--- mpeg4ip/lib/mp4v2/atom_avc1.cpp    2004-07-13 17:07:50.000000000 -0400
++++ mpeg4ip-patched/lib/mp4v2/atom_avc1.cpp    2008-01-17 12:07:00.000000000 -0500
+@@ -41,7 +41,7 @@
+       MP4StringProperty* pProp = 
+               new MP4StringProperty("compressorName");
+       pProp->SetFixedLength(32);
+-      pProp->SetValue("AVC Coding");
++      pProp->SetValue("");
+       AddProperty(pProp); /* 6 */
+       AddReserved("reserved4", 4); /* 7 */
+diff -Naur mpeg4ip/lib/mp4v2/atom_gmin.cpp mpeg4ip-patched/lib/mp4v2/atom_gmin.cpp
+--- mpeg4ip/lib/mp4v2/atom_gmin.cpp    1969-12-31 19:00:00.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/atom_gmin.cpp    2008-01-17 12:04:09.000000000 -0500
+@@ -0,0 +1,51 @@
++/*
++ * The contents of this file are subject to the Mozilla Public
++ * License Version 1.1 (the "License"); you may not use this file
++ * except in compliance with the License. You may obtain a copy of
++ * the License at http://www.mozilla.org/MPL/
++ * 
++ * Software distributed under the License is distributed on an "AS
++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++ * implied. See the License for the specific language governing
++ * rights and limitations under the License.
++ * 
++ * The Original Code is MPEG4IP.
++ * 
++ * The Initial Developer of the Original Code is Cisco Systems Inc.
++ * Portions created by Cisco Systems Inc. are
++ * Copyright (C) Cisco Systems Inc. 2001.  All Rights Reserved.
++ * 
++ * Contributor(s): 
++ *            Dave Mackie             dmackie@cisco.com
++ */
++
++#include "mp4common.h"
++
++MP4GminAtom::MP4GminAtom() 
++      : MP4Atom("gmin") 
++{
++
++      AddVersionAndFlags(); /* 0, 1 */
++
++      AddProperty(new MP4Integer16Property("graphicsMode")); /* 2 */
++      AddProperty(new MP4Integer16Property("opColorRed")); /* 3 */
++      AddProperty(new MP4Integer16Property("opColorGreen")); /* 4 */
++      AddProperty(new MP4Integer16Property("opColorBlue")); /* 5 */
++      AddProperty(new MP4Integer16Property("balance")); /* 6 */
++      AddReserved("reserved", 2); /* 7 */
++
++}
++
++void MP4GminAtom::Generate()
++{
++
++      MP4Atom::Generate();
++
++      ((MP4Integer16Property*)m_pProperties[2])->SetValue(0x0040);
++      ((MP4Integer16Property*)m_pProperties[3])->SetValue(0x8000);
++      ((MP4Integer16Property*)m_pProperties[4])->SetValue(0x8000);
++      ((MP4Integer16Property*)m_pProperties[5])->SetValue(0x8000);
++      ((MP4Integer16Property*)m_pProperties[6])->SetValue(0x0000);
++
++}
++
+diff -Naur mpeg4ip/lib/mp4v2/atom_mp4a.cpp mpeg4ip-patched/lib/mp4v2/atom_mp4a.cpp
+--- mpeg4ip/lib/mp4v2/atom_mp4a.cpp    2001-10-02 17:15:39.000000000 -0400
++++ mpeg4ip-patched/lib/mp4v2/atom_mp4a.cpp    2008-01-17 12:04:09.000000000 -0500
+@@ -29,7 +29,10 @@
+       AddProperty( /* 1 */
+               new MP4Integer16Property("dataReferenceIndex"));
+-      AddReserved("reserved2", 16); /* 2 */
++      /* patched by saintdev to allow us to set correct audio information */
++//    AddReserved("reserved2", 16); /* 2 */
++      AddProperty( /* 2 */
++              new MP4BytesProperty("reserved2", 16));
+       AddProperty( /* 3 */
+               new MP4Integer16Property("timeScale"));
+@@ -55,5 +58,6 @@
+       m_pProperties[2]->SetReadOnly(false);
+       ((MP4BytesProperty*)m_pProperties[2])->
+               SetValue(reserved2, sizeof(reserved2));
+-      m_pProperties[2]->SetReadOnly(true);
++      /* patched by saintdev to allow us to set correct audio information */
++//    m_pProperties[2]->SetReadOnly(true);
+ }
+diff -Naur mpeg4ip/lib/mp4v2/atom_standard.cpp mpeg4ip-patched/lib/mp4v2/atom_standard.cpp
+--- mpeg4ip/lib/mp4v2/atom_standard.cpp        2004-12-14 16:35:35.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/atom_standard.cpp        2008-01-17 12:04:09.000000000 -0500
+@@ -138,6 +138,11 @@
+   /*
+    * g???
+    */
++  } else if (ATOMID(type) == ATOMID("gmhd")) { 
++    ExpectChildAtom("gmin", Required, OnlyOne);
++    ExpectChildAtom("tmcd", Optional, OnlyOne);
++    ExpectChildAtom("text", Optional, OnlyOne);
++
+   } else if (ATOMID(type) == ATOMID("gnre")) { // Apple iTunes 
+     ExpectChildAtom("data", Optional, OnlyOne);
+@@ -221,6 +226,7 @@
+     ExpectChildAtom("smhd", Optional, OnlyOne);
+     ExpectChildAtom("hmhd", Optional, OnlyOne);
+     ExpectChildAtom("nmhd", Optional, OnlyOne);
++    ExpectChildAtom("gmhd", Optional, OnlyOne);
+     ExpectChildAtom("dinf", Required, OnlyOne);
+     ExpectChildAtom("stbl", Required, OnlyOne);
+@@ -366,6 +372,7 @@
+     ExpectChildAtom("ipir", Optional, OnlyOne);
+     ExpectChildAtom("mpod", Optional, OnlyOne);
+     ExpectChildAtom("sync", Optional, OnlyOne);
++    ExpectChildAtom("chap", Optional, OnlyOne);
+   } else if (ATOMID(type) == ATOMID("trex")) {
+     AddVersionAndFlags();     /* 0, 1 */
+diff -Naur mpeg4ip/lib/mp4v2/atom_stsd.cpp mpeg4ip-patched/lib/mp4v2/atom_stsd.cpp
+--- mpeg4ip/lib/mp4v2/atom_stsd.cpp    2004-07-13 17:07:50.000000000 -0400
++++ mpeg4ip-patched/lib/mp4v2/atom_stsd.cpp    2008-01-17 12:07:00.000000000 -0500
+@@ -49,6 +49,8 @@
+       ExpectChildAtom("sawb", Optional, Many); // For AMR-WB
+       ExpectChildAtom("s263", Optional, Many); // For H.263
+       ExpectChildAtom("avc1", Optional, Many);
++      ExpectChildAtom("text", Optional, Many);
++      ExpectChildAtom("pasp", Optional, Many);
+ }
+ void MP4StsdAtom::Read() 
+diff -Naur mpeg4ip/lib/mp4v2/atom_text.cpp mpeg4ip-patched/lib/mp4v2/atom_text.cpp
+--- mpeg4ip/lib/mp4v2/atom_text.cpp    1969-12-31 19:00:00.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/atom_text.cpp    2008-01-17 12:04:09.000000000 -0500
+@@ -0,0 +1,132 @@
++/*
++ * The contents of this file are subject to the Mozilla Public
++ * License Version 1.1 (the "License"); you may not use this file
++ * except in compliance with the License. You may obtain a copy of
++ * the License at http://www.mozilla.org/MPL/
++ * 
++ * Software distributed under the License is distributed on an "AS
++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++ * implied. See the License for the specific language governing
++ * rights and limitations under the License.
++ * 
++ * The Original Code is MPEG4IP.
++ * 
++ * The Initial Developer of the Original Code is Cisco Systems Inc.
++ * Portions created by Cisco Systems Inc. are
++ * Copyright (C) Cisco Systems Inc. 2001.  All Rights Reserved.
++ * 
++ * Contributor(s): 
++ *            Dave Mackie             dmackie@cisco.com
++ */
++
++#include "mp4common.h"
++
++MP4TextAtom::MP4TextAtom() 
++      : MP4Atom("text") 
++{
++      // The atom type "text" is used in two complete unrelated ways
++      // i.e. it's real two atoms with the same name
++      // To handle that we need to postpone property creation until
++      // we know who our parent atom is (stsd or gmhd) which gives us
++      // the context info we need to know who we are
++}
++
++void MP4TextAtom::AddPropertiesStsdType()
++{
++
++      AddReserved("reserved1", 6); /* 0 */
++
++      AddProperty(new MP4Integer16Property("dataReferenceIndex"));/* 1 */
++
++      AddProperty(new MP4Integer32Property("displayFlags")); /* 2 */
++      AddProperty(new MP4Integer32Property("textJustification")); /* 3 */
++
++      AddProperty(new MP4Integer16Property("bgColorRed")); /* 4 */
++      AddProperty(new MP4Integer16Property("bgColorGreen")); /* 5 */
++      AddProperty(new MP4Integer16Property("bgColorBlue")); /* 6 */
++
++      AddProperty(new MP4Integer16Property("defTextBoxTop")); /* 7 */
++      AddProperty(new MP4Integer16Property("defTextBoxLeft")); /* 8 */
++      AddProperty(new MP4Integer16Property("defTextBoxBottom")); /* 9 */
++      AddProperty(new MP4Integer16Property("defTextBoxRight")); /* 10 */
++
++      AddReserved("reserved2", 8); /* 11 */
++
++      AddProperty(new MP4Integer16Property("fontNumber")); /* 12 */
++      AddProperty(new MP4Integer16Property("fontFace")); /* 13 */
++
++      AddReserved("reserved3", 1); /* 14 */
++      AddReserved("reserved4", 2); /* 15 */
++
++      AddProperty(new MP4Integer16Property("foreColorRed")); /* 16 */
++      AddProperty(new MP4Integer16Property("foreColorGreen")); /* 17 */
++      AddProperty(new MP4Integer16Property("foreColorBlue")); /* 18 */
++
++}
++
++void MP4TextAtom::AddPropertiesGmhdType()
++{
++
++      AddProperty(new MP4BytesProperty("textData", 36)); /* 0 */
++
++}
++
++
++void MP4TextAtom::Generate()
++{
++
++      if (!strcmp(m_pParentAtom->GetType(), "stsd")) {
++              AddPropertiesStsdType();
++              GenerateStsdType();
++      } else if (!strcmp(m_pParentAtom->GetType(), "gmhd")) {
++              AddPropertiesGmhdType();
++              GenerateGmhdType();
++      } else {
++              VERBOSE_WARNING(m_pFile->GetVerbosity(),
++                      printf("Warning: text atom in unexpected context, can not generate"));
++      }
++
++}
++
++void MP4TextAtom::GenerateStsdType() 
++{
++      // generate children
++      MP4Atom::Generate();
++
++      ((MP4Integer16Property*)m_pProperties[1])->SetValue(1);
++
++      ((MP4Integer32Property*)m_pProperties[2])->SetValue(1);
++      ((MP4Integer32Property*)m_pProperties[3])->SetValue(1);
++
++}
++
++void MP4TextAtom::GenerateGmhdType() 
++{
++      MP4Atom::Generate();
++
++      // property 0 has non-zero fixed values
++      static u_int8_t textData[36] = {
++              0x00, 0x01, 
++              0x00, 0x00,
++              0x00, 0x00,
++              0x00, 0x00,
++              0x00, 0x00, 
++              0x00, 0x00,
++              0x00, 0x00, 
++              0x00, 0x00,
++              0x00, 0x01, 
++              0x00, 0x00,
++              0x00, 0x00, 
++              0x00, 0x00,
++              0x00, 0x00, 
++              0x00, 0x00,
++              0x00, 0x00, 
++              0x00, 0x00,
++              0x40, 0x00, 
++              0x00, 0x00, 
++      };
++      ((MP4BytesProperty*)m_pProperties[0])->SetValue(textData, sizeof(textData));
++      
++}
++
++
+diff -Naur mpeg4ip/lib/mp4v2/atom_tkhd.cpp mpeg4ip-patched/lib/mp4v2/atom_tkhd.cpp
+--- mpeg4ip/lib/mp4v2/atom_tkhd.cpp    2003-11-20 00:46:11.000000000 +0100
++++ mpeg4ip/lib/mp4v2/atom_tkhd.cpp    2008-01-19 12:41:13.000000000 +0100
+@@ -53,23 +53,29 @@
+                       new MP4Integer32Property("duration"));
+       }
+-      AddReserved("reserved2", 12); /* 7 */
+-
++      AddReserved("reserved2", 8); /* 7 */
++      
++      AddProperty( /* 8 */
++                      new MP4Integer16Property("layer"));
++      AddProperty( /* 9 */
++                      new MP4Integer16Property("alternate_group"));
++      
+       MP4Float32Property* pProp;
+       pProp = new MP4Float32Property("volume");
+       pProp->SetFixed16Format();
+-      AddProperty(pProp); /* 8 */
++      AddProperty(pProp); /* 10 */
+-      AddReserved("reserved3", 38); /* 9 */
++      /* patched by maurj to enable us to set the matrix for anamorphic display */
++      AddProperty(new MP4BytesProperty("reserved3", 38)); /* 11 */
+       pProp = new MP4Float32Property("width");
+       pProp->SetFixed32Format();
+-      AddProperty(pProp); /* 10 */
++      AddProperty(pProp); /* 12 */
+       pProp = new MP4Float32Property("height");
+       pProp->SetFixed32Format();
+-      AddProperty(pProp); /* 11 */
++      AddProperty(pProp); /* 13 */
+ }
+ void MP4TkhdAtom::Generate() 
+@@ -103,10 +109,11 @@
+               0x00, 0x00, 0x00, 0x00, 
+               0x40, 0x00, 0x00, 0x00, 
+       };
+-      m_pProperties[9]->SetReadOnly(false);
+-      ((MP4BytesProperty*)m_pProperties[9])->
++      m_pProperties[11]->SetReadOnly(false);
++      ((MP4BytesProperty*)m_pProperties[11])->
+               SetValue(reserved3, sizeof(reserved3));
+-      m_pProperties[9]->SetReadOnly(true);
++      /* patched by maurj to enable us to set the matrix for anamorphic display */
++      /* m_pProperties[9]->SetReadOnly(true);*/
+ }
+ void MP4TkhdAtom::Read()
+diff -Naur mpeg4ip/lib/mp4v2/atoms.h mpeg4ip-patched/lib/mp4v2/atoms.h
+--- mpeg4ip/lib/mp4v2/atoms.h  2005-03-10 13:31:34.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/atoms.h  2008-01-17 12:07:00.000000000 -0500
+@@ -206,6 +206,12 @@
+       void Read();
+ };
++class MP4GminAtom : public MP4Atom {
++public:
++      MP4GminAtom();
++      void Generate();
++};
++
+ class MP4HdlrAtom : public MP4Atom {
+ public:
+       MP4HdlrAtom();
+@@ -327,6 +333,19 @@
+       void Write();
+ };
++class MP4TextAtom : public MP4Atom {
++public:
++      MP4TextAtom();
++      void Generate();
++
++protected:
++      void AddPropertiesStsdType();
++      void AddPropertiesGmhdType();
++
++      void GenerateStsdType();
++      void GenerateGmhdType();
++};
++
+ class MP4TfhdAtom : public MP4Atom {
+ public:
+       MP4TfhdAtom();
+@@ -374,4 +393,10 @@
+   void Generate(void);
+ };
++class MP4PaspAtom : public MP4Atom {
++ public:
++    MP4PaspAtom();
++    void Generate();
++};
++
+ #endif /* __MP4_ATOMS_INCLUDED__ */
+diff -Naur mpeg4ip/lib/mp4v2/libmp4v260.dsp mpeg4ip-patched/lib/mp4v2/libmp4v260.dsp
+--- mpeg4ip/lib/mp4v2/libmp4v260.dsp   2005-03-24 17:14:52.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/libmp4v260.dsp   2008-01-17 12:07:00.000000000 -0500
+@@ -134,6 +134,10 @@
+ # End Source File
+ # Begin Source File
++SOURCE=.\atom_gmin.cpp
++# End Source File
++# Begin Source File
++
+ SOURCE=.\atom_hdlr.cpp
+ # End Source File
+ # Begin Source File
+@@ -178,6 +182,10 @@
+ # End Source File
+ # Begin Source File
++SOURCE=.\atom_pasp.cpp
++# End Source File
++# Begin Source File
++
+ SOURCE=.\atom_root.cpp
+ # End Source File
+ # Begin Source File
+@@ -242,6 +250,10 @@
+ # End Source File
+ # Begin Source File
++SOURCE=.\atom_text.cpp
++# End Source File
++# Begin Source File
++
+ SOURCE=.\atom_udta.cpp
+ # End Source File
+ # Begin Source File
+diff -Naur mpeg4ip/lib/mp4v2/libmp4v2_st60.dsp mpeg4ip-patched/lib/mp4v2/libmp4v2_st60.dsp
+--- mpeg4ip/lib/mp4v2/libmp4v2_st60.dsp        2005-03-24 17:14:52.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/libmp4v2_st60.dsp        2008-01-17 12:04:09.000000000 -0500
+@@ -133,6 +133,10 @@
+ # End Source File
+ # Begin Source File
++SOURCE=.\atom_gmin.cpp
++# End Source File
++# Begin Source File
++
+ SOURCE=.\atom_hdlr.cpp
+ # End Source File
+ # Begin Source File
+@@ -241,6 +245,10 @@
+ # End Source File
+ # Begin Source File
++SOURCE=.\atom_text.cpp
++# End Source File
++# Begin Source File
++
+ SOURCE=.\atom_udta.cpp
+ # End Source File
+ # Begin Source File
+diff -Naur mpeg4ip/lib/mp4v2/mp4.cpp mpeg4ip-patched/lib/mp4v2/mp4.cpp
+--- mpeg4ip/lib/mp4v2/mp4.cpp  2005-03-30 13:41:58.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/mp4.cpp  2008-01-17 12:07:00.000000000 -0500
+@@ -939,6 +939,52 @@
+       return MP4_INVALID_TRACK_ID;
+ }
++extern "C" MP4TrackId MP4AddTextTrack(
++      MP4FileHandle hFile, MP4TrackId refTrackId)
++{
++      if (MP4_IS_VALID_FILE_HANDLE(hFile)) {
++              try {
++                      return ((MP4File*)hFile)->AddTextTrack(refTrackId);
++              }
++              catch (MP4Error* e) {
++                      PRINT_ERROR(e);
++                      delete e;
++              }
++      }
++      return MP4_INVALID_TRACK_ID;
++}
++
++extern "C" MP4TrackId MP4AddChapterTextTrack(
++      MP4FileHandle hFile, MP4TrackId refTrackId)
++{
++      if (MP4_IS_VALID_FILE_HANDLE(hFile)) {
++              try {
++                      return ((MP4File*)hFile)->AddChapterTextTrack(refTrackId);
++              }
++              catch (MP4Error* e) {
++                      PRINT_ERROR(e);
++                      delete e;
++              }
++      }
++      return MP4_INVALID_TRACK_ID;
++}
++
++extern "C" MP4TrackId MP4AddPixelAspectRatio(
++      MP4FileHandle hFile, MP4TrackId refTrackId, u_int32_t hSpacing, u_int32_t vSpacing)
++{
++      if (MP4_IS_VALID_FILE_HANDLE(hFile)) {
++              try {
++                      return ((MP4File*)hFile)->AddPixelAspectRatio(refTrackId, hSpacing, vSpacing);
++              }
++              catch (MP4Error* e) {
++                      PRINT_ERROR(e);
++                      delete e;
++              }
++      }
++      return MP4_INVALID_TRACK_ID;
++}
++
++
+ extern "C" MP4TrackId MP4CloneTrack(
+       MP4FileHandle srcFile, 
+       MP4TrackId srcTrackId,
+diff -Naur mpeg4ip/lib/mp4v2/mp4.h mpeg4ip-patched/lib/mp4v2/mp4.h
+--- mpeg4ip/lib/mp4v2/mp4.h    2005-03-30 13:41:58.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/mp4.h    2008-01-17 12:07:00.000000000 -0500
+@@ -100,6 +100,7 @@
+ #define MP4_VIDEO_TRACK_TYPE  "vide"
+ #define MP4_HINT_TRACK_TYPE           "hint"
+ #define MP4_CNTL_TRACK_TYPE     "cntl"
++#define MP4_TEXT_TRACK_TYPE           "text"
+ /*
+  * This second set of track types should be created 
+  * via MP4AddSystemsTrack(type)
+@@ -538,6 +539,20 @@
+       MP4FileHandle hFile, 
+       MP4TrackId refTrackId);
++MP4TrackId MP4AddTextTrack(
++      MP4FileHandle hFile, 
++      MP4TrackId refTrackId);
++
++MP4TrackId MP4AddChapterTextTrack(
++      MP4FileHandle hFile, 
++      MP4TrackId refTrackId);
++
++MP4TrackId MP4AddPixelAspectRatio(
++      MP4FileHandle hFile, 
++      MP4TrackId refTrackId,
++    u_int32_t hSpacing,
++    u_int32_t vSpacing);
++
+ MP4TrackId MP4CloneTrack(
+       MP4FileHandle srcFile, 
+       MP4TrackId srcTrackId,
+diff -Naur mpeg4ip/lib/mp4v2/mp4atom.cpp mpeg4ip-patched/lib/mp4v2/mp4atom.cpp
+--- mpeg4ip/lib/mp4v2/mp4atom.cpp      2005-03-10 13:31:34.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/mp4atom.cpp      2008-01-17 12:11:40.000000000 -0500
+@@ -84,6 +84,13 @@
+       pAtom = new MP4SoundAtom("alaw");
+       }
+       break;
++
++    case 'c':
++      if (ATOMID(type) == ATOMID("chap")) {
++      pAtom = new MP4TrefTypeAtom(type);
++        }
++        break;
++
+     case 'd':
+       if (ATOMID(type) == ATOMID("d263")) {
+       pAtom = new MP4D263Atom();
+@@ -113,6 +120,11 @@
+       pAtom = new MP4FtypAtom();
+       }
+       break;
++    case 'g':
++      if (ATOMID(type) == ATOMID("gmin")) {
++      pAtom = new MP4GminAtom();
++      }
++      break;
+     case 'h':
+       if (ATOMID(type) == ATOMID("hdlr")) {
+       pAtom = new MP4HdlrAtom();
+@@ -200,7 +212,9 @@
+       }
+       break;
+     case 't':
+-      if (ATOMID(type) == ATOMID("tkhd")) {
++      if (ATOMID(type) == ATOMID("text")) {
++      pAtom = new MP4TextAtom();
++      } else if (ATOMID(type) == ATOMID("tkhd")) {
+       pAtom = new MP4TkhdAtom();
+       } else if (ATOMID(type) == ATOMID("tfhd")) {
+       pAtom = new MP4TfhdAtom();
+@@ -238,6 +252,12 @@
+       pAtom = new MP4SmiAtom();
+       }
+       break;
++     case 'p':
++         if (ATOMID(type) == ATOMID("pasp")) {
++      pAtom = new MP4PaspAtom();
++       }
++       break;
++    
+     }
+   }
+diff -Naur mpeg4ip/lib/mp4v2/mp4file.cpp mpeg4ip-patched/lib/mp4v2/mp4file.cpp
+--- mpeg4ip/lib/mp4v2/mp4file.cpp      2005-03-30 13:41:58.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/mp4file.cpp      2008-01-17 12:07:00.000000000 -0500
+@@ -1869,6 +1869,81 @@
+       return trackId;
+ }
++MP4TrackId MP4File::AddTextTrack(MP4TrackId refTrackId)
++{
++      // validate reference track id
++      FindTrackIndex(refTrackId);
++
++      MP4TrackId trackId = 
++              AddTrack(MP4_TEXT_TRACK_TYPE, GetTrackTimeScale(refTrackId));
++
++      InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "gmhd", 0);
++
++      AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "text");
++
++      // stsd is a unique beast in that it has a count of the number 
++      // of child atoms that needs to be incremented after we add the text atom
++      MP4Integer32Property* pStsdCountProperty;
++      FindIntegerProperty(
++              MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"),
++              (MP4Property**)&pStsdCountProperty);
++      pStsdCountProperty->IncrementValue();
++
++      return trackId;
++}
++
++MP4TrackId MP4File::AddChapterTextTrack(MP4TrackId refTrackId)
++{
++      // validate reference track id
++      FindTrackIndex(refTrackId);
++
++      MP4TrackId trackId = 
++              AddTrack(MP4_TEXT_TRACK_TYPE, GetTrackTimeScale(refTrackId));
++
++      InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "gmhd", 0);
++
++      AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "text");
++
++      // stsd is a unique beast in that it has a count of the number 
++      // of child atoms that needs to be incremented after we add the text atom
++      MP4Integer32Property* pStsdCountProperty;
++      FindIntegerProperty(
++              MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"),
++              (MP4Property**)&pStsdCountProperty);
++      pStsdCountProperty->IncrementValue();
++
++      /* add the magic "text" atom to the generic media header */
++      AddChildAtom(MakeTrackName(trackId, "mdia.minf.gmhd"), "text");
++
++      AddDescendantAtoms(MakeTrackName(refTrackId, NULL), "tref.chap");
++
++      AddTrackReference(MakeTrackName(refTrackId, "tref.chap"), trackId);
++
++      return trackId;
++}
++
++MP4TrackId MP4File::AddPixelAspectRatio(MP4TrackId trackId, u_int32_t hSpacing, u_int32_t vSpacing)
++{
++      // validate reference track id
++  (void)FindTrackIndex(trackId);
++    const char *format = GetTrackMediaDataName (trackId);
++    
++    if (!strcasecmp(format, "avc1"))
++    {
++           (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.avc1"), "pasp");
++            SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.avc1.pasp.hSpacing", hSpacing);
++            SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.avc1.pasp.vSpacing", vSpacing);
++    }
++    else if (!strcasecmp(format, "mp4v"))
++    {
++           (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.mp4v"), "pasp");
++            SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.mp4v.pasp.hSpacing", hSpacing);
++            SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.mp4v.pasp.vSpacing", vSpacing);
++    }
++
++      return trackId;
++}
++
+ void MP4File::DeleteTrack(MP4TrackId trackId)
+ {
+       ProtectWriteOperation("MP4DeleteTrack");
+diff -Naur mpeg4ip/lib/mp4v2/mp4file.h mpeg4ip-patched/lib/mp4v2/mp4file.h
+--- mpeg4ip/lib/mp4v2/mp4file.h        2005-03-30 13:41:58.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/mp4file.h        2008-01-17 12:07:00.000000000 -0500
+@@ -296,6 +296,10 @@
+                                       const uint8_t *pPicture,
+                                       uint16_t pictureLen);
+       MP4TrackId AddHintTrack(MP4TrackId refTrackId);
++      MP4TrackId AddTextTrack(MP4TrackId refTrackId);
++      MP4TrackId AddChapterTextTrack(MP4TrackId refTrackId);
++
++      MP4TrackId AddPixelAspectRatio(MP4TrackId trackId, u_int32_t hSpacing, u_int32_t vSpacing);
+       MP4SampleId GetTrackNumberOfSamples(MP4TrackId trackId);
+diff -Naur mpeg4ip/lib/mp4v2/atom_pasp.cpp mpeg4ip-patched/lib/mp4v2/atom_pasp.cpp
+--- mpeg4ip/lib/mp4v2/atom_pasp.cpp    1969-12-31 19:00:00.000000000 -0500
++++ mpeg4ip-patched/lib/mp4v2/atom_pasp.cpp    2008-01-17 12:07:00.000000000 -0500
+@@ -0,0 +1,42 @@
++/*
++ * The contents of this file are subject to the Mozilla Public
++ * License Version 1.1 (the "License"); you may not use this file
++ * except in compliance with the License. You may obtain a copy of
++ * the License at http://www.mozilla.org/MPL/
++ * 
++ * Software distributed under the License is distributed on an "AS
++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++ * implied. See the License for the specific language governing
++ * rights and limitations under the License.
++ * 
++ * The Original Code is MPEG4IP.
++ * 
++ * Contributer has declined to give copyright information, and gives
++ * it freely to the world.
++ * 
++ * Contributor(s): 
++ */
++
++#include "mp4common.h"
++
++MP4PaspAtom::MP4PaspAtom() 
++      : MP4Atom("pasp") 
++{
++
++      AddProperty( /* 0 */
++        new MP4Integer32Property("hSpacing"));
++
++      AddProperty( /* 1 */
++        new MP4Integer32Property("vSpacing")); 
++
++}
++
++void MP4PaspAtom::Generate()
++{
++
++      MP4Atom::Generate();
++
++      ((MP4Integer32Property*)m_pProperties[0])->SetValue(1);
++      ((MP4Integer32Property*)m_pProperties[1])->SetValue(1);
++
++}
+diff -Naur mpeg4ip-patched/lib/mp4v2/Makefile.in mpeg4ip/lib/mp4v2/Makefile.in
+--- mpeg4ip-patched/lib/mp4v2/Makefile.in      2008-01-17 12:04:09.000000000 -0500
++++ mpeg4ip/lib/mp4v2/Makefile.in      2008-01-17 13:20:50.000000000 -0500
+@@ -58,7 +58,7 @@
+       atom_gmin.lo atom_text.lo \
+       atom_hdlr.lo atom_hinf.lo atom_hnti.lo atom_href.lo \
+       atom_mdat.lo atom_mdhd.lo atom_meta.lo atom_mp4a.lo \
+-      atom_mp4s.lo atom_mp4v.lo atom_mvhd.lo atom_root.lo \
++      atom_mp4s.lo atom_mp4v.lo atom_mvhd.lo atom_pasp.lo atom_root.lo \
+       atom_rtp.lo atom_s263.lo atom_sdp.lo atom_smi.lo atom_sound.lo \
+       atom_standard.lo atom_stbl.lo atom_stdp.lo atom_stsc.lo \
+       atom_stsd.lo atom_stsz.lo atom_tfhd.lo atom_tkhd.lo \
+@@ -96,6 +96,7 @@
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_mp4v.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_mvhd.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_root.Plo ./$(DEPDIR)/atom_rtp.Plo \
++@AMDEP_TRUE@  ./$(DEPDIR)/atom_pasp.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_s263.Plo ./$(DEPDIR)/atom_sdp.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_smi.Plo \
+ @AMDEP_TRUE@  ./$(DEPDIR)/atom_sound.Plo \
+@@ -364,6 +365,7 @@
+       atom_mp4s.cpp \
+       atom_mp4v.cpp \
+       atom_mvhd.cpp \
++      atom_pasp.cpp \
+       atom_root.cpp \
+       atom_rtp.cpp \
+       atom_s263.cpp \
+@@ -518,6 +520,7 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_mp4s.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_mp4v.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_mvhd.Plo@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_pasp.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_root.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_rtp.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom_s263.Plo@am__quote@
diff --git a/contrib/patch-x264-aq.patch b/contrib/patch-x264-aq.patch
new file mode 100644 (file)
index 0000000..79d8dca
--- /dev/null
@@ -0,0 +1,299 @@
+Index: encoder/ratecontrol.h
+===================================================================
+--- encoder/ratecontrol.h      (revision 736)
++++ encoder/ratecontrol.h      (working copy)
+@@ -34,6 +34,7 @@
+ int  x264_ratecontrol_qp( x264_t * );
+ void x264_ratecontrol_end( x264_t *, int bits );
+ void x264_ratecontrol_summary( x264_t * );
++void x264_adaptive_quant    ( x264_t * );
+ #endif
+Index: encoder/encoder.c
+===================================================================
+--- encoder/encoder.c  (revision 736)
++++ encoder/encoder.c  (working copy)
+@@ -401,6 +401,7 @@
+         h->param.analyse.b_fast_pskip = 0;
+         h->param.analyse.i_noise_reduction = 0;
+         h->param.analyse.i_subpel_refine = x264_clip3( h->param.analyse.i_subpel_refine, 1, 6 );
++        h->param.analyse.b_aq = 0;
+     }
+     if( h->param.rc.i_rc_method == X264_RC_CQP )
+     {
+@@ -475,6 +476,10 @@
+     if( !h->param.b_cabac )
+         h->param.analyse.i_trellis = 0;
+     h->param.analyse.i_trellis = x264_clip3( h->param.analyse.i_trellis, 0, 2 );
++    h->param.analyse.b_aq = h->param.analyse.b_aq && h->param.analyse.f_aq_strength > 0;
++    /* VAQ on static sensitivity mode effectively replaces qcomp, so qcomp is raised towards 1 to compensate. */
++    if(h->param.analyse.b_aq && h->param.analyse.f_aq_sensitivity != 0) 
++        h->param.rc.f_qcompress = x264_clip3f(h->param.rc.f_qcompress + h->param.analyse.f_aq_strength * 0.4 / 0.28, 0, 1);
+     h->param.analyse.i_noise_reduction = x264_clip3( h->param.analyse.i_noise_reduction, 0, 1<<16 );
+     {
+Index: encoder/ratecontrol.c
+===================================================================
+--- encoder/ratecontrol.c      (revision 736)
++++ encoder/ratecontrol.c      (working copy)
+@@ -127,6 +127,10 @@
+     predictor_t *pred_b_from_p; /* predict B-frame size from P-frame satd */
+     int bframes;                /* # consecutive B-frames before this P-frame */
+     int bframe_bits;            /* total cost of those frames */
++    
++    /* AQ stuff */
++    float aq_threshold;
++    int *ac_energy;
+     int i_zones;
+     x264_zone_t *zones;
+@@ -169,7 +173,97 @@
+            + rce->misc_bits;
+ }
++// Find the total AC energy of the block in all planes.
++static int ac_energy_mb( x264_t *h, int mb_x, int mb_y, int *satd )
++{
++    DECLARE_ALIGNED( static uint8_t, flat[16], 16 ) = {128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128};
++//  DECLARE_ALIGNED( static uint8_t, flat[16], 16 );
++    unsigned int var=0, sad, ssd, i;
++    for( i=0; i<3; i++ )
++    {
++        int w = i ? 8 : 16;
++        int stride = h->fenc->i_stride[i];
++        int offset = h->mb.b_interlaced
++            ? w * (mb_x + (mb_y&~1) * stride) + (mb_y&1) * stride
++            : w * (mb_x + mb_y * stride);
++        int pix = i ? PIXEL_8x8 : PIXEL_16x16;
++        stride <<= h->mb.b_interlaced;
++        sad = h->pixf.sad[pix](flat, 0, h->fenc->plane[i]+offset, stride);
++        ssd = h->pixf.ssd[pix](flat, 0, h->fenc->plane[i]+offset, stride);
++        var += ssd - (sad * sad >> (i?6:8));
++        // SATD to represent the block's overall complexity (bit cost) for intra encoding.
++        // exclude the DC coef, because nothing short of an actual intra prediction will estimate DC cost.
++        if( var && satd )
++            *satd += h->pixf.satd[pix](flat, 0, h->fenc->plane[i]+offset, stride) - sad/2;
++    }
++    return var;
++}
++ 
++void x264_autosense_aq( x264_t *h )
++{
++    double total = 0;
++    double n = 0;
++    int mb_x, mb_y;
++    /* FIXME: Some of the SATDs might be already calculated elsewhere (ratecontrol?).  Can we reuse them? */
++    /* FIXME: Is chroma SATD necessary? */
++    for( mb_y=0; mb_y<h->sps->i_mb_height; mb_y++ )
++        for( mb_x=0; mb_x<h->sps->i_mb_width; mb_x++ )
++        {
++            int energy, satd=0;
++            energy = ac_energy_mb( h, mb_x, mb_y, &satd );
++            h->rc->ac_energy[mb_x + mb_y * h->sps->i_mb_width] = energy;
++            /* Weight the energy value by the SATD value of the MB.  This represents the fact that
++            the more complex blocks in a frame should be weighted more when calculating the optimal sensitivity. 
++            This also helps diminish the negative effect of large numbers of simple blocks in a frame, such as in the case
++            of a letterboxed film. */
++            if( energy )
++            {
++                x264_cpu_restore(h->param.cpu);
++                total += logf(energy) * satd;
++                n += satd;
++            }
++        }
++    x264_cpu_restore(h->param.cpu);
++    /* Calculate and store the threshold. */
++    h->rc->aq_threshold = n ? total/n : 15;
++}
++/*****************************************************************************
++* x264_adaptive_quant:
++ * adjust macroblock QP based on variance (AC energy) of the MB.
++ * high variance  = higher QP
++ * low variance = lower QP
++ * This generally increases SSIM and lowers PSNR.
++*****************************************************************************/
++void x264_adaptive_quant( x264_t *h )
++{
++    int qp = h->mb.i_qp;
++    int energy;
++    x264_cpu_restore(h->param.cpu);
++    if(h->param.analyse.f_aq_sensitivity != 0)
++        energy = ac_energy_mb( h, h->mb.i_mb_x, h->mb.i_mb_y, NULL );
++    else
++        energy = h->rc->ac_energy[h->mb.i_mb_xy];
++    if(energy == 0)
++    {
++        h->mb.i_qp = h->mb.i_last_qp;
++    }
++    else
++    {
++        x264_cpu_restore(h->param.cpu);
++        float result = energy;
++        /* Adjust the QP based on the AC energy of the macroblock. */
++        float qp_adj = 3 * (logf(result) - h->rc->aq_threshold);
++        if(h->param.analyse.f_aq_sensitivity == 0) qp_adj = x264_clip3f(qp_adj, -5, 5);
++        int new_qp = x264_clip3(qp + qp_adj * h->param.analyse.f_aq_strength + .5, h->param.rc.i_qp_min, h->param.rc.i_qp_max);
++        /* If the QP of this MB is within 1 of the previous MB, code the same QP as the previous MB,
++         * to lower the bit cost of the qp_delta. */
++        if(abs(new_qp - h->mb.i_last_qp) == 1) new_qp = h->mb.i_last_qp;
++        h->mb.i_qp = new_qp;
++    }
++    h->mb.i_chroma_qp = i_chroma_qp_table[x264_clip3( h->mb.i_qp + h->pps->i_chroma_qp_index_offset, 0, 51 )];
++}
++
+ int x264_ratecontrol_new( x264_t *h )
+ {
+     x264_ratecontrol_t *rc;
+@@ -244,7 +338,7 @@
+         rc->rate_tolerance = 0.01;
+     }
+-    h->mb.b_variable_qp = rc->b_vbv && !rc->b_2pass;
++    h->mb.b_variable_qp = (rc->b_vbv && !rc->b_2pass) || h->param.analyse.b_aq;
+     if( rc->b_abr )
+     {
+@@ -458,10 +552,13 @@
+         x264_free( p );
+     }
+-    for( i=1; i<h->param.i_threads; i++ )
++    for( i=0; i<h->param.i_threads; i++ )
+     {
+         h->thread[i]->rc = rc+i;
+-        rc[i] = rc[0];
++        if( i )
++            rc[i] = rc[0];
++        if( h->param.analyse.b_aq )
++            rc[i].ac_energy = x264_malloc( h->mb.i_mb_count * sizeof(int) );
+     }
+     return 0;
+@@ -623,6 +720,8 @@
+                     x264_free( rc->zones[i].param );
+         x264_free( rc->zones );
+     }
++    for( i=0; i<h->param.i_threads; i++ )
++        x264_free( rc[i].ac_energy );
+     x264_free( rc );
+ }
+@@ -729,6 +828,15 @@
+     if( h->sh.i_type != SLICE_TYPE_B )
+         rc->last_non_b_pict_type = h->sh.i_type;
++        
++    /* Adaptive AQ sensitivity algorithm. */
++    if( h->param.analyse.b_aq )
++    {
++        if( h->param.analyse.f_aq_sensitivity > 0 ) 
++            h->rc->aq_threshold = logf(powf(h->param.analyse.f_aq_sensitivity,4)/2); //FIXME simplify
++        else
++            x264_autosense_aq(h);
++    }
+ }
+ double predict_row_size( x264_t *h, int y, int qp )
+Index: encoder/analyse.c
+===================================================================
+--- encoder/analyse.c  (revision 736)
++++ encoder/analyse.c  (working copy)
+@@ -2047,8 +2047,13 @@
+     int i_cost = COST_MAX;
+     int i;
+-    /* init analysis */
+-    x264_mb_analyse_init( h, &analysis, x264_ratecontrol_qp( h ) );
++    h->mb.i_qp = x264_ratecontrol_qp( h );
++    
++    if( h->param.analyse.b_aq )
++        x264_adaptive_quant( h );
++ 
++     /* init analysis */
++    x264_mb_analyse_init( h, &analysis, h->mb.i_qp );
+     /*--------------------------- Do the analysis ---------------------------*/
+     if( h->sh.i_type == SLICE_TYPE_I )
+Index: x264.c
+===================================================================
+--- x264.c     (revision 736)
++++ x264.c     (working copy)
+@@ -244,6 +244,14 @@
+         "                                  - 2: enabled on all mode decisions\n", defaults->analyse.i_trellis );
+     H0( "      --no-fast-pskip         Disables early SKIP detection on P-frames\n" );
+     H0( "      --no-dct-decimate       Disables coefficient thresholding on P-frames\n" );
++    H0( "      --aq-strength <float>   Amount to adjust QP/lambda per MB [%.1f]\n"
++        "                                  0.0: no AQ\n"
++        "                                  1.0: medium AQ\n", defaults->analyse.f_aq_strength );
++    H0( "      --aq-sensitivity <float> \"Center\" of AQ curve. [%.1f]\n"
++        "               0: automatic sensitivity (avoids moving bits between frames)\n"
++        "               10: most QPs are raised\n"
++        "               20: good general-use sensitivity\n"
++        "               30: most QPs are lowered\n", defaults->analyse.f_aq_sensitivity );
+     H0( "      --nr <integer>          Noise reduction [%d]\n", defaults->analyse.i_noise_reduction );
+     H1( "\n" );
+     H1( "      --deadzone-inter <int>  Set the size of the inter luma quantization deadzone [%d]\n", defaults->analyse.i_luma_deadzone[0] );
+@@ -407,6 +415,8 @@
+             { "trellis", required_argument, NULL, 't' },
+             { "no-fast-pskip", no_argument, NULL, 0 },
+             { "no-dct-decimate", no_argument, NULL, 0 },
++            { "aq-strength", required_argument, NULL, 0 },
++            { "aq-sensitivity", required_argument, NULL, 0 },
+             { "deadzone-inter", required_argument, NULL, '0' },
+             { "deadzone-intra", required_argument, NULL, '0' },
+             { "level",   required_argument, NULL, 0 },
+Index: common/common.c
+===================================================================
+--- common/common.c    (revision 736)
++++ common/common.c    (working copy)
+@@ -123,6 +123,9 @@
+     param->analyse.i_chroma_qp_offset = 0;
+     param->analyse.b_fast_pskip = 1;
+     param->analyse.b_dct_decimate = 1;
++    param->analyse.b_aq = 1;
++    param->analyse.f_aq_strength = 0.5;
++    param->analyse.f_aq_sensitivity = 13;
+     param->analyse.i_luma_deadzone[0] = 21;
+     param->analyse.i_luma_deadzone[1] = 11;
+     param->analyse.b_psnr = 1;
+@@ -455,6 +458,13 @@
+         p->analyse.b_fast_pskip = atobool(value);
+     OPT("dct-decimate")
+         p->analyse.b_dct_decimate = atobool(value);
++    OPT("aq-strength")
++    {
++        p->analyse.f_aq_strength = atof(value);
++        p->analyse.b_aq = 1;
++    }
++    OPT("aq-sensitivity")
++        p->analyse.f_aq_sensitivity = atof(value);
+     OPT("deadzone-inter")
+         p->analyse.i_luma_deadzone[0] = atoi(value);
+     OPT("deadzone-intra")
+@@ -883,6 +893,10 @@
+         s += sprintf( s, " ip_ratio=%.2f", p->rc.f_ip_factor );
+         if( p->i_bframe )
+             s += sprintf( s, " pb_ratio=%.2f", p->rc.f_pb_factor );
++        if( p->analyse.b_aq )
++            s += sprintf( s, " aq=1:%.1f:%.1f", p->analyse.f_aq_strength, p->analyse.f_aq_sensitivity );
++        else
++            s += sprintf( s, " aq=0" );
+         if( p->rc.psz_zones )
+             s += sprintf( s, " zones=%s", p->rc.psz_zones );
+         else if( p->rc.i_zones )
+Index: x264.h
+===================================================================
+--- x264.h     (revision 736)
++++ x264.h     (working copy)
+@@ -232,6 +232,9 @@
+         int          i_trellis;  /* trellis RD quantization */
+         int          b_fast_pskip; /* early SKIP detection on P-frames */
+         int          b_dct_decimate; /* transform coefficient thresholding on P-frames */
++        int          b_aq; /* psy adaptive QP */
++        float        f_aq_strength;
++        float        f_aq_sensitivity;
+         int          i_noise_reduction; /* adaptive pseudo-deadzone */
+         /* the deadzone size that will be used in luma quantization */
diff --git a/contrib/patch-x264-cygwin.patch b/contrib/patch-x264-cygwin.patch
new file mode 100644 (file)
index 0000000..f2e375d
--- /dev/null
@@ -0,0 +1,13 @@
+--- x264/configure2    2008-04-12 21:45:07.000000000 +0100
++++ x264/configure     2008-04-14 18:44:33.890625000 +0100
+@@ -210,8 +210,8 @@
+     ;;
+   cygwin*)
+     SYS="MINGW"
+-    CFLAGS="$CFLAGS -mno-cygwin"
+-    LDFLAGS="$LDFLAGS -mno-cygwin"
++    #CFLAGS="$CFLAGS -mno-cygwin"
++    #LDFLAGS="$LDFLAGS -mno-cygwin"
+     EXE=".exe"
+     DEVNULL="NUL"
+     ;;
diff --git a/contrib/patch-x264-idr.patch b/contrib/patch-x264-idr.patch
new file mode 100644 (file)
index 0000000..df4294f
--- /dev/null
@@ -0,0 +1,17 @@
+Index: encoder/slicetype.c
+===================================================================
+--- encoder/slicetype.c (revision 665)
++++ encoder/slicetype.c (working copy)
+@@ -379,7 +379,12 @@
+         return;
+     frames[0] = h->frames.last_nonb;
+     for( j = 0; h->frames.next[j]; j++ )
++    {
++        // if the app wants an IDR, give it to them
++        if ( h->frames.next[j]->i_type == X264_TYPE_IDR )
++            return;
+         frames[j+1] = h->frames.next[j];
++    }
+     keyint_limit = h->param.i_keyint_max - frames[0]->i_frame + h->frames.i_last_idr - 1;
+     num_frames = X264_MIN( j, keyint_limit );
+     if( num_frames == 0 )
diff --git a/contrib/patch-x264-linux.patch b/contrib/patch-x264-linux.patch
new file mode 100644 (file)
index 0000000..3f1752d
--- /dev/null
@@ -0,0 +1,194 @@
+Index: /common/ppc/quant.c
+===================================================================
+--- /common/ppc/quant.c (revision 601)
++++ /common/ppc/quant.c (revision 621)
+@@ -18,8 +18,4 @@
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+-
+-#ifdef HAVE_ALTIVEC_H
+-#include <altivec.h>
+-#endif
+ #include "common/common.h"
+@@ -54,29 +50,29 @@
+ temp2v = vec_xor(temp2v, mskB);                                              \
+ temp1v = vec_adds(temp1v, vec_and(mskA, one));                                \
+-vec_st(temp1v, (dct0), dct);                                                 \
++vec_st(temp1v, (dct0), (int16_t*)dct);                                        \
+ temp2v = vec_adds(temp2v, vec_and(mskB, one));                                \
+-vec_st(temp2v, (dct1), dct);
++vec_st(temp2v, (dct1), (int16_t*)dct);
+                 
+ void x264_quant_4x4_altivec( int16_t dct[4][4], int quant_mf[4][4], int const i_qbits, int const f ) {
+     vector bool short mskA;
+-    vec_s32_t i_qbitsv;
++    vec_u32_t i_qbitsv;
+     vec_u16_t coefvA;
+     vec_u32_t multEvenvA, multOddvA;
+-    vec_u32_t mfvA;
++    vec_u16_t mfvA;
+     vec_s16_t zerov, one;
+-    vec_s32_t fV;
++    vec_u32_t fV;
+     vector bool short mskB;
+     vec_u16_t coefvB;
+     vec_u32_t multEvenvB, multOddvB;
+-    vec_u32_t mfvB;
++    vec_u16_t mfvB;
+     vec_s16_t temp1v, temp2v;
+-    vect_sint_u qbits_u;
++    vect_int_u qbits_u;
+     qbits_u.s[0]=i_qbits;
+     i_qbitsv = vec_splat(qbits_u.v, 0);
+-    vect_sint_u f_u;
++    vect_int_u f_u;
+     f_u.s[0]=f;
+@@ -114,16 +110,16 @@
+ temp2v = vec_xor(temp2v, mskB);                                 \
+ temp1v = vec_add(temp1v, vec_and(mskA, one));                   \
+-vec_st(temp1v, (dct0), dct);                                    \
++vec_st(temp1v, (dct0), (int16_t*)dct);                          \
+ temp2v = vec_add(temp2v, vec_and(mskB, one));                   \
+-vec_st(temp2v, (dct1), dct);
++vec_st(temp2v, (dct1), (int16_t*)dct);
+ void x264_quant_4x4_dc_altivec( int16_t dct[4][4], int i_quant_mf, int const i_qbits, int const f ) {
+     vector bool short mskA;
+-    vec_s32_t i_qbitsv;
++    vec_u32_t i_qbitsv;
+     vec_u16_t coefvA;
+     vec_u32_t multEvenvA, multOddvA;
+     vec_s16_t zerov, one;
+-    vec_s32_t fV;
++    vec_u32_t fV;
+     vector bool short mskB;
+@@ -133,15 +129,14 @@
+     vec_s16_t temp1v, temp2v;
+-    vec_u32_t mfv;
+-    vect_int_u mf_u;
++    vec_u16_t mfv;
++    vect_ushort_u mf_u;
+     mf_u.s[0]=i_quant_mf;
+     mfv = vec_splat( mf_u.v, 0 );
+-    mfv = vec_packs( mfv, mfv);
+-    vect_sint_u qbits_u;
++    vect_int_u qbits_u;
+     qbits_u.s[0]=i_qbits;
+     i_qbitsv = vec_splat(qbits_u.v, 0);
+-    vect_sint_u f_u;
++    vect_int_u f_u;
+     f_u.s[0]=f;
+     fV = vec_splat(f_u.v, 0);
+@@ -156,13 +151,15 @@
+ void x264_quant_8x8_altivec( int16_t dct[8][8], int quant_mf[8][8], int const i_qbits, int const f ) {
+     vector bool short mskA;
+-    vec_s32_t i_qbitsv;
++    vec_u32_t i_qbitsv;
+     vec_u16_t coefvA;
+-    vec_s32_t multEvenvA, multOddvA, mfvA;
++    vec_u32_t multEvenvA, multOddvA;
++    vec_u16_t mfvA;
+     vec_s16_t zerov, one;
+-    vec_s32_t fV;
++    vec_u32_t fV;
+     
+     vector bool short mskB;
+     vec_u16_t coefvB;
+-    vec_u32_t multEvenvB, multOddvB, mfvB;
++    vec_u32_t multEvenvB, multOddvB;
++    vec_u16_t mfvB;
+     
+     vec_s16_t temp1v, temp2v;
+@@ -172,5 +169,5 @@
+     i_qbitsv = vec_splat(qbits_u.v, 0);
+-    vect_sint_u f_u;
++    vect_int_u f_u;
+     f_u.s[0]=f;
+     fV = vec_splat(f_u.v, 0);
+Index: /common/ppc/dct.c
+===================================================================
+--- /common/ppc/dct.c (revision 604)
++++ /common/ppc/dct.c (revision 621)
+@@ -61,6 +61,6 @@
+     VEC_DCT( dct0v, dct1v, dct2v, dct3v, tmp0v, tmp1v, tmp2v, tmp3v );
+-    vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0, dct);
+-    vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16, dct);
++    vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0,  (int16_t*)dct);
++    vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16, (int16_t*)dct);
+ }
+@@ -95,12 +95,12 @@
+     VEC_DCT( dct4v, dct5v, dct6v, dct7v, tmp4v, tmp5v, tmp6v, tmp7v );
+-    vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0, dct);
+-    vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16, dct);
+-    vec_st(vec_perm(tmp4v, tmp5v, permHighv), 32, dct);
+-    vec_st(vec_perm(tmp6v, tmp7v, permHighv), 48, dct);
+-    vec_st(vec_perm(tmp0v, tmp1v, permLowv),  64, dct);
+-    vec_st(vec_perm(tmp2v, tmp3v, permLowv), 80, dct);
+-    vec_st(vec_perm(tmp4v, tmp5v, permLowv), 96, dct);
+-    vec_st(vec_perm(tmp6v, tmp7v, permLowv), 112, dct);
++    vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0,   (int16_t*)dct);
++    vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16,  (int16_t*)dct);
++    vec_st(vec_perm(tmp4v, tmp5v, permHighv), 32,  (int16_t*)dct);
++    vec_st(vec_perm(tmp6v, tmp7v, permHighv), 48,  (int16_t*)dct);
++    vec_st(vec_perm(tmp0v, tmp1v, permLowv),  64,  (int16_t*)dct);
++    vec_st(vec_perm(tmp2v, tmp3v, permLowv),  80,  (int16_t*)dct);
++    vec_st(vec_perm(tmp4v, tmp5v, permLowv),  96,  (int16_t*)dct);
++    vec_st(vec_perm(tmp6v, tmp7v, permLowv),  112, (int16_t*)dct);
+ }
+@@ -312,6 +312,6 @@
+ void x264_add8x8_idct8_altivec( uint8_t *dst, int16_t dct[8][8] )
+ {
+-    vec_s16_t onev = vec_splat_s16(1);
+-    vec_s16_t twov = vec_splat_s16(2);
++    vec_u16_t onev = vec_splat_s16(1);
++    vec_u16_t twov = vec_splat_s16(2);
+     dct[0][0] += 32; // rounding for the >>6 at the end
+@@ -342,5 +342,5 @@
+     vec_u8_t perm_ldv = vec_lvsl(0, dst);
+     vec_u8_t perm_stv = vec_lvsr(8, dst);
+-    vec_s16_t sixv = vec_splat_s16(6);
++    vec_u16_t sixv = vec_splat_s16(6);
+     const vec_u8_t sel = (vec_u8_t) CV(0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1);
+     LOAD_ZERO;
+Index: /common/ppc/quant.h
+===================================================================
+--- /common/ppc/quant.h (revision 601)
++++ /common/ppc/quant.h (revision 621)
+@@ -19,4 +19,8 @@
+ *****************************************************************************/
++#ifdef SYS_LINUX
++#include <altivec.h>
++#endif
++
+ #ifndef _PPC_QUANT_H
+ #define _PPC_QUANT_H 1
+@@ -28,8 +32,7 @@
+ typedef union {
+-  signed int s[4];
+-  vector signed int v;
+-} vect_sint_u;
+-
++  unsigned short s[8];
++  vector unsigned short v;
++} vect_ushort_u;
+ void x264_quant_4x4_altivec( int16_t dct[4][4], int quant_mf[4][4], int const i_qbits, int const f );
diff --git a/contrib/patch-x264-solaris.patch b/contrib/patch-x264-solaris.patch
new file mode 100644 (file)
index 0000000..24d629f
--- /dev/null
@@ -0,0 +1,67 @@
+diff -ru x264/Makefile x264.solaris/Makefile
+--- x264/Makefile      Mon Jun  9 01:36:08 2008
++++ x264.solaris/Makefile      Thu Jun 19 11:54:53 2008
+@@ -150,8 +150,10 @@
+       $(MAKE) -C gtk distclean
+ install: x264$(EXE) $(SONAME)
+-      install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
+-      install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
++      install -d $(DESTDIR)$(bindir) 
++      install -d $(DESTDIR)$(includedir)
++      install -d $(DESTDIR)$(libdir) 
++      install -d $(DESTDIR)$(libdir)/pkgconfig
+       install -m 644 x264.h $(DESTDIR)$(includedir)
+       install -m 644 libx264.a $(DESTDIR)$(libdir)
+       install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
+diff -ru x264/configure x264.solaris/configure
+--- x264/configure     Tue Aug 12 03:26:58 2008
++++ x264.modified/configure    Tue Aug 19 16:09:32 2008
+@@ -1,4 +1,4 @@
+-#! /bin/sh
++#! /usr/xpg4/bin/sh
+ if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
+@@ -75,7 +75,7 @@
+ # check whether 'echo -n' works as expected, otherwise try printf
+ if [ "x`echo -n houba`" = xhouba ]
+ then
+-  ECHON="echo -n"
++  ECHON="/usr/ucb/echo -n"
+ elif [ "x`printf houba`" = xhouba ]
+ then
+   ECHON="printf"
+@@ -321,8 +321,6 @@
+         echo "If you really want to compile without asm, configure with --disable-asm."
+         exit 1
+     fi
+-else
+-    AS=""
+ fi
+ CFLAGS="$CFLAGS -DARCH_$ARCH -DSYS_$SYS"
+@@ -329,8 +327,10 @@
+ echo "unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';" > conftest.c
+ $CC $CFLAGS conftest.c -c -o conftest.o 2>$DEVNULL || die "endian test failed"
+-grep -q BIGE conftest.o && CFLAGS="$CFLAGS -DWORDS_BIGENDIAN"
++/usr/bin/tr -cd "BIGE" < conftest.o | /usr/xpg4/bin/grep -q BIGE && CFLAGS="$CFLAGS -DWORDS_BIGENDIAN"
++echo $CFLAGS
++
+ # autodetect options that weren't forced nor disabled
+ libpthread=""
+diff -ru x264/version.sh x264.solaris/version.sh
+--- x264/version.sh    Mon Jun  9 01:36:08 2008
++++ x264.solaris/version.sh    Thu Jun 19 11:56:19 2008
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ git-rev-list HEAD | sort > config.git-hash
+ LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
+-if [ $LOCALVER \> 1 ] ; then
++if [ $LOCALVER -gt 1 ] ; then
+     VER=`git-rev-list origin/master | sort | join config.git-hash - | wc -l | awk '{print $1}'`
+     if [ $VER != $LOCALVER ] ; then
+         VER="$VER+$(($LOCALVER-$VER))"
diff --git a/contrib/patch-xvidcore-cygwin.patch b/contrib/patch-xvidcore-cygwin.patch
new file mode 100644 (file)
index 0000000..7b60510
--- /dev/null
@@ -0,0 +1,34 @@
+diff -Naur xvidcore/build/generic/configure xvidcore-patched/build/generic/configure
+--- xvidcore/build/generic/configure   2005-12-30 09:45:30.000000000 -0500
++++ xvidcore-patched/build/generic/configure   2007-01-01 18:43:27.953125000 -0500
+@@ -3844,10 +3844,9 @@
+      [cC][yY][gG][wW][iI][nN]*|mingw32*|mks*)
+       echo "$as_me:$LINENO: result: ok" >&5
+ echo "${ECHO_T}ok" >&6
+-      STATIC_LIB="xvidcore.\$(STATIC_EXTENSION)"
+-      SHARED_LIB="xvidcore.\$(SHARED_EXTENSION)"
+-      SPECIFIC_LDFLAGS="-mno-cygwin -shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def"
+-      SPECIFIC_CFLAGS="-mno-cygwin"
++      STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"
++      SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)"
++      SPECIFIC_LDFLAGS="-shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def"
+       ;;
+      darwin*|raphsody*)
+       STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"
+diff -Naur xvidcore/build/generic/configure.in xvidcore-patched/build/generic/configure.in
+--- xvidcore/build/generic/configure.in        2005-12-30 09:45:30.000000000 -0500
++++ xvidcore-patched/build/generic/configure.in        2007-01-01 18:43:11.453125000 -0500
+@@ -281,10 +281,9 @@
+       ;;
+      [[cC]][[yY]][[gG]][[wW]][[iI]][[nN]]*|mingw32*|mks*)
+       AC_MSG_RESULT([ok])
+-      STATIC_LIB="xvidcore.\$(STATIC_EXTENSION)"
+-      SHARED_LIB="xvidcore.\$(SHARED_EXTENSION)"
+-      SPECIFIC_LDFLAGS="-mno-cygwin -shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def"
+-      SPECIFIC_CFLAGS="-mno-cygwin"
++      STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"
++      SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)"
++      SPECIFIC_LDFLAGS="-shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def"
+       ;;
+      darwin*|raphsody*)
+       STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"
diff --git a/contrib/patch-xvidcore-fdct.patch b/contrib/patch-xvidcore-fdct.patch
new file mode 100644 (file)
index 0000000..1fc90b6
--- /dev/null
@@ -0,0 +1,8 @@
+--- xvidcore/src/dct/x86_asm/fdct_sse2_skal.asm.orig   2008-02-22 10:28:13.000000000 -0800
++++ xvidcore/src/dct/x86_asm/fdct_sse2_skal.asm        2008-02-22 11:08:52.000000000 -0800
+@@ -620,3 +620,5 @@
+   ret
+ .endfunc
++ALIGN 16
++  times 8 dw 0
diff --git a/contrib/patch-xvidcore-macosx.patch b/contrib/patch-xvidcore-macosx.patch
new file mode 100644 (file)
index 0000000..51cb94c
--- /dev/null
@@ -0,0 +1,31 @@
+diff -ru xvidcore-1.1.0/build/generic/configure xvidcore-1.1.0-patched/build/generic/configure
+--- xvidcore-1.1.0/build/generic/configure     2005-12-30 15:45:30.000000000 +0100
++++ xvidcore-1.1.0-patched/build/generic/configure     2006-01-16 22:06:10.000000000 +0100
+@@ -4052,6 +4071,12 @@
+              PREFIX="-DPREFIX"
+              MARK_FUNCS=""
+                ;;
++           *darwin*)
++               echo "$as_me:$LINENO: result: macho" >&5
++echo "${ECHO_T}macho" >&6
++               NASM_FORMAT="macho"
++               PREFIX="-DPREFIX"
++               MARK_FUNCS=""
+        esac
+        AS="$chosen_asm_prog"
+diff -ru xvidcore-1.1.0/build/generic/configure.in xvidcore-1.1.0-patched/build/generic/configure.in
+--- xvidcore-1.1.0/build/generic/configure.in  2005-12-30 15:45:30.000000000 +0100
++++ xvidcore-1.1.0-patched/build/generic/configure.in  2006-01-16 22:06:04.000000000 +0100
+@@ -397,6 +397,11 @@
+              PREFIX="-DPREFIX"
+              MARK_FUNCS=""
+                ;;
++           *darwin*)
++               AC_MSG_RESULT([macho])
++               NASM_FORMAT="macho"
++               PREFIX="-DPREFIX"
++               MARK_FUNCS=""
+        esac
+        AS="$chosen_asm_prog"
diff --git a/contrib/patch-xvidcore-nasm-2.00-configure.patch b/contrib/patch-xvidcore-nasm-2.00-configure.patch
new file mode 100644 (file)
index 0000000..44242ac
--- /dev/null
@@ -0,0 +1,13 @@
+diff -ruN xvidcore-orig/build/generic/configure xvidcore/build/generic/configure
+--- xvidcore-orig/build/generic/configure      2006-11-01 03:39:36.000000000 -0700
++++ xvidcore/build/generic/configure   2008-01-30 20:19:48.000000000 -0700
+@@ -4016,7 +4016,7 @@
+        if test "$ac_nasm" = "yes" ; then
+                                             echo "$as_me:$LINENO: checking for nasm patch version" >&5
+ echo $ECHO_N "checking for nasm patch version... $ECHO_C" >&6
+-           nasm_patch=`$nasm_prog -r | cut -d '.' -f 3 | cut -d ' ' -f 1`
++           nasm_patch=`($nasm_prog -r || $nasm_prog -v) | cut -d '.' -f 3 | cut -d ' ' -f 1`
+            if test -z $nasm_patch ; then
+-              nasm_patch=-1
++              nasm_patch=45
+            fi
diff --git a/contrib/patch_mpeg4ip_cygwin.patch b/contrib/patch_mpeg4ip_cygwin.patch
new file mode 100644 (file)
index 0000000..0bc19cd
--- /dev/null
@@ -0,0 +1,262 @@
+diff -Naur mpeg4ip/lib/mp4v2/mp4.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4.cpp
+--- mpeg4ip/lib/mp4v2/mp4.cpp  2005-03-30 20:41:58.000000000 +0200
++++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4.cpp     2007-02-09 22:39:28.000000000 +0100
+@@ -1678,9 +1678,9 @@
+ extern "C" bool MP4GetTrackH264SeqPictHeaders (MP4FileHandle hFile, 
+                                              MP4TrackId trackId,
+                                              uint8_t ***pSeqHeader,
+-                                             uint32_t **pSeqHeaderSize,
++                                             u_int32_t **pSeqHeaderSize,
+                                              uint8_t ***pPictHeader,
+-                                             uint32_t **pPictHeaderSize)
++                                             u_int32_t **pPictHeaderSize)
+ {
+   if (MP4_IS_VALID_FILE_HANDLE(hFile)) {
+     try {
+diff -Naur mpeg4ip/lib/mp4v2/mp4.h /Users/pri/t/mpeg4ip/lib/mp4v2/mp4.h
+--- mpeg4ip/lib/mp4v2/mp4.h    2005-03-30 20:41:58.000000000 +0200
++++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4.h       2007-02-09 22:39:42.000000000 +0100
+@@ -631,9 +631,9 @@
+ bool MP4GetTrackVideoMetadata(MP4FileHandle hFile,
+                             MP4TrackId trackId,
+-                            uint8_t **ppConfig,
+-                            uint32_t *pConfigSize);
+-
++                            u_int8_t **ppConfig,
++                            u_int32_t *pConfigSize);
++                                
+ bool MP4GetTrackESConfiguration(
+       MP4FileHandle hFile, 
+       MP4TrackId trackId, 
+@@ -654,9 +654,9 @@
+ bool MP4GetTrackH264SeqPictHeaders(MP4FileHandle hFile,
+                                  MP4TrackId trackId,
+                                  uint8_t ***pSeqHeaders,
+-                                 uint32_t **pSeqHeaderSize,
++                                 u_int32_t **pSeqHeaderSize,
+                                  uint8_t ***pPictHeader,
+-                                 uint32_t **pPictHeaderSize);
++                                 u_int32_t **pPictHeaderSize);
+ bool MP4GetTrackH264LengthSize(MP4FileHandle hFile,
+                              MP4TrackId trackId,
+                              uint32_t *pLength);
+diff -Naur mpeg4ip/lib/mp4v2/mp4container.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4container.cpp
+--- mpeg4ip/lib/mp4v2/mp4container.cpp 2001-11-19 18:06:58.000000000 +0100
++++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4container.cpp    2007-02-09 22:10:23.000000000 +0100
+@@ -207,7 +207,7 @@
+       u_int32_t numProperties = m_pProperties.Size();
+       if (numProperties == 0) {
+-              WARNING(numProperties == 0);
++              //WARNING(numProperties == 0);
+               return;
+       }
+diff -Naur mpeg4ip/lib/mp4v2/mp4container.h /Users/pri/t/mpeg4ip/lib/mp4v2/mp4container.h
+--- mpeg4ip/lib/mp4v2/mp4container.h   2001-11-19 18:06:58.000000000 +0100
++++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4container.h      2007-02-09 22:06:42.000000000 +0100
+@@ -1,24 +1,3 @@
+-/*
+- * The contents of this file are subject to the Mozilla Public
+- * License Version 1.1 (the "License"); you may not use this file
+- * except in compliance with the License. You may obtain a copy of
+- * the License at http://www.mozilla.org/MPL/
+- * 
+- * Software distributed under the License is distributed on an "AS
+- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+- * implied. See the License for the specific language governing
+- * rights and limitations under the License.
+- * 
+- * The Original Code is MPEG4IP.
+- * 
+- * The Initial Developer of the Original Code is Cisco Systems Inc.
+- * Portions created by Cisco Systems Inc. are
+- * Copyright (C) Cisco Systems Inc. 2001.  All Rights Reserved.
+- * 
+- * Contributor(s): 
+- *            Dave Mackie             dmackie@cisco.com
+- */
+-
+ #ifndef __MP4_CONTAINER_INCLUDED__
+ #define __MP4_CONTAINER_INCLUDED__
+diff -Naur mpeg4ip/lib/mp4v2/mp4descriptor.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4descriptor.cpp
+--- mpeg4ip/lib/mp4v2/mp4descriptor.cpp        2004-02-12 03:06:02.000000000 +0100
++++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4descriptor.cpp   2007-02-09 22:24:17.000000000 +0100
+@@ -149,7 +149,7 @@
+       u_int32_t numProperties = m_pProperties.Size();
+       if (numProperties == 0) {
+-              WARNING(numProperties == 0);
++              //WARNING(numProperties == 0);
+               return;
+       }
+@@ -194,7 +194,7 @@
+       u_int32_t numProperties = m_pProperties.Size();
+       if (numProperties == 0) {
+-              WARNING(numProperties == 0);
++              //WARNING(numProperties == 0);
+               return;
+       }
+       for (u_int32_t i = 0; i < numProperties; i++) {
+diff -Naur mpeg4ip/lib/mp4v2/mp4file.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file.cpp
+--- mpeg4ip/lib/mp4v2/mp4file.cpp      2005-03-30 20:41:58.000000000 +0200
++++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file.cpp 2007-02-09 22:44:08.000000000 +0100
+@@ -1431,7 +1431,7 @@
+   return trackId;
+ }
+-MP4TrackId MP4File::AddCntlTrackDefault (uint32_t timeScale,
++MP4TrackId MP4File::AddCntlTrackDefault (u_int32_t timeScale,
+                                        MP4Duration sampleDuration,
+                                        const char *type)
+ {
+@@ -1682,7 +1682,7 @@
+                             (MP4Property **)&pLength) == false) ||
+       (avcCAtom->FindProperty("avcC.sequenceEntries.sequenceParameterSetNALUnit",
+                             (MP4Property **)&pUnit) == false)) {
+-    VERBOSE_ERROR(m_verbosity, WARNING("Could not find avcC properties"));
++    //VERBOSE_ERROR(m_verbosity, WARNING("Could not find avcC properties"));
+     return false;
+   }
+   uint32_t count = pCount->GetValue();
+@@ -1692,7 +1692,7 @@
+     for (uint32_t index = 0; index < count; index++) {
+       if (pLength->GetValue(index) == sequenceLen) {
+       uint8_t *seq;
+-      uint32_t seqlen;
++      u_int32_t seqlen;
+       pUnit->GetValue(&seq, &seqlen, index);
+       if (memcmp(seq, pSequence, sequenceLen) == 0) {
+         free(seq);
+@@ -1724,8 +1724,8 @@
+                             (MP4Property **)&pLength) == false) ||
+       (avcCAtom->FindProperty("avcC.pictureEntries.pictureParameterSetNALUnit",
+                             (MP4Property **)&pUnit) == false)) {
+-    VERBOSE_ERROR(m_verbosity, 
+-                WARNING("Could not find avcC picture table properties"));
++    //VERBOSE_ERROR(m_verbosity, 
++                //WARNING("Could not find avcC picture table properties"));
+     return false;
+   }
+   uint32_t count = pCount->GetValue();
+@@ -1735,7 +1735,7 @@
+     for (uint32_t index = 0; index < count; index++) {
+       if (pLength->GetValue(index) == pictLen) {
+       uint8_t *seq;
+-      uint32_t seqlen;
++      u_int32_t seqlen;
+       pUnit->GetValue(&seq, &seqlen, index);
+       if (memcmp(seq, pPict, pictLen) == 0) {
+         VERBOSE_WRITE(m_verbosity, 
+@@ -2472,9 +2472,9 @@
+ bool MP4File::GetTrackH264SeqPictHeaders (MP4TrackId trackId,
+                                         uint8_t ***pppSeqHeader,
+-                                        uint32_t **ppSeqHeaderSize,
++                                        u_int32_t **ppSeqHeaderSize,
+                                         uint8_t ***pppPictHeader,
+-                                        uint32_t **ppPictHeaderSize)
++                                        u_int32_t **ppPictHeaderSize)
+ {
+   uint32_t count;
+@@ -2490,15 +2490,15 @@
+                             (MP4Property **)&pSeqLen) == false) ||
+       (avcCAtom->FindProperty("avcC.sequenceEntries.sequenceParameterSetNALUnit",
+                             (MP4Property **)&pSeqVal) == false)) {
+-    VERBOSE_ERROR(m_verbosity, WARNING("Could not find avcC properties"));
++    //VERBOSE_ERROR(m_verbosity, WARNING("Could not find avcC properties"));
+     return false;
+   }
+   uint8_t **ppSeqHeader =
+     (uint8_t **)malloc((pSeqCount->GetValue() + 1) * sizeof(uint8_t *));
+   *pppSeqHeader = ppSeqHeader;
+-  uint32_t *pSeqHeaderSize = 
+-    (uint32_t *)malloc((pSeqCount->GetValue() + 1) * sizeof(uint32_t *));
++  u_int32_t *pSeqHeaderSize = 
++    (u_int32_t *)malloc((pSeqCount->GetValue() + 1) * sizeof(u_int32_t *));
+   *ppSeqHeaderSize = pSeqHeaderSize;
+   for (count = 0; count < pSeqCount->GetValue(); count++) {
+@@ -2513,15 +2513,15 @@
+                             (MP4Property **)&pPictLen) == false) ||
+       (avcCAtom->FindProperty("avcC.pictureEntries.pictureParameterSetNALUnit",
+                             (MP4Property **)&pPictVal) == false)) {
+-    VERBOSE_ERROR(m_verbosity, 
+-                WARNING("Could not find avcC picture table properties"));
++    //VERBOSE_ERROR(m_verbosity, 
++                //WARNING("Could not find avcC picture table properties"));
+     return false;
+   }
+   uint8_t 
+   **ppPictHeader = 
+     (uint8_t **)malloc((pPictCount->GetValue() + 1) * sizeof(uint8_t *));
+-  uint32_t *pPictHeaderSize = 
+-    (uint32_t *)malloc((pPictCount->GetValue() + 1)* sizeof(uint32_t *));
++  u_int32_t *pPictHeaderSize = 
++    (u_int32_t *)malloc((pPictCount->GetValue() + 1)* sizeof(u_int32_t *));
+   *pppPictHeader = ppPictHeader;
+   *ppPictHeaderSize = pPictHeaderSize;
+diff -Naur mpeg4ip/lib/mp4v2/mp4file.h /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file.h
+--- mpeg4ip/lib/mp4v2/mp4file.h        2005-03-30 20:41:58.000000000 +0200
++++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file.h   2007-02-09 22:35:21.000000000 +0100
+@@ -329,9 +329,9 @@
+                                     uint8_t *pLevel);
+       bool GetTrackH264SeqPictHeaders(MP4TrackId trackId, 
+                                       uint8_t ***pSeqHeader,
+-                                      uint32_t **pSeqHeaderSize,
++                                      u_int32_t **pSeqHeaderSize,
+                                       uint8_t ***pPictHeader,
+-                                      uint32_t **pPictHeaderSize);
++                                      u_int32_t **pPictHeaderSize);
+       void GetTrackH264LengthSize(MP4TrackId, 
+                                   uint32_t *pLength);
+       const char* GetHintTrackSdp(MP4TrackId hintTrackId);
+diff -Naur mpeg4ip/lib/mp4v2/mp4file_io.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file_io.cpp
+--- mpeg4ip/lib/mp4v2/mp4file_io.cpp   2004-07-15 20:09:48.000000000 +0200
++++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file_io.cpp      2007-02-09 22:44:47.000000000 +0100
+@@ -86,7 +86,7 @@
+       }
+       ASSERT(pBytes);
+-      WARNING(m_numReadBits > 0);
++      //WARNING(m_numReadBits > 0);
+       if (pFile == NULL) {
+               pFile = m_pFile;
+diff -Naur mpeg4ip/lib/mp4v2/mp4property.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4property.cpp
+--- mpeg4ip/lib/mp4v2/mp4property.cpp  2004-08-23 20:28:21.000000000 +0200
++++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4property.cpp     2007-02-09 22:47:04.000000000 +0100
+@@ -636,7 +636,7 @@
+       u_int32_t numProperties = m_pProperties.Size();
+       if (numProperties == 0) {
+-              WARNING(numProperties == 0);
++              //WARNING(numProperties == 0);
+               return;
+       }
+@@ -670,7 +670,7 @@
+       u_int32_t numProperties = m_pProperties.Size();
+       if (numProperties == 0) {
+-              WARNING(numProperties == 0);
++              //WARNING(numProperties == 0);
+               return;
+       }
+@@ -709,7 +709,7 @@
+       u_int32_t numProperties = m_pProperties.Size();
+       if (numProperties == 0) {
+-              WARNING(numProperties == 0);
++              //WARNING(numProperties == 0);
+               return;
+       }
diff --git a/contrib/version_a52dec.txt b/contrib/version_a52dec.txt
new file mode 100644 (file)
index 0000000..86617fd
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/a52dec-0.7.4.tar.gz
diff --git a/contrib/version_bzip2.txt b/contrib/version_bzip2.txt
new file mode 100644 (file)
index 0000000..7a90c84
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/bzip2-1.0.5.tar.gz
diff --git a/contrib/version_faac.txt b/contrib/version_faac.txt
new file mode 100644 (file)
index 0000000..b53bcc4
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/faac-1.26.tar.gz
diff --git a/contrib/version_faad2.txt b/contrib/version_faad2.txt
new file mode 100644 (file)
index 0000000..ad74c36
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/faad2-2.6.1.tar.gz
diff --git a/contrib/version_ffmpeg.txt b/contrib/version_ffmpeg.txt
new file mode 100644 (file)
index 0000000..043a665
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/ffmpeg-r15462.tar.gz
diff --git a/contrib/version_lame.txt b/contrib/version_lame.txt
new file mode 100644 (file)
index 0000000..6790bfb
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/lame-3.98.tar.gz
diff --git a/contrib/version_libdca.txt b/contrib/version_libdca.txt
new file mode 100644 (file)
index 0000000..dfa4de6
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/libdca-r81-strapped.tar.gz
diff --git a/contrib/version_libdvdcss.txt b/contrib/version_libdvdcss.txt
new file mode 100644 (file)
index 0000000..4821730
--- /dev/null
@@ -0,0 +1 @@
+http://download.videolan.org/pub/libdvdcss/1.2.9/libdvdcss-1.2.9.tar.gz
\ No newline at end of file
diff --git a/contrib/version_libdvdread.txt b/contrib/version_libdvdread.txt
new file mode 100644 (file)
index 0000000..ef686d6
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/libdvdread-0.9.7.tar.gz
diff --git a/contrib/version_libmkv.txt b/contrib/version_libmkv.txt
new file mode 100644 (file)
index 0000000..133af65
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/libmkv-0.6.3.tar.gz
diff --git a/contrib/version_libmp4v2.txt b/contrib/version_libmp4v2.txt
new file mode 100644 (file)
index 0000000..1b75cd9
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/libmp4v2-r45.tar.gz
diff --git a/contrib/version_libogg.txt b/contrib/version_libogg.txt
new file mode 100644 (file)
index 0000000..25bcb92
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/libogg-1.1.3.tar.gz
diff --git a/contrib/version_libsamplerate.txt b/contrib/version_libsamplerate.txt
new file mode 100644 (file)
index 0000000..038fcbb
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/libsamplerate-0.1.4.tar.gz
diff --git a/contrib/version_libtheora.txt b/contrib/version_libtheora.txt
new file mode 100644 (file)
index 0000000..8595fe9
--- /dev/null
@@ -0,0 +1,2 @@
+http://download.m0k.org/handbrake/contrib/libtheora-1.0.tar.gz
+
diff --git a/contrib/version_libvorbis.txt b/contrib/version_libvorbis.txt
new file mode 100644 (file)
index 0000000..ad9df27
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/libvorbis-aotuv_b5.tar.gz
diff --git a/contrib/version_mpeg2dec.txt b/contrib/version_mpeg2dec.txt
new file mode 100644 (file)
index 0000000..248ce7b
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/mpeg2dec-0.5.1.tar.gz
diff --git a/contrib/version_mpeg4ip.txt b/contrib/version_mpeg4ip.txt
new file mode 100644 (file)
index 0000000..f60e597
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/mpeg4ip-1.3.tar.gz
diff --git a/contrib/version_qt.txt b/contrib/version_qt.txt
new file mode 100644 (file)
index 0000000..5f679e3
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/libquicktime-0.9.10.tar.gz
diff --git a/contrib/version_x264.txt b/contrib/version_x264.txt
new file mode 100644 (file)
index 0000000..0a3b00d
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/x264-r1028-83baa7f.tar.gz
\ No newline at end of file
diff --git a/contrib/version_xvidcore.txt b/contrib/version_xvidcore.txt
new file mode 100644 (file)
index 0000000..5d8c197
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/xvidcore-1.1.3.tar.gz
diff --git a/contrib/version_zlib.txt b/contrib/version_zlib.txt
new file mode 100644 (file)
index 0000000..bbb84c2
--- /dev/null
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/zlib-1.2.3.tar.gz
diff --git a/gtk/.cvsignore b/gtk/.cvsignore
new file mode 100644 (file)
index 0000000..99be563
--- /dev/null
@@ -0,0 +1,37 @@
+.anjuta
+.tm_project*
+.libs
+.deps
+.*swp
+.nautilus-metafile.xml
+*.autosave
+*.pws
+*.bak
+*~
+#*#
+*.gladep
+*.la
+*.lo
+*.o
+*.class
+*.pyc
+aclocal.m4
+autom4te.cache
+config.h
+config.h.in
+config.log
+config.status
+configure
+intltool-extract*
+intltool-merge*
+intltool-modules*
+intltool-update*
+libtool
+prepare.sh
+stamp-h*
+ltmain.sh
+mkinstalldirs
+config.guess
+config.sub
+Makefile
+Makefile.in
diff --git a/gtk/AUTHORS b/gtk/AUTHORS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/gtk/COPYING b/gtk/COPYING
new file mode 100644 (file)
index 0000000..623b625
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 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
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/gtk/ChangeLog b/gtk/ChangeLog
new file mode 100644 (file)
index 0000000..c9b8f0e
--- /dev/null
@@ -0,0 +1,18 @@
+2007-12-28  Johannes Schmid,,,  <jhs@idefix>
+
+       reviewed by: <delete if not using a buddy>
+
+       * project.anjuta:
+
+2007-12-23  Johannes Schmid,,,  <jhs@idefix>
+
+       reviewed by: <delete if not using a buddy>
+
+       * src/Makefile.am.tpl:
+
+2007-12-23  Johannes Schmid,,,  <jhs@idefix>
+
+       reviewed by: <delete if not using a buddy>
+
+       * src/Makefile.am.tpl:
+
diff --git a/gtk/INSTALL b/gtk/INSTALL
new file mode 100644 (file)
index 0000000..5458714
--- /dev/null
@@ -0,0 +1,234 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006 Free Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/gtk/Jamfile b/gtk/Jamfile
new file mode 100644 (file)
index 0000000..2d73124
--- /dev/null
@@ -0,0 +1,45 @@
+SubDir TOP gtk ;
+
+#rule GhbConfig
+#{
+#      Depends $(SUBDIR)/ghb : $(1) ;
+#}
+#actions GhbConfig
+#{
+#      cd `dirname $(1)` &&
+#      ./configure --prefix=/usr
+#}
+#GhbConfig $(SUBDIR)/config.h : $(SUBDIR)/configure ;
+
+rule GhbApp
+{
+       Depends all : $(1) ;
+}
+actions GhbApp
+{
+       cd `dirname $(1)` &&
+       $(MAKE)
+}
+GhbApp $(SUBDIR)/ghb : libhb.a $(SUBDIR)/config.h ;
+
+rule GhbClean
+{
+       Depends clean : $(1) ;
+}
+actions GhbClean
+{
+       cd $(2) &&
+       $(MAKE) clean
+}
+GhbClean clean_dummy : $(SUBDIR) ;
+
+rule GhbInstall
+{
+       Depends install : $(1) ;
+}
+actions GhbInstall
+{
+       cd $(2) &&
+       $(MAKE) install
+}
+GhbInstall install_dummy : $(SUBDIR) ;
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
new file mode 100644 (file)
index 0000000..5fbda7c
--- /dev/null
@@ -0,0 +1,24 @@
+## Process this file with automake to produce Makefile.in
+## Created by Anjuta
+
+SUBDIRS = src po
+
+ghbdocdir = ${prefix}/share/doc/ghb
+ghbdoc_DATA = \
+       README\
+       COPYING\
+       AUTHORS\
+       ChangeLog\
+       INSTALL\
+       NEWS
+
+EXTRA_DIST = $(ghbdoc_DATA)
+
+# Copy all the spec files. Of cource, only one is actually used.
+dist-hook:
+       for specfile in *.spec; do \
+               if test -f $$specfile; then \
+                       cp -p $$specfile $(distdir); \
+               fi \
+       done
+
diff --git a/gtk/NEWS b/gtk/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/gtk/README b/gtk/README
new file mode 100644 (file)
index 0000000..184b8ee
--- /dev/null
@@ -0,0 +1,15 @@
+ghb requires recent a recent version of glib with gio.  These
+are available in ubuntu 8.04 and fedora 9.  I don't know about other
+distributions.
+
+Currently, to build you must build handbrake separately, then
+autogen and build the gtk ui. e.g.
+
+./autogen.sh
+make
+sudo make install
+
+You can test without installing:
+cd src
+./ghb
+
diff --git a/gtk/TODO.tasks b/gtk/TODO.tasks
new file mode 100644 (file)
index 0000000..d1fa282
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<gtodo>
+  <category title="Personal" place="0"/>
+  <category title="Business" place="1"/>
+  <category title="Unfiled" place="2"/>
+</gtodo>
diff --git a/gtk/autogen.sh b/gtk/autogen.sh
new file mode 100755 (executable)
index 0000000..36e952b
--- /dev/null
@@ -0,0 +1,159 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+DIE=0
+
+if [ -n "$GNOME2_DIR" ]; then
+       ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
+       LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
+       PATH="$GNOME2_DIR/bin:$PATH"
+       export PATH
+       export LD_LIBRARY_PATH
+fi
+
+(test -f $srcdir/configure.ac) || {
+    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+    echo " top-level package directory"
+    exit 1
+}
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`autoconf' installed."
+  echo "Download the appropriate package for your distribution,"
+  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+  DIE=1
+}
+
+(grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
+  (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
+    echo 
+    echo "**Error**: You must have \`intltool' installed."
+    echo "You can get it from:"
+    echo "  ftp://ftp.gnome.org/pub/GNOME/"
+    DIE=1
+  }
+}
+
+(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.ac >/dev/null) && {
+  (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`xml-i18n-toolize' installed."
+    echo "You can get it from:"
+    echo "  ftp://ftp.gnome.org/pub/GNOME/"
+    DIE=1
+  }
+}
+
+(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
+  (libtool --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`libtool' installed."
+    echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+    DIE=1
+  }
+}
+
+(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && {
+  (grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \
+  (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`glib' installed."
+    echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
+    DIE=1
+  }
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`automake' installed."
+  echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+  DIE=1
+  NO_AUTOMAKE=yes
+}
+
+
+# if no automake, don't bother testing for aclocal
+test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
+  echo "installed doesn't appear recent enough."
+  echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
+  DIE=1
+}
+
+if test "$DIE" -eq 1; then
+  exit 1
+fi
+
+if test -z "$*"; then
+  echo "**Warning**: I am going to run \`configure' with no arguments."
+  echo "If you wish to pass any to it, please specify them on the"
+  echo \`$0\'" command line."
+  echo
+fi
+
+case $CC in
+xlc )
+  am_opt=--include-deps;;
+esac
+
+for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.ac -print`
+do 
+  dr=`dirname $coin`
+  if test -f $dr/NO-AUTO-GEN; then
+    echo skipping $dr -- flagged as no auto-gen
+  else
+    echo processing $dr
+    ( cd $dr
+
+      aclocalinclude="$ACLOCAL_FLAGS"
+
+      if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
+       echo "Creating $dr/aclocal.m4 ..."
+       test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+       echo "Running glib-gettextize...  Ignore non-fatal messages."
+       echo "no" | glib-gettextize --force --copy
+       echo "Making $dr/aclocal.m4 writable ..."
+       test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+      fi
+      if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then
+        echo "Running intltoolize..."
+       intltoolize --copy --force --automake
+      fi
+      if grep "^AM_PROG_XML_I18N_TOOLS" configure.ac >/dev/null; then
+        echo "Running xml-i18n-toolize..."
+       xml-i18n-toolize --copy --force --automake
+      fi
+      if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
+       if test -z "$NO_LIBTOOLIZE" ; then 
+         echo "Running libtoolize..."
+         libtoolize --force --copy
+       fi
+      fi
+      echo "Running aclocal $aclocalinclude ..."
+      aclocal $aclocalinclude
+      if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
+       echo "Running autoheader..."
+       autoheader
+      fi
+      echo "Running automake --gnu $am_opt ..."
+      automake --add-missing --copy --gnu $am_opt
+      echo "Running autoconf ..."
+      autoconf
+    )
+  fi
+done
+
+conf_flags="--enable-maintainer-mode"
+
+if test x$NOCONFIGURE = x; then
+  echo Running $srcdir/configure $conf_flags "$@" ...
+  $srcdir/configure $conf_flags "$@" \
+  && echo Now type \`make\' to compile. || exit 1
+else
+  echo Skipping configure process.
+fi
diff --git a/gtk/configure.ac b/gtk/configure.ac
new file mode 100644 (file)
index 0000000..6b051eb
--- /dev/null
@@ -0,0 +1,84 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl Created by Anjuta application wizard.
+
+AC_INIT(ghb, 0.1)
+
+AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+AM_CONFIG_HEADER(config.h)
+AM_MAINTAINER_MODE
+
+AC_ISC_POSIX
+AC_PROG_CC
+AC_PROG_CXX
+AM_PROG_CC_STDC
+AC_HEADER_STDC
+
+# introduce the optional configure parameter for the path of libXXX.a
+AC_ARG_WITH(hb,
+       AC_HELP_STRING(
+           [--with-hb=prefix],
+           [try this for the bh-library prefix install directory]
+         ),
+         hb_PATHSET=1,
+         hb_PATHSET=0
+)
+
+if test  $hb_PATHSET = 1 ; then
+    case ${with_hb} in
+    /*)
+               CXXFLAGS="$CXXFLAGS -I$with_hb/libhb"
+               CFLAGS="$CFLAGS -I$with_hb/libhb"
+               LDFLAGS="$LDFLAGS -L$with_hb/libhb -L$with_hb/contrib/lib"
+               AC_SUBST(HB_DIR, "$with_hb")
+        ;;
+    *)
+               CXXFLAGS="$CXXFLAGS "'-I$(top_srcdir)/'"$with_hb/libhb"
+               CFLAGS="$CFLAGS "'-I$(top_srcdir)/'"$with_hb/libhb"
+               LDFLAGS="$LDFLAGS "'-L$(top_srcdir)/'"$with_hb/libhb "'-L$(top_srcdir)/'"$with_hb/contrib/lib"
+               AC_SUBST(HB_DIR, '$(top_srcdir)/'"$with_hb")
+        ;;
+    esac
+else
+       CXXFLAGS="$CXXFLAGS "'-I$(top_srcdir)/'"../libhb"
+       CFLAGS="$CFLAGS "'-I$(top_srcdir)/'"../libhb"
+       LDFLAGS="$LDFLAGS "'-L$(top_srcdir)/'"../libhb "'-L$(top_srcdir)/'"../contrib/lib"
+       AC_SUBST(HB_DIR, '$(top_srcdir)/'"..")
+fi
+
+# overwrite global variable (used for Makefile generation)
+AC_SUBST(GLOBALCXXFLAGS, $CXXFLAGS )
+AC_SUBST(GLOBALLDFLAGS, $LDFLAGS )
+
+
+
+dnl ***************************************************************************
+dnl Internatinalization
+dnl ***************************************************************************
+GETTEXT_PACKAGE=ghb
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
+AM_GLIB_GNU_GETTEXT
+IT_PROG_INTLTOOL([0.35.0])
+
+
+
+AM_PROG_LIBTOOL
+
+
+
+PKG_CHECK_MODULES(GHBTOOLS, [glib-2.0 gobject-2.0 gdk-pixbuf-2.0])
+AC_SUBST(GHBTOOLS_CFLAGS)
+AC_SUBST(GHBTOOLS_LIBS)
+
+PKG_CHECK_MODULES(GHB, [gtk+-2.0 >= 2.8 gio-2.0 hal hal-storage libgtkhtml-3.14])
+AC_SUBST(GHB_CFLAGS)
+AC_SUBST(GHB_LIBS)
+
+
+
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+po/Makefile.in
+])
diff --git a/gtk/ghb.anjuta b/gtk/ghb.anjuta
new file mode 100644 (file)
index 0000000..ad7ca27
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<anjuta>
+    <plugin name="GBF Project Manager"
+            url="http://anjuta.org/plugins/"
+            mandatory="yes">
+               <require group="Anjuta Plugin"
+                 attribute="Interfaces"
+                 value="IAnjutaProjectManager"/>
+               <require group="Project"
+                 attribute="Supported-Project-Types"
+                 value="automake"/>
+       </plugin>
+       <plugin name="Symbol Browser"
+            url="http://anjuta.org/plugins/"
+            mandatory="yes">
+               <require group="Anjuta Plugin"
+                 attribute="Interfaces"
+                 value="IAnjutaSymbolManager"/>
+       </plugin>
+       <plugin name="Make Build System"
+            url="http://anjuta.org/plugins/"
+            mandatory="yes">
+               <require group="Anjuta Plugin"
+                 attribute="Interfaces"
+                 value="IAnjutaBuildable"/>
+               <require group="Build"
+                 attribute="Supported-Build-Types"
+                 value="make"/>
+       </plugin>
+</anjuta>
diff --git a/gtk/ghb.spec b/gtk/ghb.spec
new file mode 100644 (file)
index 0000000..83cdab4
--- /dev/null
@@ -0,0 +1,64 @@
+Name:          handbrake
+Version:       0.9.2
+Release:       1%{?dist}
+Summary:       A program to rip and encode DVDs and other sources to MPEG-4
+
+Group:         Applications/Multimedia
+License:       GPL
+URL:           http://handbrake.fr/
+Source0:       HandBrake.tgz
+BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+Requires:      glib2 >= 2.16, gtk2 >= 2.12, hal-libs
+
+%description
+HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded 
+DVD to MPEG-4 converter, available for MacOS X, Linux and Windows.
+
+%prep
+%setup -q
+
+
+%build
+%configure
+jam
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+DESTDIR=$RPM_BUILD_ROOT jam install 
+
+## blow away stuff we don't want
+/bin/rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x /usr/bin/gtk-update-icon-cache ]; then
+  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
+fi
+
+%postun
+/sbin/ldconfig
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x /usr/bin/gtk-update-icon-cache ]; then
+  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
+fi
+
+%files
+%defattr(-,root,root,-)
+%doc %{_datadir}/doc
+%{_datadir}/ghb
+%{_datadir}/icons
+%{_datadir}/locale
+%{_datadir}/applications
+%{_bindir}
+
+
+%changelog
+* Sat May 31 2008 John Stebbins <jstebbins@jetheaddev.com> 
+- Initial release
+
+
diff --git a/gtk/po/.cvsignore b/gtk/po/.cvsignore
new file mode 100644 (file)
index 0000000..e69b061
--- /dev/null
@@ -0,0 +1,23 @@
+.libs
+.deps
+.*swp
+.nautilus-metafile.xml
+*.autosave
+*.gmo
+*.mo
+*.pot
+*~
+#*#
+*.bak
+*.o
+*.lo
+*.la
+cat-id-tbl.c
+stamp-cat-id
+messages
+missing
+POTFILES
+Makefile
+Makefile.in
+Makefile.in.in
+translations.xml
diff --git a/gtk/po/ChangeLog b/gtk/po/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/gtk/po/LINGUAS b/gtk/po/LINGUAS
new file mode 100644 (file)
index 0000000..bc8cbb0
--- /dev/null
@@ -0,0 +1,2 @@
+# please keep this list sorted alphabetically
+#
diff --git a/gtk/po/POTFILES.in b/gtk/po/POTFILES.in
new file mode 100644 (file)
index 0000000..a0b3c55
--- /dev/null
@@ -0,0 +1,3 @@
+# List of source files containing translatable strings.
+
+src/main.c
diff --git a/gtk/src/.cvsignore b/gtk/src/.cvsignore
new file mode 100644 (file)
index 0000000..6c5271f
--- /dev/null
@@ -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 (file)
index 0000000..4cae9d3
--- /dev/null
@@ -0,0 +1,231 @@
+## 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
+
+HB_LIBS=\
+       $(HB_DIR)/libhb/libhb.a \
+       $(HB_DIR)/contrib/lib/liba52.a \
+       $(HB_DIR)/contrib/lib/libmkv.a \
+       $(HB_DIR)/contrib/lib/libavformat.a \
+       $(HB_DIR)/contrib/lib/libavcodec.a \
+       $(HB_DIR)/contrib/lib/libavutil.a \
+       $(HB_DIR)/contrib/lib/libdca.a \
+       $(HB_DIR)/contrib/lib/libdvdread.a \
+       $(HB_DIR)/contrib/lib/libfaac.a \
+       $(HB_DIR)/contrib/lib/libmp3lame.a \
+       $(HB_DIR)/contrib/lib/libmpeg2.a \
+       $(HB_DIR)/contrib/lib/libvorbis.a \
+       $(HB_DIR)/contrib/lib/libvorbisenc.a \
+       $(HB_DIR)/contrib/lib/libogg.a \
+       $(HB_DIR)/contrib/lib/libsamplerate.a \
+       $(HB_DIR)/contrib/lib/libx264.a \
+       $(HB_DIR)/contrib/lib/libxvidcore.a \
+       $(HB_DIR)/contrib/lib/libmp4v2.a \
+       $(HB_DIR)/contrib/lib/libswscale.a \
+       $(HB_DIR)/contrib/lib/libtheora.a \
+       $(HB_DIR)/contrib/lib/libfaad.a \
+       -lz \
+       -lbz2 \
+       -lpthread
+
+icons =        \
+       hb-icon.128.png 
+
+icons_dep =    \
+       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-pref.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_menu = ghb.desktop
+
+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 
+noinst_PROGRAMS = makewidgetdeps quotestring create_resources preset_xlat
+
+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 \
+       queuehandler.c \
+       queuehandler.h \
+       audiohandler.c \
+       audiohandler.h \
+       x264handler.c \
+       x264handler.h \
+       main.c \
+       settings.c \
+       settings.h \
+       resources.c \
+       resources.h \
+       presets.c \
+       presets.h \
+       icons.c \
+       icons.h \
+       icon_tools.c \
+       icon_tools.h \
+       values.c \
+       values.h \
+       appcast.c \
+       appcast.h \
+       plist.c \
+       plist.h \
+       hb-backend.c \
+       hb-backend.h \
+       renderer_button.h \
+       renderer_button.c \
+       ghbcellrenderertext.c \
+       ghbcellrenderertext.h \
+       ghb-dvd.c \
+       ghb-dvd.h \
+       marshalers.c \
+       marshalers.h
+
+ghb_LDFLAGS = \
+       -Wl,--export-dynamic
+
+ghb_LDADD = $(GHB_LIBS) $(HB_LIBS)
+
+ghb_DEPENDENCIES = $(HB_DIR)/libhb/libhb.a
+
+makewidgetdeps_SOURCES = \
+       plist.c \
+       plist.h \
+       values.c \
+       values.h \
+       makedeps.c 
+
+makewidgetdeps_LDADD = $(GHBTOOLS_LIBS)
+
+create_resources_SOURCES = \
+       create_resources.c \
+       plist.c \
+       plist.h \
+       values.c \
+       values.h \
+       icon_tools.c \
+       icon_tools.h
+
+create_resources_LDADD = $(GHBTOOLS_LIBS)
+
+preset_xlat_SOURCES = \
+       preset_xlat.c \
+       plist.c \
+       plist.h \
+       values.c \
+       values.h
+
+preset_xlat_LDADD = $(GHBTOOLS_LIBS)
+
+quotestring_SOURCES = quotestring.c
+
+dumbell: preset_xlat
+
+resources.c: resource_data.h
+
+resource_data.h: quotestring resources.plist
+       ./quotestring resources.plist resource_data.h
+
+widget_deps: makewidgetdeps
+       ./makewidgetdeps
+
+resources.plist: create_resources resources.list $(icons_dep) internal_defaults.xml standard_presets.xml ghb.ui widget_deps widget_reverse_deps
+       ./create_resources resources.list resources.plist
+
+ghbcellrenderertext.c: marshalers.h
+
+marshalers.h: marshalers.list
+       glib-genmarshal --prefix=ghb_marshal marshalers.list --header > marshalers.h
+
+marshalers.c: marshalers.list
+       glib-genmarshal --prefix=ghb_marshal marshalers.list --body > marshalers.c
+
+EXTRA_DIST = HandBrakeCLI
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(DESTDIR)/$(datadir)/icons/hicolor
+
+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
+       @-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
+       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
+       @-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
+       mkdir -p $(DESTDIR)/$(datadir)/applications/; \
+       $(INSTALL_DATA) $(srcdir)/$(hb_menu) $(DESTDIR)/$(datadir)/applications/$(hb_menu)
diff --git a/gtk/src/appcast.c b/gtk/src/appcast.c
new file mode 100644 (file)
index 0000000..114b653
--- /dev/null
@@ -0,0 +1,271 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * appcast.c
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ * 
+ * appcast.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 <stdio.h>
+#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include "icon_tools.h"
+#include "plist.h"
+#include "values.h"
+
+enum
+{
+       A_NONE = 0,
+       A_DESCRIPTION,
+       A_ENCLOSURE,
+       A_ITEM,
+};
+
+typedef struct
+{
+       gchar *tag;
+       gint id;
+} tag_map_t;
+
+static tag_map_t tag_map[] =
+{
+       {"description", A_DESCRIPTION},
+       {"enclosure", A_ENCLOSURE},
+       {"item", A_ITEM},
+};
+#define TAG_MAP_SZ     (sizeof(tag_map)/sizeof(tag_map_t))
+
+typedef struct
+{
+       gchar *key;
+       gchar *value;
+       GQueue *stack;
+       GQueue *tag_stack;
+       GString *description;
+       gchar *build;
+       gchar *version;
+       gboolean item;
+} parse_data_t;
+
+static const gchar*
+lookup_attr_value(
+       const gchar *name, 
+       const gchar **attr_names, 
+       const gchar **attr_values)
+{
+       gint ii;
+
+       if (attr_names == NULL) return NULL;
+       for (ii = 0; attr_names[ii] != NULL; ii++)
+       {
+               if (strcmp(name, attr_names[ii]) == 0)
+                       return attr_values[ii];
+       }
+       return NULL;
+}
+static void
+start_element(
+       GMarkupParseContext *ctx, 
+       const gchar *tag, 
+       const gchar **attr_names,
+       const gchar **attr_values,
+       gpointer ud,
+       GError **error)
+{
+       parse_data_t *pd = (parse_data_t*)ud;
+       union 
+       {
+               gint id;
+               gpointer pid;
+       } id;
+       gint ii;
+
+       for (ii = 0; ii < TAG_MAP_SZ; ii++)
+       {
+               if (strcmp(tag, tag_map[ii].tag) == 0)
+               {
+                       id.id = tag_map[ii].id;
+                       break;
+               }
+       }
+       if (ii == TAG_MAP_SZ)
+       {
+               g_debug("Unrecognized start tag (%s)", tag);
+               id.id = A_NONE;
+       }
+       g_queue_push_head(pd->tag_stack, id.pid);
+       switch (id.id)
+       {
+               case A_ITEM:
+               {
+                       pd->item = TRUE;
+               } break;
+               case A_ENCLOSURE:
+               {
+                       const gchar *build, *version;
+                       build = lookup_attr_value(
+                                               "sparkle:version", attr_names, attr_values);
+                       version = lookup_attr_value(
+                                               "sparkle:shortVersionString", attr_names, attr_values);
+                       if (build)
+                               pd->build = g_strdup(build);
+                       if (version)
+                               pd->version = g_strdup(version);
+               } break;
+       }
+}
+
+static void
+end_element(
+       GMarkupParseContext *ctx, 
+       const gchar *tag, 
+       gpointer ud,
+       GError **error)
+{
+       parse_data_t *pd = (parse_data_t*)ud;
+       gint id;
+       union 
+       {
+               gint id;
+               gpointer pid;
+       } start_id;
+       gint ii;
+
+       for (ii = 0; ii < TAG_MAP_SZ; ii++)
+       {
+               if (strcmp(tag, tag_map[ii].tag) == 0)
+               {
+                       id = tag_map[ii].id;
+                       break;
+               }
+       }
+       if (ii == TAG_MAP_SZ)
+       {
+               g_debug("Unrecognized end tag (%s)", tag);
+               id = A_NONE;
+       }
+       start_id.pid = g_queue_pop_head(pd->tag_stack);
+       if (start_id.id != id)
+               g_warning("start tag != end tag: (%s %d) %d", tag, start_id.id, id);
+       switch (id)
+       {
+               case A_ITEM:
+               {
+                       pd->item = FALSE;
+               } break;
+               default:
+               {
+               } break;
+       }
+
+}
+
+static void
+text_data(
+       GMarkupParseContext *ctx, 
+       const gchar *text, 
+       gsize len,
+       gpointer ud,
+       GError **error)
+{
+       parse_data_t *pd = (parse_data_t*)ud;
+       union 
+       {
+               gint id;
+               gpointer pid;
+       } start_id;
+
+       start_id.pid = g_queue_peek_head(pd->tag_stack);
+       switch (start_id.id)
+       {
+               case A_DESCRIPTION:
+               {
+                       if (pd->item)
+                       {
+                               g_string_append(pd->description, text);
+                       }
+               } break;
+               default:
+               {
+                       if (pd->value) g_free(pd->value);
+                       pd->value = g_strdup(text);
+               } break;
+       }
+}
+
+static void
+passthrough(
+       GMarkupParseContext *ctx, 
+       const gchar *text, 
+       gsize len,
+       gpointer ud,
+       GError **error)
+{
+       //parse_data_t *pd = (parse_data_t*)ud;
+
+       //g_debug("passthrough %s", text);
+}
+
+static void
+parse_error(GMarkupParseContext *ctx, GError *error, gpointer ud)
+{
+       g_warning("Resource parse error: %s", error->message);
+}
+
+// This is required or the parser crashes
+static void 
+destroy_notify(gpointer data)
+{ // Do nothing
+       //g_debug("destroy parser");
+}
+
+void
+ghb_appcast_parse(gchar *buf, gchar **desc, gchar **build, gchar **version)
+{
+       GMarkupParseContext *ctx;
+       GMarkupParser parser;
+       parse_data_t pd;
+       GError *err = NULL;
+       gint len;
+       gchar *start;
+       //gchar tmp[4096]
+
+       // Skip junk at beginning of buffer
+       start = strstr(buf, "<?xml ");
+       pd.description = g_string_new("");
+       pd.item = FALSE;
+       pd.build = NULL;
+       pd.version = NULL;
+       len = strlen(start);
+       pd.tag_stack = g_queue_new();
+       pd.key = NULL;
+       pd.value = NULL;
+
+       parser.start_element = start_element;
+       parser.end_element = end_element;
+       parser.text = text_data;
+       parser.passthrough = passthrough;
+       parser.error = parse_error;
+       ctx = g_markup_parse_context_new(
+                       &parser, G_MARKUP_TREAT_CDATA_AS_TEXT, &pd, destroy_notify);
+
+       g_markup_parse_context_parse(ctx, start, len, &err);
+       g_markup_parse_context_end_parse(ctx, &err);
+       g_markup_parse_context_free(ctx);
+       g_queue_free(pd.tag_stack);
+       *desc = g_string_free(pd.description, FALSE);
+       // work around a bug to leaves the CDATA closing brakets on the string
+       gchar *glitch;
+       glitch = g_strrstr(*desc, "]]>");
+       if (glitch)
+               *glitch = 0;
+       *build = pd.build;
+       *version = pd.version;
+}
diff --git a/gtk/src/appcast.h b/gtk/src/appcast.h
new file mode 100644 (file)
index 0000000..2520be6
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * 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_APPCAST_H_)
+#define _GHB_APPCAST_H_
+
+void ghb_appcast_parse(
+       gchar *buf, gchar **desc, gchar **build, gchar **version);
+
+#endif // _GHB_APPCAST_H_
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
new file mode 100644 (file)
index 0000000..eaf7f93
--- /dev/null
@@ -0,0 +1,658 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * audiohandler.c
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ * 
+ * audiohandler.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 <gtk/gtk.h>
+#include "hb.h"
+#include "settings.h"
+#include "hb-backend.h"
+#include "values.h"
+#include "callbacks.h"
+#include "audiohandler.h"
+
+void
+ghb_adjust_audio_rate_combos(signal_user_data_t *ud)
+{
+       gint titleindex, audioindex, acodec, mix;
+       ghb_audio_info_t ainfo;
+       GtkWidget *widget;
+       GValue *gval;
+       
+       g_debug("ghb_adjust_audio_rate_combos ()");
+       titleindex = ghb_settings_combo_int(ud->settings, "title");
+
+       widget = GHB_WIDGET(ud->builder, "AudioTrack");
+       gval = ghb_widget_value(widget);
+       audioindex = ghb_lookup_combo_int("AudioTrack", gval);
+       ghb_value_free(gval);
+
+       widget = GHB_WIDGET(ud->builder, "AudioEncoder");
+       gval = ghb_widget_value(widget);
+       acodec = ghb_lookup_combo_int("AudioEncoder", gval);
+       ghb_value_free(gval);
+       widget = GHB_WIDGET(ud->builder, "AudioMixdown");
+       gval = ghb_widget_value(widget);
+       mix = ghb_lookup_combo_int("AudioMixdown", gval);
+       ghb_value_free(gval);
+
+       if (ghb_audio_is_passthru (acodec))
+       {
+               ghb_set_default_bitrate_opts (ud->builder, -1);
+               if (ghb_get_audio_info (&ainfo, titleindex, audioindex))
+               {
+                       gint br = ainfo.bitrate / 1000;
+                       // Set the values for bitrate and samplerate to the input rates
+                       ghb_set_passthru_bitrate_opts (ud->builder, br);
+                       ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(br));
+                       ghb_ui_update(ud, "AudioSamplerate", ghb_int64_value(0));
+                       ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(0));
+               }
+               else
+               {
+                       ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(384));
+                       ghb_ui_update(ud, "AudioSamplerate", ghb_int64_value(0));
+                       ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(0));
+               }
+       }
+       else if (acodec == HB_ACODEC_FAAC && mix != HB_AMIXDOWN_6CH)
+       {
+               gint br;
+
+               widget = GHB_WIDGET(ud->builder, "AudioBitrate");
+               gval = ghb_widget_value(widget);
+               br = ghb_lookup_combo_int("AudioBitrate", gval);
+               ghb_value_free(gval);
+               if (br > 160)
+                       ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(160));
+               ghb_set_default_bitrate_opts (ud->builder, 160);
+       }
+       else
+       {
+               ghb_set_default_bitrate_opts (ud->builder, -1);
+       }
+}
+
+void
+ghb_set_pref_audio(gint titleindex, signal_user_data_t *ud)
+{
+       gint acodec_code, mix_code, track;
+       gchar *source_lang;
+       GtkWidget *button;
+       ghb_audio_info_t ainfo;
+       gint index;
+       GHashTable *track_indicies;
+       gint *iptr;
+
+       GValue *pref_audio;
+       GValue *audio, *acodec, *bitrate, *rate, *mix, *drc;
+       gint count, ii, list_count;
+       
+       g_debug("set_pref_audio");
+       track_indicies = g_hash_table_new(g_int_hash, g_int_equal);
+       // Clear the audio list
+       ghb_clear_audio_list(ud);
+       // Find "best" audio based on audio preferences
+       button = GHB_WIDGET (ud->builder, "audio_add");
+       source_lang = ghb_settings_get_string(ud->settings, "SourceAudioLang");
+
+       pref_audio = ghb_settings_get_value(ud->settings, "AudioList");
+
+       list_count = 0;
+       count = ghb_array_len(pref_audio);
+       for (ii = 0; ii < count; ii++)
+       {
+               audio = ghb_array_get_nth(pref_audio, ii);
+               acodec = ghb_settings_get_value(audio, "AudioEncoder");
+               bitrate = ghb_settings_get_value(audio, "AudioBitrate");
+               rate = ghb_settings_get_value(audio, "AudioSamplerate");
+               mix = ghb_settings_get_value(audio, "AudioMixdown");
+               drc = ghb_settings_get_value(audio, "AudioTrackDRCSlider");
+               acodec_code = ghb_lookup_combo_int("AudioEncoder", acodec);
+               // If there are multiple audios using the same codec, then
+               // select sequential tracks for each.  This hash keeps track 
+               // of the last used track for each codec.
+               iptr = g_hash_table_lookup(track_indicies, &acodec_code);
+               if (iptr == NULL)
+                       index = 0;
+               else
+                       index = *(gint*)iptr;
+
+               track = ghb_find_audio_track(titleindex, source_lang, index);
+               // Check to see if:
+               // 1. pref codec is ac3
+               // 2. source codec is not ac3
+               // 3. next pref is enabled
+               if (ghb_get_audio_info (&ainfo, titleindex, track) && 
+                       ghb_audio_is_passthru (acodec_code))
+               {
+                       if (!ghb_audio_is_passthru(ainfo.codec))
+                       {
+                               acodec_code = ghb_get_default_acodec();
+                               // If there's more audio to process, or we've already
+                               // placed one in the list, then we can skip this one
+                               if ((ii + 1 < count) || (list_count != 0))
+                               {
+                                       // Skip this audio
+                                       acodec_code = 0;
+                               }
+                       }
+               }
+               if (titleindex >= 0 && track < 0)
+                       acodec_code = 0;
+               if (acodec_code != 0)
+               {
+                       // Add to audio list
+                       g_signal_emit_by_name(button, "clicked", ud);
+                       list_count++;
+                       ghb_ui_update(ud, "AudioTrack", ghb_int64_value(track));
+                       ghb_ui_update(ud, "AudioEncoder", acodec);
+                       if (!ghb_audio_is_passthru (acodec_code))
+                       {
+                               // This gets set autimatically if the codec is passthru
+                               ghb_ui_update(ud, "AudioBitrate", bitrate);
+                               ghb_ui_update(ud, "AudioSamplerate", rate);
+                               mix_code = ghb_lookup_combo_int("AudioMixdown", mix);
+                               mix_code = ghb_get_best_mix(
+                                       titleindex, track, acodec_code, mix_code);
+                               ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(mix_code));
+                       }
+                       ghb_ui_update(ud, "AudioTrackDRCSlider", drc);
+                       index++;
+                       g_hash_table_insert(track_indicies, &acodec_code, &index);
+               }
+       }
+       g_free(source_lang);
+       g_hash_table_destroy(track_indicies);
+}
+
+static GValue*
+get_selected_asettings(signal_user_data_t *ud)
+{
+       GtkTreeView *treeview;
+       GtkTreePath *treepath;
+       GtkTreeSelection *selection;
+       GtkTreeModel *store;
+       GtkTreeIter iter;
+       gint *indices;
+       gint row;
+       GValue *asettings = NULL;
+       const GValue *audio_list;
+       
+       g_debug("get_selected_asettings ()");
+       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);
+               row = indices[0];
+               gtk_tree_path_free(treepath);
+               // find audio settings
+               if (row < 0) return NULL;
+               audio_list = ghb_settings_get_value(ud->settings, "audio_list");
+               if (row >= ghb_array_len(audio_list))
+                       return NULL;
+               asettings = ghb_array_get_nth(audio_list, row);
+       }
+       return asettings;
+}
+
+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;
+       GValue *asettings = NULL;
+       const GValue *audio_list;
+       
+       g_debug("audio_list_refresh_selected ()");
+       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))
+       {
+               const gchar *track, *codec, *br, *sr, *mix;
+               gchar *drc, *s_track, *s_codec, *s_br, *s_sr, *s_mix;
+               gdouble s_drc;
+               // Get the row number
+               treepath = gtk_tree_model_get_path (store, &iter);
+               indices = gtk_tree_path_get_indices (treepath);
+               row = indices[0];
+               gtk_tree_path_free(treepath);
+               // find audio settings
+               if (row < 0) return;
+               audio_list = ghb_settings_get_value(ud->settings, "audio_list");
+               if (row >= ghb_array_len(audio_list))
+                       return;
+               asettings = ghb_array_get_nth(audio_list, row);
+
+               track = ghb_settings_combo_option(asettings, "AudioTrack");
+               codec = ghb_settings_combo_option(asettings, "AudioEncoder");
+               br = ghb_settings_combo_option(asettings, "AudioBitrate");
+               sr = ghb_settings_combo_option(asettings, "AudioSamplerate");
+               mix = ghb_settings_combo_option(asettings, "AudioMixdown");
+               drc = ghb_settings_get_string(asettings, "AudioTrackDRCSlider");
+
+               s_track = ghb_settings_get_string(asettings, "AudioTrack");
+               s_codec = ghb_settings_get_string(asettings, "AudioEncoder");
+               s_br = ghb_settings_get_string(asettings, "AudioBitrate");
+               s_sr = ghb_settings_get_string(asettings, "AudioSamplerate");
+               s_mix = ghb_settings_get_string(asettings, "AudioMixdown");
+               s_drc = ghb_settings_get_double(asettings, "AudioTrackDRCSlider");
+
+               gtk_list_store_set(GTK_LIST_STORE(store), &iter, 
+                       // These are displayed in list
+                       0, track,
+                       1, codec,
+                       2, br,
+                       3, sr,
+                       4, mix,
+                       // These are used to set combo values when a list item is selected
+                       5, drc,
+                       6, s_track,
+                       7, s_codec,
+                       8, s_br,
+                       9, s_sr,
+                       10, s_mix,
+                       11, s_drc,
+                       -1);
+               g_free(drc);
+               g_free(s_track);
+               g_free(s_codec);
+               g_free(s_br);
+               g_free(s_sr);
+               g_free(s_mix);
+       }
+}
+
+void
+audio_codec_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       static gint prev_acodec = 0;
+       gint acodec_code, mix_code;
+       GValue *asettings, *gval;
+       
+       g_debug("audio_codec_changed_cb ()");
+       gval = ghb_widget_value(widget);
+       acodec_code = ghb_lookup_combo_int("AudioEncoder", gval);
+       ghb_value_free(gval);
+       if (ghb_audio_is_passthru (prev_acodec) && 
+               !ghb_audio_is_passthru (acodec_code))
+       {
+               // Transition from passthru to not, put some audio settings back to 
+               // pref settings
+               gint titleindex;
+               gint track;
+
+               titleindex = ghb_settings_combo_int(ud->settings, "title");
+               track = ghb_settings_combo_int(ud->settings, "AudioTrack");
+
+               ghb_ui_update(ud, "AudioBitrate", ghb_string_value("160"));
+               ghb_ui_update(ud, "AudioSamplerate", ghb_string_value("source"));
+               mix_code = ghb_lookup_combo_int("AudioMixdown", ghb_string_value("dpl2"));
+               mix_code = ghb_get_best_mix( titleindex, track, acodec_code, mix_code);
+               ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(mix_code));
+               ghb_ui_update(ud, "AudioTrackDRCSlider", ghb_double_value(1.0));
+       }
+       ghb_adjust_audio_rate_combos(ud);
+       ghb_grey_combo_options (ud->builder);
+       ghb_check_dependency(ud, widget);
+       prev_acodec = acodec_code;
+       asettings = get_selected_asettings(ud);
+       if (asettings != NULL)
+       {
+               ghb_widget_to_setting(asettings, widget);
+               audio_list_refresh_selected(ud);
+       }
+
+       const GValue *audio_list;
+       audio_list = ghb_settings_get_value(ud->settings, "audio_list");
+       if (ghb_ac3_in_audio_list (audio_list))
+       {
+               gchar *container;
+
+               container = ghb_settings_get_string(ud->settings, "FileFormat");
+               if (strcmp(container, "mp4") == 0)
+               {
+                       ghb_ui_update(ud, "FileFormat", ghb_string_value("m4v"));
+               }
+               g_free(container);
+       }
+}
+
+void
+audio_track_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       GValue *asettings;
+
+       g_debug("audio_track_changed_cb ()");
+       ghb_adjust_audio_rate_combos(ud);
+       ghb_check_dependency(ud, widget);
+       ghb_grey_combo_options(ud->builder);
+       asettings = get_selected_asettings(ud);
+       if (asettings != NULL)
+       {
+               const gchar *track;
+
+               ghb_widget_to_setting(asettings, widget);
+               audio_list_refresh_selected(ud);
+               track = ghb_settings_combo_option(asettings, "AudioTrack");
+               ghb_settings_set_string(asettings, "AudioTrackDescription", track);
+       }
+}
+
+void
+audio_mix_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       GValue *asettings;
+
+       g_debug("audio_widget_changed_cb ()");
+       ghb_adjust_audio_rate_combos(ud);
+       ghb_check_dependency(ud, widget);
+       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)
+{
+       GValue *asettings;
+
+       g_debug("audio_widget_changed_cb ()");
+       ghb_check_dependency(ud, widget);
+       asettings = get_selected_asettings(ud);
+       if (asettings != NULL)
+       {
+               ghb_widget_to_setting(asettings, widget);
+               audio_list_refresh_selected(ud);
+       }
+}
+
+// subtitles 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", name);
+       ghb_widget_to_setting(ud->settings, widget);
+       ghb_check_dependency(ud, widget);
+}
+
+void
+ghb_clear_audio_list(signal_user_data_t *ud)
+{
+       GtkTreeView *treeview;
+       GtkListStore *store;
+       GValue *audio_list;
+       
+       g_debug("clear_audio_list ()");
+       audio_list = ghb_settings_get_value(ud->settings, "audio_list");
+       if (audio_list == NULL)
+       {
+               audio_list = ghb_array_value_new(8);
+               ghb_settings_set_value(ud->settings, "audio_list", audio_list);
+       }
+       else
+               ghb_array_value_reset(audio_list, 8);
+       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, GValue *settings)
+{
+       GtkTreeView *treeview;
+       GtkTreeIter iter;
+       GtkListStore *store;
+       GtkTreeSelection *selection;
+       const gchar *track, *codec, *br, *sr, *mix;
+       gchar *drc, *s_track, *s_codec, *s_br, *s_sr, *s_mix;
+       gdouble s_drc;
+       
+       g_debug("add_to_audio_list ()");
+       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));
+
+       track = ghb_settings_combo_option(settings, "AudioTrack");
+       codec = ghb_settings_combo_option(settings, "AudioEncoder");
+       br = ghb_settings_combo_option(settings, "AudioBitrate");
+       sr = ghb_settings_combo_option(settings, "AudioSamplerate");
+       mix = ghb_settings_combo_option(settings, "AudioMixdown");
+       drc = ghb_settings_get_string(settings, "AudioTrackDRCSlider");
+
+       s_track = ghb_settings_get_string(settings, "AudioTrack");
+       s_codec = ghb_settings_get_string(settings, "AudioEncoder");
+       s_br = ghb_settings_get_string(settings, "AudioBitrate");
+       s_sr = ghb_settings_get_string(settings, "AudioSamplerate");
+       s_mix = ghb_settings_get_string(settings, "AudioMixdown");
+       s_drc = ghb_settings_get_double(settings, "AudioTrackDRCSlider");
+
+       gtk_list_store_append(store, &iter);
+       gtk_list_store_set(store, &iter, 
+               // These are displayed in list
+               0, track,
+               1, codec,
+               2, br,
+               3, sr,
+               4, mix,
+               // These are used to set combo box values when a list item is selected
+               5, drc,
+               6, s_track,
+               7, s_codec,
+               8, s_br,
+               9, s_sr,
+               10, s_mix,
+               11, s_drc,
+               -1);
+       gtk_tree_selection_select_iter(selection, &iter);
+       g_free(drc);
+       g_free(s_track);
+       g_free(s_codec);
+       g_free(s_br);
+       g_free(s_sr);
+       g_free(s_mix);
+}
+
+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 ()");
+       if (gtk_tree_selection_get_selected(selection, &store, &iter))
+       {
+               const gchar *track, *codec, *bitrate, *sample_rate, *mix;
+               gdouble drc;
+
+               gtk_tree_model_get(store, &iter,
+                                                  6, &track,
+                                                  7, &codec,
+                                                  8, &bitrate,
+                                                  9, &sample_rate,
+                                                  10, &mix,
+                                                  11, &drc,
+                                                  -1);
+               ghb_ui_update(ud, "AudioTrack", ghb_string_value(track));
+               ghb_ui_update(ud, "AudioEncoder", ghb_string_value(codec));
+               ghb_ui_update(ud, "AudioBitrate", ghb_string_value(bitrate));
+               ghb_ui_update(ud, "AudioSamplerate", ghb_string_value(sample_rate));
+               ghb_ui_update(ud, "AudioMixdown", ghb_string_value(mix));
+               ghb_ui_update(ud, "AudioTrackDRCSlider", ghb_double_value(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.
+       GValue *asettings;
+       GtkWidget *widget;
+       gint count;
+       GValue *audio_list;
+       const gchar *track;
+       
+       g_debug("audio_add_clicked_cb ()");
+       asettings = ghb_dict_value_new();
+       // Only allow up to 8 audio entries
+       widget = GHB_WIDGET(ud->builder, "AudioTrack");
+       ghb_settings_take_value(asettings, "AudioTrack", ghb_widget_value(widget));
+       widget = GHB_WIDGET(ud->builder, "AudioEncoder");
+       ghb_settings_take_value(asettings, "AudioEncoder", ghb_widget_value(widget));
+       widget = GHB_WIDGET(ud->builder, "AudioBitrate");
+       ghb_settings_take_value(asettings, "AudioBitrate", ghb_widget_value(widget));
+       widget = GHB_WIDGET(ud->builder, "AudioSamplerate");
+       ghb_settings_take_value(asettings, "AudioSamplerate", ghb_widget_value(widget));
+       widget = GHB_WIDGET(ud->builder, "AudioMixdown");
+       ghb_settings_take_value(asettings, "AudioMixdown", ghb_widget_value(widget));
+       widget = GHB_WIDGET(ud->builder, "AudioTrackDRCSlider");
+       ghb_settings_take_value(asettings, "AudioTrackDRCSlider", ghb_widget_value(widget));
+       track = ghb_settings_combo_option(asettings, "AudioTrack");
+       ghb_settings_set_string(asettings, "AudioTrackDescription", track);
+
+       audio_list = ghb_settings_get_value(ud->settings, "audio_list");
+       if (audio_list == NULL)
+       {
+               audio_list = ghb_array_value_new(8);
+               ghb_settings_set_value(ud->settings, "audio_list", audio_list);
+       }
+       ghb_array_append(audio_list, asettings);
+       add_to_audio_list(ud, asettings);
+       count = ghb_array_len(audio_list);
+       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;
+       GValue *audio_list;
+
+       g_debug("audio_remove_clicked_cb ()");
+       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);
+               row = indices[0];
+               gtk_tree_path_free(treepath);
+               // Remove the selected item
+               gtk_list_store_remove (GTK_LIST_STORE(store), &iter);
+               // remove from audio settings list
+               if (row < 0) return;
+               widget = GHB_WIDGET (ud->builder, "audio_add");
+               gtk_widget_set_sensitive(widget, TRUE);
+               audio_list = ghb_settings_get_value(ud->settings, "audio_list");
+               if (row >= ghb_array_len(audio_list))
+                       return;
+               GValue *old = ghb_array_get_nth(audio_list, row);
+               ghb_value_free(old);
+               ghb_array_remove(audio_list, row);
+       }
+}
+
+void
+ghb_set_audio(signal_user_data_t *ud, GValue *settings)
+{
+       gint acodec_code;
+       GtkWidget *button;
+
+       GValue *alist;
+       GValue *track, *audio, *acodec, *bitrate, *rate, *mix, *drc;
+       gint count, ii;
+       
+       g_debug("set_audio");
+       // Clear the audio list
+       ghb_clear_audio_list(ud);
+       button = GHB_WIDGET (ud->builder, "audio_add");
+       alist = ghb_settings_get_value(settings, "audio_list");
+
+       count = ghb_array_len(alist);
+       for (ii = 0; ii < count; ii++)
+       {
+               audio = ghb_array_get_nth(alist, ii);
+               track = ghb_settings_get_value(audio, "AudioTrack");
+               acodec = ghb_settings_get_value(audio, "AudioEncoder");
+               bitrate = ghb_settings_get_value(audio, "AudioBitrate");
+               rate = ghb_settings_get_value(audio, "AudioSamplerate");
+               mix = ghb_settings_get_value(audio, "AudioMixdown");
+               drc = ghb_settings_get_value(audio, "AudioTrackDRCSlider");
+               acodec_code = ghb_lookup_combo_int("AudioEncoder", acodec);
+
+               if (acodec_code != 0)
+               {
+                       // Add to audio list
+                       g_signal_emit_by_name(button, "clicked", ud);
+                       ghb_ui_update(ud, "AudioTrack", track);
+                       ghb_ui_update(ud, "AudioEncoder", acodec);
+                       if (!ghb_audio_is_passthru (acodec_code))
+                       {
+                               // This gets set autimatically if the codec is passthru
+                               ghb_ui_update(ud, "AudioBitrate", bitrate);
+                               ghb_ui_update(ud, "AudioSamplerate", rate);
+                               ghb_ui_update(ud, "AudioMixdown", mix);
+                       }
+                       ghb_ui_update(ud, "AudioTrackDRCSlider", drc);
+               }
+       }
+}
+
diff --git a/gtk/src/audiohandler.h b/gtk/src/audiohandler.h
new file mode 100644 (file)
index 0000000..727a98b
--- /dev/null
@@ -0,0 +1,35 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * audiohandler.h
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ * 
+ * audiohandler.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(_AUDIOHANDLER_H_)
+#define _AUDIOHANDLER_H_
+
+#include "settings.h"
+
+void ghb_adjust_audio_rate_combos(signal_user_data_t *ud);
+void ghb_set_pref_audio(gint titleindex, signal_user_data_t *ud);
+void ghb_clear_audio_list(signal_user_data_t *ud);
+void ghb_set_audio(signal_user_data_t *ud, GValue *settings);
+
+#endif // _AUDIOHANDLER_H_
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
new file mode 100644 (file)
index 0000000..e13b97d
--- /dev/null
@@ -0,0 +1,2942 @@
+/* -*- 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 <netinet/in.h>
+#include <netdb.h>
+#include <libhal-storage.h>
+#include <gtk/gtk.h>
+#include <gtkhtml/gtkhtml.h>
+#include <gdk/gdkkeysyms.h>
+#include <glib/gstdio.h>
+#include <gio/gio.h>
+
+#include "hb.h"
+#include "callbacks.h"
+#include "queuehandler.h"
+#include "audiohandler.h"
+#include "resources.h"
+#include "settings.h"
+#include "presets.h"
+#include "values.h"
+#include "plist.h"
+#include "appcast.h"
+#include "hb-backend.h"
+#include "ghb-dvd.h"
+#include "ghbcellrenderertext.h"
+
+static void update_chapter_list(signal_user_data_t *ud);
+static GList* dvd_device_list();
+static void prune_logs(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
+
+GValue *dep_map;
+GValue *rev_map;
+
+void
+ghb_init_dep_map()
+{
+       dep_map = ghb_resource_get("widget-deps");
+       rev_map = ghb_resource_get("widget-reverse-deps");
+}
+
+static gboolean
+dep_check(signal_user_data_t *ud, const gchar *name)
+{
+       GtkWidget *widget;
+       GObject *dep_object;
+       gint ii;
+       gint count;
+       gboolean result = TRUE;
+       GValue *array, *data;
+       gchar *widget_name;
+       
+       g_debug("dep_check () %s", name);
+
+       array = ghb_dict_lookup(rev_map, name);
+       count = ghb_array_len(array);
+       for (ii = 0; ii < count; ii++)
+       {
+               data = ghb_array_get_nth(array, ii);
+               widget_name = ghb_value_string(ghb_array_get_nth(data, 0));
+               widget = GHB_WIDGET(ud->builder, widget_name);
+               dep_object = gtk_builder_get_object(ud->builder, name);
+               g_free(widget_name);
+               if (dep_object == NULL)
+               {
+                       g_message("Failed to find widget");
+               }
+               else
+               {
+                       gchar *value;
+                       gint jj = 0;
+                       gchar **values;
+                       gboolean sensitive = FALSE;
+                       gboolean die;
+
+                       die = ghb_value_boolean(ghb_array_get_nth(data, 2));
+                       value = ghb_value_string(ghb_array_get_nth(data, 1));
+                       values = g_strsplit(value, "|", 10);
+                       g_free(value);
+
+                       if (widget)
+                               value = ghb_widget_string(widget);
+                       else
+                               value = ghb_settings_get_string(ud->settings, name);
+                       while (values && values[jj])
+                       {
+                               if (values[jj][0] == '>')
+                               {
+                                       gdouble dbl = g_strtod (&values[jj][1], NULL);
+                                       gdouble dvalue = ghb_widget_double(widget);
+                                       if (dvalue > dbl)
+                                       {
+                                               sensitive = TRUE;
+                                               break;
+                                       }
+                               }
+                               else if (values[jj][0] == '<')
+                               {
+                                       gdouble dbl = g_strtod (&values[jj][1], NULL);
+                                       gdouble dvalue = ghb_widget_double(widget);
+                                       if (dvalue < dbl)
+                                       {
+                                               sensitive = TRUE;
+                                               break;
+                                       }
+                               }
+                               if (strcmp(values[jj], value) == 0)
+                               {
+                                       sensitive = TRUE;
+                                       break;
+                               }
+                               jj++;
+                       }
+                       sensitive = die ^ sensitive;
+                       if (!sensitive) result = FALSE;
+                       g_strfreev (values);
+                       g_free(value);
+               }
+       }
+       return result;
+}
+
+void
+ghb_check_dependency(signal_user_data_t *ud, GtkWidget *widget)
+{
+       GObject *dep_object;
+       const gchar *name;
+       GValue *array, *data;
+       gint count, ii;
+       gchar *dep_name;
+       GType type;
+
+       type = GTK_WIDGET_TYPE(widget);
+       if (type == GTK_TYPE_COMBO_BOX || type == GTK_TYPE_COMBO_BOX_ENTRY)
+               if (gtk_combo_box_get_active(GTK_COMBO_BOX(widget)) < 0) return;
+
+       name = gtk_widget_get_name(widget);
+       g_debug("ghb_check_dependency () %s", name);
+
+       array = ghb_dict_lookup(dep_map, name);
+       count = ghb_array_len(array);
+       for (ii = 0; ii < count; ii++)
+       {
+               gboolean sensitive;
+
+               data = ghb_array_get_nth(array, ii);
+               dep_name = ghb_value_string(data);
+               dep_object = gtk_builder_get_object(ud->builder, dep_name);
+               if (dep_object == NULL)
+               {
+                       g_message("Failed to find dependent widget %s", dep_name);
+                       g_free(dep_name);
+                       continue;
+               }
+               sensitive = dep_check(ud, dep_name);
+               g_free(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)
+{
+       GHashTableIter iter;
+       gchar *dep_name;
+       GValue *value;
+       GObject *dep_object;
+
+       g_debug("ghb_check_all_depencencies ()");
+       ghb_dict_iter_init(&iter, rev_map);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&dep_name, (gpointer*)(void*)&value))
+       {
+               gboolean sensitive;
+               dep_object = gtk_builder_get_object (ud->builder, dep_name);
+               if (dep_object == NULL)
+               {
+                       g_message("Failed to find dependent widget %s", dep_name);
+                       continue;
+               }
+               sensitive = dep_check(ud, 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 gchar*
+expand_tilde(const gchar *path)
+{
+       const gchar *user_home;
+       gchar *home;
+       const gchar *suffix;
+       gchar *expanded_path = NULL;
+       
+       g_debug("expand_tilde ()");
+       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)
+{
+       gint state = ghb_get_queue_state();
+       g_debug("on_quit1_activate ()");
+       if (state & GHB_STATE_WORKING)
+       {
+               if (ghb_cancel_encode("Closing HandBrake will terminate encoding.\n"))
+               {
+                       ghb_hb_cleanup(FALSE);
+                       prune_logs(ud);
+                       gtk_main_quit();
+                       return;
+               }
+               return;
+       }
+       ghb_hb_cleanup(FALSE);
+       prune_logs(ud);
+       gtk_main_quit();
+}
+
+static void
+set_destination(signal_user_data_t *ud)
+{
+       g_debug("set_destination");
+       if (ghb_settings_get_boolean(ud->settings, "use_source_name"))
+       {
+               gchar *vol_name, *filename, *extension;
+               gchar *dir, *new_name;
+               
+               filename = ghb_settings_get_string(ud->settings, "destination");
+               extension = ghb_settings_get_string(ud->settings, "FileFormat");
+               dir = g_path_get_dirname (filename);
+               vol_name = ghb_settings_get_string(ud->settings, "volume_label");
+               if (ghb_settings_get_boolean(ud->settings, "chapters_in_destination"))
+               {
+                       gint start, end;
+
+                       start = ghb_settings_get_int(ud->settings, "start_chapter");
+                       end = ghb_settings_get_int(ud->settings, "end_chapter");
+                       if (start == end)
+                       {
+                               new_name = g_strdup_printf("%s/%s-%d.%s", 
+                                       dir, vol_name, start, extension);
+                       }
+                       else
+                       {
+                               new_name = g_strdup_printf("%s/%s-%d-%d.%s", 
+                                       dir, vol_name, start, end, extension);
+                       }
+               }
+               else
+               {
+                       new_name = g_strdup_printf("%s/%s.%s", dir, vol_name, extension);
+               }
+               ghb_ui_update(ud, "destination", ghb_string_value(new_name));
+               g_free(filename);
+               g_free(extension);
+               g_free(vol_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 gchar*
+get_file_label(const gchar *filename)
+{
+       static gchar *containers[] = 
+               {".vob", ".mpg", ".m2ts", ".mkv", ".mp4", ".m4v", ".avi", ".ogm", NULL};
+       gchar *base;
+       gint ii;
+
+       base = g_path_get_basename(filename);
+       for (ii = 0; containers[ii] != NULL; ii++)
+       {
+               if (g_str_has_suffix(base, containers[ii]))
+               {
+                       gchar *pos;
+                       pos = strrchr(base, '.');
+                       *pos = 0;
+                       break;
+               }
+       }
+       return base;
+}
+
+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)
+               {
+                       label = get_file_label(filename);
+               }
+               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 *folder;
+       
+       g_debug("source_type_changed_cb ()");
+       folder = gtk_file_chooser_get_current_folder (chooser);
+       if (gtk_toggle_button_get_active (toggle))
+       {
+               gtk_file_chooser_set_action (chooser, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
+               gtk_widget_set_sensitive (dvd_device_combo, FALSE);
+               gtk_combo_box_set_active (GTK_COMBO_BOX(dvd_device_combo), 0);
+       }
+       else
+       {
+               gtk_file_chooser_set_action (chooser, GTK_FILE_CHOOSER_ACTION_OPEN);
+               gtk_widget_set_sensitive (dvd_device_combo, TRUE);
+       }
+       if (folder != NULL)
+       {
+               gtk_file_chooser_set_current_folder(chooser, folder);
+               g_free(folder);
+       }
+}
+
+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);
+}
+
+extern GValue *ghb_queue_edit_settings;
+static gchar *last_scan_file = NULL;
+
+void
+ghb_do_scan(signal_user_data_t *ud, const gchar *filename, gboolean force)
+{
+       if (!force && last_scan_file != NULL &&
+               strcmp(last_scan_file, filename) == 0)
+       {
+               if (ghb_queue_edit_settings)
+               {
+                       gint jstatus;
+
+                       jstatus = ghb_settings_get_int(ghb_queue_edit_settings, "job_status");
+                       ghb_settings_to_ui(ud, ghb_queue_edit_settings);
+                       ghb_set_audio(ud, ghb_queue_edit_settings);
+                       if (jstatus == GHB_QUEUE_PENDING)
+                       {
+                               ghb_value_free(ghb_queue_edit_settings);
+                       }
+                       ghb_queue_edit_settings = NULL;
+               }
+               return;
+       }
+       if (last_scan_file != NULL)
+               g_free(last_scan_file);
+       last_scan_file = NULL;
+       if (filename != NULL)
+       {
+               last_scan_file = g_strdup(filename);
+               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"));
+                       gchar *path;
+                       path = ghb_settings_get_string( ud->settings, "source");
+                       gtk_progress_bar_set_fraction (progress, 0);
+                       gtk_progress_bar_set_text (progress, "Scanning ...");
+                       ghb_hb_cleanup(TRUE);
+                       prune_logs(ud);
+                       ghb_backend_scan (path, 0);
+                       g_free(path);
+               }
+               else
+               {
+                       // TODO: error dialog
+               }
+       }
+}
+
+void
+source_button_clicked_cb(GtkButton *button, signal_user_data_t *ud)
+{
+       GtkWidget *dialog;
+       GtkWidget *widget;
+       gchar *sourcename;
+       gint    response;
+       GtkFileChooserAction action;
+       gboolean checkbutton_active;
+
+       g_debug("source_browse_clicked_cb ()");
+       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_do_scan(ud, filename, TRUE);
+                       if (strcmp(sourcename, filename) != 0)
+                       {
+                               ghb_settings_set_string (ud->settings, "default_source", filename);
+                               ghb_pref_save (ud->settings, "default_source");
+                               ghb_dvd_set_current (filename, ud);
+                       }
+                       g_free(filename);
+               }
+       }
+       g_free(sourcename);
+       gtk_widget_destroy(dialog);
+}
+
+void
+dvd_source_activate_cb(GtkAction *action, signal_user_data_t *ud)
+{
+       const gchar *filename;
+       gchar *sourcename;
+
+       sourcename = ghb_settings_get_string(ud->settings, "source");
+       filename = gtk_action_get_name(action);
+       ghb_do_scan(ud, filename, TRUE);
+       if (strcmp(sourcename, filename) != 0)
+       {
+               ghb_settings_set_string (ud->settings, "default_source", filename);
+               ghb_pref_save (ud->settings, "default_source");
+               ghb_dvd_set_current (filename, ud);
+       }
+       g_free(sourcename);
+}
+
+static void
+update_destination_extension(signal_user_data_t *ud)
+{
+       static gchar *containers[] = {".mkv", ".mp4", ".m4v", ".avi", ".ogm", NULL};
+       gchar *filename;
+       gchar *extension;
+       gint ii;
+       GtkEntry *entry;
+
+       g_debug("update_destination_extension ()");
+       extension = ghb_settings_get_string(ud->settings, "FileFormat");
+       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, "." );
+                       if (pos == NULL)
+                       {
+                               // No period? shouldn't happen
+                               break;
+                       }
+                       *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", ghb_string_value(new_name));
+                       g_free(new_name);
+                       break;
+               }
+       }
+       g_free(extension);
+       g_free(filename);
+}
+
+static void
+destination_select_title(GtkEntry *entry)
+{
+       const gchar *dest;
+       gint start, end;
+
+       dest = gtk_entry_get_text(entry);
+       for (end = strlen(dest)-1; end > 0; end--)
+       {
+               if (dest[end] == '.')
+               {
+                       break;
+               }
+       }
+       for (start = end; start >= 0; start--)
+       {
+               if (dest[start] == '/')
+               {
+                       start++;
+                       break;
+               }
+       }
+       if (start < end)
+       {
+               gtk_editable_select_region(GTK_EDITABLE(entry), start, end);
+       }
+}
+
+gboolean
+destination_grab_cb(
+       GtkEntry *entry, 
+       signal_user_data_t *ud)
+{
+       destination_select_title(entry);
+       return FALSE;
+}
+
+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 ()");
+       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;
+       gchar *destname;
+       gchar *basename;
+
+       g_debug("destination_browse_clicked_cb ()");
+       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);
+       g_free(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", "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 ()");
+       ghb_hb_cleanup(FALSE);
+       prune_logs(ud);
+       gtk_main_quit();
+       return FALSE;
+}
+
+gboolean
+window_delete_event_cb(GtkWidget *widget, GdkEvent *event, signal_user_data_t *ud)
+{
+       gint state = ghb_get_queue_state();
+       g_debug("window_delete_event_cb ()");
+       if (state & GHB_STATE_WORKING)
+       {
+               if (ghb_cancel_encode("Closing HandBrake will terminate encoding.\n"))
+               {
+                       ghb_hb_cleanup(FALSE);
+                       prune_logs(ud);
+                       gtk_main_quit();
+                       return FALSE;
+               }
+               return TRUE;
+       }
+       ghb_hb_cleanup(FALSE);
+       prune_logs(ud);
+       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)
+{
+       const GValue *audio_list;
+       g_debug("container_changed_cb ()");
+       ghb_widget_to_setting(ud->settings, widget);
+       update_destination_extension(ud);
+       ghb_check_dependency(ud, widget);
+       update_acodec_combo(ud);
+       ghb_clear_presets_selection(ud);
+
+       audio_list = ghb_settings_get_value(ud->settings, "audio_list");
+       if (ghb_ac3_in_audio_list (audio_list))
+       {
+               gchar *container;
+
+               container = ghb_settings_get_string(ud->settings, "FileFormat");
+               if (strcmp(container, "mp4") == 0)
+               {
+                       ghb_ui_update(ud, "FileFormat", ghb_string_value("m4v"));
+               }
+               g_free(container);
+       }
+}
+
+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");
+       if (tinfo->duration != 0)
+       {
+               text = g_strdup_printf ("%02d:%02d:%02d", tinfo->hours, 
+                               tinfo->minutes, tinfo->seconds);
+       }
+       else
+       {
+               text = g_strdup_printf ("Unknown");
+       }
+       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);
+       ghb_settings_set_int(ud->settings, "source_width", tinfo->width);
+       ghb_settings_set_int(ud->settings, "source_height", tinfo->height);
+       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(ud, "scale_width", 
+               ghb_int64_value(tinfo->width - tinfo->crop[2] - tinfo->crop[3]));
+       // If anamorphic or keep_aspect, the hight will be automatically calculated
+       gboolean keep_aspect, anamorphic;
+       keep_aspect = ghb_settings_get_boolean(ud->settings, "PictureKeepRatio");
+       anamorphic = ghb_settings_get_boolean(ud->settings, "anamorphic");
+       if (!(keep_aspect || anamorphic))
+       {
+               ghb_ui_update(ud, "scale_height", 
+                       ghb_int64_value(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, "PictureTopCrop");
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+       widget = GHB_WIDGET (ud->builder, "PictureBottomCrop");
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+       bound = tinfo->width / 2 - 2;
+       widget = GHB_WIDGET (ud->builder, "PictureLeftCrop");
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+       widget = GHB_WIDGET (ud->builder, "PictureRightCrop");
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+       if (ghb_settings_get_boolean(ud->settings, "PictureAutoCrop"))
+       {
+               ghb_ui_update(ud, "PictureTopCrop", ghb_int64_value(tinfo->crop[0]));
+               ghb_ui_update(ud, "PictureBottomCrop", ghb_int64_value(tinfo->crop[1]));
+               ghb_ui_update(ud, "PictureLeftCrop", ghb_int64_value(tinfo->crop[2]));
+               ghb_ui_update(ud, "PictureRightCrop", ghb_int64_value(tinfo->crop[3]));
+       }
+       ghb_set_scale (ud, GHB_SCALE_KEEP_NONE);
+       gint width, height, crop[4];
+       crop[0] = ghb_settings_get_int(ud->settings, "PictureTopCrop");
+       crop[1] = ghb_settings_get_int(ud->settings, "PictureBottomCrop");
+       crop[2] = ghb_settings_get_int(ud->settings, "PictureLeftCrop");
+       crop[3] = ghb_settings_get_int(ud->settings, "PictureRightCrop");
+       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);
+
+       g_debug("setting max end chapter %d", 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);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 1, tinfo->num_chapters);
+}
+
+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 ()");
+       gint titleindex;
+
+       titleindex = ghb_settings_combo_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", 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;
+       
+       g_debug("title_changed_cb ()");
+       ghb_widget_to_setting(ud->settings, widget);
+       ghb_check_dependency(ud, widget);
+
+       titleindex = ghb_settings_combo_int(ud->settings, "title");
+       ghb_update_ui_combo_box (ud->builder, "AudioTrack", titleindex, FALSE);
+       ghb_update_ui_combo_box (ud->builder, "Subtitles", titleindex, FALSE);
+
+       ghb_update_from_preset(ud, "Subtitles");
+       if (ghb_get_title_info (&tinfo, titleindex))
+       {
+               show_title_info(ud, &tinfo);
+       }
+       update_chapter_list (ud);
+       ghb_adjust_audio_rate_combos(ud);
+       ghb_set_pref_audio(titleindex, ud);
+       if (ghb_settings_get_boolean(ud->settings, "vquality_type_target"))
+       {
+               gint bitrate = ghb_calculate_target_bitrate (ud->settings, titleindex);
+               ghb_ui_update(ud, "VideoAvgBitrate", ghb_int64_value(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(ud, "preview_frame", ghb_int64_value(1));
+
+       set_preview_image (ud);
+}
+
+void
+setting_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       ghb_widget_to_setting(ud->settings, widget);
+       ghb_check_dependency(ud, widget);
+       ghb_clear_presets_selection(ud);
+}
+
+static void
+validate_filter_widget(signal_user_data_t *ud, const gchar *name)
+{
+       GtkTreeModel *store;
+       GtkTreeIter iter;
+       const gchar *str;
+       gboolean foundit = FALSE;
+       GtkComboBox *combo = GTK_COMBO_BOX(GHB_WIDGET(ud->builder, name));
+       if (gtk_combo_box_get_active(combo) < 0)
+       { // Validate user input
+               gchar *val = ghb_settings_get_string(ud->settings, name);
+               store = gtk_combo_box_get_model(combo);
+               // Check to see if user manually entered one of the combo options
+               if (gtk_tree_model_get_iter_first(store, &iter))
+               {
+                       do
+                       {
+                               gtk_tree_model_get(store, &iter, 0, &str, -1);
+                               if (strcasecmp(val, str) == 0)
+                               {
+                                       gtk_combo_box_set_active_iter(combo, &iter);
+                                       foundit = TRUE;
+                                       break;
+                               }
+                       } while (gtk_tree_model_iter_next(store, &iter));
+               }
+               if (!foundit)
+               { // validate format of filter string
+                       if (!ghb_validate_filter_string(val, -1))
+                               gtk_combo_box_set_active(combo, 0);
+               }
+               g_free(val);
+       }
+}
+
+gboolean
+deint_tweak_focus_out_cb(GtkWidget *widget, GdkEventFocus *event, 
+       signal_user_data_t *ud)
+{
+       g_debug("deint_tweak_focus_out_cb ()");
+       validate_filter_widget(ud, "tweak_PictureDeinterlace");
+       return FALSE;
+}
+
+gboolean
+denoise_tweak_focus_out_cb(GtkWidget *widget, GdkEventFocus *event, 
+       signal_user_data_t *ud)
+{
+       g_debug("denoise_tweak_focus_out_cb ()");
+       validate_filter_widget(ud, "tweak_PictureDenoise");
+       return FALSE;
+}
+
+void
+http_opt_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       ghb_widget_to_setting(ud->settings, widget);
+       ghb_check_dependency(ud, widget);
+       ghb_clear_presets_selection(ud);
+       // AC3 is not allowed when Web optimized
+       ghb_grey_combo_options (ud->builder);
+}
+
+void
+vcodec_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       gdouble vqmin, vqmax, step, page;
+       gint digits;
+       gint vcodec;
+
+       ghb_widget_to_setting(ud->settings, widget);
+       ghb_check_dependency(ud, widget);
+       ghb_clear_presets_selection(ud);
+       ghb_vquality_range(ud, &vqmin, &vqmax, &step, &page, &digits);
+       GtkWidget *qp = GHB_WIDGET(ud->builder, "VideoQualitySlider");
+       gtk_range_set_range (GTK_RANGE(qp), vqmin, vqmax);
+       gtk_range_set_increments (GTK_RANGE(qp), step, page);
+       gtk_scale_set_digits(GTK_SCALE(qp), digits);
+       vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder");
+       if (vcodec != HB_VCODEC_X264 && vcodec != HB_VCODEC_FFMPEG)
+       {
+               ghb_ui_update(ud, "directqp", ghb_boolean_value(FALSE));
+       }
+}
+
+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", name);
+       ghb_widget_to_setting(ud->settings, widget);
+       ghb_check_dependency(ud, widget);
+       ghb_clear_presets_selection(ud);
+       if (ghb_settings_get_boolean(ud->settings, "vquality_type_target"))
+       {
+               gint titleindex;
+               titleindex = ghb_settings_combo_int(ud->settings, "title");
+               gint bitrate = ghb_calculate_target_bitrate (ud->settings, titleindex);
+               ghb_ui_update(ud, "VideoAvgBitrate", ghb_int64_value(bitrate));
+       }
+}
+
+void
+start_chapter_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       gint start, end;
+       const gchar *name = gtk_widget_get_name(widget);
+
+       g_debug("start_chapter_changed_cb () %s", name);
+       ghb_widget_to_setting(ud->settings, widget);
+       start = ghb_settings_get_int(ud->settings, "start_chapter");
+       end = ghb_settings_get_int(ud->settings, "end_chapter");
+       if (start > end)
+               ghb_ui_update(ud, "end_chapter", ghb_int_value(start));
+       ghb_check_dependency(ud, widget);
+       if (ghb_settings_get_boolean(ud->settings, "chapters_in_destination"))
+       {
+               set_destination(ud);
+       }
+}
+
+void
+end_chapter_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       gint start, end;
+       const gchar *name = gtk_widget_get_name(widget);
+
+       g_debug("end_chapter_changed_cb () %s", name);
+       ghb_widget_to_setting(ud->settings, widget);
+       start = ghb_settings_get_int(ud->settings, "start_chapter");
+       end = ghb_settings_get_int(ud->settings, "end_chapter");
+       if (start > end)
+               ghb_ui_update(ud, "start_chapter", ghb_int_value(end));
+       ghb_check_dependency(ud, widget);
+       if (ghb_settings_get_boolean(ud->settings, "chapters_in_destination"))
+       {
+               set_destination(ud);
+       }
+}
+
+void
+scale_width_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       g_debug("scale_width_changed_cb ()");
+       ghb_widget_to_setting(ud->settings, widget);
+       ghb_check_dependency(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 ()");
+       ghb_widget_to_setting(ud->settings, widget);
+       ghb_check_dependency(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 ()");
+       ghb_widget_to_setting(ud->settings, widget);
+       ghb_check_dependency(ud, widget);
+       ghb_set_scale (ud, GHB_SCALE_KEEP_NONE);
+
+       crop[0] = ghb_settings_get_int(ud->settings, "PictureTopCrop");
+       crop[1] = ghb_settings_get_int(ud->settings, "PictureBottomCrop");
+       crop[2] = ghb_settings_get_int(ud->settings, "PictureLeftCrop");
+       crop[3] = ghb_settings_get_int(ud->settings, "PictureRightCrop");
+       titleindex = ghb_settings_combo_int(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 ()");
+       ghb_widget_to_setting(ud->settings, widget);
+       ghb_check_dependency(ud, widget);
+       ghb_clear_presets_selection(ud);
+       ghb_set_scale (ud, GHB_SCALE_KEEP_NONE);
+       update_preview = TRUE;
+       
+       gchar *text;
+       
+       text = ghb_settings_get_boolean(ud->settings, "PictureAutoCrop") ? "On" : "Off";
+       widget = GHB_WIDGET (ud->builder, "crop_auto");
+       gtk_label_set_text (GTK_LABEL(widget), text);
+       text = ghb_settings_get_boolean(ud->settings, "autoscale") ? "On" : "Off";
+       widget = GHB_WIDGET (ud->builder, "scale_auto");
+       gtk_label_set_text (GTK_LABEL(widget), text);
+       text = ghb_settings_get_boolean(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 ()");
+       if (!GTK_WIDGET_HAS_FOCUS((GtkWidget*)entry))
+       {
+               ghb_widget_to_setting(ud->settings, (GtkWidget*)entry);
+       }
+}
+
+void
+prefs_dialog_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+       GtkWidget *dialog;
+       GtkResponseType response;
+
+       g_debug("prefs_dialog_cb ()");
+       dialog = GHB_WIDGET(ud->builder, "prefs_dialog");
+       response = gtk_dialog_run(GTK_DIALOG(dialog));
+       gtk_widget_hide(dialog);
+}
+
+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,
+                                                       "%s", 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;
+}
+
+gboolean
+ghb_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;
+}
+
+static void
+submit_job(GValue *settings)
+{
+       static gint unique_id = 1;
+       gchar *type, *modified, *preset;
+       GValue *path;
+       gboolean preset_modified;
+
+       g_debug("submit_job");
+       if (settings == NULL) return;
+       preset_modified = ghb_settings_get_boolean(settings, "preset_modified");
+       path = ghb_settings_get_value(settings, "preset");
+       preset = ghb_preset_path_string(path);
+       type = ghb_preset_is_custom() ? "Custom " : "";
+       modified = preset_modified ? "Modified " : "";
+       ghb_log("%s%sPreset: %s", modified, type, preset);
+       g_free(preset);
+
+       ghb_settings_set_int(settings, "job_unique_id", unique_id);
+       ghb_settings_set_int(settings, "job_status", GHB_QUEUE_RUNNING);
+       ghb_add_job (settings, unique_id);
+       ghb_start_queue();
+       unique_id++;
+}
+
+static void
+prune_logs(signal_user_data_t *ud)
+{
+       gchar *dest_dir;
+
+       // Only prune logs stored in the default config dir location
+       dest_dir = ghb_get_user_config_dir("EncodeLogs");
+       if (g_file_test(dest_dir, G_FILE_TEST_IS_DIR))
+       {
+               const gchar *file;
+               int week = 7*24*60*60;
+               GDir *gdir = g_dir_open(dest_dir, 0, NULL);
+               time_t now;
+
+               now = time(NULL);
+               file = g_dir_read_name(gdir);
+               while (file)
+               {
+                       gchar *path;
+                       struct stat stbuf;
+
+                       path = g_strdup_printf("%s/%s", dest_dir, file);
+                       g_stat(path, &stbuf);
+                       if (now - stbuf.st_mtime > week)
+                       {
+                               g_unlink(path);
+                       }
+                       g_free(path);
+                       file = g_dir_read_name(gdir);
+               }
+               g_dir_close(gdir);
+       }
+       g_free(dest_dir);
+}
+
+static void
+queue_scan(signal_user_data_t *ud, GValue *js)
+{
+       gchar *path;
+       gint titlenum;
+       time_t  _now;
+       struct tm *now;
+       gchar *log_path, *pos, *destname, *basename, *dest_dir;
+
+       _now = time(NULL);
+       now = localtime(&_now);
+       destname = ghb_settings_get_string(js, "destination");
+       basename = g_path_get_basename(destname);
+       if (ghb_settings_get_boolean(ud->settings, "EncodeLogLocation"))
+       {
+               dest_dir = g_path_get_dirname (destname);
+       }
+       else
+       {
+               dest_dir = ghb_get_user_config_dir("EncodeLogs");
+       }
+       g_free(destname);
+       pos = g_strrstr( basename, "." );
+       if (pos != NULL)
+       {
+               *pos = 0;
+       }
+       log_path = g_strdup_printf("%s/%d-%02d-%02d %02d-%02d-%02d %s.log",
+               dest_dir,
+               now->tm_year + 1900, now->tm_mon + 1, now->tm_mday,
+               now->tm_hour, now->tm_min, now->tm_sec, basename);
+       g_free(basename);
+       g_free(dest_dir);
+       if (ud->job_activity_log)
+               g_io_channel_unref(ud->job_activity_log);
+       ud->job_activity_log = g_io_channel_new_file (log_path, "w", NULL);
+       if (ud->job_activity_log)
+       {
+               gchar *ver_str;
+
+               ver_str = g_strdup_printf("Handbrake Version: %s (%d)\n", 
+                                                                       HB_VERSION, HB_BUILD);
+               g_io_channel_write_chars (ud->job_activity_log, ver_str, 
+                                                                       -1, NULL, NULL);
+               g_free(ver_str);
+       }
+       g_free(log_path);
+
+       path = ghb_settings_get_string( js, "source");
+       titlenum = ghb_settings_get_int(js, "titlenum");
+       ghb_backend_queue_scan(path, titlenum);
+       g_free(path);
+}
+
+GValue* 
+ghb_start_next_job(signal_user_data_t *ud, gboolean find_first)
+{
+       static gint current = 0;
+       gint count, ii, jj;
+       GValue *js;
+       gint status;
+
+       g_debug("start_next_job");
+       count = ghb_array_len(ud->queue);
+       if (find_first)
+       {       // Start the first pending item in the queue
+               current = 0;
+               for (ii = 0; ii < count; ii++)
+               {
+
+                       js = ghb_array_get_nth(ud->queue, ii);
+                       status = ghb_settings_get_int(js, "job_status");
+                       if (status == GHB_QUEUE_PENDING)
+                       {
+                               current = ii;
+                               queue_scan(ud, js);
+                               return js;
+                       }
+               }
+               // Nothing pending
+               return NULL;
+       }
+       // Find the next pending item after the current running item
+       for (ii = 0; ii < count-1; ii++)
+       {
+               js = ghb_array_get_nth(ud->queue, ii);
+               status = ghb_settings_get_int(js, "job_status");
+               if (status == GHB_QUEUE_RUNNING)
+               {
+                       for (jj = ii+1; jj < count; jj++)
+                       {
+                               js = ghb_array_get_nth(ud->queue, jj);
+                               status = ghb_settings_get_int(js, "job_status");
+                               if (status == GHB_QUEUE_PENDING)
+                               {
+                                       current = jj;
+                                       queue_scan(ud, js);
+                                       return js;
+                               }
+                       }
+               }
+       }
+       // No running item found? Maybe it was deleted
+       // Look for a pending item starting from the last index we started
+       for (ii = current; ii < count; ii++)
+       {
+               js = ghb_array_get_nth(ud->queue, ii);
+               status = ghb_settings_get_int(js, "job_status");
+               if (status == GHB_QUEUE_PENDING)
+               {
+                       current = ii;
+                       queue_scan(ud, js);
+                       return js;
+               }
+       }
+       // Nothing found
+       return NULL;
+}
+
+static gint
+find_queue_job(GValue *queue, gint unique_id, GValue **job)
+{
+       GValue *js;
+       gint ii, count;
+       gint job_unique_id;
+       
+       *job = NULL;
+       g_debug("find_queue_job");
+       count = ghb_array_len(queue);
+       for (ii = 0; ii < count; ii++)
+       {
+               js = ghb_array_get_nth(queue, ii);
+               job_unique_id = ghb_settings_get_int(js, "job_unique_id");
+               if (job_unique_id == unique_id)
+               {
+                       *job = js;
+                       return ii;
+               }
+       }
+       return -1;
+}
+
+gchar*
+working_status_string(signal_user_data_t *ud, ghb_status_t *status)
+{
+       gchar *task_str, *job_str, *status_str;
+       gint qcount;
+       gint index;
+       GValue *js;
+
+       if (status->job_count > 1)
+       {
+               task_str = g_strdup_printf("pass %d of %d, ", 
+                       status->job_cur, status->job_count);
+       }
+       else
+       {
+               task_str = g_strdup("");
+       }
+       qcount = ghb_array_len(ud->queue);
+       if (qcount > 1)
+       {
+               index = find_queue_job(ud->queue, status->unique_id, &js);
+               job_str = g_strdup_printf("job %d of %d, ", index+1, qcount);
+       }
+       else
+       {
+               job_str = g_strdup("");
+       }
+       if(status->seconds > -1)
+       {
+               status_str= g_strdup_printf(
+                       "Encoding: %s%s%.2f %%"
+                       " (%.2f fps, avg %.2f fps, ETA %02dh%02dm%02ds)",
+                       job_str, task_str,
+                       100.0 * status->progress,
+                       status->rate_cur, status->rate_avg, status->hours, 
+                       status->minutes, status->seconds );
+       }
+       else
+       {
+               status_str= g_strdup_printf(
+                       "Encoding: %s%s%.2f %%",
+                       job_str, task_str,
+                       100.0 * status->progress );
+       }
+       g_free(task_str);
+       g_free(job_str);
+       return status_str;
+}
+
+static void
+ghb_backend_events(signal_user_data_t *ud)
+{
+       ghb_status_t status;
+       gchar *status_str;
+       GtkProgressBar *progress;
+       gint titleindex;
+       GValue *js;
+       gint index;
+       GtkTreeView *treeview;
+       GtkTreeStore *store;
+       GtkTreeIter iter;
+       static gint working = 0;
+       static gboolean work_started = FALSE;
+       
+       ghb_track_status();
+       ghb_get_status(&status);
+       progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "progressbar"));
+       // First handle the status of title scans
+       // Then handle the status of the queue
+       if (status.state & GHB_STATE_SCANNING)
+       {
+               if (status.title_cur == 0)
+               {
+                       status_str = g_strdup ("Scanning...");
+               }
+               else
+               {
+                       status_str = g_strdup_printf ("Scanning title %d of %d...", 
+                                                                 status.title_cur, status.title_count );
+               }
+               gtk_progress_bar_set_text (progress, status_str);
+               g_free(status_str);
+               if (status.title_count > 0)
+               {
+                       gtk_progress_bar_set_fraction (progress, 
+                               (gdouble)status.title_cur / status.title_count);
+               }
+       }
+       else if (status.state & GHB_STATE_SCANDONE)
+       {
+               status_str = g_strdup_printf ("Scan done"); 
+               gtk_progress_bar_set_text (progress, status_str);
+               g_free(status_str);
+               gtk_progress_bar_set_fraction (progress, 1.0);
+
+               ghb_title_info_t tinfo;
+                       
+               ghb_update_ui_combo_box(ud->builder, "title", 0, FALSE);
+               titleindex = ghb_longest_title();
+               ghb_ui_update(ud, "title", ghb_int64_value(titleindex));
+
+               // Are there really any titles.
+               if (!ghb_get_title_info(&tinfo, titleindex))
+               {
+                       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");
+               }
+               ghb_clear_state(GHB_STATE_SCANDONE);
+               ghb_queue_buttons_grey(ud, work_started);
+               if (ghb_queue_edit_settings)
+               {
+                       gint jstatus;
+
+                       jstatus = ghb_settings_get_int(ghb_queue_edit_settings, "job_status");
+                       ghb_settings_to_ui(ud, ghb_queue_edit_settings);
+                       ghb_set_audio(ud, ghb_queue_edit_settings);
+                       if (jstatus == GHB_QUEUE_PENDING)
+                       {
+                               ghb_value_free(ghb_queue_edit_settings);
+                       }
+                       ghb_queue_edit_settings = NULL;
+               }
+       }
+       else if (status.queue_state & GHB_STATE_SCANNING)
+       {
+               status_str = g_strdup_printf ("Scanning ...");
+               gtk_progress_bar_set_text (progress, status_str);
+               g_free(status_str);
+               gtk_progress_bar_set_fraction (progress, 0);
+       }
+       else if (status.queue_state & GHB_STATE_SCANDONE)
+       {
+               ghb_clear_queue_state(GHB_STATE_SCANDONE);
+               submit_job(ud->current_job);
+       }
+       else if (status.queue_state & GHB_STATE_PAUSED)
+       {
+               status_str = g_strdup_printf ("Paused"); 
+               gtk_progress_bar_set_text (progress, status_str);
+               g_free(status_str);
+       }
+       else if (status.queue_state & GHB_STATE_WORKING)
+       {
+               status_str = working_status_string(ud, &status);
+               gtk_progress_bar_set_text (progress, status_str);
+               gtk_progress_bar_set_fraction (progress, status.progress);
+               g_free(status_str);
+       }
+       else if (status.queue_state & GHB_STATE_WORKDONE)
+       {
+               gint qstatus;
+
+               work_started = FALSE;
+               ghb_queue_buttons_grey(ud, FALSE);
+               index = find_queue_job(ud->queue, status.unique_id, &js);
+               treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
+               store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+               if (ud->cancel_encode)
+                       status.error = GHB_ERROR_CANCELED;
+               switch( status.error )
+               {
+                       case GHB_ERROR_NONE:
+                               gtk_progress_bar_set_text( progress, "Rip done!" );
+                               qstatus = GHB_QUEUE_DONE;
+                               if (js != NULL)
+                               {
+                                       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);
+                               }
+                               break;
+                       case GHB_ERROR_CANCELED:
+                               gtk_progress_bar_set_text( progress, "Rip canceled." );
+                               qstatus = GHB_QUEUE_CANCELED;
+                               if (js != NULL)
+                               {
+                                       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);
+                               }
+                               break;
+                       default:
+                               gtk_progress_bar_set_text( progress, "Rip failed.");
+                               qstatus = GHB_QUEUE_CANCELED;
+                               if (js != NULL)
+                               {
+                                       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);
+                               }
+               }
+               gtk_progress_bar_set_fraction (progress, 1.0);
+               ghb_clear_queue_state(GHB_STATE_WORKDONE);
+               if (!ud->cancel_encode)
+                       ud->current_job = ghb_start_next_job(ud, FALSE);
+               else
+                       ud->current_job = NULL;
+               if (js)
+                       ghb_settings_set_int(js, "job_status", qstatus);
+               ghb_save_queue(ud->queue);
+               ud->cancel_encode = FALSE;
+               g_io_channel_unref(ud->job_activity_log);
+               ud->job_activity_log = NULL;
+       }
+       else if (status.queue_state & GHB_STATE_MUXING)
+       {
+               gtk_progress_bar_set_text(progress, "Muxing: this may take awhile...");
+       }
+       if (status.queue_state & GHB_STATE_SCANNING)
+       {
+               // This needs to be in scanning and working since scanning
+               // happens fast enough that it can be missed
+               if (!work_started)
+               {
+                       work_started = TRUE;
+                       ghb_queue_buttons_grey(ud, TRUE);
+               }
+       }
+       if (status.queue_state & GHB_STATE_WORKING)
+       {
+               // This needs to be in scanning and working since scanning
+               // happens fast enough that it can be missed
+               if (!work_started)
+               {
+                       work_started = TRUE;
+                       ghb_queue_buttons_grey(ud, TRUE);
+               }
+               index = find_queue_job(ud->queue, status.unique_id, &js);
+               if (status.unique_id != 0 && 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);
+               }
+               GtkLabel *label;
+               gchar *status_str;
+
+               status_str = working_status_string(ud, &status);
+               label = GTK_LABEL(GHB_WIDGET(ud->builder, "queue_status"));
+               gtk_label_set_text (label, status_str);
+               g_free(status_str);
+       }
+}
+
+gboolean
+ghb_timer_cb(gpointer data)
+{
+       signal_user_data_t *ud = (signal_user_data_t*)data;
+
+       ghb_backend_events(ud);
+       if (update_default_destination)
+       {
+               gchar *dest, *dest_dir, *def_dest;
+               dest = ghb_settings_get_string(ud->settings, "destination");
+               dest_dir = g_path_get_dirname (dest);
+               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_pref_save (ud->settings, "destination_dir");
+               }
+               g_free(dest);
+               g_free(dest_dir);
+               g_free(def_dest);
+               update_default_destination = FALSE;
+       }
+       if (update_preview)
+       {
+               set_preview_image (ud);
+               update_preview = FALSE;
+       }
+       return TRUE;
+}
+
+gboolean
+ghb_log_cb(GIOChannel *source, GIOCondition cond, gpointer data)
+{
+       gchar *text = NULL;
+       gsize length;
+       GtkTextView *textview;
+       GtkTextBuffer *buffer;
+       GtkTextIter iter;
+       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)
+       {
+               GdkWindow *window;
+               gint width, height;
+               gint x, y;
+               gboolean bottom = FALSE;
+
+               textview = GTK_TEXT_VIEW(GHB_WIDGET (ud->builder, "activity_view"));
+               buffer = gtk_text_view_get_buffer (textview);
+               // I would like to auto-scroll the window when the scrollbar
+               // is at the bottom, 
+               // must determining whether the insert point is at
+               // the bottom of the window 
+               window = gtk_text_view_get_window(textview, GTK_TEXT_WINDOW_TEXT);
+               if (window != NULL)
+               {
+                       gdk_drawable_get_size(GDK_DRAWABLE(window), &width, &height);
+                       gtk_text_view_window_to_buffer_coords(textview, 
+                               GTK_TEXT_WINDOW_TEXT, width, height, &x, &y);
+                       gtk_text_view_get_iter_at_location(textview, &iter, x, y);
+                       if (gtk_text_iter_is_end(&iter))
+                       {
+                               bottom = TRUE;
+                       }
+               }
+               else
+               {
+                       // If the window isn't available, assume bottom
+                       bottom = TRUE;
+               }
+               gtk_text_buffer_get_end_iter(buffer, &iter);
+               gtk_text_buffer_insert(buffer, &iter, text, -1);
+               if (bottom)
+               {
+                       //gtk_text_view_scroll_to_iter(textview, &iter, 0, FALSE, 0, 0);
+                       mark = gtk_text_buffer_get_insert (buffer);
+                       gtk_text_view_scroll_mark_onscreen(textview, mark);
+               }
+               g_io_channel_write_chars (ud->activity_log, text, 
+                                                               length, &length, NULL);
+               if (ud->job_activity_log)
+                       g_io_channel_write_chars (ud->job_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");
+               if (gerror != NULL)
+               {
+                       g_warning("%s", gerror->message);
+                       g_error_free (gerror);
+               }
+               return FALSE;
+       }
+       if (gerror != NULL)
+               g_error_free (gerror);
+       return TRUE;
+}
+
+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
+ghb_log(gchar *log, ...)
+{
+       va_list args;
+       time_t _now;
+    struct tm *now;
+       gchar fmt[362];
+
+       _now = time(NULL);
+       now = localtime( &_now );
+       snprintf(fmt, 362, "[%02d:%02d:%02d] lingui: %s\n", 
+                       now->tm_hour, now->tm_min, now->tm_sec, log);
+       va_start(args, log);
+       vfprintf(stderr, fmt, args);
+       va_end(args);
+}
+
+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);
+}
+
+static void
+browse_url(const gchar *url)
+{
+       gboolean result;
+       char *argv[] = 
+               {"xdg-open",NULL,NULL,NULL};
+       argv[1] = (gchar*)url;
+       result = g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL,
+                               NULL, NULL, NULL);
+       if (result) return;
+
+       argv[0] = "gnome-open";
+       result = g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL,
+                               NULL, NULL, NULL);
+       if (result) return;
+
+       argv[0] = "kfmclient";
+       argv[1] = "exec";
+       argv[2] = "http://trac.handbrake.fr/wiki/HandBrakeGuide";
+       result = g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL,
+                               NULL, NULL, NULL);
+       if (result) return;
+
+       argv[0] = "firefox";
+       argv[1] = "http://trac.handbrake.fr/wiki/HandBrakeGuide";
+       argv[2] = NULL;
+       result = g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL,
+                               NULL, NULL, NULL);
+}
+
+void
+guide_activate_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+       browse_url("http://trac.handbrake.fr/wiki/HandBrakeGuide");
+}
+
+void
+hb_about_response_cb(GtkWidget *widget, gint response, signal_user_data_t *ud)
+{
+       gtk_widget_hide (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 ()");
+       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_pref_save(ud->settings, "show_presets");
+}
+
+static void
+update_chapter_list(signal_user_data_t *ud)
+{
+       GtkTreeView *treeview;
+       GtkTreeIter iter;
+       GtkListStore *store;
+       gboolean done;
+       GValue *chapters;
+       gint titleindex, ii;
+       gint count;
+       
+       g_debug("update_chapter_list ()");
+       titleindex = ghb_settings_combo_int(ud->settings, "title");
+       chapters = ghb_get_chapters(titleindex);
+       count = ghb_array_len(chapters);
+       if (chapters)
+               ghb_settings_set_value(ud->settings, "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 (ii < count)
+                       {
+                               gchar *chapter;
+
+                               // Update row with settings data
+                               g_debug("Updating row");
+                               chapter = ghb_value_string(ghb_array_get_nth(chapters, ii));
+                               gtk_list_store_set(store, &iter, 
+                                       0, ii+1,
+                                       1, chapter,
+                                       2, TRUE,
+                                       -1);
+                               g_free(chapter);
+                               ii++;
+                               done = !gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter);
+                       }
+                       else
+                       {
+                               // No more settings data, remove row
+                               g_debug("Removing row");
+                               done = !gtk_list_store_remove(store, &iter);
+                       }
+               } while (!done);
+       }
+       while (ii < count)
+       {
+               gchar *chapter;
+
+               // Additional settings, add row
+               g_debug("Adding row");
+               chapter = ghb_value_string(ghb_array_get_nth(chapters, ii));
+               gtk_list_store_append(store, &iter);
+               gtk_list_store_set(store, &iter, 
+                       0, ii+1,
+                       1, chapter,
+                       2, TRUE,
+                       -1);
+               g_free(chapter);
+               ii++;
+       }
+}
+
+static gint chapter_edit_key = 0;
+
+gboolean
+chapter_keypress_cb(
+       GhbCellRendererText *cell,
+       GdkEventKey *event,
+       signal_user_data_t *ud)
+{
+       chapter_edit_key = event->keyval;
+       return FALSE;
+}
+
+void
+chapter_edited_cb(
+       GhbCellRendererText *cell, 
+       gchar *path, 
+       gchar *text, 
+       signal_user_data_t *ud)
+{
+       GtkTreePath *treepath;
+       GtkListStore *store;
+       GtkTreeView *treeview;
+       GtkTreeIter iter;
+       gint index;
+       gint *pi;
+       gint row;
+       
+       g_debug("chapter_edited_cb ()");
+       g_debug("path (%s)", path);
+       g_debug("text (%s)", 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);
+       pi = gtk_tree_path_get_indices(treepath);
+       row = pi[0];
+       gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, treepath);
+       gtk_list_store_set(store, &iter, 
+               1, text,
+               2, TRUE,
+               -1);
+       gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 0, &index, -1);
+
+       GValue *chapters;
+       GValue *chapter;
+
+       chapters = ghb_settings_get_value(ud->settings, "chapter_list");
+       chapter = ghb_array_get_nth(chapters, index-1);
+       g_value_set_string(chapter, text);
+       if ((chapter_edit_key == GDK_Return || chapter_edit_key == GDK_Down) &&
+               gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter))
+       {
+               GtkTreeViewColumn *column;
+
+               gtk_tree_path_next(treepath);
+               // When a cell has been edited, I want to advance to the
+               // next cell and start editing it automaitcally.
+               // Unfortunately, we may not be in a state here where
+               // editing is allowed.  This happens when the user selects
+               // a new cell with the mouse instead of just hitting enter.
+               // Some kind of Gtk quirk.  widget_editable==NULL assertion.
+               // Editing is enabled again once the selection event has been
+               // processed.  So I'm queueing up a callback to be called
+               // when things go idle.  There, I will advance to the next
+               // cell and initiate editing.
+               //
+               // Now, you might be asking why I don't catch the keypress
+               // event and determine what action to take based on that.
+               // The Gtk developers in their infinite wisdom have made the 
+               // actual GtkEdit widget being used a private member of
+               // GtkCellRendererText, so it can not be accessed to hang a
+               // signal handler off of.  And they also do not propagate the
+               // keypress signals in any other way.  So that information is lost.
+               //g_idle_add((GSourceFunc)next_cell, ud);
+               //
+               // Keeping the above comment for posterity.
+               // I got industrious and made my own CellTextRendererText that
+               // passes on the key-press-event. So now I have much better
+               // control of this.
+               column = gtk_tree_view_get_column(treeview, 1);
+               gtk_tree_view_set_cursor(treeview, treepath, column, TRUE);
+       }
+       else if (chapter_edit_key == GDK_Up && row > 0)
+       {
+               GtkTreeViewColumn *column;
+               gtk_tree_path_prev(treepath);
+               column = gtk_tree_view_get_column(treeview, 1);
+               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)
+{
+       g_debug("chapter_list_selection_changed_cb ()");
+       //chapter_selection_changed = TRUE;
+}
+
+void
+preview_button_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+       gint titleindex;
+
+       titleindex = ghb_settings_combo_int(ud->settings, "title");
+       if (titleindex < 0) return;
+       g_debug("titleindex %d", 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", 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");
+               return;
+       }
+       g_debug("-------------------------------prev allocate %d x %d", preview_button_width, preview_button_height);
+       preview_button_width = allocation->width;
+       preview_button_height = allocation->height;
+       set_preview_image(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");
+       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");
+       ghb_widget_to_setting (ud->settings, widget);
+       gboolean hbfd = ghb_settings_get_boolean(ud->settings, "hbfd");
+       ghb_hbfd(ud, hbfd);
+       ghb_pref_save(ud->settings, "hbfd");
+}
+
+void
+pref_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       g_debug("pref_changed_cb");
+       ghb_widget_to_setting (ud->settings, widget);
+       ghb_check_dependency(ud, widget);
+       const gchar *name = gtk_widget_get_name(widget);
+       ghb_pref_save(ud->settings, name);
+}
+
+void
+tweaks_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       g_debug("tweaks_changed_cb");
+       ghb_widget_to_setting (ud->settings, widget);
+       const gchar *name = gtk_widget_get_name(widget);
+       ghb_pref_save(ud->settings, name);
+
+       gboolean tweaks = ghb_settings_get_boolean(ud->settings, "allow_tweaks");
+       widget = GHB_WIDGET(ud->builder, "PictureDeinterlace");
+       tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget);
+       widget = GHB_WIDGET(ud->builder, "tweak_PictureDeinterlace");
+       !tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget);
+
+       widget = GHB_WIDGET(ud->builder, "PictureDenoise");
+       tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget);
+       widget = GHB_WIDGET(ud->builder, "tweak_PictureDenoise");
+       !tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget);
+       if (tweaks)
+       {
+               const GValue *value;
+               value = ghb_settings_get_value(ud->settings, "PictureDeinterlace");
+               ghb_ui_update(ud, "tweak_PictureDeinterlace", value);
+               value = ghb_settings_get_value(ud->settings, "PictureDenoise");
+               ghb_ui_update(ud, "tweak_PictureDenoise", value);
+       }
+       else
+       {
+               const GValue *value;
+               value = ghb_settings_get_value(ud->settings, "tweak_PictureDeinterlace");
+               ghb_ui_update(ud, "PictureDeinterlace", value);
+               value = ghb_settings_get_value(ud->settings, "tweak_PictureDenoise");
+               ghb_ui_update(ud, "PictureDenoise", value);
+       }
+}
+
+void
+hbfd_feature_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       g_debug("hbfd_feature_changed_cb");
+       ghb_widget_to_setting (ud->settings, widget);
+       const gchar *name = gtk_widget_get_name(widget);
+       ghb_pref_save(ud->settings, name);
+
+       gboolean hbfd = ghb_settings_get_boolean(ud->settings, "hbfd_feature");
+       GtkAction *action;
+       if (hbfd)
+       {
+               const GValue *val;
+               val = ghb_settings_get_value(ud->settings, "hbfd");
+               ghb_ui_update(ud, "hbfd", val);
+       }
+       action = GHB_ACTION (ud->builder, "hbfd");
+       gtk_action_set_visible(action, hbfd);
+}
+
+void
+ghb_file_menu_add_dvd(signal_user_data_t *ud)
+{
+       GList *link, *drives;
+
+       GtkActionGroup *agroup = GTK_ACTION_GROUP(
+               gtk_builder_get_object(ud->builder, "actiongroup1"));
+       GtkUIManager *ui = GTK_UI_MANAGER(
+               gtk_builder_get_object(ud->builder, "uimanager1"));
+       guint merge_id = gtk_ui_manager_new_merge_id(ui);
+
+       link = drives = dvd_device_list();
+       while (link != NULL)
+       {
+               gchar *name = (gchar*)link->data;
+               // Create action for this drive
+               GtkAction *action = gtk_action_new(name, name,
+                       "Scan this DVD source", "gtk-cdrom");
+               // Add action to action group
+               gtk_action_group_add_action_with_accel(agroup, action, "");
+               // Add to ui manager
+               gtk_ui_manager_add_ui(ui, merge_id, 
+                       "ui/menubar1/menuitem1/quit1", name, name,
+                       GTK_UI_MANAGER_AUTO, TRUE);
+               // Connect signal to action (menu item)
+               g_signal_connect(action, "activate", 
+                       (GCallback)dvd_source_activate_cb, ud);
+               g_free(name);
+               link = link->next;
+       }
+       g_list_free(drives);
+
+       // Add separator
+       gtk_ui_manager_add_ui(ui, merge_id, 
+               "ui/menubar1/menuitem1/quit1", "", NULL,
+               GTK_UI_MANAGER_AUTO, TRUE);
+}
+
+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);
+       libhal_drive_free(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;
+       gint state = ghb_get_state();
+       static gboolean first_time = TRUE;
+
+       if (ud->current_dvd_device == NULL) return;
+       // A drive change event happens when the program initially starts
+       // and I don't want to automatically scan at that time.
+       if (first_time)
+       {
+               first_time = FALSE;
+               return;
+       }
+       if (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);
+                       ghb_hb_cleanup(TRUE);
+                       prune_logs(ud);
+                       ghb_backend_scan(device, 0);
+               }
+               else
+               {
+                       ghb_hb_cleanup(TRUE);
+                       prune_logs(ud);
+                       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", 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");
+}
+
+gboolean 
+tweak_setting_cb(
+       GtkWidget *widget, 
+       GdkEventButton *event, 
+       signal_user_data_t *ud)
+{
+       const gchar *name;
+       gchar *tweak_name;
+       gboolean ret = FALSE;
+       gboolean allow_tweaks;
+
+       g_debug("press %d %d", event->type, event->button);
+       allow_tweaks = ghb_settings_get_boolean(ud->settings, "allow_tweaks");
+       if (allow_tweaks && event->type == GDK_BUTTON_PRESS && event->button == 3)
+       { // Its a right mouse click
+               GtkWidget *dialog;
+               GtkEntry *entry;
+               GtkResponseType response;
+               gchar *tweak = NULL;
+
+               name = gtk_widget_get_name(widget);
+               if (g_str_has_prefix(name, "tweak_"))
+               {
+                       tweak_name = g_strdup(name);
+               }
+               else
+               {
+                       tweak_name = g_strdup_printf("tweak_%s", name);
+               }
+
+               tweak = ghb_settings_get_string (ud->settings, tweak_name);
+               dialog = GHB_WIDGET(ud->builder, "tweak_dialog");
+               gtk_window_set_title(GTK_WINDOW(dialog), tweak_name);
+               entry = GTK_ENTRY(GHB_WIDGET(ud->builder, "tweak_setting"));
+               if (tweak)
+               {
+                       gtk_entry_set_text(entry, tweak);
+                       g_free(tweak);
+               }
+               response = gtk_dialog_run(GTK_DIALOG(dialog));
+               gtk_widget_hide(dialog);
+               if (response == GTK_RESPONSE_OK)
+               {
+                       tweak = (gchar*)gtk_entry_get_text(entry);
+                       if (ghb_validate_filter_string(tweak, -1))
+                               ghb_settings_set_string(ud->settings, tweak_name, tweak);
+                       else
+                       {
+                               gchar *message;
+                               message = g_strdup_printf(
+                                                       "Invalid Settings:\n%s",
+                                                       tweak);
+                               ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL);
+                               g_free(message);
+                       }
+               }
+               g_free(tweak_name);
+               ret = TRUE;
+       }
+       return ret;
+}
+
+gboolean 
+easter_egg_cb(
+       GtkWidget *widget, 
+       GdkEventButton *event, 
+       signal_user_data_t *ud)
+{
+       g_debug("press %d %d", event->type, event->button);
+       if (event->type == GDK_3BUTTON_PRESS && event->button == 1)
+       { // Its a tripple left mouse button click
+               GtkWidget *widget;
+               widget = GHB_WIDGET(ud->builder, "allow_tweaks");
+               gtk_widget_show(widget);
+               widget = GHB_WIDGET(ud->builder, "hbfd_feature");
+               gtk_widget_show(widget);
+       }
+       else if (event->type == GDK_BUTTON_PRESS && event->button == 1)
+       {
+               GtkWidget *widget;
+               widget = GHB_WIDGET(ud->builder, "allow_tweaks");
+               gtk_widget_hide(widget);
+               widget = GHB_WIDGET(ud->builder, "hbfd_feature");
+               gtk_widget_hide(widget);
+       }
+       return FALSE;
+}
+
+gchar*
+format_deblock_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud)
+{
+       if (val < 5.0)
+       {
+               return g_strdup_printf("Off");
+       }
+       else
+       {
+               return g_strdup_printf("%d", (gint)val);
+       }
+}
+
+gchar*
+format_vquality_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud)
+{
+       if (ghb_settings_get_boolean(ud->settings, "directqp"))
+       {
+               gint vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder");
+               // Only x264 and ffmpeg currently support direct qp/crf entry
+               if (vcodec != HB_VCODEC_X264 && vcodec != HB_VCODEC_FFMPEG)
+               {
+                       val *= 100;
+                       return g_strdup_printf("%.1f", val);
+               }
+               return g_strdup_printf("%d", (gint)val);
+       }
+       else
+       {
+               val *= 100;
+               return g_strdup_printf("%.1f", val);
+       }
+}
+
+static void
+html_link_cb(GtkHTML *html, const gchar *url, signal_user_data_t *ud)
+{
+       browse_url(url);
+}
+
+static gboolean check_stable_update(signal_user_data_t *ud);
+static gboolean stable_update_lock = FALSE;
+
+static void
+process_appcast(signal_user_data_t *ud)
+{
+       gchar *description = NULL, *build = NULL, *version = NULL, *msg;
+       GtkWidget *html, *window, *dialog, *label;
+       gint    response, ibuild = 0, skip;
+
+       if (ud->appcast == NULL || ud->appcast_len < 15 || 
+               strncmp(&(ud->appcast[9]), "200 OK", 6))
+       {
+               if (!stable_update_lock && HB_BUILD % 100)
+                       g_idle_add((GSourceFunc)check_stable_update, ud);
+               goto done;
+       }
+       ghb_appcast_parse(ud->appcast, &description, &build, &version);
+       if (build)
+               ibuild = g_strtod(build, NULL);
+       skip = ghb_settings_get_int(ud->settings, "update_skip_version");
+       if (description == NULL || build == NULL || version == NULL 
+               || ibuild <= HB_BUILD || skip == ibuild)
+       {
+               if (!stable_update_lock && HB_BUILD % 100)
+                       g_idle_add((GSourceFunc)check_stable_update, ud);
+               goto done;
+       }
+       msg = g_strdup_printf("HandBrake %s/%s is now available (you have %s/%d).",
+                       version, build, HB_VERSION, HB_BUILD);
+       label = GHB_WIDGET(ud->builder, "update_message");
+       gtk_label_set_text(GTK_LABEL(label), msg);
+       html = gtk_html_new_from_string(description, -1);
+       g_signal_connect(html, "link_clicked", G_CALLBACK(html_link_cb), ud);
+       window = GHB_WIDGET(ud->builder, "update_scroll");
+       gtk_container_add(GTK_CONTAINER(window), html);
+       // Show it
+       dialog = GHB_WIDGET(ud->builder, "update_dialog");
+       gtk_widget_set_size_request(html, 420, 240);
+       gtk_widget_show(html);
+       response = gtk_dialog_run(GTK_DIALOG(dialog));
+       gtk_widget_hide(dialog);
+       gtk_widget_destroy(html);
+       if (response == GTK_RESPONSE_OK)
+       {
+               // Skip
+               ghb_settings_set_int(ud->settings, "update_skip_version", ibuild);
+               ghb_pref_save(ud->settings, "update_skip_version");
+       }
+       g_free(msg);
+
+done:
+       if (description) g_free(description);
+       if (build) g_free(build);
+       if (version) g_free(version);
+       g_free(ud->appcast);
+       ud->appcast_len = 0;
+       ud->appcast = NULL;
+}
+
+void
+ghb_net_close(GIOChannel *ioc)
+{
+       gint fd;
+
+       g_debug("ghb_net_close");
+       if (ioc == NULL) return;
+       fd = g_io_channel_unix_get_fd(ioc);
+       close(fd);
+       g_io_channel_unref(ioc);
+}
+
+gboolean
+ghb_net_recv_cb(GIOChannel *ioc, GIOCondition cond, gpointer data)
+{
+       gchar buf[2048];
+       gsize len;
+       GError *gerror = NULL;
+       GIOStatus status;
+       
+       g_debug("ghb_net_recv_cb");
+       signal_user_data_t *ud = (signal_user_data_t*)data;
+
+       status = g_io_channel_read_chars (ioc, buf, 2048, &len, &gerror);
+       if ((status == G_IO_STATUS_NORMAL || status == G_IO_STATUS_EOF) &&
+               len > 0)
+       {
+               gint new_len = ud->appcast_len + len;
+               ud->appcast = g_realloc(ud->appcast, new_len + 1);
+               memcpy(&(ud->appcast[ud->appcast_len]), buf, len);
+               ud->appcast_len = new_len;
+       }
+       if (status == G_IO_STATUS_EOF)
+       {
+               ud->appcast[ud->appcast_len] = 0;
+               ghb_net_close(ioc);
+               process_appcast(ud);
+               return FALSE;
+       }
+       return TRUE;
+}
+
+GIOChannel*
+ghb_net_open(signal_user_data_t *ud, gchar *address, gint port)
+{
+       GIOChannel *ioc;
+       gint fd;
+
+       struct sockaddr_in   sock;
+       struct hostent     * host;
+
+       g_debug("ghb_net_open");
+       if( !( host = gethostbyname( address ) ) )
+       {
+               g_warning( "gethostbyname failed (%s)", address );
+               return NULL;
+       }
+
+       memset( &sock, 0, sizeof( struct sockaddr_in ) );
+       sock.sin_family = host->h_addrtype;
+       sock.sin_port   = htons( port );
+       memcpy( &sock.sin_addr, host->h_addr, host->h_length );
+
+       fd = socket(host->h_addrtype, SOCK_STREAM, 0);
+       if( fd < 0 )
+       {
+               g_debug( "socket failed" );
+               return NULL;
+       }
+
+       if(connect(fd, (struct sockaddr*)&sock, sizeof(struct sockaddr_in )) < 0 )
+       {
+               g_debug( "connect failed" );
+               return NULL;
+       }
+       ioc = g_io_channel_unix_new(fd);
+       g_io_channel_set_encoding (ioc, NULL, NULL);
+       g_io_channel_set_flags(ioc, G_IO_FLAG_NONBLOCK, NULL);
+       g_io_add_watch (ioc, G_IO_IN, ghb_net_recv_cb, (gpointer)ud );
+
+       return ioc;
+}
+
+gboolean
+ghb_check_update(signal_user_data_t *ud)
+{
+       gchar *query;
+       gsize len;
+       GIOChannel *ioc;
+       GError *gerror = NULL;
+
+       g_debug("ghb_check_update");
+       if (HB_BUILD % 100)
+       {
+       query = 
+               "GET /appcast_unstable.xml HTTP/1.0\r\nHost: handbrake.fr\r\n\r\n";
+       }
+       else
+       {
+               stable_update_lock = TRUE;
+       query = "GET /appcast.xml HTTP/1.0\r\nHost: handbrake.fr\r\n\r\n";
+       }
+       ioc = ghb_net_open(ud, "handbrake.fr", 80);
+       if (ioc == NULL)
+               return FALSE;
+
+       g_io_channel_write_chars(ioc, query, strlen(query), &len, &gerror);
+       g_io_channel_flush(ioc, &gerror);
+       // This function is initiated by g_idle_add.  Must return false
+       // so that it is not called again
+       return FALSE;
+}
+
+static gboolean
+check_stable_update(signal_user_data_t *ud)
+{
+       gchar *query;
+       gsize len;
+       GIOChannel *ioc;
+       GError *gerror = NULL;
+
+       g_debug("check_stable_update");
+       stable_update_lock = TRUE;
+       query = "GET /appcast.xml HTTP/1.0\r\nHost: handbrake.fr\r\n\r\n";
+       ioc = ghb_net_open(ud, "handbrake.fr", 80);
+       if (ioc == NULL)
+               return FALSE;
+
+       g_io_channel_write_chars(ioc, query, strlen(query), &len, &gerror);
+       g_io_channel_flush(ioc, &gerror);
+       // This function is initiated by g_idle_add.  Must return false
+       // so that it is not called again
+       return FALSE;
+}
+
diff --git a/gtk/src/callbacks.h b/gtk/src/callbacks.h
new file mode 100644 (file)
index 0000000..7afaf9d
--- /dev/null
@@ -0,0 +1,52 @@
+/* -*- 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);
+gboolean ghb_timer_cb(gpointer data);
+gboolean ghb_log_cb(GIOChannel *source, GIOCondition cond, gpointer data);
+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_file_menu_add_dvd(signal_user_data_t *ud);
+void ghb_hal_init();
+gboolean ghb_message_dialog(
+       GtkMessageType type, const gchar *message, 
+       const gchar *no, const gchar *yes);
+void ghb_init_dep_map();
+gboolean ghb_reload_queue(signal_user_data_t *ud);
+gboolean ghb_cancel_encode(const gchar *extra_msg);
+GValue* ghb_start_next_job(signal_user_data_t *ud, gboolean find_first);
+void ghb_check_dependency(signal_user_data_t *ud, GtkWidget *widget);
+void ghb_do_scan(signal_user_data_t *ud, const gchar *filename, gboolean force);
+void ghb_log(gchar *log, ...);
+gboolean ghb_check_update(signal_user_data_t *ud);
+
+#endif // _CALLBACKS_H_
+
diff --git a/gtk/src/create_resources.c b/gtk/src/create_resources.c
new file mode 100644 (file)
index 0000000..4fea4d7
--- /dev/null
@@ -0,0 +1,424 @@
+#include <stdio.h>
+#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include "icon_tools.h"
+#include "plist.h"
+#include "values.h"
+
+enum
+{
+       R_NONE = 0,
+       R_RESOURCES,
+       R_SECTION,
+       R_ICON,
+       R_PLIST,
+       R_STRING,
+};
+
+typedef struct
+{
+       gchar *tag;
+       gint id;
+} tag_map_t;
+
+static tag_map_t tag_map[] =
+{
+       {"resources", R_RESOURCES},
+       {"section", R_SECTION},
+       {"icon", R_ICON},
+       {"plist", R_PLIST},
+       {"string", R_STRING},
+};
+#define TAG_MAP_SZ     (sizeof(tag_map)/sizeof(tag_map_t))
+
+typedef struct
+{
+       gchar *key;
+       gchar *value;
+       GValue *plist;
+       GQueue *stack;
+       GQueue *tag_stack;
+       gboolean closed_top;
+} parse_data_t;
+
+static const gchar*
+lookup_attr_value(
+       const gchar *name, 
+       const gchar **attr_names, 
+       const gchar **attr_values)
+{
+       gint ii;
+
+       if (attr_names == NULL) return NULL;
+       for (ii = 0; attr_names[ii] != NULL; ii++)
+       {
+               if (strcmp(name, attr_names[ii]) == 0)
+                       return attr_values[ii];
+       }
+       return NULL;
+}
+static GValue*
+read_string_from_file(const gchar *filename)
+{
+       gchar *buffer;
+       size_t size;
+       GValue *gval;
+       FILE *fd;
+
+       fd = g_fopen(filename, "r");
+       if (fd == NULL)
+               return NULL;
+       fseek(fd, 0, SEEK_END);
+       size = ftell(fd);
+       fseek(fd, 0, SEEK_SET);
+       buffer = g_malloc(size+1);
+       size = fread(buffer, 1, size, fd);
+       buffer[size] = 0;
+       gval = ghb_value_new(G_TYPE_STRING);
+       g_value_take_string(gval, buffer);
+       fclose(fd);
+       return gval;
+}
+
+static void
+start_element(
+       GMarkupParseContext *ctx, 
+       const gchar *tag, 
+       const gchar **attr_names,
+       const gchar **attr_values,
+       gpointer ud,
+       GError **error)
+{
+       parse_data_t *pd = (parse_data_t*)ud;
+       union 
+       {
+               gint id;
+               gpointer pid;
+       } id;
+       gint ii;
+
+       // Check to see if the first element found has been closed
+       // If so, ignore any junk following it.
+       if (pd->closed_top)
+               return;
+
+       for (ii = 0; ii < TAG_MAP_SZ; ii++)
+       {
+               if (strcmp(tag, tag_map[ii].tag) == 0)
+               {
+                       id.id = tag_map[ii].id;
+                       break;
+               }
+       }
+       if (ii == TAG_MAP_SZ)
+       {
+               g_warning("Unrecognized start tag (%s)", tag);
+               return;
+       }
+       g_queue_push_head(pd->tag_stack, id.pid);
+       GType gtype = 0;
+       GValue *gval = NULL;
+       GValue *current = g_queue_peek_head(pd->stack);
+       switch (id.id)
+       {
+               case R_SECTION:
+               {
+                       const gchar *name;
+
+                       name = lookup_attr_value("name", attr_names, attr_values);
+                       if (name && strcmp(name, "icons") == 0)
+                       {
+                               gval = ghb_dict_value_new();
+                               if (pd->key) g_free(pd->key);
+                               pd->key = g_strdup(name);
+                               g_queue_push_head(pd->stack, gval);
+                       }
+               } break;
+               case R_ICON:
+               {
+                       const gchar *filename, *name;
+
+                       filename = lookup_attr_value("file", attr_names, attr_values);
+                       name = lookup_attr_value("name", attr_names, attr_values);
+                       if (filename && name)
+                       {
+                               ghb_rawdata_t *rd;
+                               guint size;
+
+                               rd = g_malloc(sizeof(ghb_rawdata_t));
+                               rd->data = icon_file_serialize(filename, &size);
+                               rd->size = size;
+                               gval = ghb_rawdata_value_new(rd);
+                               if (pd->key) g_free(pd->key);
+                               pd->key = g_strdup(name);
+                       }
+                       else
+                       {
+                               g_warning("%s:missing a requried attribute", name);
+                       }
+               } break;
+               case R_PLIST:
+               {
+                       const gchar *filename, *name;
+
+                       filename = lookup_attr_value("file", attr_names, attr_values);
+                       name = lookup_attr_value("name", attr_names, attr_values);
+                       if (filename && name)
+                       {
+                               gval = ghb_plist_parse_file(filename);
+                               if (pd->key) g_free(pd->key);
+                               pd->key = g_strdup(name);
+                       }
+                       else
+                       {
+                               g_warning("%s:missing a requried attribute", name);
+                       }
+               } break;
+               case R_STRING:
+               {
+                       const gchar *filename, *name;
+
+                       filename = lookup_attr_value("file", attr_names, attr_values);
+                       name = lookup_attr_value("name", attr_names, attr_values);
+                       if (filename && name)
+                       {
+                               gval = read_string_from_file(filename);
+                               if (pd->key) g_free(pd->key);
+                               pd->key = g_strdup(name);
+                       }
+                       else
+                       {
+                               g_warning("%s:missing a requried attribute", name);
+                       }
+               } break;
+       }
+       // Add the element to the current container
+       if (gval)
+       { // There's an element to add
+               if (current == NULL)
+               {
+                       pd->plist = gval;
+                       return;
+               }
+               gtype = G_VALUE_TYPE(current);
+               if (gtype == ghb_array_get_type())
+               {
+                       ghb_array_append(current, gval);
+               }
+               else if (gtype == ghb_dict_get_type())
+               {
+                       if (pd->key == NULL)
+                       {
+                               g_warning("No key for dictionary item");
+                               ghb_value_free(gval);
+                       }
+                       else
+                       {
+                               ghb_dict_insert(current, g_strdup(pd->key), gval);
+                       }
+               }
+               else
+               {
+                       g_error("Invalid container type. This shouldn't happen");
+               }
+       }
+}
+
+static void
+end_element(
+       GMarkupParseContext *ctx, 
+       const gchar *name, 
+       gpointer ud,
+       GError **error)
+{
+       parse_data_t *pd = (parse_data_t*)ud;
+       gint id;
+       union 
+       {
+               gint id;
+               gpointer pid;
+       } start_id;
+       gint ii;
+
+       // Check to see if the first element found has been closed
+       // If so, ignore any junk following it.
+       if (pd->closed_top)
+               return;
+
+       for (ii = 0; ii < TAG_MAP_SZ; ii++)
+       {
+               if (strcmp(name, tag_map[ii].tag) == 0)
+               {
+                       id = tag_map[ii].id;
+                       break;
+               }
+       }
+       if (ii == TAG_MAP_SZ)
+       {
+               g_warning("Unrecognized start tag (%s)", name);
+               return;
+       }
+       start_id.pid = g_queue_pop_head(pd->tag_stack);
+       if (start_id.id != id)
+               g_warning("start tag != end tag: (%s %d) %d", name, id, id);
+
+       GValue *gval = NULL;
+       GValue *current = g_queue_peek_head(pd->stack);
+       GType gtype = 0;
+       switch (id)
+       {
+               case R_SECTION:
+               {
+                       g_queue_pop_head(pd->stack);
+               } break;
+       }
+       if (gval)
+       {
+               // Get the top of the data structure stack and if it's an array
+               // or dict, add the current element
+               if (current == NULL)
+               {
+                       pd->plist = gval;
+                       pd->closed_top = TRUE;
+                       return;
+               }
+               gtype = G_VALUE_TYPE(current);
+               if (gtype == ghb_array_get_type())
+               {
+                       ghb_array_append(current, gval);
+               }
+               else if (gtype == ghb_dict_get_type())
+               {
+                       if (pd->key == NULL)
+                       {
+                               g_warning("No key for dictionary item");
+                               ghb_value_free(gval);
+                       }
+                       else
+                       {
+                               ghb_dict_insert(current, g_strdup(pd->key), gval);
+                       }
+               }
+               else
+               {
+                       g_error("Invalid container type. This shouldn't happen");
+               }
+       }
+       if (g_queue_is_empty(pd->tag_stack))
+               pd->closed_top = TRUE;
+}
+
+static void
+text_data(
+       GMarkupParseContext *ctx, 
+       const gchar *text, 
+       gsize len,
+       gpointer ud,
+       GError **error)
+{
+       parse_data_t *pd = (parse_data_t*)ud;
+       if (pd->value) g_free(pd->value);
+       pd->value = g_strdup(text);
+}
+
+static void
+passthrough(
+       GMarkupParseContext *ctx, 
+       const gchar *text, 
+       gsize len,
+       gpointer ud,
+       GError **error)
+{
+       //parse_data_t *pd = (parse_data_t*)ud;
+
+       //g_debug("passthrough %s", text);
+}
+
+static void
+parse_error(GMarkupParseContext *ctx, GError *error, gpointer ud)
+{
+       g_warning("Resource parse error: %s", error->message);
+}
+
+// This is required or the parser crashes
+static void 
+destroy_notify(gpointer data)
+{ // Do nothing
+       //g_debug("destroy parser");
+}
+
+GValue*
+ghb_resource_parse(const gchar *buf, gssize len)
+{
+       GMarkupParseContext *ctx;
+       GMarkupParser parser;
+       parse_data_t pd;
+       GError *err = NULL;
+
+       pd.stack = g_queue_new();
+       pd.tag_stack = g_queue_new();
+       pd.key = NULL;
+       pd.value = NULL;
+       pd.plist = ghb_dict_value_new();
+       g_queue_push_head(pd.stack, pd.plist);
+       pd.closed_top = FALSE;
+
+       parser.start_element = start_element;
+       parser.end_element = end_element;
+       parser.text = text_data;
+       parser.passthrough = passthrough;
+       parser.error = parse_error;
+       ctx = g_markup_parse_context_new(&parser, 0, &pd, destroy_notify);
+
+       g_markup_parse_context_parse(ctx, buf, len, &err);
+       g_markup_parse_context_end_parse(ctx, &err);
+       g_markup_parse_context_free(ctx);
+       g_queue_free(pd.stack);
+       g_queue_free(pd.tag_stack);
+       return pd.plist;
+}
+
+GValue*
+ghb_resource_parse_file(FILE *fd)
+{
+       gchar *buffer;
+       size_t size;
+       GValue *gval;
+
+       if (fd == NULL)
+               return NULL;
+       fseek(fd, 0, SEEK_END);
+       size = ftell(fd);
+       fseek(fd, 0, SEEK_SET);
+       buffer = g_malloc(size+1);
+       size = fread(buffer, 1, size, fd);
+       buffer[size] = 0;
+       gval = ghb_resource_parse(buffer, (gssize)size);
+       g_free(buffer);
+       return gval;
+}
+
+
+gint
+main(gint argc, gchar *argv[])
+{
+       FILE *file;
+       GValue *gval;
+
+       if (argc < 3)
+       {
+               fprintf(stderr, "Usage: <in resource list> <out resource plist>\n");
+               return 1;
+       }
+       g_type_init();
+       file = g_fopen(argv[1], "r");
+       if (file == NULL)
+               return 1;
+
+       gval = ghb_resource_parse_file(file);
+       ghb_plist_write_file(argv[2], gval);
+       return 0;
+}
+
diff --git a/gtk/src/ghb-dvd.c b/gtk/src/ghb-dvd.c
new file mode 100644 (file)
index 0000000..c20b8fa
--- /dev/null
@@ -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 <kay.sievers@vrfy.org>
+ *
+ *     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 (file)
index 0000000..b939872
--- /dev/null
@@ -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 (file)
index 0000000..75ed319
--- /dev/null
@@ -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.ui b/gtk/src/ghb.ui
new file mode 100644 (file)
index 0000000..d278f77
--- /dev/null
@@ -0,0 +1,4922 @@
+<?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">0</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">0</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">0</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">0</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">0</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">0</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">0</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment17">
+    <property name="upper">2000</property>
+    <property name="lower">0</property>
+    <property name="page_increment">16</property>
+    <property name="step_increment">2</property>
+    <property name="page_size">0</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment18">
+    <property name="upper">1200</property>
+    <property name="lower">0</property>
+    <property name="page_increment">16</property>
+    <property name="step_increment">2</property>
+    <property name="page_size">0</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">0</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">0</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">0</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment5">
+    <property name="upper">1</property>
+    <property name="lower">0</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">0.1</property>
+    <property name="page_size">0</property>
+    <property name="value">0.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.2</property>
+    <property name="page_size">0</property>
+    <property name="value">2.6</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">0</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">0</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment20">
+    <property name="upper">15</property>
+    <property name="lower">4</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">0</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="preferences">
+            <property name="stock_id">gtk-preferences</property>
+            <property name="name">preferences</property>
+            <signal handler="prefs_dialog_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>
+        <child>
+          <object class="GtkAction" id="guide">
+            <property name="name">guide</property>
+            <property name="label" translatable="yes">_Guide</property>
+            <signal handler="guide_activate_cb" name="activate"/>
+          </object>
+        </child>
+      </object>
+    </child>
+    <ui>
+      <menubar name="menubar1">
+        <menu action="menuitem1">
+          <menuitem action="source1"/>
+          <menuitem action="destination1"/>
+          <separator/>
+          <menuitem action="preferences"/>
+          <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"/>
+          <menuitem action="guide"/>
+        </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"> thru </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"/>
+                                    <signal handler="destination_grab_cb" name="grab-focus" after="yes"/>
+                                    <accelerator key="d" signal="grab-focus" modifiers="GDK_MOD1_MASK"/>
+                                  </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="FileFormat">
+                                    <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="Mp4iPodCompatible">
+                                        <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 5G Support</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="Mp4HttpOptimize">
+                                    <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">Web optimized</property>
+                                    <property name="tooltip-text" translatable="yes">Tunes the MP4 to be better suited for streaming</property>
+                                    <property name="draw_indicator">True</property>
+                                    <signal handler="http_opt_changed_cb" name="toggled"/>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="Mp4LargeFile">
+                                    <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 file size (&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;&lt;u&gt;D&lt;/u&gt;estination&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>
+                                            <property name="width_chars">15</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="VideoGrayScale">
+                                        <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 filter removes the color components of the picture.</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">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="PictureDetelecine">
+                                        <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">Remove interlacing artifacts caused by the telecine process often applied to movies.</property>
+                                        <property name="label" translatable="yes">Detelecine</property>
+                                        <property name="draw_indicator">True</property>
+                                        <signal handler="setting_widget_changed_cb" name="toggled"/>
+                                        <signal handler="tweak_setting_cb" name="button-press-event"/>
+                                      </object>
+                                      <packing>
+                                        <property name="position">1</property>
+                                        <property name="expand">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="PictureDecomb">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip-text" translatable="yes">Decomb is a selective deinterlacer. It will only deinterlace frames that appear to need it. It generally produces better quality than the normal deinterlacer.</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"/>
+                                        <signal handler="tweak_setting_cb" name="button-press-event"/>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="position">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkHBox" id="hbox25">
+                                        <property name="visible">True</property>
+                                        <child>
+                                          <object class="GtkLabel" id="label41">
+                                            <property name="visible">True</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">Deblock:</property>
+                                            <property name="width_chars">10</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkAlignment" id="alignment20">
+                                            <property name="visible">True</property>
+                                            <property name="xalign">0</property>
+                                            <property name="xscale">0.55</property>
+                                            <child>
+                                              <object class="GtkHScale" id="PictureDeblock">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="tooltip-text" translatable="yes">This is a filter that gets applied before encoding.  If the source looks blocky before encoding, you may want to use this.</property>
+                                                <property name="adjustment">adjustment20</property>
+                                                <property name="digits">0</property>
+                                                <property name="value_pos">GTK_POS_RIGHT</property>
+                                                <signal handler="setting_widget_changed_cb" name="value_changed"/>
+                                                <signal handler="format_deblock_cb" name="format-value"/>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <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="can_focus">True</property>
+                                            <property name="selectable">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="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="PictureDeinterlace">
+                                            <property name="width_request">100</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="tooltip-text" translatable="yes">Removes interlacing artifacts. Since deinterlacing degrades picture quality, leave it off unless you know you need it.</property>
+                                            <signal handler="setting_widget_changed_cb" name="changed"/>
+                                            <signal handler="tweak_setting_cb" name="button-press-event"/>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkComboBoxEntry" id="tweak_PictureDeinterlace">
+                                            <property name="visible">False</property>
+                                            <signal handler="setting_widget_changed_cb" name="changed"/>
+                                            <child internal-child="entry">
+                                              <object class="GtkEntry" id="comboboxentry-entry1">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="width_chars">15</property>
+                                                <signal handler="deint_tweak_focus_out_cb" name="focus_out_event"/>
+                                              </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="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="selectable">True</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="PictureDenoise">
+                                            <property name="width_request">100</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="tooltip-text" translatable="yes">This filter removes noise or grain from the picture.</property>
+                                            <signal handler="setting_widget_changed_cb" name="changed"/>
+                                            <signal handler="tweak_setting_cb" name="button-press-event"/>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkComboBoxEntry" id="tweak_PictureDenoise">
+                                            <property name="visible">False</property>
+                                            <signal handler="setting_widget_changed_cb" name="changed"/>
+                                            <child internal-child="entry">
+                                              <object class="GtkEntry" id="comboboxentry-entry2">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="width_chars">15</property>
+                                                <signal handler="denoise_tweak_focus_out_cb" name="focus_out_event"/>
+                                              </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="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="VideoEncoder">
+                                                <property name="visible">True</property>
+                                                <signal handler="vcodec_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="VideoFramerate">
+                                                <property name="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="VideoTwoPass">
+                                        <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">2</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="VideoTurboTwoPass">
+                                            <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">3</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="VideoAvgBitrate">
+                                                <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="VideoTargetSize">
+                                                <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="VideoQualitySlider">
+                                            <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">3</property>
+                                            <property name="value_pos">GTK_POS_RIGHT</property>
+                                            <signal handler="setting_widget_changed_cb" name="value_changed"/>
+                                            <signal handler="format_vquality_cb" name="format-value"/>
+                                          </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="AudioTrackDRCSlider">
+                                                <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="AudioTrack">
+                                        <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="AudioEncoder">
+                                        <property name="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="AudioSamplerate">
+                                        <property name="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="AudioMixdown">
+                                        <property name="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_mix_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="AudioBitrate">
+                                        <property name="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>
+                    <child>
+                      <object class="GtkHBox" id="hboxj01">
+                        <property name="visible">True</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="GtkFrame" id="framej01">
+                            <property name="visible">True</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="alignmentj01">
+                                <property name="visible">True</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="GtkHBox" id="hboxj02">
+                                    <property name="visible">True</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="GtkComboBox" id="SourceAudioLang">
+                                        <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>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                            <child type="label">
+                              <object class="GtkLabel" id="labelj01">
+                                <property name="visible">True</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;Preferred Audio Language&lt;/b&gt;</property>
+                                <property name="use_markup">True</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkFrame" id="framej02">
+                            <property name="visible">True</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="alignmentj02">
+                                <property name="visible">True</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="GtkHBox" id="hboxj03">
+                                    <property name="visible">True</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="GtkComboBox" id="Subtitles">
+                                        <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>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="SubtitlesForced">
+                                        <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>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                            <child type="label">
+                              <object class="GtkLabel" id="labelj02">
+                                <property name="visible">True</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">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">3</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">2</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="x264_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="x264_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;Reference 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="x264_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="x264_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="GtkTable" id="table8">
+                                        <property name="visible">True</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="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="x264_widget_changed_cb" name="toggled"/>
+                                      </object>
+                                    </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="x264_widget_changed_cb" name="toggled"/>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                      </packing>
+                                    </child>
+
+                                      </object>
+                                      <packing>
+                                        <property name="position">2</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="GtkTextView" id="x264Option">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                        <property name="tooltip-text" translatable="yes">Your selected options will appear here. 
+You can edit these and add additional options.  
+
+Default values will not be shown. The defaults are:
+ref=1:mixed-refs=0:bframes=0:direct=spatial:b-pyramid=0:
+weightb=0:me=hex:merange=16:subme=5:
+analyse=some:8x8dct=0:deblock=0,0:trellis=0:
+no-fast-pskip=0:no-dct-decimate=0:cabac=1</property>
+                                    <property name="wrap_mode">GTK_WRAP_CHAR</property>
+                                    <property name="accepts_tab">False</property>
+                                    <signal handler="x264_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">True</property>
+                            <property name="padding">2</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                      </packing>
+                    </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="x264_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="x264_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. 9 is highest quality and slowest.  5 or 6 are commonly used values.</property>
+                                                <signal handler="x264_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="x264_widget_changed_cb" name="changed"/>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="position">1</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="GtkCheckButton" id="x264_8x8dct">
+                                                <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">High profile feature. Breaks picture into 8x8 blocks for analysis. Improves coding efficiency.</property>
+                                                <property name="label" translatable="yes">8x8dct</property>
+                                                <property name="active">True</property>
+                                                <property name="draw_indicator">True</property>
+                                                <signal handler="x264_widget_changed_cb" name="toggled"/>
+                                              </object>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="position">2</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="x264_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="x264_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="x264_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="x264_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="x264_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="x264_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="expand">False</property>
+                        <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">3</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="ChapterMarkers">
+                            <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>
+                            <property name="enable-search">False</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">4</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>
+                            <child>
+                              <object class="GtkButton" id="presets_restore">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="tooltip-text" translatable="yes">Reload HandBrakes standard presets</property>
+                                <property name="relief">GTK_RELIEF_NONE</property>
+                                <signal handler="presets_restore_clicked_cb" name="clicked"/>
+                                <child>
+                                  <object class="GtkImage" id="image7">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-refresh</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">4</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="prefs_dialog">
+    <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="skip_taskbar_hint">True</property>
+    <property name="skip_pager_hint">True</property>
+    <property name="has_separator">False</property>
+    <signal name="delete_event" handler="gtk_widget_hide_on_delete"/>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox6">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkHBox" id="hbox24">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkVBox" id="vbox19">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkEventBox" id="eventbox1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK</property>
+                    <property name="visible_window">True</property>
+                    <property name="above_child">True</property>
+                    <signal name="button_press_event" handler="easter_egg_cb"/>
+                    <child>
+                      <object 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="icon_size">6</property>
+                        <property name="icon_name">hb-icon</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame16">
+                <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="alignment6">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox29">
+                        <property name="visible">True</property>
+                        <child>
+                          <object class="GtkCheckButton" id="use_source_name">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="tooltip_text">The destination filename will be automatically
+generated from the source filename or volume
+label.</property>
+                            <property name="label" translatable="yes">Automatically generate destination</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="pref_changed_cb"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="chapters_in_destination">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="tooltip_text">Add chapter numbers to the 
+auto-generated destination name.</property>
+                            <property name="label" translatable="yes">Add chapters to destination name</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="pref_changed_cb"/>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="reduce_hd_preview">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="tooltip_text"> Automatically reduce the size of High Definition previews.
+This is helpfull when working on laptops or similar
+non-hidef screens.  </property>
+                            <property name="label" translatable="yes">Scale down High Definition previews</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="pref_changed_cb"/>
+                          </object>
+                          <packing>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="noscale">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="tooltip_text">When picture settings require that the image 
+dimensions be rounded to some multiple number
+of pixels. This setting will crop a few extra pixels
+instead of doing exact cropping and scaling to
+the required multiple.</property>
+                            <property name="label" translatable="yes">Loose cropping</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="pref_changed_cb"/>
+                          </object>
+                          <packing>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="directqp">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="tooltip_text">HandBrake allows entry of QP/CRF values for x264 
+and FFMPEG instead of the percentage metric.
+This preference is associated with the current
+preset only.
+
+You *MUST* save the current preset to preserve
+this setting.</property>
+                            <property name="label" translatable="yes">Allow direct QP/CRF</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="vcodec_changed_cb"/>
+                          </object>
+                          <packing>
+                            <property name="position">4</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="EncodeLogLocation">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="tooltip_text"> HandBrake produces 2 activity logs.  
+One for the session and one for each encoding.
+Store the individual encode logs in the same
+location as the movie.</property>
+                            <property name="label" translatable="yes">Store logs in destination video directory</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="pref_changed_cb"/>
+                          </object>
+                          <packing>
+                            <property name="position">5</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="allow_tweaks">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Allow Tweaks</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="tweaks_changed_cb"/>
+                          </object>
+                          <packing>
+                            <property name="position">6</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="hbfd_feature">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Allow HandBrake For Dummies</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="hbfd_feature_changed_cb"/>
+                          </object>
+                          <packing>
+                            <property name="position">7</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label18">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Preferences&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <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_area6">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <object class="GtkButton" id="pref_ok">
+                <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>
+              </object>
+            </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="-5">pref_ok</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkDialog" id="tweak_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-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>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkHBox" id="hbox9">
+            <property name="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="label33">
+                <property name="visible">True</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">Setting:</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="tweak_setting">
+                <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="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area7">
+            <property name="visible">True</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="tweak_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="tweak_ok">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">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">tweak_cancel</action-widget>
+      <action-widget response="-5">tweak_ok</action-widget>
+    </action-widgets>
+  </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="PresetName">
+                    <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>
+                    <signal handler="preset_name_changed_cb" name="changed"/>
+                  </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="PresetDescription">
+                        <property name="height_request">60</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>
+            <child>
+              <object class="GtkHBox" id="hbox43">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkRadioButton" id="preset_type_folder">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Folder</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="preset_type_changed_cb"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="preset_type_normal">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Preset</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">preset_type_folder</property>
+                    <signal name="toggled" handler="preset_type_changed_cb"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">2</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="GtkLabel" id="activity_location">
+            <property name="justify">GTK_JUSTIFY_LEFT</property>
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkScrolledWindow" id="activity_scroll">
+            <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="cursor-visible">False</property>
+                <property name="wrap_mode">GTK_WRAP_CHAR</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">2</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>
+            <child>
+              <object class="GtkToolButton" id="queue_edit">
+                <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">Edit</property>
+                <property name="icon_name">hb-edit</property>
+                <signal handler="queue_edit_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="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="visible">True</property>
+                  </object>
+                  <packing>
+                    <property name="padding">10</property>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+            <property name="expand">False</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">900</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">False</property>
+                <property name="hover_expand">False</property>
+                <signal handler="queue_key_press_cb" name="key-press-event"/>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">2</property>
+            <property name="expand">True</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="PictureLeftCrop">
+                                    <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="PictureTopCrop">
+                                    <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="PictureBottomCrop">
+                                    <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="PictureRightCrop">
+                                    <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="PictureAutoCrop">
+                            <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="ModDimensions">
+                                <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="PictureKeepRatio">
+                                <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 a GPL-licensed, multiplatform, multithreaded video transcoder.</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
+  sergent@io.com
+  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="update_dialog">
+    <property name="border_width">5</property>
+    <property name="modal">True</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="skip_pager_hint">True</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox6">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkHBox" id="hbox24">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkVBox" id="vbox19">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkEventBox" id="eventbox2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK</property>
+                    <property name="visible_window">False</property>
+                    <property name="above_child">True</property>
+                    <child>
+                      <object 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="icon_name">hb-icon</property>
+                        <property name="icon-size">6</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox1">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="xpad">10</property>
+                    <property name="ypad">5</property>
+                    <property name="label" translatable="yes">&lt;b&gt;A new version of HandBrake is available!&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="update_message">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="xpad">10</property>
+                    <property name="ypad">5</property>
+                    <property name="label" translatable="yes">HandBrake xxx is now available (you have yyy).</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame2">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">etched-out</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkScrolledWindow" id="update_scroll">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hscrollbar_policy">automatic</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label88">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Release Notes&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="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_area6">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="update_skip">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">Skip This Version</property>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="update_remind">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">Remind Me Later</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-5">update_skip</action-widget>
+      <action-widget response="0">update_remind</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/gtk/src/ghbcellrenderertext.c b/gtk/src/ghbcellrenderertext.c
new file mode 100644 (file)
index 0000000..849cdd2
--- /dev/null
@@ -0,0 +1,1972 @@
+/* gtkcellrenderertext.c
+ * Copyright (C) 2000  Red Hat, Inc.,  Jonathan Blandford <jrb@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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 Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n-lib.h>
+#include <gtk/gtkmarshal.h>
+//#include <gtk/gtkeditable.h>
+//#include <gtk/gtkentry.h>
+//#include <gtk/gtkintl.h>
+//#include <gtk/gtkprivate.h>
+//#include <gtk/gtktreeprivate.h>
+//#include <gtk/gtkalias.h>
+
+#include "marshalers.h"
+#include "ghbcellrenderertext.h"
+
+#ifdef ENABLE_NLS
+#define P_(String) dgettext(GETTEXT_PACKAGE "-properties",String)
+#else
+#define P_(String) (String)
+#endif
+
+#define I_(string) g_intern_static_string (string)
+
+#define GTK_PARAM_READABLE G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
+#define GTK_PARAM_WRITABLE G_PARAM_WRITABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
+#define GTK_PARAM_READWRITE G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
+
+
+
+static void ghb_cell_renderer_text_finalize   (GObject                  *object);
+
+static void ghb_cell_renderer_text_get_property  (GObject                  *object,
+                                                 guint                     param_id,
+                                                 GValue                   *value,
+                                                 GParamSpec               *pspec);
+static void ghb_cell_renderer_text_set_property  (GObject                  *object,
+                                                 guint                     param_id,
+                                                 const GValue             *value,
+                                                 GParamSpec               *pspec);
+static void ghb_cell_renderer_text_get_size   (GtkCellRenderer          *cell,
+                                              GtkWidget                *widget,
+                                              GdkRectangle             *cell_area,
+                                              gint                     *x_offset,
+                                              gint                     *y_offset,
+                                              gint                     *width,
+                                              gint                     *height);
+static void ghb_cell_renderer_text_render     (GtkCellRenderer          *cell,
+                                              GdkWindow                *window,
+                                              GtkWidget                *widget,
+                                              GdkRectangle             *background_area,
+                                              GdkRectangle             *cell_area,
+                                              GdkRectangle             *expose_area,
+                                              GtkCellRendererState      flags);
+
+static GtkCellEditable *ghb_cell_renderer_text_start_editing (GtkCellRenderer      *cell,
+                                                             GdkEvent             *event,
+                                                             GtkWidget            *widget,
+                                                             const gchar          *path,
+                                                             GdkRectangle         *background_area,
+                                                             GdkRectangle         *cell_area,
+                                                             GtkCellRendererState  flags);
+
+enum {
+  EDITED,
+  KEYPRESS,
+  LAST_SIGNAL
+};
+
+enum {
+  PROP_0,
+
+  PROP_TEXT,
+  PROP_MARKUP,
+  PROP_ATTRIBUTES,
+  PROP_SINGLE_PARAGRAPH_MODE,
+  PROP_WIDTH_CHARS,
+  PROP_WRAP_WIDTH,
+  PROP_ALIGN,
+  
+  /* Style args */
+  PROP_BACKGROUND,
+  PROP_FOREGROUND,
+  PROP_BACKGROUND_GDK,
+  PROP_FOREGROUND_GDK,
+  PROP_FONT,
+  PROP_FONT_DESC,
+  PROP_FAMILY,
+  PROP_STYLE,
+  PROP_VARIANT,
+  PROP_WEIGHT,
+  PROP_STRETCH,
+  PROP_SIZE,
+  PROP_SIZE_POINTS,
+  PROP_SCALE,
+  PROP_EDITABLE,
+  PROP_STRIKETHROUGH,
+  PROP_UNDERLINE,
+  PROP_RISE,
+  PROP_LANGUAGE,
+  PROP_ELLIPSIZE,
+  PROP_WRAP_MODE,
+  
+  /* Whether-a-style-arg-is-set args */
+  PROP_BACKGROUND_SET,
+  PROP_FOREGROUND_SET,
+  PROP_FAMILY_SET,
+  PROP_STYLE_SET,
+  PROP_VARIANT_SET,
+  PROP_WEIGHT_SET,
+  PROP_STRETCH_SET,
+  PROP_SIZE_SET,
+  PROP_SCALE_SET,
+  PROP_EDITABLE_SET,
+  PROP_STRIKETHROUGH_SET,
+  PROP_UNDERLINE_SET,
+  PROP_RISE_SET,
+  PROP_LANGUAGE_SET,
+  PROP_ELLIPSIZE_SET,
+  PROP_ALIGN_SET
+};
+
+static guint text_cell_renderer_signals [LAST_SIGNAL];
+
+#define GHB_CELL_RENDERER_TEXT_PATH "gtk-cell-renderer-text-path"
+
+#define GHB_CELL_RENDERER_TEXT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GHB_TYPE_CELL_RENDERER_TEXT, GhbCellRendererTextPrivate))
+
+typedef struct _GhbCellRendererTextPrivate GhbCellRendererTextPrivate;
+struct _GhbCellRendererTextPrivate
+{
+  guint single_paragraph : 1;
+  guint language_set : 1;
+  guint markup_set : 1;
+  guint ellipsize_set : 1;
+  guint align_set : 1;
+  
+  gulong focus_out_id;
+  PangoLanguage *language;
+  PangoEllipsizeMode ellipsize;
+  PangoWrapMode wrap_mode;
+  PangoAlignment align;
+  
+  gulong populate_popup_id;
+  gulong entry_menu_popdown_timeout;
+  gboolean in_entry_menu;
+  
+  gint width_chars;
+  gint wrap_width;
+  
+  GtkWidget *entry;
+};
+
+G_DEFINE_TYPE (GhbCellRendererText, ghb_cell_renderer_text, GTK_TYPE_CELL_RENDERER)
+
+static void
+ghb_cell_renderer_text_init (GhbCellRendererText *celltext)
+{
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (celltext);
+
+  GTK_CELL_RENDERER (celltext)->xalign = 0.0;
+  GTK_CELL_RENDERER (celltext)->yalign = 0.5;
+  GTK_CELL_RENDERER (celltext)->xpad = 2;
+  GTK_CELL_RENDERER (celltext)->ypad = 2;
+  celltext->font_scale = 1.0;
+  celltext->fixed_height_rows = -1;
+  celltext->font = pango_font_description_new ();
+
+  priv->width_chars = -1;
+  priv->wrap_width = -1;
+  priv->wrap_mode = PANGO_WRAP_CHAR;
+  priv->align = PANGO_ALIGN_LEFT;
+  priv->align_set = FALSE;
+}
+
+static void
+ghb_cell_renderer_text_class_init (GhbCellRendererTextClass *class)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (class);
+  GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class);
+
+  object_class->finalize = ghb_cell_renderer_text_finalize;
+  
+  object_class->get_property = ghb_cell_renderer_text_get_property;
+  object_class->set_property = ghb_cell_renderer_text_set_property;
+
+  cell_class->get_size = ghb_cell_renderer_text_get_size;
+  cell_class->render = ghb_cell_renderer_text_render;
+  cell_class->start_editing = ghb_cell_renderer_text_start_editing;
+
+  g_object_class_install_property (object_class,
+                                   PROP_TEXT,
+                                   g_param_spec_string ("text",
+                                                        P_("Text"),
+                                                        P_("Text to render"),
+                                                        NULL,
+                                                        GTK_PARAM_READWRITE));
+  
+  g_object_class_install_property (object_class,
+                                   PROP_MARKUP,
+                                   g_param_spec_string ("markup",
+                                                        P_("Markup"),
+                                                        P_("Marked up text to render"),
+                                                        NULL,
+                                                        GTK_PARAM_WRITABLE));
+
+  g_object_class_install_property (object_class,
+                                  PROP_ATTRIBUTES,
+                                  g_param_spec_boxed ("attributes",
+                                                      P_("Attributes"),
+                                                      P_("A list of style attributes to apply to the text of the renderer"),
+                                                      PANGO_TYPE_ATTR_LIST,
+                                                      GTK_PARAM_READWRITE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_SINGLE_PARAGRAPH_MODE,
+                                   g_param_spec_boolean ("single-paragraph-mode",
+                                                         P_("Single Paragraph Mode"),
+                                                         P_("Whether or not to keep all text in a single paragraph"),
+                                                         FALSE,
+                                                         GTK_PARAM_READWRITE));
+
+  
+  g_object_class_install_property (object_class,
+                                   PROP_BACKGROUND,
+                                   g_param_spec_string ("background",
+                                                        P_("Background color name"),
+                                                        P_("Background color as a string"),
+                                                        NULL,
+                                                        GTK_PARAM_WRITABLE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_BACKGROUND_GDK,
+                                   g_param_spec_boxed ("background-gdk",
+                                                       P_("Background color"),
+                                                       P_("Background color as a GdkColor"),
+                                                       GDK_TYPE_COLOR,
+                                                       GTK_PARAM_READWRITE));  
+
+  g_object_class_install_property (object_class,
+                                   PROP_FOREGROUND,
+                                   g_param_spec_string ("foreground",
+                                                        P_("Foreground color name"),
+                                                        P_("Foreground color as a string"),
+                                                        NULL,
+                                                        GTK_PARAM_WRITABLE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_FOREGROUND_GDK,
+                                   g_param_spec_boxed ("foreground-gdk",
+                                                       P_("Foreground color"),
+                                                       P_("Foreground color as a GdkColor"),
+                                                       GDK_TYPE_COLOR,
+                                                       GTK_PARAM_READWRITE));
+
+
+  g_object_class_install_property (object_class,
+                                   PROP_EDITABLE,
+                                   g_param_spec_boolean ("editable",
+                                                         P_("Editable"),
+                                                         P_("Whether the text can be modified by the user"),
+                                                         FALSE,
+                                                         GTK_PARAM_READWRITE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_FONT,
+                                   g_param_spec_string ("font",
+                                                        P_("Font"),
+                                                        P_("Font description as a string, e.g. \"Sans Italic 12\""),
+                                                        NULL,
+                                                        GTK_PARAM_READWRITE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_FONT_DESC,
+                                   g_param_spec_boxed ("font-desc",
+                                                       P_("Font"),
+                                                       P_("Font description as a PangoFontDescription struct"),
+                                                       PANGO_TYPE_FONT_DESCRIPTION,
+                                                       GTK_PARAM_READWRITE));
+
+  
+  g_object_class_install_property (object_class,
+                                   PROP_FAMILY,
+                                   g_param_spec_string ("family",
+                                                        P_("Font family"),
+                                                        P_("Name of the font family, e.g. Sans, Helvetica, Times, Monospace"),
+                                                        NULL,
+                                                        GTK_PARAM_READWRITE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_STYLE,
+                                   g_param_spec_enum ("style",
+                                                      P_("Font style"),
+                                                      P_("Font style"),
+                                                      PANGO_TYPE_STYLE,
+                                                      PANGO_STYLE_NORMAL,
+                                                      GTK_PARAM_READWRITE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_VARIANT,
+                                   g_param_spec_enum ("variant",
+                                                     P_("Font variant"),
+                                                     P_("Font variant"),
+                                                      PANGO_TYPE_VARIANT,
+                                                      PANGO_VARIANT_NORMAL,
+                                                      GTK_PARAM_READWRITE));
+  
+  g_object_class_install_property (object_class,
+                                   PROP_WEIGHT,
+                                   g_param_spec_int ("weight",
+                                                     P_("Font weight"),
+                                                     P_("Font weight"),
+                                                     0,
+                                                     G_MAXINT,
+                                                     PANGO_WEIGHT_NORMAL,
+                                                     GTK_PARAM_READWRITE));
+
+   g_object_class_install_property (object_class,
+                                   PROP_STRETCH,
+                                   g_param_spec_enum ("stretch",
+                                                      P_("Font stretch"),
+                                                      P_("Font stretch"),
+                                                      PANGO_TYPE_STRETCH,
+                                                      PANGO_STRETCH_NORMAL,
+                                                      GTK_PARAM_READWRITE));
+  
+  g_object_class_install_property (object_class,
+                                   PROP_SIZE,
+                                   g_param_spec_int ("size",
+                                                     P_("Font size"),
+                                                     P_("Font size"),
+                                                     0,
+                                                     G_MAXINT,
+                                                     0,
+                                                     GTK_PARAM_READWRITE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_SIZE_POINTS,
+                                   g_param_spec_double ("size-points",
+                                                        P_("Font points"),
+                                                        P_("Font size in points"),
+                                                        0.0,
+                                                        G_MAXDOUBLE,
+                                                        0.0,
+                                                        GTK_PARAM_READWRITE));  
+
+  g_object_class_install_property (object_class,
+                                   PROP_SCALE,
+                                   g_param_spec_double ("scale",
+                                                        P_("Font scale"),
+                                                        P_("Font scaling factor"),
+                                                        0.0,
+                                                        G_MAXDOUBLE,
+                                                        1.0,
+                                                        GTK_PARAM_READWRITE));
+  
+  g_object_class_install_property (object_class,
+                                   PROP_RISE,
+                                   g_param_spec_int ("rise",
+                                                     P_("Rise"),
+                                                     P_("Offset of text above the baseline "
+                                                       "(below the baseline if rise is negative)"),
+                                                     -G_MAXINT,
+                                                     G_MAXINT,
+                                                     0,
+                                                     GTK_PARAM_READWRITE));
+
+
+  g_object_class_install_property (object_class,
+                                   PROP_STRIKETHROUGH,
+                                   g_param_spec_boolean ("strikethrough",
+                                                         P_("Strikethrough"),
+                                                         P_("Whether to strike through the text"),
+                                                         FALSE,
+                                                         GTK_PARAM_READWRITE));
+  
+  g_object_class_install_property (object_class,
+                                   PROP_UNDERLINE,
+                                   g_param_spec_enum ("underline",
+                                                      P_("Underline"),
+                                                      P_("Style of underline for this text"),
+                                                      PANGO_TYPE_UNDERLINE,
+                                                      PANGO_UNDERLINE_NONE,
+                                                      GTK_PARAM_READWRITE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_LANGUAGE,
+                                   g_param_spec_string ("language",
+                                                        P_("Language"),
+                                                        P_("The language this text is in, as an ISO code. "
+                                                          "Pango can use this as a hint when rendering the text. "
+                                                          "If you don't understand this parameter, you probably don't need it"),
+                                                        NULL,
+                                                        GTK_PARAM_READWRITE));
+
+
+  /**
+   * GhbCellRendererText:ellipsize:
+   *
+   * Specifies the preferred place to ellipsize the string, if the cell renderer 
+   * does not have enough room to display the entire string. Setting it to 
+   * %PANGO_ELLIPSIZE_NONE turns off ellipsizing. See the wrap-width property
+   * for another way of making the text fit into a given width.
+   *
+   * Since: 2.6
+   */
+  g_object_class_install_property (object_class,
+                                   PROP_ELLIPSIZE,
+                                   g_param_spec_enum ("ellipsize",
+                                                     P_("Ellipsize"),
+                                                     P_("The preferred place to ellipsize the string, "
+                                                        "if the cell renderer does not have enough room "
+                                                        "to display the entire string"),
+                                                     PANGO_TYPE_ELLIPSIZE_MODE,
+                                                     PANGO_ELLIPSIZE_NONE,
+                                                     GTK_PARAM_READWRITE));
+
+  /**
+   * GhbCellRendererText:width-chars:
+   * 
+   * The desired width of the cell, in characters. If this property is set to
+   * -1, the width will be calculated automatically, otherwise the cell will
+   * request either 3 characters or the property value, whichever is greater.
+   * 
+   * Since: 2.6
+   **/
+  g_object_class_install_property (object_class,
+                                   PROP_WIDTH_CHARS,
+                                   g_param_spec_int ("width-chars",
+                                                     P_("Width In Characters"),
+                                                     P_("The desired width of the label, in characters"),
+                                                     -1,
+                                                     G_MAXINT,
+                                                     -1,
+                                                     GTK_PARAM_READWRITE));
+  
+  /**
+   * GhbCellRendererText:wrap-mode:
+   *
+   * Specifies how to break the string into multiple lines, if the cell 
+   * renderer does not have enough room to display the entire string. 
+   * This property has no effect unless the wrap-width property is set.
+   *
+   * Since: 2.8
+   */
+  g_object_class_install_property (object_class,
+                                   PROP_WRAP_MODE,
+                                   g_param_spec_enum ("wrap-mode",
+                                                     P_("Wrap mode"),
+                                                     P_("How to break the string into multiple lines, "
+                                                        "if the cell renderer does not have enough room "
+                                                        "to display the entire string"),
+                                                     PANGO_TYPE_WRAP_MODE,
+                                                     PANGO_WRAP_CHAR,
+                                                     GTK_PARAM_READWRITE));
+
+  /**
+   * GhbCellRendererText:wrap-width:
+   *
+   * Specifies the width at which the text is wrapped. The wrap-mode property can 
+   * be used to influence at what character positions the line breaks can be placed.
+   * Setting wrap-width to -1 turns wrapping off.
+   *
+   * Since: 2.8
+   */
+  g_object_class_install_property (object_class,
+                                  PROP_WRAP_WIDTH,
+                                  g_param_spec_int ("wrap-width",
+                                                    P_("Wrap width"),
+                                                    P_("The width at which the text is wrapped"),
+                                                    -1,
+                                                    G_MAXINT,
+                                                    -1,
+                                                    GTK_PARAM_READWRITE));
+
+  /**
+   * GhbCellRendererText:alignment:
+   *
+   * Specifies how to align the lines of text with respect to each other. 
+   *
+   * Note that this property describes how to align the lines of text in 
+   * case there are several of them. The "xalign" property of #GtkCellRenderer, 
+   * on the other hand, sets the horizontal alignment of the whole text.
+   *
+   * Since: 2.10
+   */
+  g_object_class_install_property (object_class,
+                                   PROP_ALIGN,
+                                   g_param_spec_enum ("alignment",
+                                                     P_("Alignment"),
+                                                     P_("How to align the lines"),
+                                                     PANGO_TYPE_ALIGNMENT,
+                                                     PANGO_ALIGN_LEFT,
+                                                     GTK_PARAM_READWRITE));
+  
+  /* Style props are set or not */
+
+#define ADD_SET_PROP(propname, propval, nick, blurb) g_object_class_install_property (object_class, propval, g_param_spec_boolean (propname, nick, blurb, FALSE, GTK_PARAM_READWRITE))
+
+  ADD_SET_PROP ("background-set", PROP_BACKGROUND_SET,
+                P_("Background set"),
+                P_("Whether this tag affects the background color"));
+
+  ADD_SET_PROP ("foreground-set", PROP_FOREGROUND_SET,
+                P_("Foreground set"),
+                P_("Whether this tag affects the foreground color"));
+  
+  ADD_SET_PROP ("editable-set", PROP_EDITABLE_SET,
+                P_("Editability set"),
+                P_("Whether this tag affects text editability"));
+
+  ADD_SET_PROP ("family-set", PROP_FAMILY_SET,
+                P_("Font family set"),
+                P_("Whether this tag affects the font family"));  
+
+  ADD_SET_PROP ("style-set", PROP_STYLE_SET,
+                P_("Font style set"),
+                P_("Whether this tag affects the font style"));
+
+  ADD_SET_PROP ("variant-set", PROP_VARIANT_SET,
+                P_("Font variant set"),
+                P_("Whether this tag affects the font variant"));
+
+  ADD_SET_PROP ("weight-set", PROP_WEIGHT_SET,
+                P_("Font weight set"),
+                P_("Whether this tag affects the font weight"));
+
+  ADD_SET_PROP ("stretch-set", PROP_STRETCH_SET,
+                P_("Font stretch set"),
+                P_("Whether this tag affects the font stretch"));
+
+  ADD_SET_PROP ("size-set", PROP_SIZE_SET,
+                P_("Font size set"),
+                P_("Whether this tag affects the font size"));
+
+  ADD_SET_PROP ("scale-set", PROP_SCALE_SET,
+                P_("Font scale set"),
+                P_("Whether this tag scales the font size by a factor"));
+  
+  ADD_SET_PROP ("rise-set", PROP_RISE_SET,
+                P_("Rise set"),
+                P_("Whether this tag affects the rise"));
+
+  ADD_SET_PROP ("strikethrough-set", PROP_STRIKETHROUGH_SET,
+                P_("Strikethrough set"),
+                P_("Whether this tag affects strikethrough"));
+
+  ADD_SET_PROP ("underline-set", PROP_UNDERLINE_SET,
+                P_("Underline set"),
+                P_("Whether this tag affects underlining"));
+
+  ADD_SET_PROP ("language-set", PROP_LANGUAGE_SET,
+                P_("Language set"),
+                P_("Whether this tag affects the language the text is rendered as"));
+
+  ADD_SET_PROP ("ellipsize-set", PROP_ELLIPSIZE_SET,
+                P_("Ellipsize set"),
+                P_("Whether this tag affects the ellipsize mode"));
+
+  ADD_SET_PROP ("align-set", PROP_ALIGN_SET,
+                P_("Align set"),
+                P_("Whether this tag affects the alignment mode"));
+
+  /**
+   * GhbCellRendererText::edited
+   * @renderer: the object which received the signal
+   * @path: the path identifying the edited cell
+   * @new_text: the new text
+   *
+   * This signal is emitted after @renderer has been edited.
+   *
+   * It is the responsibility of the application to update the model
+   * and store @new_text at the position indicated by @path.
+   */
+  text_cell_renderer_signals [EDITED] =
+    g_signal_new (I_("edited"),
+                 G_OBJECT_CLASS_TYPE (object_class),
+                 G_SIGNAL_RUN_LAST,
+                 G_STRUCT_OFFSET (GhbCellRendererTextClass, edited),
+                 NULL, NULL,
+                 ghb_marshal_VOID__STRING_STRING,
+                 G_TYPE_NONE, 2,
+                 G_TYPE_STRING,
+                 G_TYPE_STRING);
+
+  text_cell_renderer_signals [KEYPRESS] =
+    g_signal_new (I_("key-press-event"),
+                 G_OBJECT_CLASS_TYPE (object_class),
+                 G_SIGNAL_RUN_LAST,
+                 G_STRUCT_OFFSET (GhbCellRendererTextClass, keypress),
+                 NULL, NULL,
+                 ghb_marshal_BOOLEAN__BOXED,
+                 G_TYPE_BOOLEAN, 1,
+                 GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+  g_type_class_add_private (object_class, sizeof (GhbCellRendererTextPrivate));
+}
+
+static void
+ghb_cell_renderer_text_finalize (GObject *object)
+{
+  GhbCellRendererText *celltext = GHB_CELL_RENDERER_TEXT (object);
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (object);
+
+  pango_font_description_free (celltext->font);
+
+  g_free (celltext->text);
+
+  if (celltext->extra_attrs)
+    pango_attr_list_unref (celltext->extra_attrs);
+
+  if (priv->language)
+    g_object_unref (priv->language);
+
+  (* G_OBJECT_CLASS (ghb_cell_renderer_text_parent_class)->finalize) (object);
+}
+
+static PangoFontMask
+get_property_font_set_mask (guint prop_id)
+{
+  switch (prop_id)
+    {
+    case PROP_FAMILY_SET:
+      return PANGO_FONT_MASK_FAMILY;
+    case PROP_STYLE_SET:
+      return PANGO_FONT_MASK_STYLE;
+    case PROP_VARIANT_SET:
+      return PANGO_FONT_MASK_VARIANT;
+    case PROP_WEIGHT_SET:
+      return PANGO_FONT_MASK_WEIGHT;
+    case PROP_STRETCH_SET:
+      return PANGO_FONT_MASK_STRETCH;
+    case PROP_SIZE_SET:
+      return PANGO_FONT_MASK_SIZE;
+    }
+
+  return 0;
+}
+
+static void
+ghb_cell_renderer_text_get_property (GObject        *object,
+                                    guint           param_id,
+                                    GValue         *value,
+                                    GParamSpec     *pspec)
+{
+  GhbCellRendererText *celltext = GHB_CELL_RENDERER_TEXT (object);
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (object);
+
+  switch (param_id)
+    {
+    case PROP_TEXT:
+      g_value_set_string (value, celltext->text);
+      break;
+
+    case PROP_ATTRIBUTES:
+      g_value_set_boxed (value, celltext->extra_attrs);
+      break;
+
+    case PROP_SINGLE_PARAGRAPH_MODE:
+      g_value_set_boolean (value, priv->single_paragraph);
+      break;
+
+    case PROP_BACKGROUND_GDK:
+      {
+        GdkColor color;
+        
+        color.red = celltext->background.red;
+        color.green = celltext->background.green;
+        color.blue = celltext->background.blue;
+        
+        g_value_set_boxed (value, &color);
+      }
+      break;
+
+    case PROP_FOREGROUND_GDK:
+      {
+        GdkColor color;
+        
+        color.red = celltext->foreground.red;
+        color.green = celltext->foreground.green;
+        color.blue = celltext->foreground.blue;
+        
+        g_value_set_boxed (value, &color);
+      }
+      break;
+
+    case PROP_FONT:
+        g_value_take_string (value, pango_font_description_to_string (celltext->font));
+      break;
+      
+    case PROP_FONT_DESC:
+      g_value_set_boxed (value, celltext->font);
+      break;
+
+    case PROP_FAMILY:
+      g_value_set_string (value, pango_font_description_get_family (celltext->font));
+      break;
+
+    case PROP_STYLE:
+      g_value_set_enum (value, pango_font_description_get_style (celltext->font));
+      break;
+
+    case PROP_VARIANT:
+      g_value_set_enum (value, pango_font_description_get_variant (celltext->font));
+      break;
+
+    case PROP_WEIGHT:
+      g_value_set_int (value, pango_font_description_get_weight (celltext->font));
+      break;
+
+    case PROP_STRETCH:
+      g_value_set_enum (value, pango_font_description_get_stretch (celltext->font));
+      break;
+
+    case PROP_SIZE:
+      g_value_set_int (value, pango_font_description_get_size (celltext->font));
+      break;
+
+    case PROP_SIZE_POINTS:
+      g_value_set_double (value, ((double)pango_font_description_get_size (celltext->font)) / (double)PANGO_SCALE);
+      break;
+
+    case PROP_SCALE:
+      g_value_set_double (value, celltext->font_scale);
+      break;
+      
+    case PROP_EDITABLE:
+      g_value_set_boolean (value, celltext->editable);
+      break;
+
+    case PROP_STRIKETHROUGH:
+      g_value_set_boolean (value, celltext->strikethrough);
+      break;
+
+    case PROP_UNDERLINE:
+      g_value_set_enum (value, celltext->underline_style);
+      break;
+
+    case PROP_RISE:
+      g_value_set_int (value, celltext->rise);
+      break;  
+
+    case PROP_LANGUAGE:
+      g_value_set_static_string (value, pango_language_to_string (priv->language));
+      break;
+
+    case PROP_ELLIPSIZE:
+      g_value_set_enum (value, priv->ellipsize);
+      break;
+      
+    case PROP_WRAP_MODE:
+      g_value_set_enum (value, priv->wrap_mode);
+      break;
+
+    case PROP_WRAP_WIDTH:
+      g_value_set_int (value, priv->wrap_width);
+      break;
+      
+    case PROP_ALIGN:
+      g_value_set_enum (value, priv->align);
+      break;
+
+    case PROP_BACKGROUND_SET:
+      g_value_set_boolean (value, celltext->background_set);
+      break;
+
+    case PROP_FOREGROUND_SET:
+      g_value_set_boolean (value, celltext->foreground_set);
+      break;
+
+    case PROP_FAMILY_SET:
+    case PROP_STYLE_SET:
+    case PROP_VARIANT_SET:
+    case PROP_WEIGHT_SET:
+    case PROP_STRETCH_SET:
+    case PROP_SIZE_SET:
+      {
+       PangoFontMask mask = get_property_font_set_mask (param_id);
+       g_value_set_boolean (value, (pango_font_description_get_set_fields (celltext->font) & mask) != 0);
+       
+       break;
+      }
+
+    case PROP_SCALE_SET:
+      g_value_set_boolean (value, celltext->scale_set);
+      break;
+      
+    case PROP_EDITABLE_SET:
+      g_value_set_boolean (value, celltext->editable_set);
+      break;
+
+    case PROP_STRIKETHROUGH_SET:
+      g_value_set_boolean (value, celltext->strikethrough_set);
+      break;
+
+    case PROP_UNDERLINE_SET:
+      g_value_set_boolean (value, celltext->underline_set);
+      break;
+
+    case  PROP_RISE_SET:
+      g_value_set_boolean (value, celltext->rise_set);
+      break;
+
+    case PROP_LANGUAGE_SET:
+      g_value_set_boolean (value, priv->language_set);
+      break;
+
+    case PROP_ELLIPSIZE_SET:
+      g_value_set_boolean (value, priv->ellipsize_set);
+      break;
+
+    case PROP_ALIGN_SET:
+      g_value_set_boolean (value, priv->align_set);
+      break;
+      
+    case PROP_WIDTH_CHARS:
+      g_value_set_int (value, priv->width_chars);
+      break;  
+
+    case PROP_BACKGROUND:
+    case PROP_FOREGROUND:
+    case PROP_MARKUP:
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+      break;
+    }
+}
+
+
+static void
+set_bg_color (GhbCellRendererText *celltext,
+              GdkColor            *color)
+{
+  if (color)
+    {
+      if (!celltext->background_set)
+        {
+          celltext->background_set = TRUE;
+          g_object_notify (G_OBJECT (celltext), "background-set");
+        }
+      
+      celltext->background.red = color->red;
+      celltext->background.green = color->green;
+      celltext->background.blue = color->blue;
+    }
+  else
+    {
+      if (celltext->background_set)
+        {
+          celltext->background_set = FALSE;
+          g_object_notify (G_OBJECT (celltext), "background-set");
+        }
+    }
+}
+
+
+static void
+set_fg_color (GhbCellRendererText *celltext,
+              GdkColor            *color)
+{
+  if (color)
+    {
+      if (!celltext->foreground_set)
+        {
+          celltext->foreground_set = TRUE;
+          g_object_notify (G_OBJECT (celltext), "foreground-set");
+        }
+      
+      celltext->foreground.red = color->red;
+      celltext->foreground.green = color->green;
+      celltext->foreground.blue = color->blue;
+    }
+  else
+    {
+      if (celltext->foreground_set)
+        {
+          celltext->foreground_set = FALSE;
+          g_object_notify (G_OBJECT (celltext), "foreground-set");
+        }
+    }
+}
+
+static PangoFontMask
+set_font_desc_fields (PangoFontDescription *desc,
+                     PangoFontMask         to_set)
+{
+  PangoFontMask changed_mask = 0;
+  
+  if (to_set & PANGO_FONT_MASK_FAMILY)
+    {
+      const char *family = pango_font_description_get_family (desc);
+      if (!family)
+       {
+         family = "sans";
+         changed_mask |= PANGO_FONT_MASK_FAMILY;
+       }
+
+      pango_font_description_set_family (desc, family);
+    }
+  if (to_set & PANGO_FONT_MASK_STYLE)
+    pango_font_description_set_style (desc, pango_font_description_get_style (desc));
+  if (to_set & PANGO_FONT_MASK_VARIANT)
+    pango_font_description_set_variant (desc, pango_font_description_get_variant (desc));
+  if (to_set & PANGO_FONT_MASK_WEIGHT)
+    pango_font_description_set_weight (desc, pango_font_description_get_weight (desc));
+  if (to_set & PANGO_FONT_MASK_STRETCH)
+    pango_font_description_set_stretch (desc, pango_font_description_get_stretch (desc));
+  if (to_set & PANGO_FONT_MASK_SIZE)
+    {
+      gint size = pango_font_description_get_size (desc);
+      if (size <= 0)
+       {
+         size = 10 * PANGO_SCALE;
+         changed_mask |= PANGO_FONT_MASK_SIZE;
+       }
+      
+      pango_font_description_set_size (desc, size);
+    }
+
+  return changed_mask;
+}
+
+static void
+notify_set_changed (GObject       *object,
+                   PangoFontMask  changed_mask)
+{
+  if (changed_mask & PANGO_FONT_MASK_FAMILY)
+    g_object_notify (object, "family-set");
+  if (changed_mask & PANGO_FONT_MASK_STYLE)
+    g_object_notify (object, "style-set");
+  if (changed_mask & PANGO_FONT_MASK_VARIANT)
+    g_object_notify (object, "variant-set");
+  if (changed_mask & PANGO_FONT_MASK_WEIGHT)
+    g_object_notify (object, "weight-set");
+  if (changed_mask & PANGO_FONT_MASK_STRETCH)
+    g_object_notify (object, "stretch-set");
+  if (changed_mask & PANGO_FONT_MASK_SIZE)
+    g_object_notify (object, "size-set");
+}
+
+static void
+notify_fields_changed (GObject       *object,
+                      PangoFontMask  changed_mask)
+{
+  if (changed_mask & PANGO_FONT_MASK_FAMILY)
+    g_object_notify (object, "family");
+  if (changed_mask & PANGO_FONT_MASK_STYLE)
+    g_object_notify (object, "style");
+  if (changed_mask & PANGO_FONT_MASK_VARIANT)
+    g_object_notify (object, "variant");
+  if (changed_mask & PANGO_FONT_MASK_WEIGHT)
+    g_object_notify (object, "weight");
+  if (changed_mask & PANGO_FONT_MASK_STRETCH)
+    g_object_notify (object, "stretch");
+  if (changed_mask & PANGO_FONT_MASK_SIZE)
+    g_object_notify (object, "size");
+}
+
+static void
+set_font_description (GhbCellRendererText  *celltext,
+                      PangoFontDescription *font_desc)
+{
+  GObject *object = G_OBJECT (celltext);
+  PangoFontDescription *new_font_desc;
+  PangoFontMask old_mask, new_mask, changed_mask, set_changed_mask;
+  
+  if (font_desc)
+    new_font_desc = pango_font_description_copy (font_desc);
+  else
+    new_font_desc = pango_font_description_new ();
+
+  old_mask = pango_font_description_get_set_fields (celltext->font);
+  new_mask = pango_font_description_get_set_fields (new_font_desc);
+
+  changed_mask = old_mask | new_mask;
+  set_changed_mask = old_mask ^ new_mask;
+
+  pango_font_description_free (celltext->font);
+  celltext->font = new_font_desc;
+  
+  g_object_freeze_notify (object);
+
+  g_object_notify (object, "font-desc");
+  g_object_notify (object, "font");
+  
+  if (changed_mask & PANGO_FONT_MASK_FAMILY)
+    g_object_notify (object, "family");
+  if (changed_mask & PANGO_FONT_MASK_STYLE)
+    g_object_notify (object, "style");
+  if (changed_mask & PANGO_FONT_MASK_VARIANT)
+    g_object_notify (object, "variant");
+  if (changed_mask & PANGO_FONT_MASK_WEIGHT)
+    g_object_notify (object, "weight");
+  if (changed_mask & PANGO_FONT_MASK_STRETCH)
+    g_object_notify (object, "stretch");
+  if (changed_mask & PANGO_FONT_MASK_SIZE)
+    {
+      g_object_notify (object, "size");
+      g_object_notify (object, "size-points");
+    }
+
+  notify_set_changed (object, set_changed_mask);
+  
+  g_object_thaw_notify (object);
+}
+
+static void
+ghb_cell_renderer_text_set_property (GObject      *object,
+                                    guint         param_id,
+                                    const GValue *value,
+                                    GParamSpec   *pspec)
+{
+  GhbCellRendererText *celltext = GHB_CELL_RENDERER_TEXT (object);
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (object);
+
+  switch (param_id)
+    {
+    case PROP_TEXT:
+      g_free (celltext->text);
+
+      if (priv->markup_set)
+        {
+          if (celltext->extra_attrs)
+            pango_attr_list_unref (celltext->extra_attrs);
+          celltext->extra_attrs = NULL;
+          priv->markup_set = FALSE;
+        }
+
+      celltext->text = g_strdup (g_value_get_string (value));
+      g_object_notify (object, "text");
+      break;
+
+    case PROP_ATTRIBUTES:
+      if (celltext->extra_attrs)
+       pango_attr_list_unref (celltext->extra_attrs);
+
+      celltext->extra_attrs = g_value_get_boxed (value);
+      if (celltext->extra_attrs)
+        pango_attr_list_ref (celltext->extra_attrs);
+      break;
+    case PROP_MARKUP:
+      {
+       const gchar *str;
+       gchar *text = NULL;
+       GError *error = NULL;
+       PangoAttrList *attrs = NULL;
+
+       str = g_value_get_string (value);
+       if (str && !pango_parse_markup (str,
+                                       -1,
+                                       0,
+                                       &attrs,
+                                       &text,
+                                       NULL,
+                                       &error))
+         {
+           g_warning ("Failed to set text from markup due to error parsing markup: %s",
+                      error->message);
+           g_error_free (error);
+           return;
+         }
+
+       g_free (celltext->text);
+
+       if (celltext->extra_attrs)
+         pango_attr_list_unref (celltext->extra_attrs);
+
+       celltext->text = text;
+       celltext->extra_attrs = attrs;
+        priv->markup_set = TRUE;
+      }
+      break;
+
+    case PROP_SINGLE_PARAGRAPH_MODE:
+      priv->single_paragraph = g_value_get_boolean (value);
+      break;
+      
+    case PROP_BACKGROUND:
+      {
+        GdkColor color;
+
+        if (!g_value_get_string (value))
+          set_bg_color (celltext, NULL);       /* reset to background_set to FALSE */
+        else if (gdk_color_parse (g_value_get_string (value), &color))
+          set_bg_color (celltext, &color);
+        else
+          g_warning ("Don't know color `%s'", g_value_get_string (value));
+
+        g_object_notify (object, "background-gdk");
+      }
+      break;
+      
+    case PROP_FOREGROUND:
+      {
+        GdkColor color;
+
+        if (!g_value_get_string (value))
+          set_fg_color (celltext, NULL);       /* reset to foreground_set to FALSE */
+        else if (gdk_color_parse (g_value_get_string (value), &color))
+          set_fg_color (celltext, &color);
+        else
+          g_warning ("Don't know color `%s'", g_value_get_string (value));
+
+        g_object_notify (object, "foreground-gdk");
+      }
+      break;
+
+    case PROP_BACKGROUND_GDK:
+      /* This notifies the GObject itself. */
+      set_bg_color (celltext, g_value_get_boxed (value));
+      break;
+
+    case PROP_FOREGROUND_GDK:
+      /* This notifies the GObject itself. */
+      set_fg_color (celltext, g_value_get_boxed (value));
+      break;
+
+    case PROP_FONT:
+      {
+        PangoFontDescription *font_desc = NULL;
+        const gchar *name;
+
+        name = g_value_get_string (value);
+
+        if (name)
+          font_desc = pango_font_description_from_string (name);
+
+        set_font_description (celltext, font_desc);
+
+       pango_font_description_free (font_desc);
+        
+       if (celltext->fixed_height_rows != -1)
+         celltext->calc_fixed_height = TRUE;
+      }
+      break;
+
+    case PROP_FONT_DESC:
+      set_font_description (celltext, g_value_get_boxed (value));
+      
+      if (celltext->fixed_height_rows != -1)
+       celltext->calc_fixed_height = TRUE;
+      break;
+
+    case PROP_FAMILY:
+    case PROP_STYLE:
+    case PROP_VARIANT:
+    case PROP_WEIGHT:
+    case PROP_STRETCH:
+    case PROP_SIZE:
+    case PROP_SIZE_POINTS:
+      {
+       PangoFontMask old_set_mask = pango_font_description_get_set_fields (celltext->font);
+       
+       switch (param_id)
+         {
+         case PROP_FAMILY:
+           pango_font_description_set_family (celltext->font,
+                                              g_value_get_string (value));
+           break;
+         case PROP_STYLE:
+           pango_font_description_set_style (celltext->font,
+                                             g_value_get_enum (value));
+           break;
+         case PROP_VARIANT:
+           pango_font_description_set_variant (celltext->font,
+                                               g_value_get_enum (value));
+           break;
+         case PROP_WEIGHT:
+           pango_font_description_set_weight (celltext->font,
+                                              g_value_get_int (value));
+           break;
+         case PROP_STRETCH:
+           pango_font_description_set_stretch (celltext->font,
+                                               g_value_get_enum (value));
+           break;
+         case PROP_SIZE:
+           pango_font_description_set_size (celltext->font,
+                                            g_value_get_int (value));
+           g_object_notify (object, "size-points");
+           break;
+         case PROP_SIZE_POINTS:
+           pango_font_description_set_size (celltext->font,
+                                            g_value_get_double (value) * PANGO_SCALE);
+           g_object_notify (object, "size");
+           break;
+         }
+       
+       if (celltext->fixed_height_rows != -1)
+         celltext->calc_fixed_height = TRUE;
+       
+       notify_set_changed (object, old_set_mask & pango_font_description_get_set_fields (celltext->font));
+       g_object_notify (object, "font-desc");
+       g_object_notify (object, "font");
+
+       break;
+      }
+      
+    case PROP_SCALE:
+      celltext->font_scale = g_value_get_double (value);
+      celltext->scale_set = TRUE;
+      if (celltext->fixed_height_rows != -1)
+       celltext->calc_fixed_height = TRUE;
+      g_object_notify (object, "scale-set");
+      break;
+      
+    case PROP_EDITABLE:
+      celltext->editable = g_value_get_boolean (value);
+      celltext->editable_set = TRUE;
+      if (celltext->editable)
+        GTK_CELL_RENDERER (celltext)->mode = GTK_CELL_RENDERER_MODE_EDITABLE;
+      else
+        GTK_CELL_RENDERER (celltext)->mode = GTK_CELL_RENDERER_MODE_INERT;
+      g_object_notify (object, "editable-set");
+      break;
+
+    case PROP_STRIKETHROUGH:
+      celltext->strikethrough = g_value_get_boolean (value);
+      celltext->strikethrough_set = TRUE;
+      g_object_notify (object, "strikethrough-set");
+      break;
+
+    case PROP_UNDERLINE:
+      celltext->underline_style = g_value_get_enum (value);
+      celltext->underline_set = TRUE;
+      g_object_notify (object, "underline-set");
+            
+      break;
+
+    case PROP_RISE:
+      celltext->rise = g_value_get_int (value);
+      celltext->rise_set = TRUE;
+      g_object_notify (object, "rise-set");
+      if (celltext->fixed_height_rows != -1)
+       celltext->calc_fixed_height = TRUE;
+      break;  
+
+    case PROP_LANGUAGE:
+      priv->language_set = TRUE;
+      if (priv->language)
+        g_object_unref (priv->language);
+      priv->language = pango_language_from_string (g_value_get_string (value));
+      g_object_notify (object, "language-set");
+      break;
+
+    case PROP_ELLIPSIZE:
+      priv->ellipsize = g_value_get_enum (value);
+      priv->ellipsize_set = TRUE;
+      g_object_notify (object, "ellipsize-set");
+      break;
+      
+    case PROP_WRAP_MODE:
+      priv->wrap_mode = g_value_get_enum (value);
+      break;
+      
+    case PROP_WRAP_WIDTH:
+      priv->wrap_width = g_value_get_int (value);
+      break;
+            
+    case PROP_WIDTH_CHARS:
+      priv->width_chars = g_value_get_int (value);
+      break;  
+
+    case PROP_ALIGN:
+      priv->align = g_value_get_enum (value);
+      priv->align_set = TRUE;
+      g_object_notify (object, "align-set");
+      break;
+
+    case PROP_BACKGROUND_SET:
+      celltext->background_set = g_value_get_boolean (value);
+      break;
+
+    case PROP_FOREGROUND_SET:
+      celltext->foreground_set = g_value_get_boolean (value);
+      break;
+
+    case PROP_FAMILY_SET:
+    case PROP_STYLE_SET:
+    case PROP_VARIANT_SET:
+    case PROP_WEIGHT_SET:
+    case PROP_STRETCH_SET:
+    case PROP_SIZE_SET:
+      if (!g_value_get_boolean (value))
+       {
+         pango_font_description_unset_fields (celltext->font,
+                                              get_property_font_set_mask (param_id));
+       }
+      else
+       {
+         PangoFontMask changed_mask;
+         
+         changed_mask = set_font_desc_fields (celltext->font,
+                                              get_property_font_set_mask (param_id));
+         notify_fields_changed (G_OBJECT (celltext), changed_mask);
+       }
+      break;
+
+    case PROP_SCALE_SET:
+      celltext->scale_set = g_value_get_boolean (value);
+      break;
+      
+    case PROP_EDITABLE_SET:
+      celltext->editable_set = g_value_get_boolean (value);
+      break;
+
+    case PROP_STRIKETHROUGH_SET:
+      celltext->strikethrough_set = g_value_get_boolean (value);
+      break;
+
+    case PROP_UNDERLINE_SET:
+      celltext->underline_set = g_value_get_boolean (value);
+      break;
+
+    case PROP_RISE_SET:
+      celltext->rise_set = g_value_get_boolean (value);
+      break;
+
+    case PROP_LANGUAGE_SET:
+      priv->language_set = g_value_get_boolean (value);
+      break;
+
+    case PROP_ELLIPSIZE_SET:
+      priv->ellipsize_set = g_value_get_boolean (value);
+      break;
+
+    case PROP_ALIGN_SET:
+      priv->align_set = g_value_get_boolean (value);
+      break;
+      
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+      break;
+    }
+}
+
+/**
+ * ghb_cell_renderer_text_new:
+ * 
+ * Creates a new #GhbCellRendererText. Adjust how text is drawn using
+ * object properties. Object properties can be
+ * set globally (with g_object_set()). Also, with #GtkTreeViewColumn,
+ * you can bind a property to a value in a #GtkTreeModel. For example,
+ * you can bind the "text" property on the cell renderer to a string
+ * value in the model, thus rendering a different string in each row
+ * of the #GtkTreeView
+ * 
+ * Return value: the new cell renderer
+ **/
+GtkCellRenderer *
+ghb_cell_renderer_text_new (void)
+{
+  return g_object_new (GHB_TYPE_CELL_RENDERER_TEXT, NULL);
+}
+
+static void
+add_attr (PangoAttrList  *attr_list,
+          PangoAttribute *attr)
+{
+  attr->start_index = 0;
+  attr->end_index = G_MAXINT;
+  
+  pango_attr_list_insert (attr_list, attr);
+}
+
+static PangoLayout*
+get_layout (GhbCellRendererText *celltext,
+            GtkWidget           *widget,
+            gboolean             will_render,
+            GtkCellRendererState flags)
+{
+  PangoAttrList *attr_list;
+  PangoLayout *layout;
+  PangoUnderline uline;
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (celltext);
+  
+  layout = gtk_widget_create_pango_layout (widget, celltext->text);
+
+  if (celltext->extra_attrs)
+    attr_list = pango_attr_list_copy (celltext->extra_attrs);
+  else
+    attr_list = pango_attr_list_new ();
+
+  pango_layout_set_single_paragraph_mode (layout, priv->single_paragraph);
+
+  if (will_render)
+    {
+      /* Add options that affect appearance but not size */
+      
+      /* note that background doesn't go here, since it affects
+       * background_area not the PangoLayout area
+       */
+      
+      if (celltext->foreground_set
+         && (flags & GTK_CELL_RENDERER_SELECTED) == 0)
+        {
+          PangoColor color;
+
+          color = celltext->foreground;
+          
+          add_attr (attr_list,
+                    pango_attr_foreground_new (color.red, color.green, color.blue));
+        }
+
+      if (celltext->strikethrough_set)
+        add_attr (attr_list,
+                  pango_attr_strikethrough_new (celltext->strikethrough));
+    }
+
+  add_attr (attr_list, pango_attr_font_desc_new (celltext->font));
+
+  if (celltext->scale_set &&
+      celltext->font_scale != 1.0)
+    add_attr (attr_list, pango_attr_scale_new (celltext->font_scale));
+  
+  if (celltext->underline_set)
+    uline = celltext->underline_style;
+  else
+    uline = PANGO_UNDERLINE_NONE;
+
+  if (priv->language_set)
+    add_attr (attr_list, pango_attr_language_new (priv->language));
+  
+  if ((flags & GTK_CELL_RENDERER_PRELIT) == GTK_CELL_RENDERER_PRELIT)
+    {
+      switch (uline)
+        {
+        case PANGO_UNDERLINE_NONE:
+          uline = PANGO_UNDERLINE_SINGLE;
+          break;
+
+        case PANGO_UNDERLINE_SINGLE:
+          uline = PANGO_UNDERLINE_DOUBLE;
+          break;
+
+        default:
+          break;
+        }
+    }
+
+  if (uline != PANGO_UNDERLINE_NONE)
+    add_attr (attr_list, pango_attr_underline_new (celltext->underline_style));
+
+  if (celltext->rise_set)
+    add_attr (attr_list, pango_attr_rise_new (celltext->rise));
+
+  if (priv->ellipsize_set)
+    pango_layout_set_ellipsize (layout, priv->ellipsize);
+  else
+    pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_NONE);
+
+  if (priv->wrap_width != -1)
+    {
+      pango_layout_set_width (layout, priv->wrap_width * PANGO_SCALE);
+      pango_layout_set_wrap (layout, priv->wrap_mode);
+    }
+  else
+    {
+      pango_layout_set_width (layout, -1);
+      pango_layout_set_wrap (layout, PANGO_WRAP_CHAR);
+    }
+
+  if (priv->align_set)
+    pango_layout_set_alignment (layout, priv->align);
+  else
+    {
+      PangoAlignment align;
+
+      if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
+       align = PANGO_ALIGN_RIGHT;
+      else
+       align = PANGO_ALIGN_LEFT;
+
+      pango_layout_set_alignment (layout, align);
+    }
+
+  pango_layout_set_attributes (layout, attr_list);
+
+  pango_attr_list_unref (attr_list);
+  
+  return layout;
+}
+
+static void
+get_size (GtkCellRenderer *cell,
+         GtkWidget       *widget,
+         GdkRectangle    *cell_area,
+         PangoLayout     *layout,
+         gint            *x_offset,
+         gint            *y_offset,
+         gint            *width,
+         gint            *height)
+{
+  GhbCellRendererText *celltext = (GhbCellRendererText *) cell;
+  PangoRectangle rect;
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (cell);
+
+  if (celltext->calc_fixed_height)
+    {
+      PangoContext *context;
+      PangoFontMetrics *metrics;
+      PangoFontDescription *font_desc;
+      gint row_height;
+
+      font_desc = pango_font_description_copy_static (widget->style->font_desc);
+      pango_font_description_merge_static (font_desc, celltext->font, TRUE);
+
+      if (celltext->scale_set)
+       pango_font_description_set_size (font_desc,
+                                        celltext->font_scale * pango_font_description_get_size (font_desc));
+
+      context = gtk_widget_get_pango_context (widget);
+
+      metrics = pango_context_get_metrics (context,
+                                          font_desc,
+                                          pango_context_get_language (context));
+      row_height = (pango_font_metrics_get_ascent (metrics) +
+                   pango_font_metrics_get_descent (metrics));
+      pango_font_metrics_unref (metrics);
+
+      pango_font_description_free (font_desc);
+
+      gtk_cell_renderer_set_fixed_size (cell,
+                                       cell->width, 2*cell->ypad +
+                                       celltext->fixed_height_rows * PANGO_PIXELS (row_height));
+      
+      if (height)
+       {
+         *height = cell->height;
+         height = NULL;
+       }
+      celltext->calc_fixed_height = FALSE;
+      if (width == NULL)
+       return;
+    }
+  
+  if (layout)
+    g_object_ref (layout);
+  else
+    layout = get_layout (celltext, widget, FALSE, 0);
+
+  pango_layout_get_extents (layout, NULL, &rect);
+  pango_extents_to_pixels (&rect, NULL);
+
+  if (height)
+    *height = cell->ypad * 2 + rect.height;
+
+  /* The minimum size for ellipsized labels is ~ 3 chars */
+  if (width)
+    {
+      if (priv->ellipsize || priv->width_chars > 0)
+       {
+         PangoContext *context;
+         PangoFontMetrics *metrics;
+         gint char_width;
+
+         context = pango_layout_get_context (layout);
+         metrics = pango_context_get_metrics (context, widget->style->font_desc, pango_context_get_language (context));
+
+         char_width = pango_font_metrics_get_approximate_char_width (metrics);
+         pango_font_metrics_unref (metrics);
+         
+         *width = cell->xpad * 2 + (PANGO_PIXELS (char_width) * MAX (priv->width_chars, 3));
+       }
+      else
+       {
+         *width = cell->xpad * 2 + rect.x + rect.width;
+       }         
+    }
+
+  if (cell_area)
+    {
+      if (x_offset)
+       {
+         if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
+           *x_offset = (1.0 - cell->xalign) * (cell_area->width - (rect.x + rect.width + (2 * cell->xpad)));
+         else 
+           *x_offset = cell->xalign * (cell_area->width - (rect.x + rect.width + (2 * cell->xpad)));
+
+         if ((priv->ellipsize_set && priv->ellipsize != PANGO_ELLIPSIZE_NONE) || priv->wrap_width != -1)
+           *x_offset = MAX(*x_offset, 0);
+       }
+      if (y_offset)
+       {
+         *y_offset = cell->yalign * (cell_area->height - (rect.height + (2 * cell->ypad)));
+         *y_offset = MAX (*y_offset, 0);
+       }
+    }
+  else
+    {
+      if (x_offset) *x_offset = 0;
+      if (y_offset) *y_offset = 0;
+    }
+
+  g_object_unref (layout);
+}
+
+
+static void
+ghb_cell_renderer_text_get_size (GtkCellRenderer *cell,
+                                GtkWidget       *widget,
+                                GdkRectangle    *cell_area,
+                                gint            *x_offset,
+                                gint            *y_offset,
+                                gint            *width,
+                                gint            *height)
+{
+  get_size (cell, widget, cell_area, NULL,
+           x_offset, y_offset, width, height);
+}
+
+static void
+ghb_cell_renderer_text_render (GtkCellRenderer      *cell,
+                              GdkDrawable          *window,
+                              GtkWidget            *widget,
+                              GdkRectangle         *background_area,
+                              GdkRectangle         *cell_area,
+                              GdkRectangle         *expose_area,
+                              GtkCellRendererState  flags)
+
+{
+  GhbCellRendererText *celltext = (GhbCellRendererText *) cell;
+  PangoLayout *layout;
+  GtkStateType state;
+  gint x_offset;
+  gint y_offset;
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (cell);
+
+  layout = get_layout (celltext, widget, TRUE, flags);
+  get_size (cell, widget, cell_area, layout, &x_offset, &y_offset, NULL, NULL);
+
+  if (!cell->sensitive) 
+    {
+      state = GTK_STATE_INSENSITIVE;
+    }
+  else if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED)
+    {
+      if (GTK_WIDGET_HAS_FOCUS (widget))
+       state = GTK_STATE_SELECTED;
+      else
+       state = GTK_STATE_ACTIVE;
+    }
+  else if ((flags & GTK_CELL_RENDERER_PRELIT) == GTK_CELL_RENDERER_PRELIT &&
+          GTK_WIDGET_STATE (widget) == GTK_STATE_PRELIGHT)
+    {
+      state = GTK_STATE_PRELIGHT;
+    }
+  else
+    {
+      if (GTK_WIDGET_STATE (widget) == GTK_STATE_INSENSITIVE)
+       state = GTK_STATE_INSENSITIVE;
+      else
+       state = GTK_STATE_NORMAL;
+    }
+
+  if (celltext->background_set && 
+      (flags & GTK_CELL_RENDERER_SELECTED) == 0)
+    {
+      cairo_t *cr = gdk_cairo_create (window);
+
+      if (expose_area)
+       {
+         gdk_cairo_rectangle (cr, expose_area);
+         cairo_clip (cr);
+       }
+
+      gdk_cairo_rectangle (cr, background_area);
+      cairo_set_source_rgb (cr,
+                           celltext->background.red / 65535.,
+                           celltext->background.green / 65535.,
+                           celltext->background.blue / 65535.);
+      cairo_fill (cr);
+      
+      cairo_destroy (cr);
+    }
+
+  if (priv->ellipsize_set && priv->ellipsize != PANGO_ELLIPSIZE_NONE)
+    pango_layout_set_width (layout, 
+                           (cell_area->width - x_offset - 2 * cell->xpad) * PANGO_SCALE);
+  else if (priv->wrap_width == -1)
+    pango_layout_set_width (layout, -1);
+
+  gtk_paint_layout (widget->style,
+                    window,
+                    state,
+                   TRUE,
+                    expose_area,
+                    widget,
+                    "cellrenderertext",
+                    cell_area->x + x_offset + cell->xpad,
+                    cell_area->y + y_offset + cell->ypad,
+                    layout);
+
+  g_object_unref (layout);
+}
+
+static gboolean
+ghb_cell_renderer_text_keypress(
+       GtkCellEditable *entry,
+       GdkEventKey *event,
+       gpointer data)
+{
+       gboolean result;
+       g_signal_emit(
+               data, text_cell_renderer_signals[KEYPRESS], 0, event, &result);
+       return result;
+}
+
+static void
+ghb_cell_renderer_text_editing_done (GtkCellEditable *entry,
+                                    gpointer         data)
+{
+  const gchar *path;
+  const gchar *new_text;
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (data);
+
+  priv->entry = NULL;
+
+  if (priv->focus_out_id > 0)
+    {
+      g_signal_handler_disconnect (entry, priv->focus_out_id);
+      priv->focus_out_id = 0;
+    }
+
+  if (priv->populate_popup_id > 0)
+    {
+      g_signal_handler_disconnect (entry, priv->populate_popup_id);
+      priv->populate_popup_id = 0;
+    }
+
+  if (priv->entry_menu_popdown_timeout)
+    {
+      g_source_remove (priv->entry_menu_popdown_timeout);
+      priv->entry_menu_popdown_timeout = 0;
+    }
+
+  gtk_cell_renderer_stop_editing (GTK_CELL_RENDERER (data), 
+                                 GTK_ENTRY (entry)->editing_canceled);
+  if (GTK_ENTRY (entry)->editing_canceled)
+    return;
+
+  path = g_object_get_data (G_OBJECT (entry), GHB_CELL_RENDERER_TEXT_PATH);
+  new_text = gtk_entry_get_text (GTK_ENTRY (entry));
+
+  g_signal_emit (data, text_cell_renderer_signals[EDITED], 0, path, new_text);
+}
+
+static gboolean
+popdown_timeout (gpointer data)
+{
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (data);
+
+  priv->entry_menu_popdown_timeout = 0;
+
+  if (!GTK_WIDGET_HAS_FOCUS (priv->entry))
+    ghb_cell_renderer_text_editing_done (GTK_CELL_EDITABLE (priv->entry), data);
+
+  return FALSE;
+}
+
+static void
+ghb_cell_renderer_text_popup_unmap (GtkMenu *menu,
+                                    gpointer data)
+{
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (data);
+
+  priv->in_entry_menu = FALSE;
+
+  if (priv->entry_menu_popdown_timeout)
+    return;
+
+  priv->entry_menu_popdown_timeout = gdk_threads_add_timeout (500, popdown_timeout,
+                                                    data);
+}
+
+static void
+ghb_cell_renderer_text_populate_popup (GtkEntry *entry,
+                                       GtkMenu  *menu,
+                                       gpointer  data)
+{
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (data);
+
+  if (priv->entry_menu_popdown_timeout)
+    {
+      g_source_remove (priv->entry_menu_popdown_timeout);
+      priv->entry_menu_popdown_timeout = 0;
+    }
+
+  priv->in_entry_menu = TRUE;
+
+  g_signal_connect (menu, "unmap",
+                    G_CALLBACK (ghb_cell_renderer_text_popup_unmap), data);
+}
+
+static gboolean
+ghb_cell_renderer_text_focus_out_event (GtkWidget *entry,
+                                       GdkEvent  *event,
+                                       gpointer   data)
+{
+  GhbCellRendererTextPrivate *priv;
+
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (data);
+
+  if (priv->in_entry_menu)
+    return FALSE;
+
+  GTK_ENTRY (entry)->editing_canceled = TRUE;
+  gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
+  gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (entry));
+
+  /* entry needs focus-out-event */
+  return FALSE;
+}
+
+static GtkCellEditable *
+ghb_cell_renderer_text_start_editing (GtkCellRenderer      *cell,
+                                     GdkEvent             *event,
+                                     GtkWidget            *widget,
+                                     const gchar          *path,
+                                     GdkRectangle         *background_area,
+                                     GdkRectangle         *cell_area,
+                                     GtkCellRendererState  flags)
+{
+  GtkRequisition requisition;
+  GhbCellRendererText *celltext;
+  GhbCellRendererTextPrivate *priv;
+
+  celltext = GHB_CELL_RENDERER_TEXT (cell);
+  priv = GHB_CELL_RENDERER_TEXT_GET_PRIVATE (cell);
+
+  /* If the cell isn't editable we return NULL. */
+  if (celltext->editable == FALSE)
+    return NULL;
+
+  priv->entry = g_object_new (GTK_TYPE_ENTRY,
+                             "has-frame", FALSE,
+                             "xalign", cell->xalign,
+                             NULL);
+
+  if (celltext->text)
+    gtk_entry_set_text (GTK_ENTRY (priv->entry), celltext->text);
+  g_object_set_data_full (G_OBJECT (priv->entry), I_(GHB_CELL_RENDERER_TEXT_PATH), g_strdup (path), g_free);
+  
+  gtk_editable_select_region (GTK_EDITABLE (priv->entry), 0, -1);
+  
+  gtk_widget_size_request (priv->entry, &requisition);
+  if (requisition.height < cell_area->height)
+    {
+      GtkBorder *style_border;
+      GtkBorder border;
+
+      gtk_widget_style_get (priv->entry,
+                           "inner-border", &style_border,
+                           NULL);
+
+      if (style_border)
+        {
+         border = *style_border;
+         g_boxed_free (GTK_TYPE_BORDER, style_border);
+       }
+      else
+        {
+         /* Since boxed style properties can't have default values ... */
+         border.left = 2;
+         border.right = 2;
+       }
+
+      border.top = (cell_area->height - requisition.height) / 2;
+      border.bottom = (cell_area->height - requisition.height) / 2;
+      gtk_entry_set_inner_border (GTK_ENTRY (priv->entry), &border);
+    }
+
+  priv->in_entry_menu = FALSE;
+  if (priv->entry_menu_popdown_timeout)
+    {
+      g_source_remove (priv->entry_menu_popdown_timeout);
+      priv->entry_menu_popdown_timeout = 0;
+    }
+
+  g_signal_connect (priv->entry,
+                   "key-press-event",
+                   G_CALLBACK (ghb_cell_renderer_text_keypress),
+                   celltext);
+  g_signal_connect (priv->entry,
+                   "editing_done",
+                   G_CALLBACK (ghb_cell_renderer_text_editing_done),
+                   celltext);
+  priv->focus_out_id = g_signal_connect_after (priv->entry, "focus_out_event",
+                                              G_CALLBACK (ghb_cell_renderer_text_focus_out_event),
+                                              celltext);
+  priv->populate_popup_id =
+    g_signal_connect (priv->entry, "populate_popup",
+                      G_CALLBACK (ghb_cell_renderer_text_populate_popup),
+                      celltext);
+  gtk_widget_show (priv->entry);
+
+  return GTK_CELL_EDITABLE (priv->entry);
+}
+
+/**
+ * ghb_cell_renderer_text_set_fixed_height_from_font:
+ * @renderer: A #GhbCellRendererText
+ * @number_of_rows: Number of rows of text each cell renderer is allocated, or -1
+ * 
+ * Sets the height of a renderer to explicitly be determined by the "font" and
+ * "y_pad" property set on it.  Further changes in these properties do not
+ * affect the height, so they must be accompanied by a subsequent call to this
+ * function.  Using this function is unflexible, and should really only be used
+ * if calculating the size of a cell is too slow (ie, a massive number of cells
+ * displayed).  If @number_of_rows is -1, then the fixed height is unset, and
+ * the height is determined by the properties again.
+ **/
+void
+ghb_cell_renderer_text_set_fixed_height_from_font (GhbCellRendererText *renderer,
+                                                  gint                 number_of_rows)
+{
+  g_return_if_fail (GHB_IS_CELL_RENDERER_TEXT (renderer));
+  g_return_if_fail (number_of_rows == -1 || number_of_rows > 0);
+
+  if (number_of_rows == -1)
+    {
+      gtk_cell_renderer_set_fixed_size (GTK_CELL_RENDERER (renderer),
+                                       GTK_CELL_RENDERER (renderer)->width,
+                                       -1);
+    }
+  else
+    {
+      renderer->fixed_height_rows = number_of_rows;
+      renderer->calc_fixed_height = TRUE;
+    }
+}
+
diff --git a/gtk/src/ghbcellrenderertext.h b/gtk/src/ghbcellrenderertext.h
new file mode 100644 (file)
index 0000000..0e12ba1
--- /dev/null
@@ -0,0 +1,105 @@
+/* gtkcellrenderertext.h
+ * Copyright (C) 2000  Red Hat, Inc.,  Jonathan Blandford <jrb@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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 Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GHB_CELL_RENDERER_TEXT_H__
+#define __GHB_CELL_RENDERER_TEXT_H__
+
+#include <pango/pango.h>
+#include <gtk/gtkcellrenderer.h>
+
+
+G_BEGIN_DECLS
+
+
+#define GHB_TYPE_CELL_RENDERER_TEXT            (ghb_cell_renderer_text_get_type ())
+#define GHB_CELL_RENDERER_TEXT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GHB_TYPE_CELL_RENDERER_TEXT, GhbCellRendererText))
+#define GHB_CELL_RENDERER_TEXT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GHB_TYPE_CELL_RENDERER_TEXT, GhbCellRendererTextClass))
+#define GHB_IS_CELL_RENDERER_TEXT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GHB_TYPE_CELL_RENDERER_TEXT))
+#define GHB_IS_CELL_RENDERER_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GHB_TYPE_CELL_RENDERER_TEXT))
+#define GHB_CELL_RENDERER_TEXT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GHB_TYPE_CELL_RENDERER_TEXT, GhbCellRendererTextClass))
+
+typedef struct _GhbCellRendererText      GhbCellRendererText;
+typedef struct _GhbCellRendererTextClass GhbCellRendererTextClass;
+
+struct _GhbCellRendererText
+{
+  GtkCellRenderer parent;
+
+  /*< private >*/
+  gchar *text;
+  PangoFontDescription *font;
+  gdouble font_scale;
+  PangoColor foreground;
+  PangoColor background;
+  
+  PangoAttrList *extra_attrs;
+
+  PangoUnderline underline_style;
+
+  gint rise;
+  gint fixed_height_rows;
+
+  guint strikethrough : 1;
+
+  guint editable  : 1;
+
+  guint scale_set : 1;
+  
+  guint foreground_set : 1;
+  guint background_set : 1;
+  
+  guint underline_set : 1;
+
+  guint rise_set : 1;
+  
+  guint strikethrough_set : 1;
+
+  guint editable_set : 1;
+  guint calc_fixed_height : 1;
+};
+
+struct _GhbCellRendererTextClass
+{
+  GtkCellRendererClass parent_class;
+
+  void (* edited) (GhbCellRendererText *cell_renderer_text,
+                  const gchar         *path,
+                  const gchar         *new_text);
+
+  gboolean (* keypress) (GhbCellRendererText *cell_renderer_text,
+                  GdkEventKey *event);
+
+  /* Padding for future expansion */
+  void (*_gtk_reserved1) (void);
+  void (*_gtk_reserved2) (void);
+  void (*_gtk_reserved3) (void);
+  void (*_gtk_reserved4) (void);
+};
+
+GType            ghb_cell_renderer_text_get_type (void) G_GNUC_CONST;
+GtkCellRenderer *ghb_cell_renderer_text_new      (void);
+
+void             ghb_cell_renderer_text_set_fixed_height_from_font (GhbCellRendererText *renderer,
+                                                                   gint                 number_of_rows);
+
+
+G_END_DECLS
+
+
+#endif /* __GHB_CELL_RENDERER_TEXT_H__ */
diff --git a/gtk/src/hb-activity.32.png b/gtk/src/hb-activity.32.png
new file mode 100644 (file)
index 0000000..315e0fa
Binary files /dev/null and b/gtk/src/hb-activity.32.png differ
diff --git a/gtk/src/hb-add-queue.32.png b/gtk/src/hb-add-queue.32.png
new file mode 100644 (file)
index 0000000..bd9f6ec
Binary files /dev/null and b/gtk/src/hb-add-queue.32.png differ
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
new file mode 100644 (file)
index 0000000..3bc95e3
--- /dev/null
@@ -0,0 +1,3604 @@
+/***************************************************************************
+ *            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 <glib/gstdio.h>
+#include "hb-backend.h"
+#include "settings.h"
+#include "callbacks.h"
+#include "values.h"
+#include "lang.h"
+
+typedef struct
+{
+       const gchar *option;
+       const gchar *shortOpt;
+       gint ivalue;
+       const gchar *svalue;
+} options_map_t;
+
+typedef struct
+{
+       gint count;
+       options_map_t *map;
+} combo_opts_t;
+
+static const gchar *index_str[] =
+{
+       "0",
+       "1",
+       "2",
+       "3",
+       "4",
+       "5",
+       "6",
+       "7",
+       "8",
+       "9",
+       "10",
+};
+
+static options_map_t d_container_opts[] =
+{
+       {"MKV", "mkv", HB_MUX_MKV, "mkv"},
+       {"MP4", "mp4", HB_MUX_MP4, "mp4"},
+       {"M4V", "m4v", HB_MUX_MP4, "m4v"},
+       {"AVI", "avi", HB_MUX_AVI, "avi"},
+       {"OGM", "ogm", HB_MUX_OGM, "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, ""},
+       {"Fast",   "fast",   1, "-1:-1:-1:0:1"},
+       {"Slow",   "slow",   2, "2:-1:-1:0:1"},
+       {"Slower", "slower", 3, "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, ""},
+       {"Weak",   "weak",   1, "2:1:2:3"},
+       {"Medium", "medium", 2, "3:2:2:3"},
+       {"Strong", "strong", 3, "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, ""},
+       {"MPEG-4 (XviD)",   "xvid",   HB_VCODEC_XVID, ""},
+       {"MPEG-4 (FFMPEG)", "ffmpeg", HB_VCODEC_FFMPEG, ""},
+       {"Theora",          "theora", HB_VCODEC_THEORA, ""},
+};
+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, "faac"},
+       {"MP3 (lame)",      "lame",   HB_ACODEC_LAME, "lame"},
+       {"Vorbis",          "vorbis", HB_ACODEC_VORBIS, "vorbis"},
+       {"AC3 (pass-thru)", "ac3",    HB_ACODEC_AC3, "ac3"},
+};
+combo_opts_t acodec_opts =
+{
+       sizeof(d_acodec_opts)/sizeof(options_map_t),
+       d_acodec_opts
+};
+
+static options_map_t d_direct_opts[] =
+{
+       {"None",      "none",     0, "none"},
+       {"Spatial",   "spatial",  1, "spatial"},
+       {"Temporal",  "temporal", 2, "temporal"},
+       {"Automatic", "auto",     3, "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, "dia"},
+       {"Hexagon",              "hex", 1, "hex"},
+       {"Uneven Multi-Hexagon", "umh", 2, "umh"},
+       {"Exhaustive",           "esa", 3, "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, "1"},
+       {"2", "2", 2, "2"},
+       {"3", "3", 3, "3"},
+       {"4", "4", 4, "4"},
+       {"5", "5", 5, "5"},
+       {"6", "6", 6, "6"},
+       {"7", "7", 7, "7"},
+       {"8", "8", 8, "8"},
+       {"9", "9", 9, "9"},
+};
+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, "some"},
+       {"None", "none", 1, "none"},
+       {"All",  "all",  2, "all"},
+       {"Custom",  "custom",  3, "all"},
+};
+combo_opts_t analyse_opts =
+{
+       sizeof(d_analyse_opts)/sizeof(options_map_t),
+       d_analyse_opts
+};
+
+static options_map_t d_trellis_opts[] =
+{
+       {"Disabled",          "0",    0, "0"},
+       {"Final Macro Block", "1",    1, "1"},
+       {"Always",            "2", 2, "2"},
+};
+combo_opts_t trellis_opts =
+{
+       sizeof(d_trellis_opts)/sizeof(options_map_t),
+       d_trellis_opts
+};
+
+combo_opts_t subtitle_opts =
+{
+       0,
+       NULL
+};
+
+combo_opts_t title_opts =
+{
+       0,
+       NULL
+};
+
+combo_opts_t audio_track_opts =
+{
+       0,
+       NULL
+};
+
+typedef struct
+{
+       const gchar *name;
+       combo_opts_t *opts;
+} combo_name_map_t;
+
+combo_name_map_t combo_name_map[] =
+{
+       {"FileFormat", &container_opts},
+       {"PictureDeinterlace", &deint_opts},
+       {"tweak_PictureDeinterlace", &deint_opts},
+       {"PictureDenoise", &denoise_opts},
+       {"tweak_PictureDenoise", &denoise_opts},
+       {"VideoEncoder", &vcodec_opts},
+       {"AudioEncoder", &acodec_opts},
+       {"x264_direct", &direct_opts},
+       {"x264_me", &me_opts},
+       {"x264_subme", &subme_opts},
+       {"x264_analyse", &analyse_opts},
+       {"x264_trellis", &trellis_opts},
+       {"Subtitles", &subtitle_opts},
+       {"title", &title_opts},
+       {"AudioTrack", &audio_track_opts},
+       {NULL, NULL}
+};
+
+#if 0
+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;
+#endif
+
+const iso639_lang_t ghb_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" },
+       {NULL, NULL, NULL, NULL}
+};
+#define        LANG_TABLE_SIZE (sizeof(ghb_language_table)/ sizeof(iso639_lang_t)-1)
+
+static void audio_bitrate_opts_set(GtkBuilder *builder, const gchar *name);
+
+static void
+del_tree(const gchar *name, gboolean del_top)
+{
+       const gchar *file;
+
+       if (g_file_test(name, G_FILE_TEST_IS_DIR))
+       {
+               GDir *gdir = g_dir_open(name, 0, NULL);
+               file = g_dir_read_name(gdir);
+               while (file)
+               {
+                       gchar *path;
+                       path = g_strdup_printf("%s/%s", name, file);
+                       del_tree(path, TRUE);
+                       g_free(path);
+                       file = g_dir_read_name(gdir);
+               }
+               if (del_top)
+                       g_rmdir(name);
+               g_dir_close(gdir);
+       }
+       else
+       {
+               g_unlink(name);
+       }
+}
+
+const gchar*
+ghb_version()
+{
+       return HB_VERSION;
+}
+
+void
+ghb_vquality_range(
+       signal_user_data_t *ud, 
+       gdouble *min, 
+       gdouble *max,
+       gdouble *step,
+       gdouble *page,
+       gint *digits)
+{
+       if (ghb_settings_get_boolean(ud->settings, "directqp"))
+       {
+               gint vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder");
+               // Only x264 and ffmpeg currently support direct qp/crf entry
+               *step = 1;
+               *page = 10;
+               *digits = 0;
+               if (vcodec == HB_VCODEC_X264)
+               {
+                       *min = 0;
+                       *max = 51;
+               }
+               else if (vcodec == HB_VCODEC_FFMPEG)
+               {
+                       *min = 0;
+                       *max = 31;
+               }
+               else
+               {
+                       *min = 0;
+                       *max = 1.0;
+                       *step = 0.001;
+                       *page = 0.1;
+                       *digits = 3;
+               }
+       }
+       else
+       {
+               *min = 0;
+               *max = 1.0;
+               *step = 0.001;
+               *page = 0.1;
+               *digits = 3;
+       }
+}
+
+static gint
+lookup_generic_int(combo_opts_t *opts, const GValue *gval)
+{
+       gint ii;
+       gchar *str;
+       gint result = -1;
+
+       str = ghb_value_string(gval);
+       for (ii = 0; ii < opts->count; ii++)
+       {
+               if (strcmp(opts->map[ii].shortOpt, str) == 0)
+               {
+                       result = opts->map[ii].ivalue;
+                       break;
+               }
+       }
+       g_free(str);
+       return result;
+}
+
+static const gchar*
+lookup_generic_option(combo_opts_t *opts, const GValue *gval)
+{
+       gint ii;
+       gchar *str;
+       const gchar *result = "";
+
+       str = ghb_value_string(gval);
+       for (ii = 0; ii < opts->count; ii++)
+       {
+               if (strcmp(opts->map[ii].shortOpt, str) == 0)
+               {
+                       result = opts->map[ii].option;
+                       break;
+               }
+       }
+       g_free(str);
+       return result;
+}
+
+static gint
+lookup_mix_int(const GValue *mix)
+{
+       gint ii;
+       gchar *str;
+       gint result = 0;
+
+
+       str = ghb_value_string(mix);
+       for (ii = 0; ii < hb_audio_mixdowns_count; ii++)
+       {
+               if (strcmp(hb_audio_mixdowns[ii].short_name, str) == 0)
+               {
+                       result = hb_audio_mixdowns[ii].amixdown;
+                       break;
+               }
+       }
+       g_free(str);
+       return result;
+}
+
+static const gchar*
+lookup_mix_option(const GValue *mix)
+{
+       gint ii;
+       gchar *str;
+       gchar *result = "None";
+
+
+       str = ghb_value_string(mix);
+       for (ii = 0; ii < hb_audio_mixdowns_count; ii++)
+       {
+               if (strcmp(hb_audio_mixdowns[ii].short_name, str) == 0)
+               {
+                       result = hb_audio_mixdowns[ii].human_readable_name;
+                       break;
+               }
+       }
+       g_free(str);
+       return result;
+}
+
+static gint
+lookup_video_rate_int(const GValue *vrate)
+{
+       gint ii;
+       gchar *str;
+       gint result = 0;
+
+       str = ghb_value_string(vrate);
+       for (ii = 0; ii < hb_video_rates_count; ii++)
+       {
+               if (strcmp(hb_video_rates[ii].string, str) == 0)
+               {
+                       result = hb_video_rates[ii].rate;
+                       break;
+               }
+       }
+       g_free(str);
+       // Default to "same as source"
+       return result;
+}
+
+static const gchar*
+lookup_video_rate_option(const GValue *vrate)
+{
+       gint ii;
+       gchar *str;
+       const gchar *result = "Same as source";
+
+       str = ghb_value_string(vrate);
+       for (ii = 0; ii < hb_video_rates_count; ii++)
+       {
+               if (strcmp(hb_video_rates[ii].string, str) == 0)
+               {
+                       result = hb_video_rates[ii].string;
+                       break;
+               }
+       }
+       g_free(str);
+       // Default to "same as source"
+       return result;
+}
+
+static gint
+lookup_audio_rate_int(const GValue *rate)
+{
+       gint ii;
+       gchar *str;
+       gint result = 0;
+
+       // Coincidentally, the string "source" will return 0
+       // which is our flag to use "same as source"
+       str = ghb_value_string(rate);
+       for (ii = 0; ii < hb_audio_rates_count; ii++)
+       {
+               if (strcmp(hb_audio_rates[ii].string, str) == 0)
+               {
+                       result = hb_audio_rates[ii].rate;
+                       break;
+               }
+       }
+       g_free(str);
+       return result;
+}
+
+static const gchar*
+lookup_audio_rate_option(const GValue *rate)
+{
+       gint ii;
+       gchar *str;
+       const gchar *result = "Same as source";
+
+       // Coincidentally, the string "source" will return 0
+       // which is our flag to use "same as source"
+       str = ghb_value_string(rate);
+       for (ii = 0; ii < hb_audio_rates_count; ii++)
+       {
+               if (strcmp(hb_audio_rates[ii].string, str) == 0)
+               {
+                       result = hb_audio_rates[ii].string;
+                       break;
+               }
+       }
+       g_free(str);
+       return result;
+}
+
+static gint
+lookup_audio_bitrate_int(const GValue *rate)
+{
+       gint ii;
+       gchar *str;
+       gint result = 0;
+
+       // Coincidentally, the string "source" will return 0
+       // which is our flag to use "same as source"
+       str = ghb_value_string(rate);
+       for (ii = 0; ii < hb_audio_bitrates_count; ii++)
+       {
+               if (strcmp(hb_audio_bitrates[ii].string, str) == 0)
+               {
+                       result = hb_audio_bitrates[ii].rate;
+                       break;
+               }
+       }
+       g_free(str);
+       return result;
+}
+
+static const gchar*
+lookup_audio_bitrate_option(const GValue *rate)
+{
+       gint ii;
+       gchar *str;
+       const gchar *result = "Same as source";
+
+       // Coincidentally, the string "source" will return 0
+       // which is our flag to use "same as source"
+       str = ghb_value_string(rate);
+       for (ii = 0; ii < hb_audio_bitrates_count; ii++)
+       {
+               if (strcmp(hb_audio_bitrates[ii].string, str) == 0)
+               {
+                       result = hb_audio_bitrates[ii].string;
+                       break;
+               }
+       }
+       g_free(str);
+       return result;
+}
+
+static gint
+lookup_audio_lang_int(const GValue *rate)
+{
+       gint ii;
+       gchar *str;
+       gint result = 0;
+
+       // Coincidentally, the string "source" will return 0
+       // which is our flag to use "same as source"
+       str = ghb_value_string(rate);
+       for (ii = 0; ii < LANG_TABLE_SIZE; ii++)
+       {
+               if (strcmp(ghb_language_table[ii].iso639_2, str) == 0)
+               {
+                       result = ii;
+                       break;
+               }
+       }
+       g_free(str);
+       return result;
+}
+
+static const gchar*
+lookup_audio_lang_option(const GValue *rate)
+{
+       gint ii;
+       gchar *str;
+       const gchar *result = "Same as source";
+
+       // Coincidentally, the string "source" will return 0
+       // which is our flag to use "same as source"
+       str = ghb_value_string(rate);
+       for (ii = 0; ii < LANG_TABLE_SIZE; ii++)
+       {
+               if (strcmp(ghb_language_table[ii].iso639_2, str) == 0)
+               {
+                       result = ghb_language_table[ii].eng_name;
+                       break;
+               }
+       }
+       g_free(str);
+       return result;
+}
+
+static GValue*
+get_acodec_value(gint val)
+{
+       GValue *value = NULL;
+       gint ii;
+
+       for (ii = 0; ii < acodec_opts.count; ii++)
+       {
+               if (acodec_opts.map[ii].ivalue == val)
+               {
+                       value = ghb_string_value_new(acodec_opts.map[ii].shortOpt);
+                       break;
+               }
+       }
+       return value;
+}
+
+#if 0
+static GValue*
+get_abitrate_value(gint val)
+{
+       GValue *value = NULL;
+       gint ii;
+
+       for (ii = 0; ii < hb_audio_bitrates_count; ii++)
+       {
+               if (hb_audio_bitrates[ii].rate == val)
+               {
+                       value = ghb_string_value_new(hb_audio_bitrates[ii].string);
+                       break;
+               }
+       }
+       return value;
+}
+#endif
+
+static GValue*
+get_amix_value(gint val)
+{
+       GValue *value = NULL;
+       gint ii;
+
+       for (ii = 0; ii < hb_audio_mixdowns_count; ii++)
+       {
+               if (hb_audio_mixdowns[ii].amixdown == val)
+               {
+                       value = ghb_string_value_new(hb_audio_mixdowns[ii].short_name);
+                       break;
+               }
+       }
+       return value;
+}
+
+// Handle for libhb.  Gets set by ghb_backend_init()
+static hb_handle_t * h_scan = NULL;
+static hb_handle_t * h_queue = NULL;
+
+extern void hb_get_tempory_directory(hb_handle_t *h, char path[512]);
+
+void
+ghb_hb_cleanup(gboolean partial)
+{
+       char dir[512];
+
+       hb_get_tempory_directory(h_scan, dir);
+       del_tree(dir, !partial);
+}
+
+gint
+ghb_get_title_number(gint titleindex)
+{
+       hb_list_t  * list;
+       hb_title_t * title;
+       
+       if (h_scan == NULL) return 1;
+       list = hb_get_titles( h_scan );
+       if( !hb_list_count( list ) )
+       {
+               /* No valid title, stop right there */
+               return 1;
+       }
+       title = hb_list_item( list, titleindex );
+       if (title == NULL) return 1;    // Bad titleindex
+       return title->index;
+}
+
+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_scan == NULL) return NULL;
+       list = hb_get_titles( h_scan );
+       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;
+}
+
+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;
+       GValue *gval;
+       
+       widget = GHB_WIDGET (builder, "title");
+       gval = ghb_widget_value(widget);
+       titleindex = ghb_lookup_combo_int("title", gval);
+       ghb_value_free(gval);
+       widget = GHB_WIDGET (builder, "AudioTrack");
+       gval = ghb_widget_value(widget);
+       track = ghb_lookup_combo_int("AudioTrack", gval);
+       ghb_value_free(gval);
+       audio = get_hb_audio(titleindex, track);
+       widget = GHB_WIDGET (builder, "FileFormat");
+       gval = ghb_widget_value(widget);
+       container = ghb_lookup_combo_int("FileFormat", gval);
+       ghb_value_free(gval);
+
+       grey_combo_box_item(builder, "x264_analyse", 3, TRUE);
+       grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_FAAC, FALSE);
+       grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_LAME, FALSE);
+       grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_VORBIS, FALSE);
+
+       gboolean allow_ac3 = TRUE;
+       allow_ac3 = (container != HB_MUX_OGM);
+
+       if (allow_ac3)
+       {
+               grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_AC3, FALSE);
+       }
+       else
+       {
+               grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_AC3, TRUE);
+       }
+       if (audio && audio->in.codec != HB_ACODEC_AC3)
+       {
+               grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_AC3, TRUE);
+       }
+       grey_combo_box_item(builder, "VideoEncoder", HB_VCODEC_THEORA, FALSE);
+
+       widget = GHB_WIDGET (builder, "AudioEncoder");
+       gval = ghb_widget_value(widget);
+       acodec = ghb_lookup_combo_int("AudioEncoder", gval);
+       ghb_value_free(gval);
+       if (acodec != HB_ACODEC_AC3)
+       {
+               grey_combo_box_item(builder, "AudioMixdown", 0, TRUE);
+       }
+       if (container == HB_MUX_MP4)
+       {
+               grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_LAME, TRUE);
+               grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_VORBIS, TRUE);
+               grey_combo_box_item(builder, "VideoEncoder", HB_VCODEC_THEORA, TRUE);
+       }
+       else if (container == HB_MUX_AVI)
+       {
+               grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_FAAC, TRUE);
+               grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_VORBIS, TRUE);
+               grey_combo_box_item(builder, "VideoEncoder", HB_VCODEC_THEORA, TRUE);
+       }
+       else if (container == HB_MUX_OGM)
+       {
+               grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_FAAC, 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, "AudioMixdown", HB_AMIXDOWN_MONO, !allow_mono);
+       grey_combo_box_item(builder, "AudioMixdown", HB_AMIXDOWN_STEREO, !allow_stereo);
+       grey_combo_box_item(builder, "AudioMixdown", HB_AMIXDOWN_DOLBY, !allow_dolby);
+       grey_combo_box_item(builder, "AudioMixdown", HB_AMIXDOWN_DOLBYPLII, !allow_dpl2);
+       grey_combo_box_item(builder, "AudioMixdown", 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));
+
+       if (GTK_WIDGET_TYPE(combo) == GTK_TYPE_COMBO_BOX)
+       {
+               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);
+       }
+       else
+       { // Combo box entry
+               gtk_combo_box_entry_set_text_column(GTK_COMBO_BOX_ENTRY(combo), 0);
+       }
+}      
+
+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("mix_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("language_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, ghb_language_table[ii].eng_name, 
+                                                  1, TRUE, 
+                                                  2, ghb_language_table[ii].iso639_2, 
+                                                  3, ii, 
+                                                  4, ghb_language_table[ii].iso639_1, 
+                                                  -1);
+       }
+}
+
+static gchar **titles = NULL;
+
+void
+title_opts_set(GtkBuilder *builder, const gchar *name)
+{
+       GtkTreeIter iter;
+       GtkListStore *store;
+       hb_list_t  * list = NULL;
+       hb_title_t * title = NULL;
+       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_scan != NULL)
+       {
+               list = hb_get_titles( h_scan );
+               count = hb_list_count( list );
+               if (count > 100) count = 100;
+       }
+       if (titles) g_strfreev(titles);
+       if (title_opts.map) g_free(title_opts.map);
+       if (count > 0)
+       {
+               title_opts.count = count;
+               title_opts.map = g_malloc(count*sizeof(options_map_t));
+               titles = g_malloc((count+1) * sizeof(gchar*));
+       }
+       else
+       {
+               title_opts.count = 1;
+               title_opts.map = g_malloc(sizeof(options_map_t));
+               titles = NULL;
+       }
+       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);
+               title_opts.map[0].option = "No Titles";
+               title_opts.map[0].shortOpt = "none";
+               title_opts.map[0].ivalue = -1;
+               title_opts.map[0].svalue = "none";
+               return;
+       }
+       for (ii = 0; ii < count; ii++)
+       {
+               title = (hb_title_t*)hb_list_item(list, ii);
+               if (title->duration != 0)
+               {
+                       titles[ii]  = g_strdup_printf ("%d - %02dh%02dm%02ds",
+                               title->index, title->hours, title->minutes, title->seconds);
+               }
+               else
+               {
+                       titles[ii]  = g_strdup_printf ("%d - Unknown Length", title->index);
+               }
+               gtk_list_store_append(store, &iter);
+               gtk_list_store_set(store, &iter, 
+                                                  0, titles[ii], 
+                                                  1, TRUE, 
+                                                  2, titles[ii], 
+                                                  3, ii, 
+                                                  4, titles[ii], 
+                                                  -1);
+               title_opts.map[ii].option = titles[ii];
+               title_opts.map[ii].shortOpt = titles[ii];
+               title_opts.map[ii].ivalue = ii;
+               title_opts.map[ii].svalue = titles[ii];
+       }
+       titles[ii] = NULL;
+}
+
+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;
+}
+
+void
+audio_track_opts_set(GtkBuilder *builder, const gchar *name, gint titleindex)
+{
+       GtkTreeIter iter;
+       GtkListStore *store;
+       hb_list_t  * list = NULL;
+       hb_title_t * title = NULL;
+    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_scan != NULL)
+       {
+               list = hb_get_titles( h_scan );
+           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 (audio_track_opts.map) g_free(audio_track_opts.map);
+       if (count > 0)
+       {
+               audio_track_opts.count = count;
+               audio_track_opts.map = g_malloc(count*sizeof(options_map_t));
+       }
+       else
+       {
+               audio_track_opts.count = 1;
+               audio_track_opts.map = g_malloc(sizeof(options_map_t));
+       }
+       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);
+               audio_track_opts.map[0].option = "No Audio";
+               audio_track_opts.map[0].shortOpt = "none";
+               audio_track_opts.map[0].ivalue = -1;
+               audio_track_opts.map[0].svalue = "none";
+               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, index_str[ii], 
+                                                  3, ii, 
+                                                  4, index_str[ii], 
+                                                  -1);
+               audio_track_opts.map[ii].option = audio->lang.description,
+               audio_track_opts.map[ii].shortOpt = index_str[ii];
+               audio_track_opts.map[ii].ivalue = ii;
+               audio_track_opts.map[ii].svalue = index_str[ii];
+       }
+}
+
+
+void
+subtitle_opts_set(GtkBuilder *builder, const gchar *name, gint titleindex)
+{
+       GtkTreeIter iter;
+       GtkListStore *store;
+       hb_list_t  * list = NULL;
+       hb_title_t * title = NULL;
+    hb_subtitle_t * subtitle;
+       gint ii;
+       gint count = 0;
+       
+       g_debug("subtitle_opts_set () %s\n", name);
+       store = get_combo_box_store(builder, name);
+       gtk_list_store_clear(store);
+       if (h_scan != NULL)
+       {
+               list = hb_get_titles( h_scan );
+           title = (hb_title_t*)hb_list_item( list, titleindex );
+               if (title != NULL)
+               {
+                       count = hb_list_count( title->list_subtitle );
+               }
+       }
+       if (count > 10) count = 10;
+       if (subtitle_opts.map) g_free(subtitle_opts.map);
+       if (count > 0)
+       {
+               subtitle_opts.count = count+2;
+               subtitle_opts.map = g_malloc((count+2)*sizeof(options_map_t));
+       }
+       else
+       {
+               subtitle_opts.count = LANG_TABLE_SIZE+2;
+               subtitle_opts.map = g_malloc((LANG_TABLE_SIZE+2)*sizeof(options_map_t));
+       }
+       // 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);
+       subtitle_opts.map[0].option = "None";
+       subtitle_opts.map[0].shortOpt = "none";
+       subtitle_opts.map[0].ivalue = -2;
+       subtitle_opts.map[0].svalue = "none";
+       gtk_list_store_append(store, &iter);
+       gtk_list_store_set(store, &iter, 
+                                          0, "Autoselect", 
+                                          1, TRUE, 
+                                          2, "auto", 
+                                          3, -1, 
+                                          4, "auto", 
+                                          -1);
+       subtitle_opts.map[0].option = "Same as audio";
+       subtitle_opts.map[0].shortOpt = "auto";
+       subtitle_opts.map[0].ivalue = -1;
+       subtitle_opts.map[0].svalue = "auto";
+       if (count >0)
+       {
+               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);
+                       subtitle_opts.map[ii+2].option = subtitle->lang;
+                       subtitle_opts.map[ii+2].shortOpt = subtitle->iso639_2;
+                       subtitle_opts.map[ii+2].ivalue = ii;
+                       subtitle_opts.map[ii+2].svalue = subtitle->iso639_2;
+               }
+       }
+       else
+       {
+               for (ii = 0; ii < LANG_TABLE_SIZE; ii++)
+               {
+                       gtk_list_store_append(store, &iter);
+                       gtk_list_store_set(store, &iter, 
+                               0, ghb_language_table[ii].eng_name, 
+                               1, TRUE, 
+                               2, ghb_language_table[ii].iso639_2, 
+                               3, ii, 
+                               4, ghb_language_table[ii].iso639_2, 
+                               -1);
+                       subtitle_opts.map[ii+2].option = ghb_language_table[ii].eng_name;
+                       subtitle_opts.map[ii+2].shortOpt = ghb_language_table[ii].iso639_2;
+                       subtitle_opts.map[ii+2].ivalue = ii;
+                       subtitle_opts.map[ii+2].svalue = ghb_language_table[ii].iso639_2;
+               }
+       }
+}
+
+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_scan == NULL) return 0;
+       list = hb_get_titles( h_scan );
+       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 index)
+{
+       hb_list_t  * list;
+       hb_title_t * title;
+    hb_audio_config_t * audio;
+       gint ii;
+       gint count = 0;
+       gint track = -1;
+       gint match = 0;
+       
+       g_debug("find_audio_track ()\n");
+       if (h_scan != NULL)
+       {
+               list = hb_get_titles( h_scan );
+           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))
+               {
+                       if (index == match)
+                       {
+                               track = ii;
+                               break;
+                       }
+                       match++;
+               }
+       }
+       if (match) return track;
+       if (index < count)
+               track = index;
+       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");
+       if (name == NULL || opts == NULL) return;
+       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);
+       }
+}
+
+combo_opts_t*
+find_combo_table(const gchar *name)
+{
+       gint ii;
+
+       for (ii = 0; combo_name_map[ii].name != NULL; ii++)
+       {
+               if (strcmp(name, combo_name_map[ii].name) == 0)
+               {
+                       return combo_name_map[ii].opts;
+               }
+       }
+       return NULL;
+}
+
+gint
+ghb_lookup_combo_int(const gchar *name, const GValue *gval)
+{
+       if (strcmp(name, "AudioBitrate") == 0)
+               return lookup_audio_bitrate_int(gval);
+       else if (strcmp(name, "AudioSamplerate") == 0)
+               return lookup_audio_rate_int(gval);
+       else if (strcmp(name, "VideoFramerate") == 0)
+               return lookup_video_rate_int(gval);
+       else if (strcmp(name, "AudioMixdown") == 0)
+               return lookup_mix_int(gval);
+       else if (strcmp(name, "SourceAudioLang") == 0)
+               return lookup_audio_lang_int(gval);
+       else
+       {
+               return lookup_generic_int(find_combo_table(name), gval);
+       }
+       g_warning("ghb_lookup_combo_int() couldn't find %s", name);
+       return 0;
+}
+
+const gchar*
+ghb_lookup_combo_option(const gchar *name, const GValue *gval)
+{
+       if (strcmp(name, "AudioBitrate") == 0)
+               return lookup_audio_bitrate_option(gval);
+       else if (strcmp(name, "AudioSamplerate") == 0)
+               return lookup_audio_rate_option(gval);
+       else if (strcmp(name, "VideoFramerate") == 0)
+               return lookup_video_rate_option(gval);
+       else if (strcmp(name, "AudioMixdown") == 0)
+               return lookup_mix_option(gval);
+       else if (strcmp(name, "SourceAudioLang") == 0)
+               return lookup_audio_lang_option(gval);
+       else
+       {
+               return lookup_generic_option(find_combo_table(name), gval);
+       }
+       g_warning("ghb_lookup_combo_int() couldn't find %s", name);
+       return 0;
+}
+
+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)
+       {
+               audio_bitrate_opts_set(builder, "AudioBitrate");
+               audio_samplerate_opts_set(builder, "AudioSamplerate", hb_audio_rates, hb_audio_rates_count);
+               video_rate_opts_set(builder, "VideoFramerate", hb_video_rates, hb_video_rates_count);
+               mix_opts_set(builder, "AudioMixdown");
+               language_opts_set(builder, "SourceAudioLang");
+               subtitle_opts_set(builder, "Subtitles", user_data);
+               title_opts_set(builder, "title");
+               audio_track_opts_set(builder, "AudioTrack", user_data);
+               generic_opts_set(builder, "FileFormat", &container_opts);
+               generic_opts_set(builder, "PictureDeinterlace", &deint_opts);
+               generic_opts_set(builder, "tweak_PictureDeinterlace", &deint_opts);
+               generic_opts_set(builder, "PictureDenoise", &denoise_opts);
+               generic_opts_set(builder, "tweak_PictureDenoise", &denoise_opts);
+               generic_opts_set(builder, "VideoEncoder", &vcodec_opts);
+               generic_opts_set(builder, "AudioEncoder", &acodec_opts);
+               generic_opts_set(builder, "x264_direct", &direct_opts);
+               generic_opts_set(builder, "x264_me", &me_opts);
+               generic_opts_set(builder, "x264_subme", &subme_opts);
+               generic_opts_set(builder, "x264_analyse", &analyse_opts);
+               generic_opts_set(builder, "x264_trellis", &trellis_opts);
+       }
+       else
+       {
+               if (strcmp(name, "AudioBitrate") == 0)
+                       audio_bitrate_opts_set(builder, "AudioBitrate");
+               else if (strcmp(name, "AudioSamplerate") == 0)
+                       audio_samplerate_opts_set(builder, "AudioSamplerate", hb_audio_rates, hb_audio_rates_count);
+               else if (strcmp(name, "VideoFramerate") == 0)
+                       video_rate_opts_set(builder, "VideoFramerate", hb_video_rates, hb_video_rates_count);
+               else if (strcmp(name, "AudioMixdown") == 0)
+                       mix_opts_set(builder, "AudioMixdown");
+               else if (strcmp(name, "SourceAudioLang") == 0)
+                       language_opts_set(builder, "SourceAudioLang");
+               else if (strcmp(name, "Subtitles") == 0)
+                       subtitle_opts_set(builder, "Subtitles", user_data);
+               else if (strcmp(name, "title") == 0)
+                       title_opts_set(builder, "title");
+               else if (strcmp(name, "AudioTrack") == 0)
+                       audio_track_opts_set(builder, "AudioTrack", user_data);
+               else
+                       generic_opts_set(builder, name, find_combo_table(name));
+       }
+       if (handler_id > 0)
+       {
+               g_signal_handler_unblock ((gpointer)combo, handler_id);
+       }
+}
+       
+static void
+init_ui_combo_boxes(GtkBuilder *builder)
+{
+       gint ii;
+
+       init_combo_box(builder, "AudioBitrate");
+       init_combo_box(builder, "AudioSamplerate");
+       init_combo_box(builder, "VideoFramerate");
+       init_combo_box(builder, "AudioMixdown");
+       init_combo_box(builder, "SourceAudioLang");
+       init_combo_box(builder, "Subtitles");
+       init_combo_box(builder, "title");
+       init_combo_box(builder, "AudioTrack");
+       for (ii = 0; combo_name_map[ii].name != NULL; ii++)
+       {
+               init_combo_box(builder, combo_name_map[ii].name);
+       }
+}
+       
+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(GValue *settings)
+{
+       gchar *result;
+       gchar *opts = ghb_settings_get_string(settings, "x264Option");
+       if (opts != NULL)
+       {
+               result = opts;
+       }
+       else
+       {
+               result = g_strdup("");
+       }
+       return result;
+}
+
+GValue*
+ghb_get_chapters(gint titleindex)
+{
+       hb_list_t  * list;
+       hb_title_t * title;
+    hb_chapter_t * chapter;
+       gint count, ii;
+       GValue *chapters = NULL;
+       
+       g_debug("ghb_get_chapters (title = %d)\n", titleindex);
+       if (h_scan == NULL) return NULL;
+       list = hb_get_titles( h_scan );
+    title = (hb_title_t*)hb_list_item( list, titleindex );
+       if (title == NULL) return NULL;
+       count = hb_list_count( title->list_chapter );
+       chapters = ghb_array_value_new(count);
+       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)
+               {
+                       gchar *str;
+                       str = g_strdup_printf ("Chapter %2d", ii+1);
+                       ghb_array_append(chapters, ghb_string_value_new(str));
+                       g_free(str);
+               }
+               else 
+               {
+                       ghb_array_append(chapters, ghb_string_value_new(chapter->title));
+               }
+       }
+       return chapters;
+}
+
+gboolean
+ghb_ac3_in_audio_list(const GValue *audio_list)
+{
+       gint count, ii;
+
+       count = ghb_array_len(audio_list);
+       for (ii = 0; ii < count; ii++)
+       {
+               GValue *asettings;
+               gint acodec;
+
+               asettings = ghb_array_get_nth(audio_list, ii);
+               acodec = ghb_settings_combo_int(asettings, "AudioEncoder");
+               if (acodec == HB_ACODEC_AC3)
+                       return TRUE;
+       }
+       return FALSE;
+}
+
+static void
+audio_bitrate_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 ("%d", rate);
+               gtk_list_store_append(store, &iter);
+               gtk_list_store_set(store, &iter, 
+                                                  0, str, 
+                                                  1, TRUE, 
+                                                  2, str, 
+                                                  3, rate, 
+                                                  4, str, 
+                                                  -1);
+               g_free(str);
+       }
+}
+
+static void
+audio_bitrate_opts_clean(GtkBuilder *builder, const gchar *name, gint last_rate)
+{
+       GtkTreeIter iter;
+       GtkListStore *store;
+       gint ivalue;
+       gboolean done = FALSE;
+       gint ii = 0;
+       guint last = (guint)last_rate;
+       
+       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(
+                               hb_audio_bitrates, ivalue, hb_audio_bitrates_count) < 0)
+                       {
+                               done = !gtk_list_store_remove(store, &iter);
+                       }
+                       else if (ivalue > last)
+                       {
+                               ii++;
+                               gtk_list_store_set(store, &iter, 1, FALSE, -1);
+                               done = !gtk_tree_model_iter_next (GTK_TREE_MODEL(store), &iter);
+                       }
+                       else
+                       {
+                               ii++;
+                               gtk_list_store_set(store, &iter, 1, TRUE, -1);
+                               done = !gtk_tree_model_iter_next (GTK_TREE_MODEL(store), &iter);
+                       }
+               } while (!done);
+       }
+}
+
+static void
+audio_bitrate_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 < hb_audio_bitrates_count; ii++)
+       {
+               gtk_list_store_append(store, &iter);
+               gtk_list_store_set(store, &iter, 
+                                                  0, hb_audio_bitrates[ii].string, 
+                                                  1, TRUE, 
+                                                  2, hb_audio_bitrates[ii].string, 
+                                                  3, hb_audio_bitrates[ii].rate, 
+                                                  4, hb_audio_bitrates[ii].string, 
+                                                  -1);
+       }
+}
+
+void
+ghb_set_passthru_bitrate_opts(GtkBuilder *builder, gint bitrate)
+{
+       audio_bitrate_opts_add(builder, "AudioBitrate", bitrate);
+}
+
+void
+ghb_set_default_bitrate_opts(GtkBuilder *builder, gint last_rate)
+{
+       audio_bitrate_opts_clean(builder, "AudioBitrate", last_rate);
+}
+
+static ghb_status_t hb_status;
+
+void
+ghb_backend_init(GtkBuilder *builder, gint debug, gint update)
+{
+    /* Init libhb */
+    h_scan = hb_init( debug, update );
+    h_queue = hb_init( debug, 0 );
+       // 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_close()
+{
+       hb_close(&h_queue);
+       hb_close(&h_scan);
+}
+
+void
+ghb_backend_scan(const gchar *path, gint titleindex)
+{
+    hb_scan( h_scan, path, titleindex );
+       hb_status.state |= GHB_STATE_SCANNING;
+       // initialize count and cur to something that won't cause FPE
+       // when computing progress
+       hb_status.title_count = 1;
+       hb_status.title_cur = 0;
+}
+
+void
+ghb_backend_queue_scan(const gchar *path, gint titlenum)
+{
+       g_debug("ghb_backend_queue_scan()");
+       hb_scan( h_queue, path, titlenum );
+       hb_status.queue_state |= GHB_STATE_SCANNING;
+}
+
+gint
+ghb_get_state()
+{
+       return hb_status.state;
+}
+
+gint
+ghb_get_queue_state()
+{
+       return hb_status.queue_state;
+}
+
+void
+ghb_clear_state(gint state)
+{
+       hb_status.state &= ~state;
+}
+
+void
+ghb_clear_queue_state(gint state)
+{
+       hb_status.queue_state &= ~state;
+}
+
+void
+ghb_set_state(gint state)
+{
+       hb_status.state |= state;
+}
+
+void
+ghb_set_queue_state(gint state)
+{
+       hb_status.queue_state |= state;
+}
+
+void
+ghb_get_status(ghb_status_t *status)
+{
+       memcpy(status, &hb_status, sizeof(ghb_status_t));
+}
+
+void 
+ghb_track_status()
+{
+    hb_state_t s;
+    hb_state_t s_queue;
+
+       if (h_scan == NULL) return;
+    hb_get_state( h_scan, &s );
+       switch( s.state )
+    {
+#define p s.param.scanning
+        case HB_STATE_SCANNING:
+               {
+                       hb_status.state |= GHB_STATE_SCANNING;
+                       hb_status.title_count = p.title_count;
+                       hb_status.title_cur = p.title_cur;
+               } break;
+#undef p
+
+        case HB_STATE_SCANDONE:
+        {
+                       hb_status.state &= ~GHB_STATE_SCANNING;
+                       hb_status.state |= GHB_STATE_SCANDONE;
+        } break;
+
+    }
+    hb_get_state( h_queue, &s_queue );
+       switch( s_queue.state )
+    {
+        case HB_STATE_SCANNING:
+               {
+                       hb_status.queue_state |= GHB_STATE_SCANNING;
+               } break;
+
+        case HB_STATE_SCANDONE:
+        {
+                       hb_status.queue_state &= ~GHB_STATE_SCANNING;
+                       hb_status.queue_state |= GHB_STATE_SCANDONE;
+        } break;
+
+#define p s_queue.param.working
+        case HB_STATE_WORKING:
+                       hb_status.queue_state |= GHB_STATE_WORKING;
+                       hb_status.queue_state &= ~GHB_STATE_PAUSED;
+                       hb_status.job_cur = p.job_cur;
+                       hb_status.job_count = p.job_count;
+                       hb_status.progress = p.progress;
+                       hb_status.rate_cur = p.rate_cur;
+                       hb_status.rate_avg = p.rate_avg;
+                       hb_status.hours = p.hours;
+                       hb_status.minutes = p.minutes;
+                       hb_status.seconds = p.seconds;
+                       hb_status.unique_id = p.sequence_id & 0xFFFFFF;
+            break;
+#undef p
+
+        case HB_STATE_PAUSED:
+                       hb_status.queue_state |= GHB_STATE_PAUSED;
+            break;
+                               
+        case HB_STATE_MUXING:
+        {
+                       hb_status.queue_state |= GHB_STATE_MUXING;
+        } break;
+
+#define p s_queue.param.workdone
+        case HB_STATE_WORKDONE:
+               {
+            hb_job_t *job;
+
+                       hb_status.queue_state |= GHB_STATE_WORKDONE;
+                       hb_status.queue_state &= ~GHB_STATE_MUXING;
+                       hb_status.queue_state &= ~GHB_STATE_PAUSED;
+                       hb_status.queue_state &= ~GHB_STATE_WORKING;
+                       switch (p.error)
+                       {
+                       case HB_ERROR_NONE:
+                               hb_status.error = GHB_ERROR_NONE;
+                       case HB_ERROR_CANCELED:
+                               hb_status.error = GHB_ERROR_CANCELED;
+                       default:
+                               hb_status.error = GHB_ERROR_FAIL;
+                       }
+                       hb_status.error = p.error;
+                       // 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_queue, 0)) != NULL) 
+                hb_rem( h_queue, job );
+               } break;
+#undef p
+    }
+}
+
+gboolean
+ghb_get_title_info(ghb_title_info_t *tinfo, gint titleindex)
+{
+       hb_list_t  * list;
+       hb_title_t * title;
+       
+    if (h_scan == NULL) return FALSE;
+       list = hb_get_titles( h_scan );
+       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;
+       tinfo->duration = title->duration;
+       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;
+       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_scan == NULL) return;
+       list = hb_get_titles( h_scan );
+       if( !hb_list_count( list ) )
+       {
+               /* No valid title, stop right there */
+               return;
+       }
+       gint titleindex;
+
+       titleindex = ghb_settings_combo_int(ud->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_boolean(ud->settings, "ModDimensions");
+       anamorphic = ghb_settings_get_boolean(ud->settings, "anamorphic");
+       keep_aspect = ghb_settings_get_boolean(ud->settings, "PictureKeepRatio");
+       autocrop = ghb_settings_get_boolean(ud->settings, "PictureAutoCrop");
+       autoscale = ghb_settings_get_boolean(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_boolean(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(ud, "PictureTopCrop", ghb_int64_value(crop[0]));
+                       ghb_ui_update(ud, "PictureBottomCrop", ghb_int64_value(crop[1]));
+                       ghb_ui_update(ud, "PictureLeftCrop", ghb_int64_value(crop[2]));
+                       ghb_ui_update(ud, "PictureRightCrop", ghb_int64_value(crop[3]));
+               }
+       }
+       crop[0] = ghb_settings_get_int(ud->settings, "PictureTopCrop");
+       crop[1] = ghb_settings_get_int(ud->settings, "PictureBottomCrop");
+       crop[2] = ghb_settings_get_int(ud->settings, "PictureLeftCrop");
+       crop[3] = ghb_settings_get_int(ud->settings, "PictureRightCrop");
+       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;
+               max_width = 0; //crop_width;
+               max_height = 0; //crop_height;
+       }
+       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, "PictureWidth");
+               max_height = ghb_settings_get_int(ud->settings, "PictureHeight");
+               // 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)
+               {
+                       max_width = crop_width;
+               }
+               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;
+                       if ((max_width && new_width > max_width) || 
+                               new_width > title->width)
+                       {
+                               height = new_height;
+                       }
+                       else if ((max_height && new_height > max_height) || 
+                                               new_height > title->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(ud, "scale_width", ghb_int64_value(width));
+       ghb_ui_update(ud, "scale_height", ghb_int64_value(height));
+}
+
+static void
+set_preview_job_settings(hb_job_t *job, GValue *settings)
+{
+       job->crop[0] = ghb_settings_get_int(settings, "PictureTopCrop");
+       job->crop[1] = ghb_settings_get_int(settings, "PictureBottomCrop");
+       job->crop[2] = ghb_settings_get_int(settings, "PictureLeftCrop");
+       job->crop[3] = ghb_settings_get_int(settings, "PictureRightCrop");
+
+       gboolean anamorphic, round_dimensions;
+       anamorphic = ghb_settings_get_boolean(settings, "anamorphic");
+       round_dimensions = ghb_settings_get_boolean(settings, "ModDimensions");
+       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_combo_int(settings, "PictureDeinterlace");
+       gboolean decomb = ghb_settings_get_boolean(settings, "PictureDecomb");
+       job->deinterlace = (!decomb && deint == 0) ? 0 : 1;
+}
+
+gint
+ghb_calculate_target_bitrate(GValue *settings, gint titleindex)
+{
+       hb_list_t  * list;
+       hb_title_t * title;
+       hb_job_t   * job;
+       gint size;
+
+       if (h_scan == NULL) return 1500;
+       list = hb_get_titles( h_scan );
+    title = hb_list_item( list, titleindex );
+       if (title == NULL) return 1500;
+       job   = title->job;
+       if (job == NULL) return 1500;
+       size = ghb_settings_get_int(settings, "VideoTargetSize");
+       return hb_calc_bitrate( job, size );
+}
+
+gboolean
+ghb_validate_filter_string(const gchar *str, gint max_fields)
+{
+       gint fields = 0;
+       gchar *end;
+       gdouble val;
+
+       if (str == NULL || *str == 0) return TRUE;
+       while (*str)
+       {
+               val = g_strtod(str, &end);
+               if (str != end)
+               { // Found a numeric value
+                       fields++;
+                       // negative max_fields means infinate
+                       if (max_fields >= 0 && fields > max_fields) return FALSE;
+                       if (*end == 0)
+                               return TRUE;
+                       if (*end != ':')
+                               return FALSE;
+                       str = end + 1;
+               }
+               else
+                       return FALSE;
+       }
+       return FALSE;
+}
+
+gboolean
+ghb_validate_filters(signal_user_data_t *ud)
+{
+       gboolean tweaks;
+       gchar *str;
+       gint index;
+       gchar *message;
+       gboolean enabled;
+
+       tweaks = ghb_settings_get_boolean(ud->settings, "allow_tweaks");
+       if (tweaks)
+       {
+               // detele 6
+               str = ghb_settings_get_string(ud->settings, "tweak_PictureDetelecine");
+               enabled = ghb_settings_get_boolean(ud->settings, "PictureDetelecine");
+               if (enabled && !ghb_validate_filter_string(str, 6))
+               {
+                       message = g_strdup_printf(
+                                               "Invalid Detelecine Settings:\n\n%s\n",
+                                               str);
+                       ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL);
+                       g_free(str);
+                       g_free(message);
+                       return FALSE;
+               }
+               g_free(str);
+               // decomb 7
+               str = ghb_settings_get_string(ud->settings, "tweak_PictureDecomb");
+               enabled = ghb_settings_get_boolean(ud->settings, "PictureDecomb");
+               if (enabled && !ghb_validate_filter_string(str, 7))
+               {
+                       message = g_strdup_printf(
+                                               "Invalid Decomb Settings:\n\n%s\n",
+                                               str);
+                       ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL);
+                       g_free(str);
+                       g_free(message);
+                       return FALSE;
+               }
+               g_free(str);
+               // deinte 4
+               index = ghb_lookup_combo_int("tweak_PictureDeinterlace", 
+                       ghb_settings_get_value(ud->settings, "tweak_PictureDeinterlace"));
+               if (index < 0)
+               {
+                       str = ghb_settings_get_string(ud->settings, "tweak_PictureDeinterlace");
+                       if (!ghb_validate_filter_string(str, 4))
+                       {
+                               message = g_strdup_printf(
+                                                       "Invalid Deinterlace Settings:\n\n%s\n",
+                                                       str);
+                               ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL);
+                               g_free(message);
+                               g_free(str);
+                               return FALSE;
+                       }
+                       g_free(str);
+               }
+               // denois 4
+               index = ghb_lookup_combo_int("tweak_PictureDenoise", 
+                               ghb_settings_get_value(ud->settings, "tweak_PictureDenoise"));
+               if (index < 0)
+               {
+                       str = ghb_settings_get_string(ud->settings, "tweak_PictureDenoise");
+                       if (!ghb_validate_filter_string(str, 4))
+                       {
+                               message = g_strdup_printf(
+                                                       "Invalid Denoise Settings:\n\n%s\n",
+                                                       str);
+                               ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL);
+                               g_free(str);
+                               g_free(message);
+                               return FALSE;
+                       }
+                       g_free(str);
+               }
+       }
+       return TRUE;
+}
+
+gboolean
+ghb_validate_video(signal_user_data_t *ud)
+{
+       gint vcodec, mux;
+       gchar *message;
+
+       mux = ghb_settings_combo_int(ud->settings, "FileFormat");
+       vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder");
+       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(ud, "VideoEncoder", ghb_int64_value(vcodec));
+       }
+       return TRUE;
+}
+
+gboolean
+ghb_validate_audio(signal_user_data_t *ud)
+{
+       hb_list_t  * list;
+       hb_title_t * title;
+       gchar *message;
+       GValue *value;
+
+       if (h_scan == NULL) return FALSE;
+       list = hb_get_titles( h_scan );
+       if( !hb_list_count( list ) )
+       {
+               /* No valid title, stop right there */
+               g_message("No title found.\n");
+               return FALSE;
+       }
+
+       gint titleindex;
+
+       titleindex = ghb_settings_combo_int(ud->settings, "title");
+    title = hb_list_item( list, titleindex );
+       if (title == NULL) return FALSE;
+       gint mux = ghb_settings_combo_int(ud->settings, "FileFormat");
+
+       const GValue *audio_list;
+       gint count, ii;
+
+       audio_list = ghb_settings_get_value(ud->settings, "audio_list");
+       count = ghb_array_len(audio_list);
+       for (ii = 0; ii < count; ii++)
+       {
+               GValue *asettings;
+           hb_audio_config_t *taudio;
+
+               asettings = ghb_array_get_nth(audio_list, ii);
+               gint track = ghb_settings_combo_int(asettings, "AudioTrack");
+               gint codec = ghb_settings_combo_int(asettings, "AudioEncoder");
+        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_take_value(asettings, "AudioEncoder", 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_take_value(asettings, "AudioEncoder", value);
+               }
+               gint mix = ghb_settings_combo_int (asettings, "AudioMixdown");
+               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_take_value(asettings, "AudioMixdown", value);
+               }
+       }
+       return TRUE;
+}
+
+gboolean
+ghb_validate_vquality(GValue *settings)
+{
+       gint vcodec;
+       gchar *message;
+       gint min, max;
+
+       if (ghb_settings_get_boolean(settings, "nocheckvquality")) return TRUE;
+       vcodec = ghb_settings_combo_int(settings, "VideoEncoder");
+       gdouble vquality;
+       vquality = ghb_settings_get_double(settings, "VideoQualitySlider");
+       if (ghb_settings_get_boolean(settings, "vquality_type_constant"))
+       {
+               if (!ghb_settings_get_boolean(settings, "directqp"))
+               {
+                       vquality *= 100.0;
+                       if (vcodec != HB_VCODEC_X264)
+                       {
+                               min = 68;
+                               max = 97;
+                       }
+                       else
+                       {
+                               min = 40;
+                               max = 70;
+                       }
+               }
+               else
+               {
+                       if (vcodec == HB_VCODEC_X264)
+                       {
+                               min = 16;
+                               max = 30;
+                       }
+                       else if (vcodec == HB_VCODEC_FFMPEG)
+                       {
+                               min = 1;
+                               max = 8;
+                       }
+                       else
+                       {
+                               min = 68;
+                               max = 97;
+                               vquality *= 100.0;
+                       }
+               }
+               if (vquality < min || vquality > max)
+               {
+                       message = g_strdup_printf(
+                                               "Interesting video quality choise: %d\n\n"
+                                               "Typical values range from %d to %d.\n"
+                                               "Are you sure you wish to use this setting?",
+                                               (gint)vquality, min, max);
+                       if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, 
+                                                                       "Cancel", "Continue"))
+                       {
+                               g_free(message);
+                               return FALSE;
+                       }
+                       g_free(message);
+               }
+       }
+       return TRUE;
+}
+
+void
+ghb_add_job(GValue *js, gint unique_id)
+{
+       hb_list_t  * list;
+       hb_title_t * title;
+       hb_job_t   * job;
+       static gchar *x264opts;
+       gint sub_id = 0;
+       gboolean tweaks = FALSE;
+       gchar *detel_str = NULL;
+       gchar *decomb_str = NULL;
+       gchar *deint_str = NULL;
+       gchar *deblock_str = NULL;
+       gchar *denoise_str = NULL;
+       gchar *dest_str = NULL;
+
+       g_debug("ghb_add_job()\n");
+       if (h_queue == NULL) return;
+       list = hb_get_titles( h_queue );
+       if( !hb_list_count( list ) )
+       {
+               /* No valid title, stop right there */
+               return;
+       }
+
+       // Since I'm doing a scan of the single title I want just prior 
+       // to adding the job, there is only the one title to choose from.
+       //gint titleindex = ghb_settings_get_int(js, "title");
+    gint titleindex = 0;
+    title = hb_list_item( list, titleindex );
+       if (title == NULL) return;
+
+       /* Set job settings */
+       job   = title->job;
+       if (job == NULL) return;
+
+       tweaks = ghb_settings_get_boolean(js, "allow_tweaks");
+       job->mux = ghb_settings_combo_int(js, "FileFormat");
+       if (job->mux == HB_MUX_MP4)
+       {
+               job->largeFileSize = ghb_settings_get_boolean(js, "Mp4LargeFile");
+               job->mp4_optimize = ghb_settings_get_boolean(js, "Mp4HttpOptimize");
+       }
+       else
+       {
+               job->largeFileSize = FALSE;
+               job->mp4_optimize = FALSE;
+       }
+       gint chapter_start, chapter_end;
+       chapter_start = ghb_settings_get_int(js, "start_chapter");
+       chapter_end = ghb_settings_get_int(js, "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_boolean(js, "ChapterMarkers");
+       if ( job->chapter_markers )
+       {
+               GValue *chapters;
+               GValue *chapter;
+               gint chap;
+               gint count;
+               
+               chapters = ghb_settings_get_value(js, "chapter_list");
+               count = ghb_array_len(chapters);
+               for(chap = chapter_start; chap <= chapter_end; chap++)
+               {
+                       hb_chapter_t * chapter_s;
+                       gchar *name;
+                       
+                       name = NULL;
+                       if (chap-1 < count)
+                       {
+                               chapter = ghb_array_get_nth(chapters, chap-1);
+                               name = ghb_value_string(chapter); 
+                       }
+                       if (name == NULL)
+                       {
+                               name = g_strdup_printf ("Chapter %2d", chap);
+                       }
+                       chapter_s = hb_list_item( job->title->list_chapter, chap - 1);
+                       strncpy(chapter_s->title, name, 1023);
+                       chapter_s->title[1023] = '\0';
+                       g_free(name);
+               }
+       }
+       job->crop[0] = ghb_settings_get_int(js, "PictureTopCrop");
+       job->crop[1] = ghb_settings_get_int(js, "PictureBottomCrop");
+       job->crop[2] = ghb_settings_get_int(js, "PictureLeftCrop");
+       job->crop[3] = ghb_settings_get_int(js, "PictureRightCrop");
+
+       
+       gboolean decomb = ghb_settings_get_boolean(js, "PictureDecomb");
+       gint deint = ghb_settings_combo_int(js, 
+                                       tweaks ? "tweak_PictureDeinterlace":"PictureDeinterlace");
+       if (!decomb)
+               job->deinterlace = (deint != 0) ? 1 : 0;
+       else
+               job->deinterlace = 0;
+    job->grayscale   = ghb_settings_get_boolean(js, "VideoGrayScale");
+
+       gboolean anamorphic = ghb_settings_get_boolean(js, "anamorphic");
+       gboolean round_dimensions = ghb_settings_get_boolean(js, "ModDimensions");
+       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;
+       }
+       /* Add selected filters */
+       job->filters = hb_list_init();
+       gint vrate = ghb_settings_combo_int(js, "VideoFramerate");
+       if( vrate == 0 && ghb_settings_get_boolean(js, "PictureDetelecine" ) )
+               job->vfr = 1;
+       else
+               job->vfr = 0;
+
+       if( ghb_settings_get_boolean(js, "PictureDetelecine" ) )
+       {
+               hb_filter_detelecine.settings = NULL;
+               if (tweaks)
+               {
+                       detel_str = ghb_settings_get_string(js, "tweak_PictureDetelecine");
+                       if (detel_str && detel_str[0])
+                       {
+                               hb_filter_detelecine.settings = detel_str;
+                       }
+               }
+               hb_list_add( job->filters, &hb_filter_detelecine );
+       }
+       if( decomb )
+       {
+               // Use default settings
+               hb_filter_decomb.settings = NULL;
+               if (tweaks)
+               {
+                       decomb_str = ghb_settings_get_string(js, "tweak_PictureDecomb");
+                       if (decomb_str && decomb_str[0])
+                       {
+                               hb_filter_decomb.settings = (gchar*)decomb_str;
+                       }
+               }
+               hb_list_add( job->filters, &hb_filter_decomb );
+       }
+       if( job->deinterlace )
+       {
+               if (deint > 0)
+                       deint_str = g_strdup(deint_opts.map[deint].svalue);
+               else
+                       deint_str = ghb_settings_get_string(js, 
+                                       tweaks ? "tweak_PictureDeinterlace" : "PictureDeinterlace");
+               hb_filter_deinterlace.settings = deint_str;
+               hb_list_add( job->filters, &hb_filter_deinterlace );
+       }
+       gint deblock = ghb_settings_get_int(js, "PictureDeblock");
+       if( deblock >= 5 )
+       {
+               deblock_str = g_strdup_printf("%d", deblock);
+               hb_filter_deblock.settings = deblock_str;
+               hb_list_add( job->filters, &hb_filter_deblock );
+       }
+       gint denoise = ghb_settings_combo_int(js, 
+                                       tweaks ? "tweak_PictureDenoise" : "PictureDenoise");
+       if( denoise != 0 )
+       {
+               if (denoise > 0)
+                       denoise_str = g_strdup(denoise_opts.map[denoise].svalue);
+               else
+                       denoise_str = (gchar*)ghb_settings_get_string(
+                               js, tweaks ? "tweak_PictureDenoise" : "PictureDenoise");
+               hb_filter_denoise.settings = denoise_str;
+               hb_list_add( job->filters, &hb_filter_denoise );
+       }
+       job->width = ghb_settings_get_int(js, "scale_width");
+       job->height = ghb_settings_get_int(js, "scale_height");
+
+       job->vcodec = ghb_settings_combo_int(js, "VideoEncoder");
+       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_boolean(js, "Mp4iPodCompatible");
+       }
+       if (ghb_settings_get_boolean(js, "vquality_type_constant"))
+       {
+               gdouble vquality;
+               vquality = ghb_settings_get_double(js, "VideoQualitySlider");
+               if (!ghb_settings_get_boolean(js, "directqp"))
+               {
+                       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_boolean(js, "vquality_type_bitrate"))
+       {
+               job->vquality = -1.0;
+               job->vbitrate = ghb_settings_get_int(js, "VideoAvgBitrate");
+       }
+       // AVI container does not support variable frame rate.
+       if (job->mux == HB_MUX_AVI)
+       {
+               job->vfr = FALSE;
+               job->cfr = 1;
+       }
+
+       if( vrate == 0 )
+       {
+               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);
+    }
+
+       const GValue *audio_list;
+       gint count;
+       gint tcount = 0;
+       
+       audio_list = ghb_settings_get_value(js, "audio_list");
+       count = ghb_array_len(audio_list);
+       for (ii = 0; ii < count; ii++)
+       {
+               GValue *asettings;
+           hb_audio_config_t audio;
+           hb_audio_config_t *taudio;
+
+               hb_audio_config_init(&audio);
+               asettings = ghb_array_get_nth(audio_list, ii);
+               audio.in.track = ghb_settings_get_int(asettings, "AudioTrack");
+               audio.out.track = tcount;
+               audio.out.codec = ghb_settings_combo_int(asettings, "AudioEncoder");
+        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_double(asettings, "AudioTrackDRCSlider");
+               // 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_combo_int(asettings, "AudioMixdown");
+                       // 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_combo_int(asettings, "AudioBitrate");
+                       gint srate = ghb_settings_combo_int(asettings, "AudioSamplerate");
+                       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 );
+               tcount++;
+       }
+       // 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_boolean(js, "vquality_type_target"))
+       {
+               gint size;
+               
+               size = ghb_settings_get_int(js, "VideoTargetSize");
+        job->vbitrate = hb_calc_bitrate( job, size );
+               job->vquality = -1.0;
+       }
+
+       dest_str = ghb_settings_get_string(js, "destination");
+       job->file = dest_str;
+       job->crf = ghb_settings_get_boolean(js, "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(js);
+       
+       if( x264opts != NULL && *x264opts != '\0' )
+       {
+               job->x264opts = x264opts;
+       }
+       else /*avoids a bus error crash when options aren't specified*/
+       {
+               job->x264opts =  NULL;
+       }
+       gint subtitle;
+       gchar *slang = ghb_settings_get_string(js, "Subtitles");
+       subtitle = -2; // default to none
+       if (strcmp(slang, "auto") == 0)
+       {
+               subtitle = -1;
+       }
+       else
+       {
+               gint scount;
+       hb_subtitle_t * subt;
+
+               scount = hb_list_count(title->list_subtitle);
+               for (ii = 0; ii < scount; ii++)
+               {
+               subt = (hb_subtitle_t *)hb_list_item(title->list_subtitle, ii);
+                       if (strcmp(slang, subt->iso639_2) == 0)
+                       {
+                               subtitle = ii;
+                               break;
+                       }
+               }
+       }
+       gboolean forced_subtitles = ghb_settings_get_boolean(js, "SubtitlesForced");
+       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_queue, job );
+               //if (job->x264opts != NULL)
+               //      g_free(job->x264opts);
+
+               job->x264opts = x264opts_tmp;
+       }
+       else
+       {
+               job->select_subtitle = NULL;
+       }
+       if( ghb_settings_get_boolean(js, "VideoTwoPass") &&
+               !ghb_settings_get_boolean(js, "vquality_type_constant"))
+       {
+               /*
+                * 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_boolean(js, "VideoTurboTwoPass") )
+               {
+                       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_queue, 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_queue, 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_queue, job );
+               //if (job->x264opts != NULL)
+               //      g_free(job->x264opts);
+       }
+       if (detel_str) g_free(detel_str);
+       if (decomb_str) g_free(decomb_str);
+       if (deint_str) g_free(deint_str);
+       if (deblock_str) g_free(deblock_str);
+       if (denoise_str) g_free(denoise_str);
+       if (dest_str) g_free(dest_str);
+}
+
+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_queue) - 1;
+    while ((job = hb_job(h_queue, ii--)) != NULL)
+    {
+        if ((job->sequence_id & 0xFFFFFF) == unique_id)
+                       hb_rem(h_queue, job);
+    }
+}
+
+void
+ghb_start_queue()
+{
+       hb_start( h_queue );
+}
+
+void
+ghb_stop_queue()
+{
+       hb_stop( h_queue );
+}
+
+void
+ghb_pause_queue()
+{
+    hb_state_t s;
+    hb_get_state2( h_queue, &s );
+
+    if( s.state == HB_STATE_PAUSED )
+    {
+        hb_resume( h_queue );
+    }
+    else
+    {
+        hb_pause( h_queue );
+    }
+}
+
+#define RED_HEIGHT     720.0
+#define RED_WIDTH      1280.0
+
+GdkPixbuf*
+ghb_get_preview_image(
+       gint titleindex, 
+       gint index, 
+       GValue *settings, 
+       gboolean borders)
+{
+       hb_title_t *title;
+       hb_list_t  *list;
+       
+       list = hb_get_titles( h_scan );
+       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_preview_job_settings(title->job, settings);
+
+       // 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;
+       // 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_scan, 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_boolean(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 (ghb_settings_get_boolean(settings, "reduce_hd_preview"))
+       {
+               gdouble factor = 1.0;
+
+               if (dstHeight > RED_HEIGHT)
+               {
+                       factor = RED_HEIGHT / (gdouble)dstHeight;
+               }
+               if (dstWidth * factor > RED_WIDTH)
+               {
+                       factor = RED_WIDTH / (gdouble)dstWidth;
+               }
+               dstHeight = dstHeight * factor + 0.5;
+               dstWidth = dstWidth * factor + 0.5;
+       }
+       
+       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;
+}
+
+static void
+sanitize_volname(gchar *name)
+{
+       gchar *a, *b;
+
+       a = b = name;
+       while (*b)
+       {
+               switch(*b)
+               {
+               case '<':
+                       b++;
+                       break;
+               case '>':
+                       b++;
+                       break;
+               default:
+                       *a = *b;
+                       a++; b++;
+                       break;
+               }
+       }
+       *a = 0;
+}
+
+gchar*
+ghb_dvd_volname(const gchar *device)
+{
+       gchar *name;
+       name = hb_dvd_name((gchar*)device);
+       if (name != NULL)
+       {
+               sanitize_volname(name);
+               return g_strdup(name);
+       }
+       return name;
+}
diff --git a/gtk/src/hb-backend.h b/gtk/src/hb-backend.h
new file mode 100644 (file)
index 0000000..48e85a9
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * 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_ERROR_NONE,
+       GHB_ERROR_CANCELED,
+       GHB_ERROR_FAIL,
+};
+
+typedef struct ghb_status_s
+{
+       gint state;
+       gint queue_state;
+
+       // SCANNING
+       gint title_count;
+       gint title_cur;
+
+       // WORKING
+       gint unique_id;
+       gint job_cur;
+       gint job_count;
+       gdouble progress;
+       gdouble rate_cur;
+       gdouble rate_avg;
+       gint hours;
+       gint minutes;
+       gint seconds;
+       gint error;
+} ghb_status_t;
+
+#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;
+       gint64 duration;
+} 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(void);
+void ghb_vquality_range(
+       signal_user_data_t *ud, 
+       gdouble *min, 
+       gdouble *max,
+       gdouble *step,
+       gdouble *page,
+       gint *digits);
+//const gchar* ghb_get_rate_string(gint rate, gint type);
+void ghb_backend_init(GtkBuilder *builder, gint debug, gint update);
+void ghb_backend_close(void);
+void ghb_add_job(GValue *js, gint unique_id);
+void ghb_remove_job(gint unique_id);
+void ghb_start_queue(void);
+void ghb_stop_queue(void);
+void ghb_pause_queue(void);
+
+gint ghb_get_state(void);
+void ghb_clear_state(gint state);
+void ghb_clear_queue_state(gint state);
+
+void ghb_set_state(gint state);
+gint ghb_get_queue_state();
+void ghb_get_status(ghb_status_t *status);
+void ghb_track_status(void);
+void ghb_backend_scan(const gchar *path, gint titleindex);
+void ghb_backend_queue_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);
+GValue* ghb_get_chapters(gint titleindex);
+gint ghb_get_best_mix(gint titleindex, gint track, gint acodec, gint mix);
+gboolean ghb_ac3_in_audio_list(const GValue *audio_list);
+gboolean ghb_audio_is_passthru(gint acodec);
+gint ghb_get_default_acodec(void);
+gboolean ghb_get_audio_info(
+       ghb_audio_info_t *ainfo, gint titleindex, gint audioindex);
+void ghb_set_passthru_bitrate_opts(GtkBuilder *builder, gint bitrate);
+void ghb_set_default_bitrate_opts(GtkBuilder *builder, gint last_rate);
+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 index);
+gint ghb_longest_title(void);
+gchar* ghb_build_x264opts_string(GValue *settings);
+GdkPixbuf* ghb_get_preview_image(
+       gint titleindex, gint index, GValue *settings, gboolean borders);
+gint ghb_calculate_target_bitrate(GValue *settings, gint titleindex);
+gchar* ghb_dvd_volname(const gchar *device);
+gint ghb_get_title_number(gint titleindex);
+
+gboolean ghb_validate_vquality(GValue *settings);
+gboolean ghb_validate_audio(signal_user_data_t *ud);
+gboolean ghb_validate_video(signal_user_data_t *ud);
+gboolean ghb_validate_filters(signal_user_data_t *ud);
+gboolean ghb_validate_filter_string(const gchar *str, gint max_fields);
+void ghb_hb_cleanup(gboolean partial);
+gint ghb_lookup_combo_int(const gchar *name, const GValue *acodec);
+const gchar* ghb_lookup_combo_option(const gchar *name, const GValue *acodec);
+
+#endif // _HBBACKEND_H_
diff --git a/gtk/src/hb-canceled.16.png b/gtk/src/hb-canceled.16.png
new file mode 100644 (file)
index 0000000..66c5bf7
Binary files /dev/null and b/gtk/src/hb-canceled.16.png differ
diff --git a/gtk/src/hb-complete.16.png b/gtk/src/hb-complete.16.png
new file mode 100644 (file)
index 0000000..503e52c
Binary files /dev/null and b/gtk/src/hb-complete.16.png differ
diff --git a/gtk/src/hb-drawer.32.png b/gtk/src/hb-drawer.32.png
new file mode 100644 (file)
index 0000000..43bdf12
Binary files /dev/null and b/gtk/src/hb-drawer.32.png differ
diff --git a/gtk/src/hb-edit.32.png b/gtk/src/hb-edit.32.png
new file mode 100644 (file)
index 0000000..4acff1d
Binary files /dev/null and b/gtk/src/hb-edit.32.png differ
diff --git a/gtk/src/hb-icon.128.png b/gtk/src/hb-icon.128.png
new file mode 100644 (file)
index 0000000..187df40
Binary files /dev/null and b/gtk/src/hb-icon.128.png differ
diff --git a/gtk/src/hb-icon.64.png b/gtk/src/hb-icon.64.png
new file mode 100644 (file)
index 0000000..813953c
Binary files /dev/null and b/gtk/src/hb-icon.64.png differ
diff --git a/gtk/src/hb-pause.32.png b/gtk/src/hb-pause.32.png
new file mode 100644 (file)
index 0000000..dd8ab7d
Binary files /dev/null and b/gtk/src/hb-pause.32.png differ
diff --git a/gtk/src/hb-play.32.png b/gtk/src/hb-play.32.png
new file mode 100644 (file)
index 0000000..42719c0
Binary files /dev/null and b/gtk/src/hb-play.32.png differ
diff --git a/gtk/src/hb-pref.32.png b/gtk/src/hb-pref.32.png
new file mode 100644 (file)
index 0000000..1d8ff4f
Binary files /dev/null and b/gtk/src/hb-pref.32.png differ
diff --git a/gtk/src/hb-queue-delete.16.png b/gtk/src/hb-queue-delete.16.png
new file mode 100644 (file)
index 0000000..1b51710
Binary files /dev/null and b/gtk/src/hb-queue-delete.16.png differ
diff --git a/gtk/src/hb-queue-job.16.png b/gtk/src/hb-queue-job.16.png
new file mode 100644 (file)
index 0000000..486885c
Binary files /dev/null and b/gtk/src/hb-queue-job.16.png differ
diff --git a/gtk/src/hb-queue-pass1.16.png b/gtk/src/hb-queue-pass1.16.png
new file mode 100644 (file)
index 0000000..951d8a5
Binary files /dev/null and b/gtk/src/hb-queue-pass1.16.png differ
diff --git a/gtk/src/hb-queue-pass2.16.png b/gtk/src/hb-queue-pass2.16.png
new file mode 100644 (file)
index 0000000..b2b5a39
Binary files /dev/null and b/gtk/src/hb-queue-pass2.16.png differ
diff --git a/gtk/src/hb-queue-subtitle.16.png b/gtk/src/hb-queue-subtitle.16.png
new file mode 100644 (file)
index 0000000..8395b0d
Binary files /dev/null and b/gtk/src/hb-queue-subtitle.16.png differ
diff --git a/gtk/src/hb-queue.32.png b/gtk/src/hb-queue.32.png
new file mode 100644 (file)
index 0000000..51962a1
Binary files /dev/null and b/gtk/src/hb-queue.32.png differ
diff --git a/gtk/src/hb-remove.32.png b/gtk/src/hb-remove.32.png
new file mode 100644 (file)
index 0000000..4195a5e
Binary files /dev/null and b/gtk/src/hb-remove.32.png differ
diff --git a/gtk/src/hb-source.32.png b/gtk/src/hb-source.32.png
new file mode 100644 (file)
index 0000000..8e32193
Binary files /dev/null and b/gtk/src/hb-source.32.png differ
diff --git a/gtk/src/hb-stop.32.png b/gtk/src/hb-stop.32.png
new file mode 100644 (file)
index 0000000..15b6060
Binary files /dev/null and b/gtk/src/hb-stop.32.png differ
diff --git a/gtk/src/hb-working0.16.png b/gtk/src/hb-working0.16.png
new file mode 100644 (file)
index 0000000..200606b
Binary files /dev/null and b/gtk/src/hb-working0.16.png differ
diff --git a/gtk/src/hb-working1.16.png b/gtk/src/hb-working1.16.png
new file mode 100644 (file)
index 0000000..b3e0749
Binary files /dev/null and b/gtk/src/hb-working1.16.png differ
diff --git a/gtk/src/hb-working2.16.png b/gtk/src/hb-working2.16.png
new file mode 100644 (file)
index 0000000..11fef31
Binary files /dev/null and b/gtk/src/hb-working2.16.png differ
diff --git a/gtk/src/hb-working3.16.png b/gtk/src/hb-working3.16.png
new file mode 100644 (file)
index 0000000..9a2187d
Binary files /dev/null and b/gtk/src/hb-working3.16.png differ
diff --git a/gtk/src/hb-working4.16.png b/gtk/src/hb-working4.16.png
new file mode 100644 (file)
index 0000000..680505b
Binary files /dev/null and b/gtk/src/hb-working4.16.png differ
diff --git a/gtk/src/hb-working5.16.png b/gtk/src/hb-working5.16.png
new file mode 100644 (file)
index 0000000..33fae2c
Binary files /dev/null and b/gtk/src/hb-working5.16.png differ
diff --git a/gtk/src/icon_tools.c b/gtk/src/icon_tools.c
new file mode 100644 (file)
index 0000000..b63640b
--- /dev/null
@@ -0,0 +1,102 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * icon_tools.c
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ * 
+ * icon_tools.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 <glib.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk-pixbuf/gdk-pixdata.h>
+#include "icon_tools.h"
+
+GdkPixbuf*
+icon_deserialize(const guint8 *sd, guint len)
+{
+       GdkPixdata pd;
+       GdkPixbuf *pb;
+       GError *err = NULL;
+
+       gdk_pixdata_deserialize(&pd, len, sd, &err);
+       pb = gdk_pixbuf_from_pixdata(&pd, TRUE, &err);
+       return pb;
+}
+
+guint8*
+icon_serialize(const GdkPixbuf *pixbuf, guint *len)
+{
+       GdkPixdata pd;
+       guint8 *sd;
+
+       gdk_pixdata_from_pixbuf(&pd, pixbuf, FALSE);
+       sd = gdk_pixdata_serialize(&pd, len);
+       return sd;
+}
+
+guint8*
+icon_file_serialize(const gchar *filename, guint *len)
+{
+       GdkPixbuf *pb;
+       GError *err = NULL;
+
+       pb = gdk_pixbuf_new_from_file(filename, &err);
+       if (pb == NULL)
+       {
+               g_warning("Failed to open icon file %s: %s", filename, err->message);
+               return NULL;
+       }
+       return icon_serialize(pb, len);
+}
+
+GdkPixbuf*
+base64_to_icon(const gchar *bd)
+{
+       guchar *sd;
+       gsize len;
+       GdkPixdata pd;
+       GdkPixbuf *pb;
+       GError *err = NULL;
+
+       sd = g_base64_decode(bd, &len);
+       gdk_pixdata_deserialize(&pd, len, sd, &err);
+       pb = gdk_pixbuf_from_pixdata(&pd, TRUE, &err);
+       g_free(sd);
+       return pb;
+}
+
+gchar*
+icon_to_base64(const GdkPixbuf *pixbuf)
+{
+       GdkPixdata pd;
+       guint len;
+       guint8 *sd;
+       gchar *bd;
+
+       gdk_pixdata_from_pixbuf(&pd, pixbuf, FALSE);
+       sd = gdk_pixdata_serialize(&pd, &len);
+       bd = g_base64_encode(sd, len);
+       g_free(sd);
+       return bd;
+}
+
+gchar*
+icon_file_to_base64(const gchar *filename)
+{
+       GdkPixbuf *pb;
+       GError *err = NULL;
+
+       pb = gdk_pixbuf_new_from_file(filename, &err);
+       if (pb == NULL)
+       {
+               g_warning("Failed to open icon file %s: %s", filename, err->message);
+               return NULL;
+       }
+       return icon_to_base64(pb);
+}
+
diff --git a/gtk/src/icon_tools.h b/gtk/src/icon_tools.h
new file mode 100644 (file)
index 0000000..24575a8
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * 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(_ICON_TOOLS_H_)
+#define _ICON_TOOLS_H_
+
+#include <glib.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk-pixbuf/gdk-pixdata.h>
+
+GdkPixbuf* icon_deserialize(const guint8 *sd, guint len);
+guint8* icon_serialize(const GdkPixbuf *pixbuf, guint *len);
+guint8* icon_file_serialize(const gchar *filename, guint *len);
+GdkPixbuf* base64_to_icon(const gchar *bd);
+gchar* icon_to_base64(const GdkPixbuf *pixbuf);
+gchar* icon_file_to_base64(const gchar *filename);
+
+#endif // _ICON_TOOLS_H_
diff --git a/gtk/src/icons.c b/gtk/src/icons.c
new file mode 100644 (file)
index 0000000..af7d84e
--- /dev/null
@@ -0,0 +1,29 @@
+#include <gtk/gtk.h>
+#include "icon_tools.h"
+#include "values.h"
+#include "resources.h"
+
+void
+ghb_load_icons()
+{
+       GdkPixbuf *pb;
+       GHashTableIter iter;
+       gchar *name;
+       GValue *gval;
+       ghb_rawdata_t *rd;
+       gint size;
+
+       GValue *icons = ghb_resource_get("icons");
+       ghb_dict_iter_init(&iter, icons);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&name, (gpointer*)(void*)&gval))
+       {
+               rd = g_value_get_boxed(gval);
+               pb = icon_deserialize(rd->data, rd->size);
+               size = gdk_pixbuf_get_height(pb);
+               gtk_icon_theme_add_builtin_icon(name, size, pb);
+               gdk_pixbuf_unref(pb);
+       }
+}
diff --git a/gtk/src/icons.h b/gtk/src/icons.h
new file mode 100644 (file)
index 0000000..0e0aba7
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * 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_ICONS_H_)
+#define _GHB_ICONS_H_
+
+void ghb_load_icons(void);
+
+#endif // _GHB_ICONS_H_
diff --git a/gtk/src/ini_to_plist.c b/gtk/src/ini_to_plist.c
new file mode 100644 (file)
index 0000000..d0d441d
--- /dev/null
@@ -0,0 +1,104 @@
+#include <glib.h>
+#include <glib-object.h>
+#include <glib/gstdio.h>
+#include <string.h>
+#include "values.h"
+#include "plist.h"
+
+gboolean
+string_is_true(const gchar *str)
+{
+       return (strcmp(str, "enable") == 0);
+}
+
+gboolean
+string_is_bool(const gchar *str)
+{
+       return (strcmp(str, "enable") == 0) || (strcmp(str, "disable") == 0);
+}
+
+GType
+guess_type(const gchar *str)
+{
+       gchar *end;
+       gdouble dval;
+
+       if (*str == 0)
+               return G_TYPE_STRING;
+       if (string_is_bool(str))
+               return G_TYPE_BOOLEAN;
+       dval = g_strtod(str, &end);
+       if (*end == 0)
+       {
+               if (strchr(str, '.') == NULL)
+                       return G_TYPE_INT64;
+               else
+                       return G_TYPE_DOUBLE;
+       }
+
+       return G_TYPE_STRING;
+}
+
+void
+set_value(GValue *gval, const gchar *str, GType gtype)
+{
+       if (gtype == G_TYPE_STRING)
+       {
+               g_value_set_string(gval, str);
+       }
+       else if (gtype == G_TYPE_INT64)
+       {
+               gint64 val = g_strtod(str, NULL);
+               g_value_set_int64(gval, val);
+       }
+       else if (gtype == G_TYPE_DOUBLE)
+       {
+               gdouble val = g_strtod(str, NULL);
+               g_value_set_double(gval, val);
+       }
+       else if (gtype == G_TYPE_BOOLEAN)
+       {
+               if (string_is_true(str))
+                       g_value_set_boolean(gval, TRUE);
+               else
+                       g_value_set_boolean(gval, FALSE);
+       }
+}
+
+int
+main(gint argc, gchar *argv[])
+{
+       GKeyFile *kf;
+       gchar **groups;
+       gchar **keys;
+       gint ii, jj;
+       GValue *top;
+       GValue *dict;
+
+       g_type_init();
+       top = ghb_dict_value_new();
+       kf = g_key_file_new();
+       g_key_file_load_from_file(kf, argv[1], 0, NULL);
+       groups = g_key_file_get_groups(kf, NULL);
+       for (ii = 0; groups[ii]; ii++)
+       {
+               dict = ghb_dict_value_new();
+               ghb_dict_insert(top, , g_strdup(groups[ii]), dict);
+               keys = g_key_file_get_keys(kf, groups[ii], NULL, NULL);
+               for (jj = 0; keys[jj]; jj++)
+               {
+                       gchar *str;
+                       GValue *gval;
+                       GType gtype;
+
+                       str = g_key_file_get_string(kf, groups[ii], keys[jj], NULL);
+                       gtype = guess_type(str);
+                       gval = g_malloc0(sizeof(GValue));
+                       g_value_init(gval, gtype);
+                       set_value(gval, str, gtype);
+                       ghb_dict_insert(dict, g_strdup(keys[jj]), gval);
+               }
+       }
+       ghb_plist_write_file("a_p_list", top);
+}
+
diff --git a/gtk/src/internal_defaults.xml b/gtk/src/internal_defaults.xml
new file mode 100644 (file)
index 0000000..143223c
--- /dev/null
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>Initialization</key>
+       <dict>
+               <key>anamorphic</key>
+               <true />
+               <key>autoscale</key>
+               <false />
+               <key>end_chapter</key>
+               <integer>100</integer>
+               <key>folder</key>
+               <string></string>
+               <key>preset</key>
+               <array>
+                       <string>Normal</string>
+               </array>
+               <key>preset_selection</key>
+               <array>
+                       <string>Normal</string>
+               </array>
+               <key>preset_type_folder</key>
+               <false />
+               <key>preset_type_normal</key>
+               <true />
+               <key>scale_height</key>
+               <integer>0</integer>
+               <key>scale_width</key>
+               <integer>0</integer>
+               <key>start_chapter</key>
+               <integer>1</integer>
+               <key>title</key>
+               <string>none</string>
+               <key>volume_label</key>
+               <string>New Video</string>
+               <key>x264_8x8dct</key>
+               <false />
+               <key>x264_analyse</key>
+               <string>some</string>
+               <key>x264_bframes</key>
+               <integer>0</integer>
+               <key>x264_bpyramid</key>
+               <false />
+               <key>x264_cabac</key>
+               <true />
+               <key>x264_deblock_alpha</key>
+               <integer>0</integer>
+               <key>x264_deblock_beta</key>
+               <integer>0</integer>
+               <key>x264_direct</key>
+               <string>spatial</string>
+               <key>x264_me</key>
+               <string>hex</string>
+               <key>x264_merange</key>
+               <integer>16</integer>
+               <key>x264_mixed_refs</key>
+               <false />
+               <key>x264_no_dct_decimate</key>
+               <false />
+               <key>x264_no_fast_pskip</key>
+               <false />
+               <key>x264_refs</key>
+               <integer>1</integer>
+               <key>x264_subme</key>
+               <integer>6</integer>
+               <key>x264_trellis</key>
+               <integer>0</integer>
+               <key>x264_weighted_bframes</key>
+               <false />
+               <key>audio_list</key>
+               <array>
+               </array>
+               <key>tweak_PictureDecomb</key>
+               <string></string>
+               <key>tweak_PictureDetelecine</key>
+               <string></string>
+               <key>vquality_type_bitrate</key>
+               <false />
+               <key>vquality_type_constant</key>
+               <false />
+               <key>vquality_type_target</key>
+               <false />
+       </dict>
+       <key>Preferences</key>
+       <dict>
+               <key>EncodeLogLocation</key>
+               <false />
+               <key>allow_tweaks</key>
+               <false />
+               <key>chapters_in_destination</key>
+               <false />
+               <key>default_source</key>
+               <string>/dev/dvd</string>
+               <key>destination_dir</key>
+               <string></string>
+               <key>hbfd</key>
+               <false />
+               <key>hbfd_feature</key>
+               <false />
+               <key>nocheckvquality</key>
+               <false />
+               <key>reduce_hd_preview</key>
+               <true />
+               <key>noscale</key>
+               <false />
+               <key>show_presets</key>
+               <true />
+               <key>use_source_name</key>
+               <true />
+               <key>update_skip_version</key>
+               <integer>0</integer>
+               <key>version</key>
+               <string>0.1</string>
+       </dict>
+       <key>XlatPresets</key>
+       <dict>
+               <key>anamorphic</key>
+               <true />
+               <key>autoscale</key>
+               <false />
+               <key>vquality_type_bitrate</key>
+               <false />
+               <key>vquality_type_constant</key>
+               <false />
+               <key>vquality_type_target</key>
+               <false />
+       </dict>
+       <key>Presets</key>
+       <dict>
+               <key>PictureAutoCrop</key>
+               <true />
+               <key>ChapterMarkers</key>
+               <true />
+               <key>constant_rate_factor</key>
+               <true />
+               <key>FileFormat</key>
+               <string>mp4</string>
+               <key>Folder</key>
+               <false />
+               <key>PictureDeblock</key>
+               <integer>0</integer>
+               <key>PictureDecomb</key>
+               <false />
+               <key>Default</key>
+               <false />
+               <key>PictureBottomCrop</key>
+               <integer>0</integer>
+               <key>PictureLeftCrop</key>
+               <integer>0</integer>
+               <key>PictureRightCrop</key>
+               <integer>0</integer>
+               <key>PictureTopCrop</key>
+               <integer>0</integer>
+               <key>PictureDeinterlace</key>
+               <string>none</string>
+               <key>PictureDenoise</key>
+               <string>none</string>
+               <key>PictureDetelecine</key>
+               <true />
+               <key>directqp</key>
+               <false />
+               <key>SubtitlesForced</key>
+               <true />
+               <key>VideoFramerate</key>
+               <string>source</string>
+               <key>VideoGrayScale</key>
+               <false />
+               <key>Mp4HttpOptimize</key>
+               <false />
+               <key>Mp4iPodCompatible</key>
+               <false />
+               <key>PictureKeepRatio</key>
+               <true />
+               <key>Mp4LargeFile</key>
+               <false />
+               <key>ModDimensions</key>
+               <true />
+               <key>PicturePAR</key>
+               <integer>2</integer>
+               <key>PictureHeight</key>
+               <integer>0</integer>
+               <key>PictureWidth</key>
+               <integer>0</integer>
+               <key>AudioList</key>
+               <array>
+                       <dict>
+                               <key>AudioBitrate</key>
+                               <string>192</string>
+                               <key>AudioEncoder</key>
+                               <string>ac3</string>
+                               <key>AudioTrack</key>
+                               <integer>1</integer>
+                               <key>AudioTrackDescription</key>
+                               <string></string>
+                               <key>AudioTrackDRCSlider</key>
+                               <real>1</real>
+                               <key>AudioMixdown</key>
+                               <string>dpl2</string>
+                               <key>AudioSamplerate</key>
+                               <string>source</string>
+                       </dict>
+               </array>
+               <key>PresetDescription</key>
+               <string></string>
+               <key>PresetName</key>
+               <string>Name Missing</string>
+               <key>Type</key>
+               <integer>1</integer>
+               <key>SourceAudioLang</key>
+               <string>und</string>
+               <key>Subtitles</key>
+               <string>none</string>
+               <key>VideoTurboTwoPass</key>
+               <false />
+               <key>UsesPictureFilters</key>
+               <true />
+               <key>UsesPictureSettings</key>
+               <integer>2</integer>
+               <key>UsesMaxPictureSettings</key>
+               <false />
+               <key>VideoTwoPass</key>
+               <false />
+               <key>VideoAvgBitrate</key>
+               <integer>1800</integer>
+               <key>VideoEncoder</key>
+               <string>x264</string>
+               <key>VideoQualityType</key>
+               <integer>2</integer>
+               <key>VideoQualitySlider</key>
+               <real>0.60</real>
+               <key>VideoTargetSize</key>
+               <integer>700</integer>
+               <key>x264Option</key>
+               <string></string>
+       </dict>
+</dict>
+</plist>
diff --git a/gtk/src/main.c b/gtk/src/main.c
new file mode 100644 (file)
index 0000000..08d7ff1
--- /dev/null
@@ -0,0 +1,629 @@
+/* -*- 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 "hbversion.h"
+#include "renderer_button.h"
+#include "hb-backend.h"
+#include "ghb-dvd.h"
+#include "ghbcellrenderertext.h"
+#include "values.h"
+#include "icons.h"
+#include "callbacks.h"
+#include "x264handler.h"
+#include "settings.h"
+#include "resources.h"
+#include "presets.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
+
+
+
+#define BUILDER_NAME "ghb"
+
+GtkBuilder*
+create_builder_or_die(const gchar * name)
+{
+       guint res;
+       GValue *gval;
+       const gchar *ghb_ui;
+
+    const gchar *markup =
+        N_("<b><big>Unable to create %s.</big></b>\n"
+        "\n"
+        "Internal error. Could not parse UI description.\n");
+       g_debug("create_builder_or_die ()\n");
+       GtkBuilder *xml = gtk_builder_new();
+       gval = ghb_resource_get("ghb-ui");
+       ghb_ui = g_value_get_string(gval);
+       if (xml != NULL)
+               res = gtk_builder_add_from_string(xml, ghb_ui, -1, NULL);
+    if (!xml || !res) 
+       {
+        GtkWidget *dialog = gtk_message_dialog_new_with_markup(NULL,
+            GTK_DIALOG_MODAL,
+            GTK_MESSAGE_ERROR,
+            GTK_BUTTONS_CLOSE,
+            _(markup),
+            name);
+        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);
+
+       //const gchar *name = gtk_widget_get_name((GtkWidget*)object);
+       //g_message("\n\nname %s", name);
+       g_debug("handler_name %s", handler_name);
+       g_debug("signal_name %s", 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);
+extern void chapter_keypress_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 = ghb_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 = ghb_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, "key-press-event", chapter_keypress_cb, ud);
+       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);
+extern void queue_drag_cb(void);
+extern void queue_drag_motion_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;
+       GtkTargetEntry SrcEntry;
+       SrcEntry.target = "DATA";
+       SrcEntry.flags = GTK_TARGET_SAME_WIDGET;
+
+       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));
+
+       gtk_tree_view_enable_model_drag_dest (treeview, &SrcEntry, 1, 
+                                                                                       GDK_ACTION_MOVE);
+       gtk_tree_view_enable_model_drag_source (treeview, GDK_BUTTON1_MASK, 
+                                                                                       &SrcEntry, 1, GDK_ACTION_MOVE);
+
+       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);
+       g_signal_connect(treeview, "drag_data_received", queue_drag_cb, ud);
+       g_signal_connect(treeview, "drag_motion", queue_drag_motion_cb, ud);
+
+       // Work around silly treeview display bug.  If the treeview
+       // hasn't been shown yet, the width request doesn't seem
+       // to work right.  Cells get badly formatted.
+       GtkWidget *widget = GHB_WIDGET (ud->builder, "queue_window");
+       gtk_widget_show (widget);
+       gtk_widget_hide (widget);
+}
+
+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);
+       // 12 columns in model.  6 are visible, the other 6 are for storing
+       // values that I need
+       treestore = gtk_list_store_new(12, 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, G_TYPE_DOUBLE);
+       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);
+extern void presets_drag_cb(void);
+extern void presets_drag_motion_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;
+       GtkTreeStore *treestore;
+       GtkTreeView  *treeview;
+       GtkTreeSelection *selection;
+       GtkWidget *widget;
+       GtkTargetEntry SrcEntry;
+       SrcEntry.target = "DATA";
+       SrcEntry.flags = GTK_TARGET_SAME_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_tree_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_column_set_expand (column, TRUE);
+       gtk_tree_view_set_tooltip_column (treeview, 4);
+
+       gtk_tree_view_enable_model_drag_dest (treeview, &SrcEntry, 1, 
+                                                                                       GDK_ACTION_MOVE);
+       gtk_tree_view_enable_model_drag_source (treeview, GDK_BUTTON1_MASK, 
+                                                                                       &SrcEntry, 1, GDK_ACTION_MOVE);
+
+       g_signal_connect(treeview, "drag_data_received", presets_drag_cb, ud);
+       g_signal_connect(treeview, "drag_motion", presets_drag_motion_cb, ud);
+       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];
+       gchar *config, *path;
+
+       // 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
+       config = ghb_get_user_config_dir(NULL);
+       path = g_strdup_printf("%s/%s", config, "Activity.log");
+       ud->activity_log = g_io_channel_new_file (path, "w", NULL);
+       ud->job_activity_log = NULL;
+       ghb_ui_update(ud, "activity_location", ghb_string_value(path));
+       g_free(path);
+       g_free(config);
+       // 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;
+
+static gchar *dvd_device = NULL;
+static gchar *arg_preset = NULL;
+static gboolean ghb_debug = FALSE;
+
+static GOptionEntry entries[] = 
+{
+       { "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 },
+       { "debug", 'x', 0, G_OPTION_ARG_NONE, &ghb_debug, "Spam a lot", 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
+
+// Hack to avoid a segfault in libavcodec
+extern int mm_flags;
+int mm_support();
+
+void x264_entry_changed_cb(GtkWidget *widget, signal_user_data_t *ud);
+
+int
+main (int argc, char *argv[])
+{
+       GtkWidget *window;
+       signal_user_data_t *ud;
+       GValue *preset;
+       GError *error = NULL;
+       GOptionContext *context;
+
+       mm_flags = mm_support();
+#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);
+       g_option_context_free(context);
+       
+       gtk_set_locale ();
+       gtk_init (&argc, &argv);
+       ghb_register_transforms();
+       ghb_resource_init();
+       ghb_load_icons();
+
+#if defined(__linux__)
+       ghb_hal_init();
+#endif
+
+       ud = g_malloc0(sizeof(signal_user_data_t));
+       ud->debug = ghb_debug;
+       g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, debug_log_handler, ud);
+       ud->settings = ghb_settings_new();
+       // Enable events that alert us to media change events
+       watch_volumes (ud);
+       ud->builder = create_builder_or_die (BUILDER_NAME);
+       // Redirect stderr to the activity window
+       IoRedirect(ud);
+       ghb_log("Handbrake Version: %s (%d)", HB_VERSION, HB_BUILD);
+       ghb_init_dep_map();
+
+       // Need to connect x264_options textview buffer to the changed signal
+       // since it can't be done automatically
+       GtkTextView *textview;
+       GtkTextBuffer *buffer;
+       textview = GTK_TEXT_VIEW(GHB_WIDGET (ud->builder, "x264Option"));
+       buffer = gtk_text_view_get_buffer (textview);
+       g_signal_connect(buffer, "changed", (GCallback)x264_entry_changed_cb, ud);
+
+       ghb_file_menu_add_dvd(ud);
+       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);
+
+       // Load all internal settings
+       ghb_settings_init(ud);
+       // Load the presets files
+       ghb_presets_load();
+       ghb_prefs_load(ud);
+
+       // Start the show.
+       window = GHB_WIDGET (ud->builder, "hb_window");
+       gtk_widget_show (window);
+
+       ghb_prefs_to_ui(ud);
+
+       if (ghb_settings_get_boolean(ud->settings, "hbfd"))
+       {
+               ghb_hbfd(ud, TRUE);
+       }
+       gboolean tweaks = ghb_settings_get_boolean(ud->settings, "allow_tweaks");
+       GtkWidget *widget;
+       widget = GHB_WIDGET(ud->builder, "PictureDeinterlace");
+       tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget);
+       widget = GHB_WIDGET(ud->builder, "tweak_PictureDeinterlace");
+       !tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget);
+
+       widget = GHB_WIDGET(ud->builder, "PictureDenoise");
+       tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget);
+       widget = GHB_WIDGET(ud->builder, "tweak_PictureDenoise");
+       !tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget);
+
+       gchar *source = ghb_settings_get_string(ud->settings, "default_source");
+       ghb_dvd_set_current(source, ud);
+       g_free(source);
+
+       // Parsing x264 options "" initializes x264 widgets to proper defaults
+       ghb_x264_parse_options(ud, "");
+
+       // Populate the presets tree view
+       ghb_presets_list_init(ud, NULL, 0);
+       // Get the first preset name
+       if (arg_preset != NULL)
+       {
+               preset = ghb_parse_preset_path(arg_preset);
+               if (preset)
+               {
+                       ghb_select_preset(ud->builder, preset);
+                       ghb_value_free(preset);
+               }
+       }
+       else
+       {
+               ghb_select_default_preset(ud->builder);
+       }
+
+       // 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);
+       }
+       // Reload and check status of the last saved queue
+       g_idle_add((GSourceFunc)ghb_reload_queue, ud);
+       g_idle_add((GSourceFunc)ghb_check_update, ud);
+       // 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 ();
+       ghb_backend_close();
+       if (ud->queue)
+               ghb_value_free(ud->queue);
+       ghb_value_free(ud->settings);
+       g_io_channel_unref(ud->activity_log);
+       ghb_settings_close();
+       g_free(ud);
+       return 0;
+}
+
diff --git a/gtk/src/makedeps.c b/gtk/src/makedeps.c
new file mode 100644 (file)
index 0000000..b094054
--- /dev/null
@@ -0,0 +1,131 @@
+#include <glib.h>
+#include <glib-object.h>
+#include <glib/gstdio.h>
+#include <string.h>
+#include "values.h"
+#include "plist.h"
+
+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", "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", "VideoAvgBitrate", "TRUE", FALSE},
+       {"vquality_type_target", "VideoTargetSize", "TRUE", FALSE},
+       {"vquality_type_constant", "VideoQualitySlider", "TRUE", FALSE},
+       {"vquality_type_constant", "constant_rate_factor", "TRUE", FALSE},
+       {"vquality_type_constant", "VideoTwoPass", "TRUE", TRUE},
+       {"vquality_type_constant", "VideoTurboTwoPass", "TRUE", TRUE},
+       {"VideoTwoPass", "VideoTurboTwoPass", "TRUE", FALSE},
+       {"FileFormat", "Mp4LargeFile", "mp4|m4v", FALSE},
+       {"FileFormat", "Mp4HttpOptimize", "mp4|m4v", FALSE},
+       {"FileFormat", "Mp4iPodCompatible", "mp4|m4v", FALSE},
+       {"PictureDecomb", "PictureDeinterlace", "TRUE", TRUE},
+       {"PictureDecomb", "tweak_PictureDeinterlace", "TRUE", TRUE},
+       {"PictureAutoCrop", "PictureTopCrop", "FALSE", FALSE},
+       {"PictureAutoCrop", "PictureBottomCrop", "FALSE", FALSE},
+       {"PictureAutoCrop", "PictureLeftCrop", "FALSE", FALSE},
+       {"PictureAutoCrop", "PictureRightCrop", "FALSE", FALSE},
+       {"autoscale", "scale_width", "FALSE", FALSE},
+       {"autoscale", "scale_height", "FALSE", FALSE},
+       {"anamorphic", "PictureKeepRatio", "FALSE", FALSE},
+       {"anamorphic", "scale_height", "FALSE", FALSE},
+       {"PictureKeepRatio", "scale_height", "FALSE", FALSE},
+       {"VideoEncoder", "x264_tab", "x264", FALSE},
+       {"VideoEncoder", "x264_tab_label", "x264", FALSE},
+       {"VideoEncoder", "Mp4iPodCompatible", "x264", FALSE},
+       {"VideoEncoder", "directqp", "x264|ffmpeg", FALSE},
+       {"AudioEncoder", "AudioBitrate", "ac3", TRUE},
+       {"AudioEncoder", "AudioSamplerate", "ac3", TRUE},
+       {"AudioEncoder", "AudioMixdown", "ac3", TRUE},
+       {"AudioEncoder", "AudioTrackDRCSlider", "ac3", TRUE},
+       {"x264_bframes", "x264_weighted_bframes", "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", "TRUE", FALSE},
+       {"x264_me", "x264_merange", "umh|esa", FALSE},
+       {"ChapterMarkers", "chapters_list", "TRUE", FALSE},
+       {"use_source_name", "chapters_in_destination", "TRUE", FALSE},
+};
+
+int
+main(gint argc, gchar *argv[])
+{
+       gint ii, jj;
+       GValue *top;
+       gint count = sizeof(dep_map) / sizeof(dependency_t);
+
+       g_type_init();
+
+       top = ghb_dict_value_new();
+       for (ii = 0; ii < count; ii++)
+       {
+               const gchar *name;
+               GValue *array;
+
+               name = dep_map[ii].widget_name;
+               if (ghb_dict_lookup(top, name))
+                       continue;
+               array = ghb_array_value_new(8);
+               for (jj = 0; jj < count; jj++)
+               {
+                       if (strcmp(name, dep_map[jj].widget_name) == 0)
+                       {
+                               ghb_array_append(array,
+                                       ghb_value_dup(ghb_string_value(dep_map[jj].dep_name)));
+                       }
+               }
+               ghb_dict_insert(top, g_strdup(name), array);
+       }
+       ghb_plist_write_file("widget_deps", top);
+
+       // reverse map
+       top = ghb_dict_value_new();
+       for (ii = 0; ii < count; ii++)
+       {
+               const gchar *name;
+               GValue *array;
+
+               name = dep_map[ii].dep_name;
+               if (ghb_dict_lookup(top, name))
+                       continue;
+               array = ghb_array_value_new(8);
+               for (jj = 0; jj < count; jj++)
+               {
+                       if (strcmp(name, dep_map[jj].dep_name) == 0)
+                       {
+                               GValue *data;
+                               data = ghb_array_value_new(3);
+                               ghb_array_append(data, ghb_value_dup(
+                                       ghb_string_value(dep_map[jj].widget_name)));
+                               ghb_array_append(data, ghb_value_dup(
+                                       ghb_string_value(dep_map[jj].enable_value)));
+                               ghb_array_append(data, ghb_value_dup(
+                                       ghb_boolean_value(dep_map[jj].disable_if_equal)));
+                               ghb_array_append(array, data);
+                       }
+               }
+               ghb_dict_insert(top, g_strdup(name), array);
+       }
+       ghb_plist_write_file("widget_reverse_deps", top);
+       return 0;
+}
+
diff --git a/gtk/src/marshalers.c b/gtk/src/marshalers.c
new file mode 100644 (file)
index 0000000..0f234ec
--- /dev/null
@@ -0,0 +1,125 @@
+
+#include       <glib-object.h>
+
+
+#ifdef G_ENABLE_DEBUG
+#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
+#define g_marshal_value_peek_char(v)     g_value_get_char (v)
+#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
+#define g_marshal_value_peek_int(v)      g_value_get_int (v)
+#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
+#define g_marshal_value_peek_long(v)     g_value_get_long (v)
+#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
+#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
+#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
+#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
+#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
+#define g_marshal_value_peek_float(v)    g_value_get_float (v)
+#define g_marshal_value_peek_double(v)   g_value_get_double (v)
+#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
+#define g_marshal_value_peek_param(v)    g_value_get_param (v)
+#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
+#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
+#define g_marshal_value_peek_object(v)   g_value_get_object (v)
+#else /* !G_ENABLE_DEBUG */
+/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
+ *          Do not access GValues directly in your code. Instead, use the
+ *          g_value_get_*() functions
+ */
+#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
+#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
+#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
+#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
+#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
+#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
+#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
+#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
+#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
+#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
+#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
+#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
+#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
+#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
+#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
+#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
+#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
+#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
+#endif /* !G_ENABLE_DEBUG */
+
+
+/* VOID:STRING,STRING (marshalers.list:1) */
+void
+ghb_marshal_VOID__STRING_STRING (GClosure     *closure,
+                                 GValue       *return_value G_GNUC_UNUSED,
+                                 guint         n_param_values,
+                                 const GValue *param_values,
+                                 gpointer      invocation_hint G_GNUC_UNUSED,
+                                 gpointer      marshal_data)
+{
+  typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer     data1,
+                                                    gpointer     arg_1,
+                                                    gpointer     arg_2,
+                                                    gpointer     data2);
+  register GMarshalFunc_VOID__STRING_STRING callback;
+  register GCClosure *cc = (GCClosure*) closure;
+  register gpointer data1, data2;
+
+  g_return_if_fail (n_param_values == 3);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+  callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
+
+  callback (data1,
+            g_marshal_value_peek_string (param_values + 1),
+            g_marshal_value_peek_string (param_values + 2),
+            data2);
+}
+
+/* BOOLEAN:BOXED (marshalers.list:2) */
+void
+ghb_marshal_BOOLEAN__BOXED (GClosure     *closure,
+                            GValue       *return_value G_GNUC_UNUSED,
+                            guint         n_param_values,
+                            const GValue *param_values,
+                            gpointer      invocation_hint G_GNUC_UNUSED,
+                            gpointer      marshal_data)
+{
+  typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED) (gpointer     data1,
+                                                   gpointer     arg_1,
+                                                   gpointer     data2);
+  register GMarshalFunc_BOOLEAN__BOXED callback;
+  register GCClosure *cc = (GCClosure*) closure;
+  register gpointer data1, data2;
+  gboolean v_return;
+
+  g_return_if_fail (return_value != NULL);
+  g_return_if_fail (n_param_values == 2);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+  callback = (GMarshalFunc_BOOLEAN__BOXED) (marshal_data ? marshal_data : cc->callback);
+
+  v_return = callback (data1,
+                       g_marshal_value_peek_boxed (param_values + 1),
+                       data2);
+
+  g_value_set_boolean (return_value, v_return);
+}
+
diff --git a/gtk/src/marshalers.h b/gtk/src/marshalers.h
new file mode 100644 (file)
index 0000000..1034f92
--- /dev/null
@@ -0,0 +1,28 @@
+
+#ifndef __ghb_marshal_MARSHAL_H__
+#define __ghb_marshal_MARSHAL_H__
+
+#include       <glib-object.h>
+
+G_BEGIN_DECLS
+
+/* VOID:STRING,STRING (marshalers.list:1) */
+extern void ghb_marshal_VOID__STRING_STRING (GClosure     *closure,
+                                             GValue       *return_value,
+                                             guint         n_param_values,
+                                             const GValue *param_values,
+                                             gpointer      invocation_hint,
+                                             gpointer      marshal_data);
+
+/* BOOLEAN:BOXED (marshalers.list:2) */
+extern void ghb_marshal_BOOLEAN__BOXED (GClosure     *closure,
+                                        GValue       *return_value,
+                                        guint         n_param_values,
+                                        const GValue *param_values,
+                                        gpointer      invocation_hint,
+                                        gpointer      marshal_data);
+
+G_END_DECLS
+
+#endif /* __ghb_marshal_MARSHAL_H__ */
+
diff --git a/gtk/src/marshalers.list b/gtk/src/marshalers.list
new file mode 100644 (file)
index 0000000..16d07b9
--- /dev/null
@@ -0,0 +1,2 @@
+VOID:STRING,STRING
+BOOLEAN:BOXED
diff --git a/gtk/src/plist.c b/gtk/src/plist.c
new file mode 100644 (file)
index 0000000..cb9b0e2
--- /dev/null
@@ -0,0 +1,596 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <glib-object.h>
+
+#include "plist.h"
+#include "values.h"
+
+#define BUF_SZ (128*1024)
+
+static gchar *preamble = 
+       "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+       "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
+       "<plist version=\"1.0\">\n";
+static gchar *postfix = 
+       "</plist>\n";
+
+enum
+{
+       P_NONE = 0,
+       P_PLIST,
+       P_KEY,
+       P_ARRAY,
+       P_DICT,
+       P_INTEGER,
+       P_REAL,
+       P_STRING,
+       P_DATE,
+       P_TRUE,
+       P_FALSE,
+       P_DATA,
+};
+
+typedef struct
+{
+       gchar *tag;
+       gint id;
+} tag_map_t;
+
+static tag_map_t tag_map[] =
+{
+       {"plist", P_PLIST},
+       {"key", P_KEY},
+       {"array", P_ARRAY},
+       {"dict", P_DICT},
+       {"integer", P_INTEGER},
+       {"real", P_REAL},
+       {"string", P_STRING},
+       {"date", P_DATE},
+       {"true", P_TRUE},
+       {"false", P_FALSE},
+       {"data", P_DATA},
+};
+#define TAG_MAP_SZ     (sizeof(tag_map)/sizeof(tag_map_t))
+
+typedef struct
+{
+       gchar *key;
+       gchar *value;
+       GValue *plist;
+       GQueue *stack;
+       GQueue *tag_stack;
+       gboolean closed_top;
+} parse_data_t;
+
+static void
+start_element(
+       GMarkupParseContext *ctx, 
+       const gchar *name, 
+       const gchar **attr_names,
+       const gchar **attr_values,
+       gpointer ud,
+       GError **error)
+{
+       parse_data_t *pd = (parse_data_t*)ud;
+       union 
+       {
+               gint id;
+               gpointer pid;
+       } id;
+       gint ii;
+
+       // Check to see if the first element found has been closed
+       // If so, ignore any junk following it.
+       if (pd->closed_top)
+               return;
+
+       for (ii = 0; ii < TAG_MAP_SZ; ii++)
+       {
+               if (strcmp(name, tag_map[ii].tag) == 0)
+               {
+                       id.id = tag_map[ii].id;
+                       break;
+               }
+       }
+       if (ii == TAG_MAP_SZ)
+       {
+               g_warning("Unrecognized start tag (%s)", name);
+               return;
+       }
+       g_queue_push_head(pd->tag_stack, id.pid);
+       GType gtype = 0;
+       GValue *gval = NULL;
+       GValue *current = g_queue_peek_head(pd->stack);
+       switch (id.id)
+       {
+               case P_PLIST:
+               { // Ignore
+               } break;
+               case P_KEY:
+               {
+                       if (pd->key) g_free(pd->key);
+                       pd->key = NULL;
+               } break;
+               case P_DICT:
+               {
+                       gval = ghb_dict_value_new();
+                       g_queue_push_head(pd->stack, gval);
+               } break;
+               case P_ARRAY:
+               {
+                       gval = ghb_array_value_new(128);
+                       g_queue_push_head(pd->stack, gval);
+               } break;
+               case P_INTEGER:
+               {
+               } break;
+               case P_REAL:
+               {
+               } break;
+               case P_STRING:
+               {
+               } break;
+               case P_DATE:
+               {
+               } break;
+               case P_TRUE:
+               {
+               } break;
+               case P_FALSE:
+               {
+               } break;
+               case P_DATA:
+               {
+               } break;
+       }
+       // Add the element to the current container
+       if (gval)
+       { // There's an element to add
+               if (current == NULL)
+               {
+                       pd->plist = gval;
+                       return;
+               }
+               gtype = G_VALUE_TYPE(current);
+               if (gtype == ghb_array_get_type())
+               {
+                       ghb_array_append(current, gval);
+               }
+               else if (gtype == ghb_dict_get_type())
+               {
+                       if (pd->key == NULL)
+                       {
+                               g_warning("No key for dictionary item");
+                               ghb_value_free(gval);
+                       }
+                       else
+                       {
+                               ghb_dict_insert(current, g_strdup(pd->key), gval);
+                       }
+               }
+               else
+               {
+                       g_error("Invalid container type. This shouldn't happen");
+               }
+       }
+}
+
+static void
+end_element(
+       GMarkupParseContext *ctx, 
+       const gchar *name, 
+       gpointer ud,
+       GError **error)
+{
+       parse_data_t *pd = (parse_data_t*)ud;
+       gint id;
+       union 
+       {
+               gint id;
+               gpointer pid;
+       } start_id;
+       gint ii;
+
+       // Check to see if the first element found has been closed
+       // If so, ignore any junk following it.
+       if (pd->closed_top)
+               return;
+
+       for (ii = 0; ii < TAG_MAP_SZ; ii++)
+       {
+               if (strcmp(name, tag_map[ii].tag) == 0)
+               {
+                       id = tag_map[ii].id;
+                       break;
+               }
+       }
+       if (ii == TAG_MAP_SZ)
+       {
+               g_warning("Unrecognized start tag (%s)", name);
+               return;
+       }
+       start_id.pid = g_queue_pop_head(pd->tag_stack);
+       if (start_id.id != id)
+               g_warning("start tag != end tag: (%s %d) %d", name, id, id);
+
+       GValue *gval = NULL;
+       GValue *current = g_queue_peek_head(pd->stack);
+       GType gtype = 0;
+       switch (id)
+       {
+               case P_PLIST:
+               { // Ignore
+               } break;
+               case P_KEY:
+               {
+                       if (pd->key) g_free(pd->key);
+                       pd->key = g_strdup(pd->value);
+                       return;
+               } break;
+               case P_DICT:
+               {
+                       g_queue_pop_head(pd->stack);
+               } break;
+               case P_ARRAY:
+               {
+                       g_queue_pop_head(pd->stack);
+               } break;
+               case P_INTEGER:
+               {
+                       gint64 val = g_strtod(pd->value, NULL);
+                       gval = ghb_int64_value_new(val);
+               } break;
+               case P_REAL:
+               {
+                       gdouble val = g_strtod(pd->value, NULL);
+                       gval = ghb_double_value_new(val);
+               } break;
+               case P_STRING:
+               {
+                       gval = ghb_string_value_new(pd->value);
+               } break;
+               case P_DATE:
+               {
+                       GDate date;
+                       GTimeVal time;
+                       g_time_val_from_iso8601(pd->value, &time);
+                       g_date_set_time_val(&date, &time);
+                       gval = ghb_date_value_new(&date);
+               } break;
+               case P_TRUE:
+               {
+                       gval = ghb_boolean_value_new(TRUE);
+               } break;
+               case P_FALSE:
+               {
+                       gval = ghb_boolean_value_new(FALSE);
+               } break;
+               case P_DATA:
+               {
+                       ghb_rawdata_t *data;
+                       data = g_malloc(sizeof(ghb_rawdata_t));
+                       data->data = g_base64_decode(pd->value, &(data->size));
+                       gval = ghb_rawdata_value_new(data);
+               } break;
+       }
+       if (gval)
+       {
+               // Get the top of the data structure stack and if it's an array
+               // or dict, add the current element
+               if (current == NULL)
+               {
+                       pd->plist = gval;
+                       pd->closed_top = TRUE;
+                       return;
+               }
+               gtype = G_VALUE_TYPE(current);
+               if (gtype == ghb_array_get_type())
+               {
+                       ghb_array_append(current, gval);
+               }
+               else if (gtype == ghb_dict_get_type())
+               {
+                       if (pd->key == NULL)
+                       {
+                               g_warning("No key for dictionary item");
+                               ghb_value_free(gval);
+                       }
+                       else
+                       {
+                               ghb_dict_insert(current, g_strdup(pd->key), gval);
+                       }
+               }
+               else
+               {
+                       g_error("Invalid container type. This shouldn't happen");
+               }
+       }
+       if (g_queue_is_empty(pd->stack))
+               pd->closed_top = TRUE;
+}
+
+static void
+text_data(
+       GMarkupParseContext *ctx, 
+       const gchar *text, 
+       gsize len,
+       gpointer ud,
+       GError **error)
+{
+       parse_data_t *pd = (parse_data_t*)ud;
+       if (pd->value) g_free(pd->value);
+       pd->value = g_strdup(text);
+}
+
+static void
+passthrough(
+       GMarkupParseContext *ctx, 
+       const gchar *text, 
+       gsize len,
+       gpointer ud,
+       GError **error)
+{
+       //parse_data_t *pd = (parse_data_t*)ud;
+
+       //g_debug("passthrough %s", text);
+}
+
+static void
+parse_error(GMarkupParseContext *ctx, GError *error, gpointer ud)
+{
+       g_warning("Plist parse error: %s", error->message);
+}
+
+// This is required or the parser crashes
+static void 
+destroy_notify(gpointer data)
+{ // Do nothing
+       //g_debug("destroy parser");
+}
+
+GValue*
+ghb_plist_parse(const gchar *buf, gssize len)
+{
+       GMarkupParseContext *ctx;
+       GMarkupParser parser;
+       parse_data_t pd;
+       GError *err = NULL;
+
+       pd.stack = g_queue_new();
+       pd.tag_stack = g_queue_new();
+       pd.key = NULL;
+       pd.value = NULL;
+       pd.plist = NULL;
+       pd.closed_top = FALSE;
+
+       parser.start_element = start_element;
+       parser.end_element = end_element;
+       parser.text = text_data;
+       parser.passthrough = passthrough;
+       parser.error = parse_error;
+       ctx = g_markup_parse_context_new(&parser, 0, &pd, destroy_notify);
+
+       g_markup_parse_context_parse(ctx, buf, len, &err);
+       g_markup_parse_context_end_parse(ctx, &err);
+       g_markup_parse_context_free(ctx);
+       if (pd.key) g_free(pd.key);
+       if (pd.value) g_free(pd.value);
+       g_queue_free(pd.stack);
+       g_queue_free(pd.tag_stack);
+       return pd.plist;
+}
+
+GValue*
+ghb_plist_parse_file(const gchar *filename)
+{
+       gchar *buffer;
+       size_t size;
+       GValue *gval;
+       FILE *fd;
+
+       fd = g_fopen(filename, "r");
+       if (fd == NULL)
+       {
+               g_warning("Plist parse: failed to open %s", filename);
+               return NULL;
+       }
+       fseek(fd, 0, SEEK_END);
+       size = ftell(fd);
+       fseek(fd, 0, SEEK_SET);
+       buffer = g_malloc(size+1);
+       size = fread(buffer, 1, size, fd);
+       buffer[size] = 0;
+       gval = ghb_plist_parse(buffer, (gssize)size);
+       g_free(buffer);
+       fclose(fd);
+       return gval;
+}
+
+static void
+indent_fprintf(FILE *file, gint indent, const gchar *fmt, ...)
+{
+       va_list ap;
+
+       for (; indent; indent--)
+               putc('\t', file);
+       va_start(ap, fmt);
+       vfprintf(file, fmt, ap);
+       va_end(ap);
+}
+
+// Used for sorting dictionaries.
+static gint
+key_cmp(gconstpointer a, gconstpointer b)
+{
+       gchar *stra = (gchar*)a;
+       gchar *strb = (gchar*)b;
+
+       return strcmp(stra, strb);
+}
+
+static void
+gval_write(FILE *file, GValue *gval)
+{
+       static gint indent = 0;
+       gint ii;
+       GType gtype;
+
+       if (gval == NULL) return;
+       gtype = G_VALUE_TYPE(gval);
+       if (gtype == ghb_array_get_type())
+       {
+               GValue *val;
+               gint count;
+
+               indent_fprintf(file, indent, "<array>\n");
+               indent++;
+               count = ghb_array_len(gval);
+               for (ii = 0; ii < count; ii++)
+               {
+                       val = ghb_array_get_nth(gval, ii);
+                       gval_write(file, val);
+               }
+               indent--;
+               indent_fprintf(file, indent, "</array>\n");
+       }
+       else if (gtype == ghb_dict_get_type())
+       {
+               GValue *val;
+               GHashTable *dict = g_value_get_boxed(gval);
+               GList *link, *keys;
+               keys = g_hash_table_get_keys(dict);
+               // Sort the dictionary.  Not really necessray, but it makes
+               // finding things easier
+               keys = g_list_sort(keys, key_cmp);
+               link = keys;
+               indent_fprintf(file, indent, "<dict>\n");
+               indent++;
+               while (link)
+               {
+                       gchar *key = (gchar*)link->data;
+                       val = g_hash_table_lookup(dict, key);
+                       indent_fprintf(file, indent, "<key>%s</key>\n", key);
+                       gval_write(file, val);
+                       link = link->next;
+               }
+               indent--;
+               indent_fprintf(file, indent, "</dict>\n");
+               g_list_free(keys);
+       }
+       else if (gtype == G_TYPE_BOOLEAN)
+       {
+               gchar *tag;
+               if (g_value_get_boolean(gval))
+               {
+                       tag = "true";
+               }
+               else
+               {
+                       tag = "false";
+               }
+               indent_fprintf(file, indent, "<%s />\n", tag);
+       }
+       else if (gtype == g_date_get_type())
+       {
+               GDate *date;
+               date = g_value_get_boxed(gval);
+               indent_fprintf(file, indent, "<date>%d-%d-%d</date>\n", 
+                       g_date_get_year(date),
+                       g_date_get_month(date),
+                       g_date_get_day(date)
+               );
+       }
+       else if (gtype == ghb_rawdata_get_type())
+       {
+               ghb_rawdata_t *data;
+               gchar *base64;
+               data = g_value_get_boxed(gval);
+               base64 = g_base64_encode(data->data, data->size);
+               indent_fprintf(file, indent, "<data>\n");
+               indent_fprintf(file, 0, "%s\n", base64);
+               indent_fprintf(file, indent, "</data>\n");
+               g_free(base64);
+       }
+       else if (gtype == G_TYPE_DOUBLE)
+       {
+               gdouble val = g_value_get_double(gval);
+               indent_fprintf(file, indent, "<real>%.17g</real>\n", val);
+       }
+       else if (gtype == G_TYPE_INT64)
+       {
+               gint val = g_value_get_int64(gval);
+               indent_fprintf(file, indent, "<integer>%d</integer>\n", val);
+       }
+       else if (gtype == G_TYPE_STRING)
+       {
+               const gchar *str = g_value_get_string(gval);
+               gchar *esc = g_markup_escape_text(str, -1);
+               indent_fprintf(file, indent, "<string>%s</string>\n", esc);
+               g_free(esc);
+       }
+       else
+       {
+               // Try to make anything thats unrecognized into a string
+               const gchar *str;
+               GValue val = {0,};
+               g_value_init(&val, G_TYPE_STRING);
+               if (g_value_transform(gval, &val))
+               {
+                       str = g_value_get_string(&val);
+                       gchar *esc = g_markup_escape_text(str, -1);
+                       indent_fprintf(file, indent, "<string>%s</string>\n", esc);
+                       g_free(esc);
+               }
+               else
+               {
+                       g_message("failed to transform");
+               }
+               g_value_unset(&val);
+       }
+}
+
+void
+ghb_plist_write(FILE *file, GValue *gval)
+{
+       fprintf(file, "%s", preamble);
+       gval_write(file, gval);
+       fprintf(file, "%s", postfix);
+}
+
+void
+ghb_plist_write_file(const gchar *filename, GValue *gval)
+{
+       FILE *file;
+
+       file = fopen(filename, "w");
+       if (file == NULL)
+               return;
+
+       fprintf(file, "%s", preamble);
+       gval_write(file, gval);
+       fprintf(file, "%s", postfix);
+}
+
+
+#if defined(PL_TEST)
+gint
+main(gint argc, gchar *argv[])
+{
+       GValue *gval;
+
+       g_type_init();
+
+       file = g_fopen(argv[1], "r");
+       gval = ghb_plist_parse_file(file);
+       if (argc > 2)
+               ghb_plist_write_file(argv[2], gval);
+       else
+               ghb_plist_write(stdout, gval);
+       if (file) fclose (file);
+       return 0;
+}
+#endif
diff --git a/gtk/src/plist.h b/gtk/src/plist.h
new file mode 100644 (file)
index 0000000..8b24988
--- /dev/null
@@ -0,0 +1,14 @@
+#if !defined(_PLIST_H_)
+#define _PLIST_H_
+
+#include <stdio.h>
+#include <glib.h>
+#include <glib-object.h>
+
+GValue* ghb_plist_parse(const gchar *buf, gssize len);
+GValue* ghb_plist_parse_file(const gchar *filename);
+void ghb_plist_write(FILE *file, GValue *gval);
+void ghb_plist_write_file(const gchar *filename, GValue *gval);
+
+#endif // _PLIST_H_
+
diff --git a/gtk/src/preset_xlat.c b/gtk/src/preset_xlat.c
new file mode 100644 (file)
index 0000000..d3fad53
--- /dev/null
@@ -0,0 +1,627 @@
+#include <stdio.h>
+#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include "plist.h"
+#include "values.h"
+
+static GValue *defaults;
+
+typedef struct
+{
+       gchar *mac_val;
+       gchar *lin_val;
+} value_map_t;
+
+#if 0
+static value_map_t subtitle_xlat[] =
+{ 
+       { "None", "none" },
+       { "Auto", "auto" },
+       { "Any", "und" },
+       { "Afar", "aar" },
+       { "Abkhazian", "abk" },
+       { "Afrikaans", "afr" },
+       { "Akan", "aka" },
+       { "Albanian", "sqi" },
+       { "Amharic", "amh" },
+       { "Arabic", "ara" },
+       { "Aragonese", "arg" },
+       { "Armenian", "hye" },
+       { "Assamese", "asm" },
+       { "Avaric", "ava" },
+       { "Avestan", "ave" },
+       { "Aymara", "aym" },
+       { "Azerbaijani", "aze" },
+       { "Bashkir", "bak" },
+       { "Bambara", "bam" },
+       { "Basque", "eus" },
+       { "Belarusian", "bel" },
+       { "Bengali", "ben" },
+       { "Bihari", "bih" },
+       { "Bislama", "bis" },
+       { "Bosnian", "bos" },
+       { "Breton", "bre" },
+       { "Bulgarian", "bul" },
+       { "Burmese", "mya" },
+       { "Catalan", "cat" },
+       { "Chamorro", "cha" },
+       { "Chechen", "che" },
+       { "Chinese", "zho" },
+       { "Church Slavic", "chu" },
+       { "Chuvash", "chv" },
+       { "Cornish", "cor" },
+       { "Corsican", "cos" },
+       { "Cree", "cre" },
+       { "Czech", "ces" },
+       { "Danish", "dan" },
+       { "Divehi", "div" },
+       { "Dutch", "nld" },
+       { "Dzongkha", "dzo" },
+       { "English", "eng" },
+       { "Esperanto", "epo" },
+       { "Estonian", "est" },
+       { "Ewe", "ewe" },
+       { "Faroese", "fao" },
+       { "Fijian", "fij" },
+       { "Finnish", "fin" },
+       { "French", "fra" },
+       { "Western Frisian", "fry" },
+       { "Fulah", "ful" },
+       { "Georgian", "kat" },
+       { "German", "deu" },
+       { "Gaelic (Scots)", "gla" },
+       { "Irish", "gle" },
+       { "Galician", "glg" },
+       { "Manx", "glv" },
+       { "Greek, Modern", "ell" },
+       { "Guarani", "grn" },
+       { "Gujarati", "guj" },
+       { "Haitian", "hat" },
+       { "Hausa", "hau" },
+       { "Hebrew", "heb" },
+       { "Herero", "her" },
+       { "Hindi", "hin" },
+       { "Hiri Motu", "hmo" },
+       { "Hungarian", "hun" },
+       { "Igbo", "ibo" },
+       { "Icelandic", "isl" },
+       { "Ido", "ido" },
+       { "Sichuan Yi", "iii" },
+       { "Inuktitut", "iku" },
+       { "Interlingue", "ile" },
+       { "Interlingua", "ina" },
+       { "Indonesian", "ind" },
+       { "Inupiaq", "ipk" },
+       { "Italian", "ita" },
+       { "Javanese", "jav" },
+       { "Japanese", "jpn" },
+       { "Kalaallisut", "kal" },
+       { "Kannada", "kan" },
+       { "Kashmiri", "kas" },
+       { "Kanuri", "kau" },
+       { "Kazakh", "kaz" },
+       { "Central Khmer", "khm" },
+       { "Kikuyu", "kik" },
+       { "Kinyarwanda", "kin" },
+       { "Kirghiz", "kir" },
+       { "Komi", "kom" },
+       { "Kongo", "kon" },
+       { "Korean", "kor" },
+       { "Kuanyama", "kua" },
+       { "Kurdish", "kur" },
+       { "Lao", "lao" },
+       { "Latin", "lat" },
+       { "Latvian", "lav" },
+       { "Limburgan", "lim" },
+       { "Lingala", "lin" },
+       { "Lithuanian", "lit" },
+       { "Luxembourgish", "ltz" },
+       { "Luba-Katanga", "lub" },
+       { "Ganda", "lug" },
+       { "Macedonian", "mkd" },
+       { "Marshallese", "mah" },
+       { "Malayalam", "mal" },
+       { "Maori", "mri" },
+       { "Marathi", "mar" },
+       { "Malay", "msa" },
+       { "Malagasy", "mlg" },
+       { "Maltese", "mlt" },
+       { "Moldavian", "mol" },
+       { "Mongolian", "mon" },
+       { "Nauru", "nau" },
+       { "Navajo", "nav" },
+       { "Ndebele, South", "nbl" },
+       { "Ndebele, North", "nde" },
+       { "Ndonga", "ndo" },
+       { "Nepali", "nep" },
+       { "Norwegian Nynorsk", "nno" },
+       { "Norwegian BokmÃ¥l", "nob" },
+       { "Norwegian", "nor" },
+       { "Chichewa; Nyanja", "nya" },
+       { "Occitan", "oci" },
+       { "Ojibwa", "oji" },
+       { "Oriya", "ori" },
+       { "Oromo", "orm" },
+       { "Ossetian", "oss" },
+       { "Panjabi", "pan" },
+       { "Persian", "fas" },
+       { "Pali", "pli" },
+       { "Polish", "pol" },
+       { "Portuguese", "por" },
+       { "Pushto", "pus" },
+       { "Quechua", "que" },
+       { "Romansh", "roh" },
+       { "Romanian", "ron" },
+       { "Rundi", "run" },
+       { "Russian", "rus" },
+       { "Sango", "sag" },
+       { "Sanskrit", "san" },
+       { "Serbian", "srp" },
+       { "Croatian", "hrv" },
+       { "Sinhala", "sin" },
+       { "Slovak", "slk" },
+       { "Slovenian", "slv" },
+       { "Northern Sami", "sme" },
+       { "Samoan", "smo" },
+       { "Shona", "sna" },
+       { "Sindhi", "snd" },
+       { "Somali", "som" },
+       { "Sotho, Southern", "sot" },
+       { "Spanish", "spa" },
+       { "Sardinian", "srd" },
+       { "Swati", "ssw" },
+       { "Sundanese", "sun" },
+       { "Swahili", "swa" },
+       { "Swedish", "swe" },
+       { "Tahitian", "tah" },
+       { "Tamil", "tam" },
+       { "Tatar", "tat" },
+       { "Telugu", "tel" },
+       { "Tajik", "tgk" },
+       { "Tagalog", "tgl" },
+       { "Thai", "tha" },
+       { "Tibetan", "bod" },
+       { "Tigrinya", "tir" },
+       { "Tonga", "ton" },
+       { "Tswana", "tsn" },
+       { "Tsonga", "tso" },
+       { "Turkmen", "tuk" },
+       { "Turkish", "tur" },
+       { "Twi", "twi" },
+       { "Uighur", "uig" },
+       { "Ukrainian", "ukr" },
+       { "Urdu", "urd" },
+       { "Uzbek", "uzb" },
+       { "Venda", "ven" },
+       { "Vietnamese", "vie" },
+       { "Volapük", "vol" },
+       { "Welsh", "cym" },
+       { "Walloon", "wln" },
+       { "Wolof", "wol" },
+       { "Xhosa", "xho" },
+       { "Yiddish", "yid" },
+       { "Yoruba", "yor" },
+       { "Zhuang", "zha" },
+       { "Zulu", "zul" },
+       {NULL, NULL}
+};
+
+static value_map_t vcodec_xlat[] =
+{
+       {"MPEG-4 (FFmpeg)", "ffmpeg"},
+       {"MPEG-4 (XviD)", "xvid"},
+       {"H.264 (x264)", "x264"},
+       {"VP3 (Theora)", "theora"},
+       {NULL,NULL}
+};
+
+value_map_t container_xlat[] =
+{
+       {"MP4 file", "mp4"},
+       {"M4V file", "m4v"},
+       {"MKV file", "mkv"},
+       {"AVI file", "avi"},
+       {"OGM file", "ogm"},
+       {NULL, NULL}
+};
+
+value_map_t framerate_xlat[] =
+{
+       {"Same as source", "source"},
+       {"5", "5"},
+       {"10", "10"},
+       {"12", "12"},
+       {"15", "15"},
+       {"23.976", "23.976"},
+       {"24", "24"},
+       {"25", "25"},
+       {"29.97", "29.97"},
+       {NULL, NULL}
+};
+
+value_map_t deint_xlat[] =
+{
+       {"0", "none"},
+       {"1", "fast"},
+       {"2", "slow"},
+       {"3", "slower"},
+       {NULL, NULL}
+};
+
+value_map_t denoise_xlat[] =
+{
+       {"0", "none"},
+       {"1", "weak"},
+       {"2", "medium"},
+       {"3", "strong"},
+       {NULL, NULL}
+};
+
+static value_map_t acodec_xlat[] =
+{
+       {"AAC (faac)", "faac"},
+       {"AC3 Passthru", "ac3"},
+       {"MP3 (lame)", "lame"},
+       {"Vorbis (vorbis)", "vorbis"},
+       {NULL,NULL}
+};
+
+value_map_t samplerate_xlat[] =
+{
+       {"Auto", "source"},
+       {"22.05", "22.05"},
+       {"24", "24"},
+       {"32", "32"},
+       {"44.1", "44.1"},
+       {"48", "48"},
+       {NULL, NULL}
+};
+
+value_map_t mix_xlat[] =
+{
+       {"Mono", "mono"},
+       {"Stereo", "stereo"},
+       {"Dolby Surround", "dpl1"},
+       {"Dolby Pro Logic II", "dpl2"},
+       {"6-channel discrete", "6ch"},
+       {"AC3 Passthru", "none"},
+       {NULL, NULL}
+};
+#endif
+
+typedef struct
+{
+       gchar *mac_key;
+       gchar *lin_key;
+       value_map_t *value_map;
+       gboolean same;
+       gboolean ignore;
+} key_map_t;
+
+key_map_t key_map[] = 
+{
+       {"Audio1Bitrate", NULL, NULL, FALSE, FALSE},
+       {"Audio1Encoder", NULL, NULL, FALSE, FALSE},
+       {"Audio1Mixdown", NULL, NULL, FALSE, FALSE},
+       {"Audio1Samplerate", NULL, NULL, FALSE, FALSE},
+       {"Audio1Track", NULL, NULL, FALSE, FALSE},
+       {"Audio1TrackDescription", NULL, NULL, FALSE, FALSE},
+       {"Audio1TrackDRCSlider", NULL, NULL, FALSE, FALSE},
+       {"Audio2Bitrate", NULL, NULL, FALSE, FALSE},
+       {"Audio2Encoder", NULL, NULL, FALSE, FALSE},
+       {"Audio2Mixdown", NULL, NULL, FALSE, FALSE},
+       {"Audio2Samplerate", NULL, NULL, FALSE, FALSE},
+       {"Audio2Track", NULL, NULL, FALSE, FALSE},
+       {"Audio2TrackDescription", NULL, NULL, FALSE, FALSE},
+       {"Audio2TrackDRCSlider", NULL, NULL, FALSE, FALSE},
+       {"ChapterMarkers", NULL, NULL, TRUE, FALSE},
+       {"Default", NULL, NULL, TRUE, FALSE},
+       {"FileFormat", NULL, NULL, TRUE, FALSE},
+       {"Folder", NULL, NULL, TRUE, FALSE},
+       {"Mp4HttpOptimize", NULL, NULL, TRUE, FALSE},
+       {"Mp4iPodCompatible", NULL, NULL, TRUE, FALSE},
+       {"Mp4LargeFile", NULL, NULL, TRUE, FALSE},
+       {"PictureAutoCrop", NULL, NULL, TRUE, FALSE},
+       {"PictureBottomCrop", NULL, NULL, TRUE, FALSE},
+       {"PictureDeblock", NULL, NULL, TRUE, FALSE},
+       {"PictureDecomb", NULL, NULL, TRUE, FALSE},
+       {"PictureDeinterlace", NULL, NULL, TRUE, FALSE},
+       {"PictureDenoise", NULL, NULL, TRUE, FALSE},
+       {"PictureDetelecine", NULL, NULL, TRUE, FALSE},
+       {"PictureHeight", NULL, NULL, TRUE, FALSE},
+       {"PictureKeepRatio", NULL, NULL, TRUE, FALSE},
+       {"PictureLeftCrop", NULL, NULL, TRUE, FALSE},
+       {"PicturePAR", NULL, NULL, TRUE, FALSE},
+       {"PictureRightCrop", NULL, NULL, TRUE, FALSE},
+       {"PictureTopCrop", NULL, NULL, TRUE, FALSE},
+       {"PictureWidth", NULL, NULL, TRUE, FALSE},
+       {"PresetDescription", NULL, NULL, TRUE, FALSE},
+       {"PresetName", NULL, NULL, TRUE, FALSE},
+       {"Subtitles", NULL, NULL, TRUE, FALSE},
+       {"SubtitlesForced", NULL, NULL, TRUE, FALSE},
+       {"Type", NULL, NULL, TRUE, FALSE},
+       {"UsesMaxPictureSettings", NULL, NULL, TRUE, FALSE},
+       {"UsesPictureFilters", NULL, NULL, TRUE, FALSE},
+       {"UsesPictureSettings", NULL, NULL, TRUE, FALSE},
+       {"VFR", NULL, NULL, FALSE, TRUE},
+       {"VideoAvgBitrate", NULL, NULL, TRUE, FALSE},
+       {"VideoEncoder", NULL, NULL, TRUE, FALSE},
+       {"VideoFramerate", NULL, NULL, TRUE, FALSE},
+       {"VideoGrayScale", NULL, NULL, TRUE, FALSE},
+       {"VideoQualitySlider", NULL, NULL, TRUE, FALSE},
+       {"VideoQualityType", NULL, NULL, TRUE, FALSE},
+       {"VideoTargetSize", NULL, NULL, TRUE, FALSE},
+       {"VideoTwoPass", NULL, NULL, TRUE, FALSE},
+       {"VideoTurboTwoPass", NULL, NULL, TRUE, FALSE},
+       {"x264Option", NULL, NULL, TRUE, FALSE},
+       {NULL, NULL}
+};
+
+const gint
+key_xlat(key_map_t *key_map, const gchar *mac_key)
+{
+       gint ii;
+
+       for (ii = 0; key_map[ii].mac_key; ii++)
+       {
+               if (strcmp(mac_key, key_map[ii].mac_key) == 0)
+               {
+                       if (key_map[ii].ignore)
+                               return -1;
+                       return ii;
+               }
+       }
+       g_warning("Unrecognized key: (%s)", mac_key);
+       return -1;
+}
+
+static GValue*
+value_xlat(
+       GValue *defaults, 
+       key_map_t *key_map, 
+       gint key_index, 
+       GValue *mac_val)
+{
+       GValue *gval, *def_val;
+       const gchar *lin_key;
+       if (key_map[key_index].same)
+               lin_key = key_map[key_index].mac_key;
+       else
+               lin_key = key_map[key_index].lin_key;
+       value_map_t *value_map = key_map[key_index].value_map;
+
+       def_val = ghb_dict_lookup(defaults, lin_key);
+       if (def_val)
+       {
+               if (value_map)
+               {
+                       gint ii;
+                       gchar *str;
+                       GValue *sval;
+
+                       str = ghb_value_string(mac_val);
+                       for (ii = 0; value_map[ii].mac_val; ii++)
+                       {
+                               if (strcmp(str, value_map[ii].mac_val) == 0)
+                               {
+                                       sval = ghb_string_value_new(value_map[ii].lin_val);
+                                       g_free(str);
+                                       gval = ghb_value_new(G_VALUE_TYPE(def_val));
+                                       if (!g_value_transform(sval, gval))
+                                       {
+                                               g_warning("1 can't transform");
+                                               ghb_value_free(gval);
+                                               ghb_value_free(sval);
+                                               return NULL;
+                                       }
+                                       ghb_value_free(sval);
+                                       return gval;
+                               }
+                       }
+                       g_warning("Can't map value: (%s)", str);
+                       g_free(str);
+               }
+               else
+               {
+                       gval = ghb_value_new(G_VALUE_TYPE(def_val));
+                       if (!g_value_transform(mac_val, gval))
+                       {
+                               g_warning("2 can't transform");
+                               ghb_value_free(gval);
+                               return NULL;
+                       }
+                       return gval;
+               }
+       }
+       else
+       {
+               g_warning("Bad key: (%s)", lin_key);
+               return NULL;
+       }
+       return NULL;
+}
+
+key_map_t audio_key_map[] =
+{
+       {"Audio1Bitrate", "AudioBitrate", NULL, FALSE, FALSE},
+       {"Audio1Encoder", "AudioEncoder", NULL, FALSE, FALSE},
+       {"Audio1Mixdown", "AudioMixdown", NULL, FALSE},
+       {"Audio1Samplerate", "AudioSamplerate", NULL, FALSE, FALSE},
+       {"Audio1Track", "AudioTrack", NULL, FALSE, FALSE},
+       {"Audio1TrackDescription", "AudioTrackDescription", NULL, FALSE, FALSE},
+       {"Audio1TrackDRCSlider", "AudioTrackDRCSlider", NULL, FALSE, FALSE},
+       {"Audio2Bitrate", "AudioBitrate", NULL, FALSE, FALSE},
+       {"Audio2Encoder", "AudioEncoder", NULL, FALSE, FALSE},
+       {"Audio2Mixdown", "AudioMixdown", NULL, FALSE, FALSE},
+       {"Audio2Samplerate", "AudioSamplerate", NULL, FALSE, FALSE},
+       {"Audio2Track", "AudioTrack", NULL, FALSE, FALSE},
+       {"Audio2TrackDescription", "AudioTrackDescription", NULL, FALSE, FALSE},
+       {"Audio2TrackDRCSlider", "AudioTrackDRCSlider", NULL, FALSE, FALSE},
+       {NULL, NULL}
+};
+
+static void
+hard_value_xlat(GValue *lin_dict, const gchar *mac_key, GValue *mac_val)
+{
+       {
+               gint key_index;
+               GValue *audio_defaults;
+
+               audio_defaults = ghb_array_get_nth(
+                       ghb_dict_lookup(defaults, "AudioList"), 0);
+               key_index = key_xlat(audio_key_map, mac_key);
+               if (key_index >= 0)
+               {
+                       gint audio_index, count, ii;
+                       GValue *alist, *adict, *val;
+                       const gchar *lin_key;
+
+                       if (audio_key_map[key_index].same)
+                               lin_key = audio_key_map[key_index].mac_key;
+                       else
+                               lin_key = audio_key_map[key_index].lin_key;
+                       audio_index = mac_key[5] - '1';
+                       alist = ghb_dict_lookup(lin_dict, "AudioList");
+                       if (alist == NULL)
+                       {
+                               alist = ghb_array_value_new(8);
+                               ghb_dict_insert(lin_dict, "AudioList", alist);
+                       }
+                       count = ghb_array_len(alist);
+                       for (ii = count; ii <= audio_index; ii++)
+                       {
+                               adict = ghb_value_dup(audio_defaults);
+                               ghb_array_append(alist, adict);
+                       }
+                       adict = ghb_array_get_nth(alist, audio_index);
+                       val = value_xlat(audio_defaults, audio_key_map, key_index, mac_val);
+                       if (val)
+                       {
+                               ghb_dict_insert(adict, g_strdup(lin_key), val);
+                       }
+               }
+       }
+}
+
+static void
+parse_preset_dict(GValue *mac_dict, GValue *lin_dict)
+{
+    GHashTableIter iter;
+    gchar *key;
+    GValue *mac_val, *val;
+
+    ghb_dict_iter_init(&iter, mac_dict);
+    // middle (void*) cast prevents gcc warning "defreferencing type-punned
+    // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&mac_val))
+       {
+               gint key_index;
+
+               key_index = key_xlat(key_map, key);
+               if (key_index >= 0)
+               { // The simple translations
+                       const gchar *lin_key;
+
+                       if (key_map[key_index].same)
+                               lin_key = key_map[key_index].mac_key;
+                       else
+                               lin_key = key_map[key_index].lin_key;
+                       if (lin_key)
+                       {
+                               val = value_xlat(defaults, key_map, key_index, mac_val);
+                               if (val)
+                               {
+                                       ghb_dict_insert(lin_dict, g_strdup(lin_key), val);
+                               }
+                       }
+                       else
+                       {
+                               hard_value_xlat(lin_dict, key, mac_val);
+                       }
+               }
+       }
+}
+
+static void
+parse_preset_array(GValue *mac_array, GValue *lin_array)
+{
+       gint count, ii;
+       GValue *mac_dict, *lin_dict, *gval;
+
+       count = ghb_array_len(mac_array);
+       for (ii = 0; ii < count; ii++)
+       {
+               mac_dict = ghb_array_get_nth(mac_array, ii);
+               
+               // Only process builtin types
+               if (ghb_value_int(ghb_dict_lookup(mac_dict, "Type")) != 0)
+                       continue;
+
+               lin_dict = ghb_dict_value_new();
+               ghb_array_append(lin_array, lin_dict);
+               gval = ghb_dict_lookup(mac_dict, "PresetName");
+               if (gval)
+               {
+                       ghb_dict_insert(lin_dict, g_strdup("PresetName"), 
+                                                       ghb_value_dup(gval));
+               }
+               gval = ghb_dict_lookup(mac_dict, "PresetDescription");
+               if (gval)
+               {
+                       ghb_dict_insert(lin_dict, g_strdup("PresetDescription"), 
+                                                       ghb_value_dup(gval));
+               }
+               gval = ghb_dict_lookup(mac_dict, "Folder");
+               if (gval && ghb_value_boolean(gval))
+               { // Folder
+                       GValue *mval, *lval;
+
+                       mval = ghb_dict_lookup(mac_dict, "ChildrenArray");
+                       lval = ghb_array_value_new(32);
+                       ghb_dict_insert(lin_dict, g_strdup("ChildrenArray"), lval);
+                       ghb_dict_insert(lin_dict, g_strdup("Folder"), 
+                                                       ghb_boolean_value_new(TRUE));
+                       ghb_dict_insert(lin_dict, g_strdup("Type"), 
+                                                       ghb_int_value_new(0));
+                       parse_preset_array(mval, lval);
+               }
+               else
+               { // Normal preset
+                       ghb_dict_insert(lin_dict, g_strdup("Type"), 
+                                                       ghb_int_value_new(0));
+                       parse_preset_dict(mac_dict, lin_dict);
+               }
+       }
+}
+
+static void
+xlat(GValue *mac, GValue *lin)
+{
+       return parse_preset_array(mac, lin);
+}
+
+gint
+main(gint argc, gchar *argv[])
+{
+       GValue *mac_plist, *lin_plist;
+       GValue *internal;
+
+       if (argc < 3)
+       {
+               fprintf(stderr, "Usage: <mac plist> <lin plist>\n");
+               return 1;
+       }
+       g_type_init();
+
+       ghb_register_transforms();
+       internal = ghb_plist_parse_file("internal_defaults.xml");
+       defaults = ghb_dict_lookup(internal, "Presets");
+       mac_plist = ghb_plist_parse_file(argv[1]);
+       lin_plist = ghb_array_value_new(32);
+       xlat(mac_plist, lin_plist);
+       ghb_plist_write_file(argv[2], lin_plist);
+       return 0;
+}
+
diff --git a/gtk/src/presets.c b/gtk/src/presets.c
new file mode 100644 (file)
index 0000000..f7504d6
--- /dev/null
@@ -0,0 +1,3293 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * presets.c
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ * 
+ * presets.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 <glib.h>
+#include <glib-object.h>
+#include <glib/gstdio.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include "settings.h"
+#include "callbacks.h"
+#include "audiohandler.h"
+#include "hb-backend.h"
+#include "plist.h"
+#include "resources.h"
+#include "presets.h"
+#include "values.h"
+#include "lang.h"
+
+#define MAX_NESTED_PRESET 3
+
+enum
+{
+       PRESETS_BUILTIN = 0,
+       PRESETS_CUSTOM
+};
+
+static GValue *presetsPlist = NULL;
+static GValue *internalPlist = NULL;
+static GValue *prefsPlist = NULL;
+
+static const GValue* preset_dict_get_value(GValue *dict, const gchar *key);
+static void store_plist(GValue *plist, const gchar *name);
+static void store_presets(void);
+
+// This only handle limited depth
+GtkTreePath*
+ghb_tree_path_new_from_indices(gint *indices, gint len)
+{
+       switch (len)
+       {
+               case 1:
+                       return gtk_tree_path_new_from_indices(
+                               indices[0], -1);
+               case 2:
+                       return gtk_tree_path_new_from_indices(
+                               indices[0], indices[1], -1);
+               case 3:
+                       return gtk_tree_path_new_from_indices(
+                               indices[0], indices[1], indices[2], -1);
+               case 4:
+                       return gtk_tree_path_new_from_indices(
+                               indices[0], indices[1], indices[2], indices[3], -1);
+               case 5:
+                       return gtk_tree_path_new_from_indices(
+                               indices[0], indices[1], indices[2], indices[3], indices[4], -1);
+               default:
+                       return NULL;
+       }
+}
+
+GValue*
+ghb_parse_preset_path(const gchar *path)
+{
+       gchar **split;
+       GValue *preset;
+       gint ii;
+
+       preset = ghb_array_value_new(MAX_NESTED_PRESET);
+       split = g_strsplit(path, "#", MAX_NESTED_PRESET);
+       for (ii = 0; split[ii] != NULL; ii++)
+       {
+               ghb_array_append(preset, ghb_string_value_new(split[ii]));
+       }
+       g_strfreev(split);
+       return preset;
+}
+
+static GValue*
+preset_path_from_indices(GValue *presets, gint *indices, gint len)
+{
+       gint ii;
+       GValue *path;
+
+       g_debug("preset_path_from_indices");
+       path = ghb_array_value_new(MAX_NESTED_PRESET);
+       for (ii = 0; ii < len; ii++)
+       {
+               GValue *dict;
+               gint count, folder;
+               const GValue *name;
+
+               count = ghb_array_len(presets);
+               if (indices[ii] >= count) break;
+               dict = ghb_array_get_nth(presets, indices[ii]);
+               name = ghb_dict_lookup(dict, "PresetName");
+               if (name)
+                       ghb_array_append(path, ghb_value_dup(name));
+               folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
+               if (!folder)
+                       break;
+               presets = ghb_dict_lookup(dict, "ChildrenArray");
+       }
+       return path;
+}
+
+gchar*
+ghb_preset_path_string(const GValue *path)
+{
+       gint count, ii;
+       GString *gstr;
+       GValue *val;
+       gchar *str;
+
+       gstr = g_string_new("");
+       if (path != NULL)
+       {
+               count = ghb_array_len(path);
+               for (ii = 0; ii < count; ii++)
+               {
+                       val = ghb_array_get_nth(path, ii);
+                       str = ghb_value_string(val);
+                       g_string_append(gstr, str);
+                       if (ii < count-1)
+                               g_string_append(gstr, "->");
+                       g_free(str);
+               }
+       }
+       str = g_string_free(gstr, FALSE);
+       return str;
+}
+
+static void
+debug_show_type(GType tp)
+{
+       const gchar *str = "unknown";
+       if (tp == G_TYPE_STRING)
+       {
+               str ="string";
+       }
+       else if (tp == G_TYPE_INT)
+       {
+               str ="int";
+       }
+       else if (tp == G_TYPE_INT64)
+       {
+               str ="int64";
+       }
+       else if (tp == G_TYPE_BOOLEAN)
+       {
+               str ="bool";
+       }
+       else if (tp == ghb_array_get_type())
+       {
+               str ="array";
+       }
+       else if (tp == ghb_dict_get_type())
+       {
+               str ="dict";
+       }
+       g_message("Type: %s", str);
+}
+
+void
+dump_preset_path(const gchar *msg, const GValue *path)
+{
+       gchar *str;
+
+       if (path)
+               debug_show_type (G_VALUE_TYPE(path));
+       str = ghb_preset_path_string(path);
+       g_message("%s path: (%s)", msg, str);
+       g_free(str);
+}
+
+void
+dump_preset_indices(const gchar *msg, gint *indices, gint len)
+{
+       gint ii;
+
+       g_message("%s indices: len %d", msg, len);
+       for (ii = 0; ii < len; ii++)
+       {
+               printf("%d ", indices[ii]);
+       }
+       printf("\n");
+}
+
+#if 0
+static gint
+preset_path_cmp(const GValue *path1, const GValue *path2)
+{
+       gint count, ii;
+       GValue *val;
+       gchar *str1, *str2;
+       gint result;
+
+       count = ghb_array_len(path1);
+       ii = ghb_array_len(path2);
+       if (ii != count)
+               return ii - count;
+       for (ii = 0; ii < count; ii++)
+       {
+               val = ghb_array_get_nth(path1, ii);
+               str1 = ghb_value_string(val);
+               val = ghb_array_get_nth(path2, ii);
+               str2 = ghb_value_string(val);
+               result = strcmp(str1, str2);
+               if (result != 0)
+                       return result;
+               g_free(str1);
+               g_free(str2);
+       }
+       return 0;
+}
+#endif
+
+static GValue*
+presets_get_dict(GValue *presets, gint *indices, gint len)
+{
+       gint ii, count, folder;
+       GValue *dict = NULL;
+
+       g_debug("presets_get_dict ()");
+       for (ii = 0; ii < len; ii++)
+       {
+               count = ghb_array_len(presets);
+               if (indices[ii] >= count) return NULL;
+               dict = ghb_array_get_nth(presets, indices[ii]);
+               if (ii < len-1)
+               {
+                       folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
+                       if (!folder)
+                               return NULL;
+                       presets = ghb_dict_lookup(dict, "ChildrenArray");
+               }
+       }
+       if (ii < len)
+               return NULL;
+       return dict;
+}
+
+static GValue*
+presets_get_folder(GValue *presets, gint *indices, gint len)
+{
+       gint ii, count, folder;
+       GValue *dict;
+
+       g_debug("presets_get_folder ()");
+       for (ii = 0; ii < len; ii++)
+       {
+               count = ghb_array_len(presets);
+               if (indices[ii] >= count) return NULL;
+               dict = ghb_array_get_nth(presets, indices[ii]);
+               folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
+               if (!folder)
+                       break;
+               presets = ghb_dict_lookup(dict, "ChildrenArray");
+       }
+       if (ii < len)
+               return NULL;
+       return presets;
+}
+
+static GValue*
+plist_get_dict(GValue *presets, const gchar *name)
+{
+       if (presets == NULL || name == NULL) return NULL;
+       return ghb_dict_lookup(presets, name);
+}
+
+static const gchar*
+preset_get_name(GValue *dict)
+{
+       return g_value_get_string(preset_dict_get_value(dict, "PresetName"));
+}
+
+gboolean
+ghb_preset_folder(GValue *dict)
+{
+       return ghb_value_int(preset_dict_get_value(dict, "Folder"));
+}
+
+gint
+ghb_preset_type(GValue *dict)
+{
+       return ghb_value_int(preset_dict_get_value(dict, "Type"));
+}
+
+static void
+presets_remove_nth(GValue *presets, gint pos)
+{
+       GValue *dict;
+       gint count;
+       
+       if (presets == NULL || pos < 0) return;
+       count = ghb_array_len(presets);
+       if (pos >= count) return;
+       dict = ghb_array_get_nth(presets, pos);
+       ghb_array_remove(presets, pos);
+       ghb_value_free(dict);
+}
+
+gboolean
+ghb_presets_remove(
+       GValue *presets, 
+       gint *indices,
+       gint len)
+{
+       GValue *folder = NULL;
+
+       folder = presets_get_folder(presets, indices, len-1);
+       if (folder)
+               presets_remove_nth(folder, indices[len-1]);
+       else
+       {
+               g_warning("ghb_presets_remove (): internal preset lookup error");
+               return FALSE;
+       }
+       return TRUE;
+}
+
+static void
+ghb_presets_replace(
+       GValue *presets, 
+       GValue *dict,
+       gint *indices,
+       gint len)
+{
+       GValue *folder = NULL;
+
+       folder = presets_get_folder(presets, indices, len-1);
+       if (folder)
+               ghb_array_replace(folder, indices[len-1], dict);
+       else
+       {
+               g_warning("ghb_presets_replace (): internal preset lookup error");
+       }
+}
+
+static void
+ghb_presets_insert(
+       GValue *presets, 
+       GValue *dict,
+       gint *indices,
+       gint len)
+{
+       GValue *folder = NULL;
+
+       folder = presets_get_folder(presets, indices, len-1);
+       if (folder)
+               ghb_array_insert(folder, indices[len-1], dict);
+       else
+       {
+               g_warning("ghb_presets_insert (): internal preset lookup error");
+       }
+}
+
+static gint
+presets_find_element(GValue *presets, const gchar *name)
+{
+       GValue *dict;
+       gint count, ii;
+       
+       g_debug("presets_find_element () (%s)", name);
+       if (presets == NULL || name == NULL) return -1;
+       count = ghb_array_len(presets);
+       for (ii = 0; ii < count; ii++)
+       {
+               const gchar *str;
+               dict = ghb_array_get_nth(presets, ii);
+               str = preset_get_name(dict);
+               if (strcmp(name, str) == 0)
+               {
+                       return ii;
+               }
+       }
+       return -1;
+}
+
+static gint
+single_find_pos(GValue *presets, const gchar *name, gint type)
+{
+       GValue *dict;
+       gint count, ii, ptype, last;
+       
+       if (presets == NULL || name == NULL) return -1;
+       last = count = ghb_array_len(presets);
+       for (ii = 0; ii < count; ii++)
+       {
+               const gchar *str;
+               dict = ghb_array_get_nth(presets, ii);
+               str = preset_get_name(dict);
+               ptype = ghb_value_int(preset_dict_get_value(dict, "Type"));
+               if (strcasecmp(name, str) <= 0 && ptype == type)
+               {
+                       return ii;
+               }
+               if (ptype == type)
+                       last = ii+1;
+       }
+       return last;
+}
+
+static gint*
+presets_find_pos(const GValue *path, gint type, gint *len)
+{
+       GValue *nested;
+       GValue *val;
+       gint count, ii;
+       gboolean folder;
+       gint *indices = NULL;
+       const gchar *name;
+       GValue *dict;
+
+       g_debug("presets_find_pos () ");
+       nested = presetsPlist;
+       count = ghb_array_len(path);
+       indices = g_malloc(MAX_NESTED_PRESET * sizeof(gint));
+       for (ii = 0; ii < count-1; ii++)
+       {
+               val = ghb_array_get_nth(path, ii);
+               name = g_value_get_string(val);
+               indices[ii] = presets_find_element(nested, name);
+               if (indices[ii] == -1) return NULL;
+               dict = ghb_array_get_nth(nested, indices[ii]);
+               folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
+               nested = NULL;
+               if (!folder)
+                       break;
+               nested = ghb_dict_lookup(dict, "ChildrenArray");
+       }
+       if (nested)
+       {
+               const gchar *name;
+
+               name = g_value_get_string(ghb_array_get_nth(path, count-1));
+               indices[ii] = single_find_pos(nested, name, type);
+               ii++;
+       }
+       *len = ii;
+       return indices;
+}
+
+static gint
+preset_tree_depth(GValue *dict)
+{
+       gboolean folder;
+
+       folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
+       if (folder)
+       {
+               gint depth = 0;
+               gint count, ii;
+               GValue *presets;
+
+               presets = ghb_dict_lookup(dict, "ChildrenArray");
+               count = ghb_array_len(presets);
+               for (ii = 0; ii < count; ii++)
+               {
+                       gint tmp;
+
+                       dict = ghb_array_get_nth(presets, ii);
+                       tmp = preset_tree_depth(dict);
+                       depth = MAX(depth, tmp);
+               }
+               return depth + 1;
+       }
+       else
+       {
+               return 1;
+       }
+}
+
+static gboolean
+preset_is_default(GValue *dict)
+{
+       const GValue *val;
+
+       val = preset_dict_get_value(dict, "Default");
+       return ghb_value_boolean(val);
+}
+
+static void
+presets_clear_default(GValue *presets)
+{
+       gint count, ii;
+
+       count = ghb_array_len(presets);
+       for (ii = 0; ii < count; ii++)
+       {
+               GValue *dict;
+               gboolean folder;
+
+               dict = ghb_array_get_nth(presets, ii);
+               folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
+               if (folder)
+               {
+                       GValue *nested;
+
+                       nested = ghb_dict_lookup(dict, "ChildrenArray");
+                       presets_clear_default(nested);
+               }
+               else
+               {
+                       if (preset_is_default(dict))
+                       {
+                               ghb_dict_insert(dict, g_strdup("Default"), 
+                                                               ghb_boolean_value_new(FALSE));
+                       }
+               }
+       }
+}
+
+static gint*
+presets_find_default2(GValue *presets, gint *len)
+{
+       gint count, ii;
+       gint *indices;
+
+       count = ghb_array_len(presets);
+       for (ii = 0; ii < count; ii++)
+       {
+               GValue *dict;
+               gboolean folder;
+
+               dict = ghb_array_get_nth(presets, ii);
+               folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
+               if (folder)
+               {
+                       GValue *nested;
+                       gint pos = *len;
+
+                       nested = ghb_dict_lookup(dict, "ChildrenArray");
+                       (*len)++;
+                       indices = presets_find_default2(nested, len);
+                       if (indices)
+                       {
+                               indices[pos] = ii;
+                               return indices;
+                       }
+                       else
+                               *len = pos;
+               }
+               else
+               {
+                       if (preset_is_default(dict))
+                       {
+                               indices = malloc(MAX_NESTED_PRESET * sizeof(gint));
+                               indices[*len] = ii;
+                               (*len)++;
+                               return indices;
+                       }
+               }
+       }
+       return NULL;
+}
+
+static gint*
+presets_find_default(GValue *presets, gint *len)
+{
+       *len = 0;
+       return presets_find_default2(presets, len);
+}
+
+gint*
+ghb_preset_indices_from_path(
+       GValue *presets, 
+       const GValue *path,
+       gint *len)
+{
+       GValue *nested;
+       GValue *val;
+       gint count, ii;
+       gint *indices = NULL;
+       const gchar *name;
+       GValue *dict;
+       gboolean folder;
+
+       g_debug("ghb_preset_indices_from_path () ");
+       nested = presets;
+       count = ghb_array_len(path);
+       if (count)
+               indices = g_malloc(MAX_NESTED_PRESET * sizeof(gint));
+       *len = 0;
+       for (ii = 0; ii < count; ii++)
+       {
+               val = ghb_array_get_nth(path, ii);
+               name = g_value_get_string(val);
+               indices[ii] = presets_find_element(nested, name);
+               if (indices[ii] == -1)
+               {
+                       g_free(indices);
+                       return NULL;
+               }
+               if (ii < count-1)
+               {
+                       dict = ghb_array_get_nth(nested, indices[ii]);
+                       folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
+                       if (!folder)
+                       {
+                               g_free(indices);
+                               return NULL;
+                       }
+                       nested = ghb_dict_lookup(dict, "ChildrenArray");
+               }
+       }
+       *len = ii;
+       return indices;
+}
+
+static gint
+ghb_presets_get_type(
+       GValue *presets, 
+       gint *indices,
+       gint len)
+{
+       GValue *dict;
+       gint type = 0;
+
+       dict = presets_get_dict(presets, indices, len);
+       if (dict)
+       {
+               type = ghb_preset_type(dict);
+       }
+       else
+       {
+               g_warning("ghb_presets_get_type (): internal preset lookup error");
+       }
+       return type;
+}
+
+static gboolean
+ghb_presets_get_folder(
+       GValue *presets, 
+       gint *indices,
+       gint len)
+{
+       GValue *dict;
+       gboolean folder = FALSE;
+
+       dict = presets_get_dict(presets, indices, len);
+       if (dict)
+       {
+               folder = ghb_preset_folder(dict);
+       }
+       else
+       {
+               g_warning("ghb_presets_get_folder (): internal preset lookup error");
+       }
+       return folder;
+}
+
+void
+presets_set_default(gint *indices, gint len)
+{
+       GValue *dict;
+       
+       g_debug("presets_set_default ()");
+       presets_clear_default(presetsPlist);
+       dict = presets_get_dict(presetsPlist, indices, len);
+       if (dict)
+       {
+               ghb_dict_insert(dict, g_strdup("Default"), ghb_boolean_value_new(TRUE));
+       }
+       store_presets();
+}
+
+// Used for sorting dictionaries.
+gint
+key_cmp(gconstpointer a, gconstpointer b)
+{
+       gchar *stra = (gchar*)a;
+       gchar *strb = (gchar*)b;
+
+       return strcmp(stra, strb);
+}
+
+static const GValue*
+preset_dict_get_value(GValue *dict, const gchar *key)
+{
+       const GValue *gval = NULL;
+
+       if (dict)
+       {
+               gval = ghb_dict_lookup(dict, key);
+       }
+       if (internalPlist == NULL) return NULL;
+       if (gval == NULL)
+       {
+               dict = plist_get_dict(internalPlist, "Presets");
+               if (dict == NULL) return NULL;
+               gval = ghb_dict_lookup(dict, key);
+       }
+       return gval;
+}
+
+const gchar*
+ghb_presets_get_description(GValue *pdict)
+{
+       const gchar *desc;
+
+       if (pdict == NULL) return NULL;
+       desc = g_value_get_string(
+                       preset_dict_get_value(pdict, "PresetDescription"));
+       if (desc[0] == 0) return NULL;
+       return desc;
+}
+
+
+static void init_settings_from_dict(
+       GValue *dest, GValue *internal, GValue *dict);
+
+static void
+init_settings_from_array(
+       GValue *dest, 
+       GValue *internal,
+       GValue *array)
+{
+       GValue *gval, *val;
+       gint count, ii;
+       
+       count = ghb_array_len(array);
+       // The first element of the internal version is always the 
+       // template for the allowed values
+       gval = ghb_array_get_nth(internal, 0);
+       for (ii = 0; ii < count; ii++)
+       {
+               val = NULL;
+               val = ghb_array_get_nth(array, ii);
+               if (val == NULL)
+                       val = gval;
+               if (G_VALUE_TYPE(gval) == ghb_dict_get_type())
+               {
+                       GValue *new_dict;
+                       new_dict = ghb_dict_value_new();
+                       ghb_array_append(dest, new_dict);
+                       if (G_VALUE_TYPE(val) == ghb_dict_get_type())
+                               init_settings_from_dict(new_dict, gval, val);
+                       else
+                               init_settings_from_dict(new_dict, gval, gval);
+               }
+               else if (G_VALUE_TYPE(gval) == ghb_array_get_type())
+               {
+                       GValue *new_array;
+                       new_array = ghb_array_value_new(8);
+                       ghb_array_append(dest, new_array);
+                       if (G_VALUE_TYPE(val) == ghb_array_get_type())
+                               init_settings_from_array(new_array, gval, val);
+                       else
+                               init_settings_from_array(new_array, gval, gval);
+               }
+               else
+               {
+                       ghb_array_append(dest, val);
+               }
+       }
+}
+
+static void
+init_settings_from_dict(
+       GValue *dest, 
+       GValue *internal,
+       GValue *dict)
+{
+       GHashTableIter iter;
+       gchar *key;
+       GValue *gval, *val;
+       
+       ghb_dict_iter_init(&iter, internal);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&gval))
+       {
+               val = NULL;
+               if (dict)
+                       val = ghb_dict_lookup(dict, key);
+               if (val == NULL)
+                       val = gval;
+               if (G_VALUE_TYPE(gval) == ghb_dict_get_type())
+               {
+                       GValue *new_dict;
+                       new_dict = ghb_dict_value_new();
+                       ghb_settings_take_value(dest, key, new_dict);
+                       if (G_VALUE_TYPE(val) == ghb_dict_get_type())
+                               init_settings_from_dict(new_dict, gval, val);
+                       else
+                               init_settings_from_dict(new_dict, gval, gval);
+               }
+               else if (G_VALUE_TYPE(gval) == ghb_array_get_type())
+               {
+                       GValue *new_array;
+                       new_array = ghb_array_value_new(8);
+                       ghb_settings_take_value(dest, key, new_array);
+                       if (G_VALUE_TYPE(val) == ghb_array_get_type())
+                               init_settings_from_array(new_array, gval, val);
+                       else
+                               init_settings_from_array(new_array, gval, gval);
+       
+               }
+               else
+               {
+                       ghb_settings_set_value(dest, key, val);
+               }
+       }
+}
+
+void
+init_ui_from_dict(
+       signal_user_data_t *ud, 
+       GValue *internal,
+       GValue *dict)
+{
+       GHashTableIter iter;
+       gchar *key;
+       GValue *gval, *val;
+       
+       ghb_dict_iter_init(&iter, internal);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&gval))
+       {
+               val = NULL;
+               if (dict)
+                       val = ghb_dict_lookup(dict, key);
+               if (val == NULL)
+                       val = gval;
+               ghb_ui_update(ud, key, val);
+       }
+}
+
+static void
+preset_to_ui(signal_user_data_t *ud, GValue *dict)
+{
+       g_debug("preset_to_ui()\n");
+       // Initialize the ui from presets file.
+       GValue *internal, *hidden;
+
+       // Get key list from internal default presets.  This way we do not
+       // load any unknown keys.
+       if (internalPlist == NULL) return;
+       internal = plist_get_dict(internalPlist, "Presets");
+       hidden = plist_get_dict(internalPlist, "XlatPresets");
+       // Setting a ui widget will cause the corresponding setting
+       // to be set, but it also triggers a callback that can 
+       // have the side effect of using other settings values
+       // that have not yet been set.  So set *all* settings first
+       // then update the ui.
+       init_settings_from_dict(ud->settings, internal, dict);
+       init_settings_from_dict(ud->settings, hidden, dict);
+       init_ui_from_dict(ud, internal, dict);
+       init_ui_from_dict(ud, hidden, dict);
+
+       if (ghb_settings_get_boolean(ud->settings, "allow_tweaks"))
+       {
+               const GValue *gval;
+               gval = preset_dict_get_value(dict, "PictureDeinterlace");
+               if (gval)
+               {
+                       ghb_ui_update(ud, "tweak_PictureDeinterlace", gval);
+               }
+               gval = preset_dict_get_value(dict, "PictureDenoise");
+               if (gval)
+               {
+                       ghb_ui_update(ud, "tweak_PictureDenoise", gval);
+               }
+       }
+}
+
+void
+ghb_settings_to_ui(signal_user_data_t *ud, GValue *dict)
+{
+       init_ui_from_dict(ud, dict, dict);
+}
+
+static GValue *current_preset = NULL;
+
+gboolean
+ghb_preset_is_custom()
+{
+       const GValue *val;
+
+       if (current_preset == NULL) return FALSE;
+       val = preset_dict_get_value(current_preset, "Type");
+       return (ghb_value_int(val) == 1);
+}
+
+void
+ghb_set_preset_from_indices(signal_user_data_t *ud, gint *indices, gint len)
+{
+       GValue *dict = NULL;
+       gint fallback[2] = {0, -1};
+
+       if (indices)
+               dict = presets_get_dict(presetsPlist, indices, len);
+       if (dict == NULL)
+       {
+               indices = fallback;
+               len = 1;
+               dict = presets_get_dict(presetsPlist, indices, len);
+       }
+       if (dict == NULL)
+       {
+               preset_to_ui(ud, NULL);
+               current_preset = NULL;
+       }
+       else
+       {
+               GValue *path;
+               gboolean folder;
+
+               current_preset = dict;
+               folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
+               if (folder)
+                       preset_to_ui(ud, NULL);
+               else
+                       preset_to_ui(ud, dict);
+               path = preset_path_from_indices(presetsPlist, indices, len);
+               ghb_settings_set_value(ud->settings, "preset", path);
+               ghb_value_free(path);
+       }
+}
+
+static const GValue*
+curr_preset_get_value(const gchar *key)
+{
+       if (current_preset == NULL) return NULL;
+       return preset_dict_get_value(current_preset, key);
+}
+
+void
+ghb_update_from_preset(
+       signal_user_data_t *ud, 
+       const gchar *key)
+{
+       const GValue *gval;
+       
+       g_debug("ghb_update_from_preset() %s", key);
+       gval = curr_preset_get_value(key);
+       if (gval != NULL)
+       {
+               ghb_ui_update(ud, key, gval);
+       }
+}
+
+static void
+ghb_select_preset2(
+       GtkBuilder *builder, 
+       gint *indices, 
+       gint len)
+{
+       GtkTreeView *treeview;
+       GtkTreeSelection *selection;
+       GtkTreeModel *store;
+       GtkTreeIter iter;
+       GtkTreePath *path;
+       
+       g_debug("ghb_select_preset2()");
+       treeview = GTK_TREE_VIEW(GHB_WIDGET(builder, "presets_list"));
+       selection = gtk_tree_view_get_selection (treeview);
+       store = gtk_tree_view_get_model (treeview);
+       path = ghb_tree_path_new_from_indices(indices, len);
+       if (path)
+       {
+               if (gtk_tree_model_get_iter(store, &iter, path))
+               {
+                       gtk_tree_selection_select_iter (selection, &iter);
+               }
+               else
+               {
+                       if (gtk_tree_model_get_iter_first(store, &iter))
+                               gtk_tree_selection_select_iter (selection, &iter);
+               }
+               gtk_tree_path_free(path);
+       }
+}
+
+void
+ghb_select_preset(GtkBuilder *builder, const GValue *path)
+{
+       gint *indices, len;
+
+       g_debug("ghb_select_preset()");
+       indices = ghb_preset_indices_from_path(presetsPlist, path, &len);
+       if (indices)
+       {
+               ghb_select_preset2(builder, indices, len);
+               g_free(indices);
+       }
+}
+
+void
+ghb_select_default_preset(GtkBuilder *builder)
+{
+       gint *indices, len;
+
+       g_debug("ghb_select_default_preset()");
+       indices = presets_find_default(presetsPlist, &len);
+       if (indices)
+       {
+               ghb_select_preset2(builder, indices, len);
+               g_free(indices);
+       }
+}
+
+gchar*
+ghb_get_user_config_dir(gchar *subdir)
+{
+       const gchar *dir;
+       gchar *config;
+
+       dir = g_get_user_config_dir();
+       if (!g_file_test(dir, G_FILE_TEST_IS_DIR))
+       {
+               dir = g_get_home_dir();
+               config = g_strdup_printf ("%s/.ghb", dir);
+               if (!g_file_test(config, G_FILE_TEST_IS_DIR))
+                       g_mkdir (config, 0755);
+       }
+       else
+       {
+               config = g_strdup_printf ("%s/ghb", dir);
+               if (!g_file_test(config, G_FILE_TEST_IS_DIR))
+                       g_mkdir (config, 0755);
+       }
+       if (subdir)
+       {
+               gchar **split;
+               gint ii;
+
+               split = g_strsplit(subdir, "/", -1);
+               for (ii = 0; split[ii] != NULL; ii++)
+               {
+                       gchar *tmp;
+
+                       tmp = g_strdup_printf ("%s/%s", config, split[ii]);
+                       g_free(config);
+                       config = tmp;
+                       if (!g_file_test(config, G_FILE_TEST_IS_DIR))
+                               g_mkdir (config, 0755);
+               }
+       }
+       return config;
+}
+
+static void
+store_plist(GValue *plist, const gchar *name)
+{
+       gchar *config, *path;
+       FILE *file;
+
+       config = ghb_get_user_config_dir(NULL);
+       path = g_strdup_printf ("%s/%s", config, name);
+       file = g_fopen(path, "w");
+       g_free(config);
+       g_free(path);
+       ghb_plist_write(file, plist);
+       fclose(file);
+}
+
+static GValue*
+load_plist(const gchar *name)
+{
+       gchar *config, *path;
+       GValue *plist = NULL;
+
+       config = ghb_get_user_config_dir(NULL);
+       path = g_strdup_printf ("%s/%s", config, name);
+       if (g_file_test(path, G_FILE_TEST_IS_REGULAR))
+       {
+               plist = ghb_plist_parse_file(path);
+       }
+       g_free(config);
+       g_free(path);
+       return plist;
+}
+
+static void
+remove_plist(const gchar *name)
+{
+       gchar *config, *path;
+
+       config = ghb_get_user_config_dir(NULL);
+       path = g_strdup_printf ("%s/%s", config, name);
+       if (g_file_test(path, G_FILE_TEST_IS_REGULAR))
+       {
+               g_unlink(path);
+       }
+       g_free(path);
+       g_free(config);
+}
+
+static gboolean prefs_initializing = FALSE;
+
+void
+ghb_prefs_to_ui(signal_user_data_t *ud)
+{
+       const GValue *gval;
+       gchar *key;
+       gchar *str;
+       GValue *internal, *dict;
+       GHashTableIter iter;
+       
+
+       g_debug("ghb_prefs_to_ui");
+       prefs_initializing = TRUE;
+
+       // Setting a ui widget will cause the corresponding setting
+       // to be set, but it also triggers a callback that can 
+       // have the side effect of using other settings values
+       // that have not yet been set.  So set *all* settings first
+       // then update the ui.
+       internal = plist_get_dict(internalPlist, "Initialization");
+       ghb_dict_iter_init(&iter, internal);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&gval))
+       {
+               ghb_ui_update(ud, key, gval);
+       }
+
+       dict = plist_get_dict(prefsPlist, "Preferences");
+       internal = plist_get_dict(internalPlist, "Preferences");
+       ghb_dict_iter_init(&iter, internal);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&gval))
+    {
+               const GValue *value = NULL;
+               if (dict)
+                       value = ghb_dict_lookup(dict, key);
+               if (value == NULL)
+                       value = gval;
+               ghb_settings_set_value(ud->settings, key, value);
+    }
+       internal = plist_get_dict(internalPlist, "Preferences");
+       ghb_dict_iter_init(&iter, internal);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&gval))
+       {
+               const GValue *value = NULL;
+               if (dict)
+                       value = ghb_dict_lookup(dict, key);
+               if (value == NULL)
+                       value = gval;
+               ghb_ui_update(ud, key, value);
+       }
+       const GValue *val;
+       val = ghb_settings_get_value(ud->settings, "show_presets");
+       ghb_ui_update(ud, "show_presets", val);
+       if (ghb_settings_get_boolean(ud->settings, "hbfd_feature"))
+       {
+               GtkAction *action;
+               val = ghb_settings_get_value(ud->settings, "hbfd");
+               ghb_ui_update(ud, "hbfd", val);
+               action = GHB_ACTION (ud->builder, "hbfd");
+               gtk_action_set_visible(action, TRUE);
+       }
+       else
+       {
+               ghb_ui_update(ud, "hbfd", ghb_int64_value(0));
+       }
+       gval = ghb_settings_get_value(ud->settings, "default_source");
+       ghb_settings_set_value (ud->settings, "source", gval);
+       str = ghb_settings_get_string(ud->settings, "destination_dir");
+
+       gchar *path = g_strdup_printf ("%s/new_video.mp4", str);
+       ghb_ui_update(ud, "destination", ghb_string_value(path));
+       g_free(str);
+       g_free(path);
+
+       prefs_initializing = FALSE;
+}
+
+void
+ghb_prefs_save(GValue *settings)
+{
+       GValue *dict;
+       GValue *pref_dict;
+       GHashTableIter iter;
+       gchar *key;
+       const GValue *value;
+       
+       if (prefs_initializing) return;
+       dict = plist_get_dict(internalPlist, "Preferences");
+       if (dict == NULL) return;
+       pref_dict = plist_get_dict(prefsPlist, "Preferences");
+       if (pref_dict == NULL) return;
+       ghb_dict_iter_init(&iter, dict);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&value))
+    {
+           value = ghb_settings_get_value(settings, key);
+           if (value != NULL)
+           {
+                       ghb_dict_insert(pref_dict, g_strdup(key), ghb_value_dup(value));
+           }
+       }
+    store_plist(prefsPlist, "preferences");
+}
+
+void
+ghb_pref_save(GValue *settings, const gchar *key)
+{
+       const GValue *value;
+       
+       if (prefs_initializing) return;
+       value = ghb_settings_get_value(settings, key);
+       if (value != NULL)
+       {
+               GValue *dict;
+               dict = plist_get_dict(prefsPlist, "Preferences");
+               if (dict == NULL) return;
+               ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(value));
+               store_plist(prefsPlist, "preferences");
+       }
+}
+
+void
+ghb_settings_init(signal_user_data_t *ud)
+{
+       GValue *internal;
+       GHashTableIter iter;
+       gchar *key;
+       GValue *gval;
+
+
+       g_debug("ghb_settings_init");
+       prefs_initializing = TRUE;
+
+       internalPlist = ghb_resource_get("internal-defaults");
+       // Setting a ui widget will cause the corresponding setting
+       // to be set, but it also triggers a callback that can 
+       // have the side effect of using other settings values
+       // that have not yet been set.  So set *all* settings first
+       // then update the ui.
+       internal = plist_get_dict(internalPlist, "Initialization");
+       ghb_dict_iter_init(&iter, internal);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&gval))
+       {
+               ghb_settings_set_value(ud->settings, key, gval);
+       }
+
+       internal = plist_get_dict(internalPlist, "Presets");
+       ghb_dict_iter_init(&iter, internal);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&gval))
+       {
+               ghb_settings_set_value(ud->settings, key, gval);
+       }
+
+       internal = plist_get_dict(internalPlist, "Preferences");
+       ghb_dict_iter_init(&iter, internal);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&gval))
+       {
+               ghb_settings_set_value(ud->settings, key, gval);
+       }
+       prefs_initializing = FALSE;
+}
+
+void
+ghb_settings_close()
+{
+       if (internalPlist)
+               ghb_value_free(internalPlist);
+       if (presetsPlist)
+               ghb_value_free(presetsPlist);
+       if (prefsPlist)
+               ghb_value_free(prefsPlist);
+}
+
+void
+ghb_prefs_load(signal_user_data_t *ud)
+{
+       GValue *dict, *internal;
+       GHashTableIter iter;
+       gchar *key;
+       GValue *gval, *path;
+       
+       g_debug("ghb_prefs_load");
+       prefsPlist = load_plist("preferences");
+       if (prefsPlist == NULL)
+               prefsPlist = ghb_dict_value_new();
+       dict = plist_get_dict(prefsPlist, "Preferences");
+       internal = plist_get_dict(internalPlist, "Preferences");
+    if (dict == NULL && internal)
+    {
+               dict = ghb_dict_value_new();
+               ghb_dict_insert(prefsPlist, g_strdup("Preferences"), dict);
+
+        // Get defaults from internal defaults 
+               ghb_dict_iter_init(&iter, internal);
+               // middle (void*) cast prevents gcc warning "defreferencing type-punned
+               // pointer will break strict-aliasing rules"
+               while (g_hash_table_iter_next(
+                               &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&gval))
+        {
+                       ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(gval));
+        }
+               const gchar *dir = g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS);
+               if (dir == NULL)
+               {
+                       dir = ".";
+               }
+               ghb_dict_insert(dict, 
+                       g_strdup("destination_dir"), ghb_value_dup(ghb_string_value(dir)));
+               store_plist(prefsPlist, "preferences");
+    }
+       // Read legacy default_preset preference and update accordingly
+       path = ghb_dict_lookup(dict, "default_preset");
+       if (path)
+       {
+               gint *indices, len;
+
+               if (G_VALUE_TYPE(path) == G_TYPE_STRING)
+               {
+                       GValue *str = path;
+
+                       path = ghb_array_value_new(1);
+                       ghb_array_append(path, ghb_value_dup(str));
+                       indices = ghb_preset_indices_from_path(presetsPlist, path, &len);
+                       ghb_value_free(path);
+               }
+               else
+                       indices = ghb_preset_indices_from_path(presetsPlist, path, &len);
+
+               if (indices)
+               {
+                       presets_set_default(indices, len);
+                       g_free(indices);
+               }
+               ghb_dict_remove(dict, "default_preset");
+               store_plist(prefsPlist, "preferences");
+       }
+}
+
+static const gchar*
+get_preset_color(gint type, gboolean folder)
+{
+       const gchar *color;
+
+       if (type == PRESETS_CUSTOM)
+       {
+               color = "DimGray";
+               if (folder)
+               {
+                       color = "black";
+               }
+       }
+       else
+       {
+               color = "blue";
+               if (folder)
+               {
+                       color = "Navy";
+               }
+       }
+       return color;
+}
+
+void
+ghb_presets_list_init(
+       signal_user_data_t *ud, 
+       gint *indices,
+       gint len)
+{
+       GtkTreeView *treeview;
+       GtkTreeIter iter, titer, *piter;
+       
+       GtkTreeStore *store;
+       const gchar *preset;
+       GtkTreePath *parent_path;
+       const gchar *description;
+       gboolean def;
+       gint count, ii;
+       GValue *dict;
+       gint *more_indices;
+       GValue *presets = NULL;
+       
+       g_debug("ghb_presets_list_init ()");
+       more_indices = g_malloc((len+1)*sizeof(gint));
+       memcpy(more_indices, indices, len*sizeof(gint));
+       presets = presets_get_folder(presetsPlist, indices, len);
+       if (presets == NULL)
+       {
+               g_warning("Failed to find parent folder when adding child.");
+               return;
+       }
+       count = ghb_array_len(presets);
+       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
+       store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+       parent_path = ghb_tree_path_new_from_indices(indices, len);
+       if (parent_path)
+       {
+               gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &titer, parent_path);
+               piter = &titer;
+               gtk_tree_path_free(parent_path);
+       }
+       else
+       {
+               piter = NULL;
+       }
+       for (ii = 0; ii < count; ii++)
+       {
+               const gchar *color;
+               gint type;
+               gboolean folder;
+
+               // Additional settings, add row
+               dict = ghb_array_get_nth(presets, ii);
+               preset = preset_get_name(dict);
+               more_indices[len] = ii;
+               def = preset_is_default(dict);
+
+               description = ghb_presets_get_description(dict);
+               gtk_tree_store_append(store, &iter, piter);
+               type = ghb_preset_type(dict);
+               folder = ghb_preset_folder(dict);
+               color = get_preset_color(type, folder);
+               gtk_tree_store_set(store, &iter, 0, preset, 
+                                                       1, def ? 800 : 400, 
+                                                       2, def ? 2 : 0,
+                                                       3, color, 
+                                                       4, description,
+                                                       -1);
+               if (def && piter)
+               {
+                       GtkTreePath *path;
+                       GtkTreeIter ppiter;
+
+                       if (gtk_tree_model_iter_parent(
+                               GTK_TREE_MODEL(store), &ppiter, piter))
+                       {
+                               path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &ppiter);
+                               gtk_tree_view_expand_row(treeview, path, FALSE);
+                               gtk_tree_path_free(path);
+                       }
+                       path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), piter);
+                       gtk_tree_view_expand_row(treeview, path, FALSE);
+                       gtk_tree_path_free(path);
+               }
+               if (folder)
+               {
+                       ghb_presets_list_init(ud, more_indices, len+1);
+               }
+       }
+       g_free(more_indices);
+}
+
+static void
+presets_list_update_item(
+       signal_user_data_t *ud, 
+       gint *indices,
+       gint len)
+{
+       GtkTreeView *treeview;
+       GtkTreeStore *store;
+       GtkTreeIter iter;
+       GtkTreePath *treepath;
+       const gchar *name;
+       const gchar *description;
+       gint type;
+       gboolean def, folder;
+       GValue *dict;
+       const gchar *color;
+       
+       g_debug("presets_list_update_item ()");
+       dict = presets_get_dict(presetsPlist, indices, len);
+       if (dict == NULL)
+               return;
+       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
+       store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+       treepath = ghb_tree_path_new_from_indices(indices, len);
+       gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, treepath);
+       // Additional settings, add row
+       name = preset_get_name(dict);
+       def = preset_is_default(dict);
+
+       description = ghb_presets_get_description(dict);
+       type = ghb_preset_type(dict);
+       folder = ghb_preset_folder(dict);
+       color = get_preset_color(type, folder);
+       gtk_tree_store_set(store, &iter, 0, name, 
+                                               1, def ? 800 : 400, 
+                                               2, def ? 2 : 0,
+                                               3, color,
+                                               4, description,
+                                               -1);
+       if (folder)
+       {
+               ghb_presets_list_init(ud, indices, len);
+       }
+}
+
+static void
+presets_list_insert(
+       signal_user_data_t *ud, 
+       gint *indices,
+       gint len)
+{
+       GtkTreeView *treeview;
+       GtkTreeIter iter, titer, *piter;
+       GtkTreeStore *store;
+       const gchar *preset;
+       const gchar *description;
+       gint type;
+       gboolean def, folder;
+       gint count;
+       GValue *presets;
+       GtkTreePath *parent_path;
+       GValue *dict;
+       const gchar *color;
+       
+       g_debug("presets_list_insert ()");
+       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
+       store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+       presets = presets_get_folder(presetsPlist, indices, len-1);
+       if (presets == NULL)
+       {
+               g_warning("Failed to find parent folder while adding child.");
+               return;
+       }
+       parent_path = ghb_tree_path_new_from_indices(indices, len-1);
+       if (parent_path)
+       {
+               gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &titer, parent_path);
+               piter = &titer;
+               gtk_tree_path_free(parent_path);
+       }
+       else
+       {
+               piter = NULL;
+       }
+       count = ghb_array_len(presets);
+       if (indices[len-1] >= count)
+               return;
+       // Additional settings, add row
+       dict = ghb_array_get_nth(presets, indices[len-1]);
+       preset = preset_get_name(dict);
+       def = preset_is_default(dict);
+
+       description = ghb_presets_get_description(dict);
+       gtk_tree_store_insert(store, &iter, piter, indices[len-1]);
+       type = ghb_preset_type(dict);
+       folder = ghb_preset_folder(dict);
+       color = get_preset_color(type, folder);
+       gtk_tree_store_set(store, &iter, 0, preset, 
+                                               1, def ? 800 : 400, 
+                                               2, def ? 2 : 0,
+                                               3, color,
+                                               4, description,
+                                               -1);
+       if (folder)
+       {
+               ghb_presets_list_init(ud, indices, len);
+       }
+}
+
+static void
+presets_list_remove(
+       signal_user_data_t *ud, 
+       gint *indices,
+       gint len)
+{
+       GtkTreeView *treeview;
+       GtkTreePath *treepath;
+       GtkTreeIter iter;
+       GtkTreeStore *store;
+       
+       g_debug("presets_list_remove ()");
+       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
+       store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+       treepath = ghb_tree_path_new_from_indices(indices, len);
+       if (treepath)
+       {
+               if (gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, treepath))
+                       gtk_tree_store_remove(store, &iter);
+               gtk_tree_path_free(treepath);
+       }
+}
+
+static void
+remove_std_presets(signal_user_data_t *ud)
+{
+       gint count, ii;
+       gint indices = 0;
+
+       count = ghb_array_len(presetsPlist);
+       for (ii = count-1; ii >= 0; ii--)
+       {
+               GValue *dict;
+               gint ptype;
+
+               dict = ghb_array_get_nth(presetsPlist, ii);
+               ptype = ghb_value_int(preset_dict_get_value(dict, "Type"));
+               if (ptype == PRESETS_BUILTIN)
+               {
+                       if (ghb_presets_remove(presetsPlist, &indices, 1))
+                       {
+                               presets_list_remove(ud, &indices, 1);
+                       }
+               }
+       }
+}
+
+void
+ghb_save_queue(GValue *queue)
+{
+       store_plist(queue, "queue");
+}
+
+GValue*
+ghb_load_queue()
+{
+       return load_plist("queue");
+}
+
+void
+ghb_remove_queue_file()
+{
+       remove_plist("queue");
+}
+
+typedef struct
+{
+       gchar *mac_val;
+       gchar *lin_val;
+} value_map_t;
+
+static value_map_t vcodec_xlat[] =
+{
+       {"MPEG-4 (FFmpeg)", "ffmpeg"},
+       {"MPEG-4 (XviD)", "xvid"},
+       {"H.264 (x264)", "x264"},
+       {"VP3 (Theora)", "theora"},
+       {NULL,NULL}
+};
+
+static value_map_t acodec_xlat[] =
+{
+       {"AAC (faac)", "faac"},
+       {"AC3 Passthru", "ac3"},
+       {"MP3 (lame)", "lame"},
+       {"Vorbis (vorbis)", "vorbis"},
+       {NULL,NULL}
+};
+
+value_map_t container_xlat[] =
+{
+       {"MP4 file", "mp4"},
+       {"M4V file", "m4v"},
+       {"MKV file", "mkv"},
+       {"AVI file", "avi"},
+       {"OGM file", "ogm"},
+       {NULL, NULL}
+};
+
+value_map_t framerate_xlat[] =
+{
+       {"Same as source", "source"},
+       {"5", "5"},
+       {"10", "10"},
+       {"12", "12"},
+       {"15", "15"},
+       {"23.976", "23.976"},
+       {"24", "24"},
+       {"25", "25"},
+       {"29.97", "29.97"},
+       {NULL, NULL}
+};
+
+value_map_t samplerate_xlat[] =
+{
+       {"Auto", "source"},
+       {"22.05", "22.05"},
+       {"24", "24"},
+       {"32", "32"},
+       {"44.1", "44.1"},
+       {"48", "48"},
+       {NULL, NULL}
+};
+
+value_map_t mix_xlat[] =
+{
+       {"Mono", "mono"},
+       {"Stereo", "stereo"},
+       {"Dolby Surround", "dpl1"},
+       {"Dolby Pro Logic II", "dpl2"},
+       {"6-channel discrete", "6ch"},
+       {"AC3 Passthru", "none"},
+       {NULL, NULL}
+};
+
+value_map_t deint_xlat[] =
+{
+       {"0", "none"},
+       {"1", "fast"},
+       {"2", "slow"},
+       {"3", "slower"},
+       {NULL, NULL}
+};
+
+value_map_t denoise_xlat[] =
+{
+       {"0", "none"},
+       {"1", "weak"},
+       {"2", "medium"},
+       {"3", "strong"},
+       {NULL, NULL}
+};
+
+extern iso639_lang_t ghb_language_table[];
+
+static GValue*
+export_lang_xlat2(GValue *lin_val)
+{
+       GValue *gval;
+
+       if (lin_val == NULL) return NULL;
+       gint ii;
+       gchar *str;
+
+       str = ghb_value_string(lin_val);
+       for (ii = 0; ghb_language_table[ii].eng_name; ii++)
+       {
+               if (strcmp(str, ghb_language_table[ii].iso639_2) == 0)
+               {
+                       gval = ghb_string_value_new(ghb_language_table[ii].eng_name);
+                       g_free(str);
+                       return gval;
+               }
+       }
+       g_debug("Can't map language value: (%s)", str);
+       g_free(str);
+       return NULL;
+}
+
+static GValue*
+export_subtitle_xlat2(GValue *lin_val)
+{
+       gchar *str;
+       GValue *gval;
+
+       if (lin_val == NULL) return NULL;
+       str = ghb_value_string(lin_val);
+       if (strcmp(str, "none") == 0)
+       {
+               gval = ghb_string_value_new("None");
+       }
+       else if (strcmp(str, "auto") == 0)
+       {
+               gval = ghb_string_value_new("Autoselect");
+       }
+       else
+       {
+               gval = export_lang_xlat2(lin_val);
+       }
+       g_free(str);
+       return gval;
+}
+
+static GValue*
+import_lang_xlat2(GValue *mac_val)
+{
+       GValue *gval;
+
+       if (mac_val == NULL) return NULL;
+       gint ii;
+       gchar *str;
+
+       str = ghb_value_string(mac_val);
+       for (ii = 0; ghb_language_table[ii].eng_name; ii++)
+       {
+               if (strcmp(str, ghb_language_table[ii].eng_name) == 0)
+               {
+                       gval = ghb_string_value_new(ghb_language_table[ii].iso639_2);
+                       g_free(str);
+                       return gval;
+               }
+       }
+       g_debug("Can't map language value: (%s)", str);
+       g_free(str);
+       return NULL;
+}
+
+static GValue*
+import_subtitle_xlat2(GValue *mac_val)
+{
+       gchar *str;
+       GValue *gval;
+
+       if (mac_val == NULL) return NULL;
+       str = ghb_value_string(mac_val);
+       if (strcmp(str, "None") == 0)
+       {
+               gval = ghb_string_value_new("none");
+       }
+       else if (strcmp(str, "Autoselect") == 0)
+       {
+               gval = ghb_string_value_new("auto");
+       }
+       else
+       {
+               gval = import_lang_xlat2(mac_val);
+       }
+       g_free(str);
+       return gval;
+}
+
+static GValue*
+export_audio_track_xlat2(GValue *lin_val)
+{
+       gchar *str;
+       GValue *gval = NULL;
+
+       if (lin_val == NULL) return NULL;
+       str = ghb_value_string(lin_val);
+       if (strcmp(str, "none") == 0)
+       {
+               gval = ghb_int_value_new(1);
+       }
+       else
+       {
+               gint val = ghb_value_int(lin_val) + 1;
+               gval = ghb_int_value_new(val);
+       }
+       g_free(str);
+       return gval;
+}
+
+static GValue*
+import_audio_track_xlat2(GValue *mac_val)
+{
+       gint val;
+       gchar *str;
+       GValue *gval;
+
+       if (mac_val == NULL) return NULL;
+       val = ghb_value_int(mac_val);
+       if (val <= 0)
+       {
+               val = 0;
+       }
+       else
+       {
+               val--;
+       }
+       str = g_strdup_printf("%d", val);
+       gval = ghb_string_value_new(str);
+       g_free(str);
+       return gval;
+}
+
+static GValue*
+export_value_xlat2(value_map_t *value_map, GValue *lin_val, GType mac_type)
+{
+       GValue *gval;
+
+       if (lin_val == NULL) return NULL;
+       gint ii;
+       gchar *str;
+       GValue *sval;
+
+       str = ghb_value_string(lin_val);
+       for (ii = 0; value_map[ii].mac_val; ii++)
+       {
+               if (strcmp(str, value_map[ii].lin_val) == 0)
+               {
+                       sval = ghb_string_value_new(value_map[ii].mac_val);
+                       g_free(str);
+                       gval = ghb_value_new(mac_type);
+                       if (!g_value_transform(sval, gval))
+                       {
+                               g_warning("can't transform");
+                               ghb_value_free(gval);
+                               ghb_value_free(sval);
+                               return NULL;
+                       }
+                       ghb_value_free(sval);
+                       return gval;
+               }
+       }
+       g_debug("Can't map value: (%s)", str);
+       g_free(str);
+       return NULL;
+}
+
+static void
+export_value_xlat(GValue *dict)
+{
+       GValue *lin_val, *gval;
+       const gchar *key;
+
+       key = "VideoEncoder";
+       lin_val = ghb_dict_lookup(dict, key);
+       gval = export_value_xlat2(vcodec_xlat, lin_val, G_TYPE_STRING);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+       key = "FileFormat";
+       lin_val = ghb_dict_lookup(dict, key);
+       gval = export_value_xlat2(container_xlat, lin_val, G_TYPE_STRING);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+       key = "VideoFramerate";
+       lin_val = ghb_dict_lookup(dict, key);
+       gval = export_value_xlat2(framerate_xlat, lin_val, G_TYPE_STRING);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+       key = "PictureDeinterlace";
+       lin_val = ghb_dict_lookup(dict, key);
+       gval = export_value_xlat2(deint_xlat, lin_val, G_TYPE_INT);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+       else
+               ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(lin_val));
+       key = "PictureDenoise";
+       lin_val = ghb_dict_lookup(dict, key);
+       gval = export_value_xlat2(denoise_xlat, lin_val, G_TYPE_INT);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+       else
+               ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(lin_val));
+       key = "Subtitles";
+       lin_val = ghb_dict_lookup(dict, key);
+       gval = export_subtitle_xlat2(lin_val);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+
+       GValue *alist;
+       GValue *adict;
+       gint count, ii;
+
+       alist = ghb_dict_lookup(dict, "AudioList");
+       count = ghb_array_len(alist);
+       for (ii = 0; ii < count; ii++)
+       {
+               adict = ghb_array_get_nth(alist, ii);
+               key = "AudioTrack";
+               lin_val = ghb_dict_lookup(adict, key);
+               gval = export_audio_track_xlat2(lin_val);
+               if (gval)
+                       ghb_dict_insert(adict, g_strdup(key), gval);
+               key = "AudioEncoder";
+               lin_val = ghb_dict_lookup(adict, key);
+               gval = export_value_xlat2(acodec_xlat, lin_val, G_TYPE_STRING);
+               if (gval)
+                       ghb_dict_insert(adict, g_strdup(key), gval);
+               key = "AudioSamplerate";
+               lin_val = ghb_dict_lookup(adict, key);
+               gval = export_value_xlat2(samplerate_xlat, lin_val, G_TYPE_STRING);
+               if (gval)
+                       ghb_dict_insert(adict, g_strdup(key), gval);
+               key = "AudioMixdown";
+               lin_val = ghb_dict_lookup(adict, key);
+               gval = export_value_xlat2(mix_xlat, lin_val, G_TYPE_STRING);
+               if (gval)
+                       ghb_dict_insert(adict, g_strdup(key), gval);
+       }
+}
+
+
+static GValue*
+import_value_xlat2(
+       GValue *defaults, 
+       value_map_t *value_map,
+       const gchar *key, 
+       GValue *mac_val)
+{
+       GValue *gval, *def_val;
+
+       if (mac_val == NULL) return NULL;
+       def_val = ghb_dict_lookup(defaults, key);
+       if (def_val)
+       {
+               gint ii;
+               gchar *str;
+               GValue *sval;
+
+               str = ghb_value_string(mac_val);
+               for (ii = 0; value_map[ii].mac_val; ii++)
+               {
+                       if (strcmp(str, value_map[ii].mac_val) == 0)
+                       {
+                               sval = ghb_string_value_new(value_map[ii].lin_val);
+                               g_free(str);
+                               gval = ghb_value_new(G_VALUE_TYPE(def_val));
+                               if (!g_value_transform(sval, gval))
+                               {
+                                       g_warning("can't transform");
+                                       ghb_value_free(gval);
+                                       ghb_value_free(sval);
+                                       return NULL;
+                               }
+                               ghb_value_free(sval);
+                               return gval;
+                       }
+               }
+               //g_warning("Can't map value: (%s)", str);
+               g_free(str);
+       }
+       else
+       {
+               g_warning("Bad key: (%s)", key);
+               return NULL;
+       }
+       return NULL;
+}
+
+static void
+import_value_xlat(GValue *dict)
+{
+       GValue *defaults, *mac_val, *gval;
+       const gchar *key;
+
+       defaults = plist_get_dict(internalPlist, "Presets");
+       key = "VideoEncoder";
+       mac_val = ghb_dict_lookup(dict, key);
+       gval = import_value_xlat2(defaults, vcodec_xlat, key, mac_val);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+       key = "FileFormat";
+       mac_val = ghb_dict_lookup(dict, key);
+       gval = import_value_xlat2(defaults, container_xlat, key, mac_val);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+       key = "VideoFramerate";
+       mac_val = ghb_dict_lookup(dict, key);
+       gval = import_value_xlat2(defaults, framerate_xlat, key, mac_val);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+       key = "PictureDeinterlace";
+       mac_val = ghb_dict_lookup(dict, key);
+       gval = import_value_xlat2(defaults, deint_xlat, key, mac_val);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+       key = "PictureDenoise";
+       mac_val = ghb_dict_lookup(dict, key);
+       gval = import_value_xlat2(defaults, denoise_xlat, key, mac_val);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+       key = "Subtitles";
+       mac_val = ghb_dict_lookup(dict, key);
+       gval = import_subtitle_xlat2(mac_val);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+
+       GValue *alist;
+       GValue *adict;
+       GValue *adefaults;
+       GValue *adeflist;
+       gint count, ii;
+
+       adeflist = ghb_dict_lookup(dict, "AudioList");
+       if (adeflist)
+       {
+               adefaults = ghb_array_get_nth(adeflist, 0);
+               alist = ghb_dict_lookup(dict, "AudioList");
+               count = ghb_array_len(alist);
+               for (ii = 0; ii < count; ii++)
+               {
+                       adict = ghb_array_get_nth(alist, ii);
+                       key = "AudioTrack";
+                       mac_val = ghb_dict_lookup(adict, key);
+                       gval = import_audio_track_xlat2(mac_val);
+                       if (gval)
+                               ghb_dict_insert(adict, g_strdup(key), gval);
+                       key = "AudioEncoder";
+                       mac_val = ghb_dict_lookup(adict, key);
+                       gval = import_value_xlat2(adefaults, acodec_xlat, key, mac_val);
+                       if (gval)
+                               ghb_dict_insert(adict, g_strdup(key), gval);
+                       key = "AudioSamplerate";
+                       mac_val = ghb_dict_lookup(adict, key);
+                       gval = import_value_xlat2(adefaults, samplerate_xlat, key, mac_val);
+                       if (gval)
+                               ghb_dict_insert(adict, g_strdup(key), gval);
+                       key = "AudioMixdown";
+                       mac_val = ghb_dict_lookup(adict, key);
+                       gval = import_value_xlat2(adefaults, mix_xlat, key, mac_val);
+                       if (gval)
+                               ghb_dict_insert(adict, g_strdup(key), gval);
+               }
+       }
+}
+
+static void
+import_xlat_preset(GValue *dict)
+{
+       gboolean uses_max;
+       gint uses_pic;
+       gint par;
+       gint vqtype;
+
+       g_debug("import_xlat_preset ()");
+       uses_max = ghb_value_boolean(
+                                               preset_dict_get_value(dict, "UsesMaxPictureSettings"));
+       uses_pic = ghb_value_int(
+                                               preset_dict_get_value(dict, "UsesPictureSettings"));
+       par = ghb_value_int(preset_dict_get_value(dict, "PicturePAR"));
+       vqtype = ghb_value_int(preset_dict_get_value(dict, "VideoQualityType"));
+
+       if (uses_max || uses_pic == 2)
+       {
+               ghb_dict_insert(dict, g_strdup("autoscale"), 
+                                               ghb_boolean_value_new(TRUE));
+       }
+       switch (par)
+       {
+       case 0:
+       {
+               ghb_dict_insert(dict, g_strdup("anamorphic"), 
+                                               ghb_boolean_value_new(FALSE));
+               if (ghb_dict_lookup(dict, "ModDimensions") == NULL)
+                       ghb_dict_insert(dict, g_strdup("ModDimensions"), 
+                                                       ghb_boolean_value_new(TRUE));
+       } break;
+       case 1:
+       {
+               ghb_dict_insert(dict, g_strdup("anamorphic"), 
+                                               ghb_boolean_value_new(TRUE));
+               ghb_dict_insert(dict, g_strdup("ModDimensions"), 
+                                               ghb_boolean_value_new(FALSE));
+       } break;
+       case 2:
+       {
+               ghb_dict_insert(dict, g_strdup("anamorphic"), 
+                                               ghb_boolean_value_new(TRUE));
+               ghb_dict_insert(dict, g_strdup("ModDimensions"), 
+                                               ghb_boolean_value_new(TRUE));
+       } break;
+       default:
+       {
+               ghb_dict_insert(dict, g_strdup("anamorphic"), 
+                                               ghb_boolean_value_new(TRUE));
+               ghb_dict_insert(dict, g_strdup("ModDimensions"), 
+                                               ghb_boolean_value_new(TRUE));
+       } break;
+       }
+       // VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant
+       switch (vqtype)
+       {
+       case 0:
+       {
+               ghb_dict_insert(dict, g_strdup("vquality_type_target"), 
+                                               ghb_boolean_value_new(TRUE));
+               ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), 
+                                               ghb_boolean_value_new(FALSE));
+               ghb_dict_insert(dict, g_strdup("vquality_type_constant"), 
+                                               ghb_boolean_value_new(FALSE));
+       } break;
+       case 1:
+       {
+               ghb_dict_insert(dict, g_strdup("vquality_type_target"), 
+                                               ghb_boolean_value_new(FALSE));
+               ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), 
+                                               ghb_boolean_value_new(TRUE));
+               ghb_dict_insert(dict, g_strdup("vquality_type_constant"), 
+                                               ghb_boolean_value_new(FALSE));
+       } break;
+       case 2:
+       {
+               ghb_dict_insert(dict, g_strdup("vquality_type_target"), 
+                                               ghb_boolean_value_new(FALSE));
+               ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), 
+                                               ghb_boolean_value_new(FALSE));
+               ghb_dict_insert(dict, g_strdup("vquality_type_constant"), 
+                                               ghb_boolean_value_new(TRUE));
+       } break;
+       default:
+       {
+               ghb_dict_insert(dict, g_strdup("vquality_type_target"), 
+                                               ghb_boolean_value_new(FALSE));
+               ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), 
+                                               ghb_boolean_value_new(FALSE));
+               ghb_dict_insert(dict, g_strdup("vquality_type_constant"), 
+                                               ghb_boolean_value_new(TRUE));
+       } break;
+       }
+       import_value_xlat(dict);
+}
+
+static void
+import_xlat_presets(GValue *presets)
+{
+       gint count, ii;
+       GValue *dict;
+       gboolean folder;
+
+       g_debug("import_xlat_presets ()");
+       if (presets == NULL) return;
+       count = ghb_array_len(presets);
+       for (ii = 0; ii < count; ii++)
+       {
+               dict = ghb_array_get_nth(presets, ii);
+               folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
+               if (folder)
+               {
+                       GValue *nested;
+
+                       nested = ghb_dict_lookup(dict, "ChildrenArray");
+                       import_xlat_presets(nested);
+               }
+               else
+               {
+                       import_xlat_preset(dict);
+               }
+       }
+}
+
+static void
+export_xlat_preset(GValue *dict)
+{
+       gboolean ana, round, autoscale, target, br, constant;
+
+       g_debug("export_xlat_prest ()");
+       autoscale = ghb_value_boolean(preset_dict_get_value(dict, "autoscale"));
+       ana = ghb_value_boolean(preset_dict_get_value(dict, "anamorphic"));
+       round = ghb_value_boolean(preset_dict_get_value(dict, "ModDimensions"));
+       target = ghb_value_boolean(
+                               preset_dict_get_value(dict, "vquality_type_target"));
+       br = ghb_value_boolean(
+                               preset_dict_get_value(dict, "vquality_type_bitrate"));
+       constant = ghb_value_boolean(
+                               preset_dict_get_value(dict, "vquality_type_constant"));
+
+       if (autoscale)
+               ghb_dict_insert(dict, g_strdup("UsesPictureSettings"), 
+                                               ghb_int_value_new(2));
+       else
+               ghb_dict_insert(dict, g_strdup("UsesPictureSettings"), 
+                                               ghb_int_value_new(1));
+
+       if (ana)
+       {
+               if (round)
+                       ghb_dict_insert(dict, g_strdup("PicturePAR"), 
+                                               ghb_int_value_new(2));
+               else
+                       ghb_dict_insert(dict, g_strdup("PicturePAR"), 
+                                               ghb_int_value_new(1));
+       }
+       else
+       {
+               ghb_dict_insert(dict, g_strdup("PicturePAR"), 
+                                               ghb_int_value_new(0));
+       }
+       // VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant
+       if (target)
+       {
+               ghb_dict_insert(dict, g_strdup("VideoQualityType"), 
+                                               ghb_int_value_new(0));
+       }
+       else if (br)
+       {
+               ghb_dict_insert(dict, g_strdup("VideoQualityType"), 
+                                               ghb_int_value_new(1));
+       }
+       else if (constant)
+       {
+               ghb_dict_insert(dict, g_strdup("VideoQualityType"), 
+                                               ghb_int_value_new(2));
+       }
+       ghb_dict_remove(dict, "autoscale");
+       ghb_dict_remove(dict, "anamorphic");
+       ghb_dict_remove(dict, "vquality_type_target");
+       ghb_dict_remove(dict, "vquality_type_bitrate");
+       ghb_dict_remove(dict, "vquality_type_constant");
+       export_value_xlat(dict);
+}
+
+static void
+export_xlat_presets(GValue *presets)
+{
+       gint count, ii;
+       GValue *dict;
+       gboolean folder;
+
+       if (presets == NULL) return;
+       count = ghb_array_len(presets);
+       for (ii = 0; ii < count; ii++)
+       {
+               dict = ghb_array_get_nth(presets, ii);
+               folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
+               if (folder)
+               {
+                       GValue *nested;
+
+                       nested = ghb_dict_lookup(dict, "ChildrenArray");
+                       export_xlat_presets(nested);
+               }
+               else
+               {
+                       export_xlat_preset(dict);
+               }
+       }
+}
+
+static void
+store_presets()
+{
+       GValue *export;
+
+       export = ghb_value_dup(presetsPlist);
+       export_xlat_presets(export);
+       store_plist(export, "presets");
+       ghb_value_free(export);
+}
+
+void
+ghb_presets_reload(signal_user_data_t *ud)
+{
+       GValue *std_presets;
+       gint count, ii;
+       int *indices, len;
+
+       g_debug("ghb_presets_reload()\n");
+       std_presets = ghb_resource_get("standard-presets");
+       if (std_presets == NULL) return;
+
+       remove_std_presets(ud);
+    indices = presets_find_default(presetsPlist, &len);
+       if (indices)
+       {
+               presets_clear_default(std_presets);
+               g_free(indices);
+       }
+       // Merge the keyfile contents into our presets
+       count = ghb_array_len(std_presets);
+       for (ii = count-1; ii >= 0; ii--)
+       {
+               GValue *std_dict;
+               GValue *copy_dict;
+               gint indices = 0;
+
+               std_dict = ghb_array_get_nth(std_presets, ii);
+               copy_dict = ghb_value_dup(std_dict);
+               ghb_presets_insert(presetsPlist, copy_dict, &indices, 1);
+               presets_list_insert(ud, &indices, 1);
+       }
+       import_xlat_presets(presetsPlist);
+       store_presets();
+}
+
+static gboolean
+check_old_presets()
+{
+       gint count, ii;
+
+       count = ghb_array_len(presetsPlist);
+       for (ii = count-1; ii >= 0; ii--)
+       {
+               GValue *dict;
+               GValue *type;
+
+               dict = ghb_array_get_nth(presetsPlist, ii);
+               type = ghb_dict_lookup(dict, "Type");
+               if (type == NULL)
+                       return TRUE;
+       }
+       return FALSE;
+}
+
+void
+ghb_presets_load()
+{
+       presetsPlist = load_plist("presets");
+       if (presetsPlist == NULL)
+       {
+               presetsPlist = ghb_value_dup(ghb_resource_get("standard-presets"));
+               import_xlat_presets(presetsPlist);
+               store_presets();
+       }
+       else if (G_VALUE_TYPE(presetsPlist) == ghb_dict_get_type())
+       { // Presets is older dictionary format. Convert to array
+               ghb_value_free(presetsPlist);
+               presetsPlist = ghb_value_dup(ghb_resource_get("standard-presets"));
+               import_xlat_presets(presetsPlist);
+               store_presets();
+       }
+       else if (check_old_presets())
+       {
+               ghb_value_free(presetsPlist);
+               presetsPlist = ghb_value_dup(ghb_resource_get("standard-presets"));
+               import_xlat_presets(presetsPlist);
+               store_presets();
+       }
+       import_xlat_presets(presetsPlist);
+}
+
+static void
+settings_save(signal_user_data_t *ud, const GValue *path)
+{
+       GValue *dict, *internal;
+       GHashTableIter iter;
+       gchar *key;
+       GValue *value;
+       gboolean autoscale;
+       gint *indices, len, count;
+       const gchar *name;
+       gboolean replace = FALSE;
+
+       g_debug("settings_save");
+       if (internalPlist == NULL) return;
+       count = ghb_array_len(path);
+       name = g_value_get_string(ghb_array_get_nth(path, count-1));
+       indices = ghb_preset_indices_from_path(presetsPlist, path, &len);
+       if (indices)
+       {
+               if (ghb_presets_get_folder(presetsPlist, indices, len))
+               {
+                       gchar *message;
+                       message = g_strdup_printf(
+                                               "%s: Folder already exists.\n"
+                                               "You can not replace it with a preset.",
+                                               name);
+                       ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL);
+                       g_free(message);
+                       return;
+               }
+               dict = ghb_dict_value_new();
+               ghb_presets_replace(presetsPlist, dict, indices, len);
+               replace = TRUE;
+       }
+       else
+       {
+               indices = presets_find_pos(path, PRESETS_CUSTOM, &len);
+               if (indices)
+               {
+                       dict = ghb_dict_value_new();
+                       ghb_presets_insert(presetsPlist, dict, indices, len);
+               }
+               else
+               {
+                       g_warning("failed to find insert path");
+                       return;
+               }
+       }
+       current_preset = dict;
+       if (ghb_settings_get_boolean(ud->settings, "allow_tweaks"))
+       {
+               gchar *str;
+               str = ghb_settings_get_string(ud->settings, "tweak_PictureDeinterlace");
+               if (str)
+               {
+                       ghb_settings_set_string(ud->settings, "PictureDeinterlace", str);
+                       g_free(str);
+               }
+               str = ghb_settings_get_string(ud->settings, "tweak_PictureDenoise");
+               if (str)
+               {
+                       ghb_settings_set_string(ud->settings, "PictureDenoise", str);
+                       g_free(str);
+               }
+       }
+       autoscale = ghb_settings_get_boolean(ud->settings, "autoscale");
+       ghb_settings_set_int64(ud->settings, "Type", PRESETS_CUSTOM);
+
+       internal = plist_get_dict(internalPlist, "Presets");
+       ghb_dict_iter_init(&iter, internal);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&value))
+       {
+               const GValue *gval;
+               gchar *key2;
+
+               key2 = key;
+               if (!autoscale)
+               {
+                       if (strcmp(key, "PictureWidth") == 0)
+                       {
+                               key2 = "scale_width";
+                       }
+                       else if (strcmp(key, "PictureHeight") == 0)
+                       {
+                               key2 = "scale_height";
+                       }
+               }
+               gval = ghb_settings_get_value(ud->settings, key2);
+               if (gval == NULL)
+               {
+                       continue;
+               }
+               ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(gval));
+       }
+       internal = plist_get_dict(internalPlist, "XlatPresets");
+       ghb_dict_iter_init(&iter, internal);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&value))
+       {
+               const GValue *gval;
+
+               gval = ghb_settings_get_value(ud->settings, key);
+               if (gval == NULL)
+               {
+                       continue;
+               }
+               ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(gval));
+       }
+       ghb_dict_insert(dict, g_strdup("PresetName"), ghb_string_value_new(name));
+       if (replace)
+               presets_list_update_item(ud, indices, len);
+       else
+       {
+               ghb_dict_insert(dict, g_strdup("Default"), 
+                                               ghb_boolean_value_new(FALSE));
+               presets_list_insert(ud, indices, len);
+       }
+       store_presets();
+       ud->dont_clear_presets = TRUE;
+       // Make the new preset the selected item
+       ghb_select_preset2(ud->builder, indices, len);
+       g_free(indices);
+       ud->dont_clear_presets = FALSE;
+       return;
+}
+
+static void
+folder_save(signal_user_data_t *ud, const GValue *path)
+{
+       GValue *dict, *folder;
+       gint *indices, len, count;
+       const gchar *name;
+
+       count = ghb_array_len(path);
+       name = g_value_get_string(ghb_array_get_nth(path, count-1));
+       indices = ghb_preset_indices_from_path(presetsPlist, path, &len);
+       if (indices)
+       {
+               if (!ghb_presets_get_folder(presetsPlist, indices, len))
+               {
+                       gchar *message;
+                       message = g_strdup_printf(
+                                               "%s: Preset already exists.\n"
+                                               "You can not replace it with a folder.",
+                                               name);
+                       ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL);
+                       g_free(message);
+                       g_free(indices);
+                       return;
+               }
+               // Already exists, update its description
+               dict = presets_get_dict(presetsPlist, indices, len);
+               ghb_dict_insert(dict, g_strdup("PresetDescription"), 
+                       ghb_value_dup(preset_dict_get_value(
+                               ud->settings, "PresetDescription")));
+               g_free(indices);
+               return;
+       }
+       else
+       {
+               indices = presets_find_pos(path, PRESETS_CUSTOM, &len);
+               if (indices)
+               {
+                       dict = ghb_dict_value_new();
+                       ghb_presets_insert(presetsPlist, dict, indices, len);
+               }
+               else
+               {
+                       g_warning("failed to find insert path");
+                       return;
+               }
+       }
+       ghb_dict_insert(dict, g_strdup("PresetDescription"), 
+               ghb_value_dup(preset_dict_get_value(
+                       ud->settings, "PresetDescription")));
+       ghb_dict_insert(dict, g_strdup("PresetName"), ghb_string_value_new(name));
+       folder = ghb_array_value_new(8);
+       ghb_dict_insert(dict, g_strdup("ChildrenArray"), folder);
+       ghb_dict_insert(dict, g_strdup("Type"),
+                                                       ghb_int64_value_new(PRESETS_CUSTOM));
+       ghb_dict_insert(dict, g_strdup("Folder"), ghb_boolean_value_new(TRUE));
+
+       presets_list_insert(ud, indices, len);
+       g_free(indices);
+       store_presets();
+       return;
+}
+
+void
+ghb_presets_list_default(signal_user_data_t *ud)
+{
+       GtkTreeView *treeview;
+       GtkTreePath *treepath;
+       GtkTreeIter iter;
+       GtkTreeStore *store;
+       gint *indices, len;
+       
+       g_debug("ghb_presets_list_default ()");
+       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
+       store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+       indices = presets_find_default(presetsPlist, &len);
+       if (indices == NULL) return;
+       treepath = ghb_tree_path_new_from_indices(indices, len);
+       if (treepath)
+       {
+               if (gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, treepath))
+               {
+                       gtk_tree_store_set(store, &iter, 
+                                               1, 800, 
+                                               2, 2 ,
+                                               -1);
+               }
+               gtk_tree_path_free(treepath);
+       }
+       g_free(indices);
+}
+
+void
+ghb_presets_list_clear_default(signal_user_data_t *ud)
+{
+       GtkTreeView *treeview;
+       GtkTreePath *treepath;
+       GtkTreeIter iter;
+       GtkTreeStore *store;
+       gint *indices, len;
+       
+       g_debug("ghb_presets_list_clear_default ()");
+       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
+       store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+       indices = presets_find_default(presetsPlist, &len);
+       if (indices == NULL) return;
+       treepath = ghb_tree_path_new_from_indices(indices, len);
+       if (treepath)
+       {
+               if (gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, treepath))
+               {
+                       gtk_tree_store_set(store, &iter, 
+                                               1, 400, 
+                                               2, 0 ,
+                                               -1);
+               }
+               gtk_tree_path_free(treepath);
+       }
+       g_free(indices);
+}
+
+static void
+update_audio_presets(signal_user_data_t *ud)
+{
+       g_debug("update_audio_presets");
+       const GValue *audio_list;
+
+       audio_list = ghb_settings_get_value(ud->settings, "audio_list");
+       ghb_settings_set_value(ud->settings, "AudioList", audio_list);
+}
+
+void
+enforce_preset_type(signal_user_data_t *ud, const GValue *path)
+{
+       gint *indices, len;
+       GtkWidget *normal, *folder;
+       gboolean fold;
+
+       normal = GHB_WIDGET(ud->builder, "preset_type_normal");
+       folder = GHB_WIDGET(ud->builder, "preset_type_folder");
+       indices = ghb_preset_indices_from_path(presetsPlist, path, &len);
+       if (indices)
+       {
+               fold = ghb_presets_get_folder(presetsPlist, indices, len);
+               if (fold)
+                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(folder), 
+                                                                       TRUE);
+               else
+                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(normal), 
+                                                                       TRUE);
+               gtk_widget_set_sensitive(folder,  fold);
+               gtk_widget_set_sensitive(normal,  !fold);
+               g_free(indices);
+       }
+       else
+       {
+               gtk_widget_set_sensitive(folder, TRUE);
+               gtk_widget_set_sensitive(normal, TRUE);
+       }
+}
+
+void
+presets_save_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+       GtkWidget *dialog;
+       GtkEntry *entry;
+       GtkTextView *desc;
+       GtkResponseType response;
+       GValue *preset;
+       const gchar *name = "";
+       gint count, *indices, len;
+
+       g_debug("presets_save_clicked_cb ()");
+       preset = ghb_settings_get_value (ud->settings, "preset_selection");
+
+       count = ghb_array_len(preset);
+       if (count > 0)
+               name = g_value_get_string(ghb_array_get_nth(preset, count-1));
+       else
+               count = 1;
+       // Clear the description
+       desc = GTK_TEXT_VIEW(GHB_WIDGET(ud->builder, "PresetDescription"));
+       dialog = GHB_WIDGET(ud->builder, "preset_save_dialog");
+       entry = GTK_ENTRY(GHB_WIDGET(ud->builder, "PresetName"));
+       gtk_entry_set_text(entry, name);
+       enforce_preset_type(ud, 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);
+               GValue *dest;
+
+               if (ghb_settings_get_boolean(ud->settings, "preset_type_folder"))
+               {
+                       if (count > MAX_NESTED_PRESET-1)
+                       {
+                               count = MAX_NESTED_PRESET-1;
+                       }
+               }
+               dest = ghb_array_value_new(MAX_NESTED_PRESET);
+               indices = ghb_preset_indices_from_path(presetsPlist, preset, &len);
+               if (indices)
+               {
+                       gint ptype;
+
+                       ptype = ghb_presets_get_type(presetsPlist, indices, len);
+                       if (ptype == PRESETS_CUSTOM)
+                       {
+                               ghb_array_copy(dest, preset, count-1);
+                       }
+               }
+               ghb_array_append(dest, ghb_string_value_new(name));
+
+               ghb_widget_to_setting(ud->settings, GTK_WIDGET(desc));
+               if (ghb_settings_get_boolean(ud->settings, "preset_type_folder"))
+               {
+                       folder_save(ud, dest);
+               }
+               else
+               {
+                       // Construct the audio settings presets from the current audio list
+                       update_audio_presets(ud);
+                       settings_save(ud, dest);
+               }
+               ghb_value_free(dest);
+       }
+}
+
+void
+preset_type_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       ghb_widget_to_setting(ud->settings, widget);
+}
+
+void
+preset_name_changed_cb(GtkWidget *entry, signal_user_data_t *ud)
+{
+       gchar *name;
+       GValue *preset, *dest;
+       gint count;
+
+       preset = ghb_settings_get_value (ud->settings, "preset_selection");
+       name = ghb_widget_string(entry);
+       dest = ghb_value_dup(preset);
+       count = ghb_array_len(dest);
+       ghb_array_replace(dest, count-1, ghb_string_value_new(name));
+       enforce_preset_type(ud, dest);
+       ghb_value_free(dest);
+}
+
+void
+presets_restore_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+       GValue *preset;
+
+       g_debug("presets_restore_clicked_cb ()");
+       // Reload only the standard presets
+       ghb_presets_reload(ud);
+       // Updating the presets list shuffles things around
+       // need to make sure the proper preset is selected
+       preset = ghb_settings_get_value (ud->settings, "preset");
+       ghb_select_preset(ud->builder, preset);
+}
+
+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 ()");
+       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;
+               GtkTreePath *path;
+               gint *indices, len;
+               gboolean folder;
+
+               gtk_tree_model_get(store, &iter, 0, &preset, -1);
+               path = gtk_tree_model_get_path(store, &iter);
+               indices = gtk_tree_path_get_indices(path);
+               len = gtk_tree_path_get_depth(path);
+
+               folder = ghb_presets_get_folder(presetsPlist, indices, len);
+               dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+                                                       GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
+                                                       "Confirm deletion of %s:\n\n%s", 
+                                                       folder ? "folder" : "preset",
+                                                       preset);
+               response = gtk_dialog_run(GTK_DIALOG(dialog));
+               gtk_widget_destroy (dialog);
+               if (response == GTK_RESPONSE_YES)
+               {
+                       GtkTreeIter nextIter = iter;
+                       gboolean valid = TRUE;
+                       if (!gtk_tree_model_iter_next(store, &nextIter))
+                       {
+                               if (!gtk_tree_model_iter_parent(store, &nextIter, &iter))
+                               {
+                                       valid = FALSE;
+                               }
+                       }
+                       // Remove the selected item
+                       // First unselect it so that selecting the new item works properly
+                       gtk_tree_selection_unselect_iter (selection, &iter);
+                       if (ghb_presets_remove(presetsPlist, indices, len))
+                       {
+                               store_presets();
+                               presets_list_remove(ud, indices, len);
+                       }
+                       if (!valid)
+                               valid = gtk_tree_model_get_iter_first(store, &nextIter);
+                       if (valid)
+                       {
+                               gtk_tree_path_free(path);
+                               path = gtk_tree_model_get_path(store, &nextIter);
+                               indices = gtk_tree_path_get_indices(path);
+                               len = gtk_tree_path_get_depth(path);
+                               ghb_select_preset2(ud->builder, indices, len);
+                       }
+               }
+               g_free(preset);
+               gtk_tree_path_free(path);
+       }
+}
+
+// controls where valid drop locations are
+gboolean
+presets_drag_motion_cb(
+       GtkTreeView *tv,
+       GdkDragContext *ctx,
+       gint x,
+       gint y,
+       guint time,
+       signal_user_data_t *ud)
+{
+       GtkTreePath *path = NULL;
+       GtkTreeViewDropPosition drop_pos;
+       gint *indices, len;
+       GtkTreeIter iter;
+       GtkTreeView *srctv;
+       GtkTreeModel *model;
+       GtkTreeSelection *select;
+       gint src_ptype, dst_ptype;
+       gboolean src_folder, dst_folder;
+       GValue *preset;
+       gint tree_depth, ii;
+
+       // Get the type of the object being dragged
+       srctv = GTK_TREE_VIEW(gtk_drag_get_source_widget(ctx));
+       select = gtk_tree_view_get_selection (srctv);
+       gtk_tree_selection_get_selected (select, &model, &iter);
+       path = gtk_tree_model_get_path (model, &iter);
+       indices = gtk_tree_path_get_indices(path);
+       len = gtk_tree_path_get_depth(path);
+
+       preset = presets_get_dict(presetsPlist, indices, len);
+       tree_depth = preset_tree_depth(preset);
+
+       src_ptype = ghb_presets_get_type(presetsPlist, indices, len);
+       src_folder = ghb_presets_get_folder(presetsPlist, indices, len);
+       gtk_tree_path_free(path);
+
+       if (src_folder && tree_depth == 1)
+               tree_depth = 2;
+
+       // The rest checks that the destination is a valid position
+       // in the list.
+       gtk_tree_view_get_dest_row_at_pos (tv, x, y, &path, &drop_pos);
+       if (path == NULL)
+       {
+               gdk_drag_status(ctx, 0, time);
+               return TRUE;
+       }
+       // Don't allow repositioning of builtin presets
+       if (src_ptype != PRESETS_CUSTOM)
+       {
+               gdk_drag_status(ctx, 0, time);
+               return TRUE;
+       }
+
+       len = gtk_tree_path_get_depth(path);
+       if (len+tree_depth-1 >= MAX_NESTED_PRESET)
+       {
+               if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE)
+                       drop_pos = GTK_TREE_VIEW_DROP_BEFORE;
+               if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER)
+                       drop_pos = GTK_TREE_VIEW_DROP_AFTER;
+       }
+       for (ii = len+tree_depth-1; ii > MAX_NESTED_PRESET; ii--)
+               gtk_tree_path_up(path);
+       indices = gtk_tree_path_get_indices(path);
+       len = gtk_tree_path_get_depth(path);
+       dst_ptype = ghb_presets_get_type(presetsPlist, indices, len);
+       dst_folder = ghb_presets_get_folder(presetsPlist, indices, len);
+       // Don't allow mixing custom presets in the builtins
+       if (dst_ptype != PRESETS_CUSTOM)
+       {
+               gdk_drag_status(ctx, 0, time);
+               return TRUE;
+       }
+
+       // Only allow *drop into* for folders
+       if (!dst_folder)
+       { 
+               if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE)
+                       drop_pos = GTK_TREE_VIEW_DROP_BEFORE;
+               if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER)
+                       drop_pos = GTK_TREE_VIEW_DROP_AFTER;
+       }
+
+       len = gtk_tree_path_get_depth(path);
+       gtk_tree_view_set_drag_dest_row(tv, path, drop_pos);
+       gtk_tree_path_free(path);
+       gdk_drag_status(ctx, GDK_ACTION_MOVE, time);
+       return TRUE;
+}
+
+void 
+presets_drag_cb(
+       GtkTreeView *dstwidget, 
+       GdkDragContext *dc, 
+       gint x, gint y, 
+       GtkSelectionData *selection_data, 
+       guint info, guint t, 
+       signal_user_data_t *ud)
+{
+       GtkTreePath *path = NULL;
+       GtkTreeViewDropPosition drop_pos;
+       GtkTreeIter dstiter, srciter;
+       gint *dst_indices, dst_len, *src_indices, src_len;
+       gint src_ptype;
+       gboolean src_folder, dst_folder;
+       
+       GtkTreeModel *dstmodel = gtk_tree_view_get_model(dstwidget);
+                       
+       g_debug("preset_drag_cb ()");
+       // This doesn't work here for some reason...
+       // gtk_tree_view_get_drag_dest_row(dstwidget, &path, &drop_pos);
+       gtk_tree_view_get_dest_row_at_pos (dstwidget, x, y, &path, &drop_pos);
+       // This little hack is needed because attempting to drop after
+       // the last item gives us no path or drop_pos.
+       if (path == NULL)
+       {
+               gint n_children;
+
+               n_children = gtk_tree_model_iter_n_children(dstmodel, NULL);
+               if (n_children)
+               {
+                       drop_pos = GTK_TREE_VIEW_DROP_AFTER;
+                       path = gtk_tree_path_new_from_indices(n_children-1, -1);
+               }
+               else
+               {
+                       drop_pos = GTK_TREE_VIEW_DROP_BEFORE;
+                       path = gtk_tree_path_new_from_indices(0, -1);
+               }
+       }
+       if (path)
+       {
+               GtkTreeView *srcwidget;
+               GtkTreeModel *srcmodel;
+               GtkTreeSelection *select;
+               GtkTreePath *srcpath = NULL;
+               GValue *preset;
+               gint tree_depth, ii;
+
+               srcwidget = GTK_TREE_VIEW(gtk_drag_get_source_widget(dc));
+               select = gtk_tree_view_get_selection (srcwidget);
+               gtk_tree_selection_get_selected (select, &srcmodel, &srciter);
+
+               srcpath = gtk_tree_model_get_path (srcmodel, &srciter);
+               src_indices = gtk_tree_path_get_indices(srcpath);
+               src_len = gtk_tree_path_get_depth(srcpath);
+               src_ptype = ghb_presets_get_type(presetsPlist, src_indices, src_len);
+               src_folder = ghb_presets_get_folder(presetsPlist, src_indices, src_len);
+               preset = ghb_value_dup(
+                                       presets_get_dict(presetsPlist, src_indices, src_len));
+               gtk_tree_path_free(srcpath);
+
+               // Don't allow repositioning of builtin presets
+               if (src_ptype != PRESETS_CUSTOM)
+                       return;
+
+               tree_depth = preset_tree_depth(preset);
+               if (src_folder && tree_depth == 1)
+                       tree_depth = 2;
+
+               dst_len = gtk_tree_path_get_depth(path);
+               if (dst_len+tree_depth-1 >= MAX_NESTED_PRESET)
+               {
+                       if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE)
+                               drop_pos = GTK_TREE_VIEW_DROP_BEFORE;
+                       if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER)
+                               drop_pos = GTK_TREE_VIEW_DROP_AFTER;
+               }
+
+               for (ii = dst_len+tree_depth-1; ii > MAX_NESTED_PRESET; ii--)
+                       gtk_tree_path_up(path);
+               dst_indices = gtk_tree_path_get_indices(path);
+               dst_len = gtk_tree_path_get_depth(path);
+               dst_folder = ghb_presets_get_folder(presetsPlist, dst_indices, dst_len);
+               // Only allow *drop into* for folders
+               if (!dst_folder)
+               { 
+                       if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE)
+                               drop_pos = GTK_TREE_VIEW_DROP_BEFORE;
+                       if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER)
+                               drop_pos = GTK_TREE_VIEW_DROP_AFTER;
+               }
+               if (gtk_tree_model_get_iter (dstmodel, &dstiter, path))
+               {
+                       GtkTreeIter iter;
+                       GtkTreePath *dstpath = NULL;
+
+                       switch (drop_pos)
+                       {
+                               case GTK_TREE_VIEW_DROP_BEFORE:
+                                       gtk_tree_store_insert_before(GTK_TREE_STORE (dstmodel), 
+                                                                                               &iter, NULL, &dstiter);
+                                       break;
+
+                               case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
+                                       gtk_tree_store_insert(GTK_TREE_STORE (dstmodel), 
+                                                                                               &iter, &dstiter, 0);
+                                       break;
+
+                               case GTK_TREE_VIEW_DROP_AFTER:
+                                       gtk_tree_store_insert_after(GTK_TREE_STORE (dstmodel), 
+                                                                                               &iter, NULL, &dstiter);
+                                       break;
+
+                               case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
+                                       gtk_tree_store_insert_after(GTK_TREE_STORE (dstmodel), 
+                                                                                               &iter, &dstiter, 0);
+                                       break;
+
+                               default:
+                                       break;
+                       }
+
+                       dstpath = gtk_tree_model_get_path (dstmodel, &iter);
+                       dst_indices = gtk_tree_path_get_indices(dstpath);
+                       dst_len = gtk_tree_path_get_depth(dstpath);
+                       ghb_presets_insert(presetsPlist, preset, dst_indices, dst_len);
+                       gtk_tree_path_free(dstpath);
+
+                       srcpath = gtk_tree_model_get_path (srcmodel, &srciter);
+                       src_indices = gtk_tree_path_get_indices(srcpath);
+                       src_len = gtk_tree_path_get_depth(srcpath);
+                       ghb_presets_remove(presetsPlist, src_indices, src_len);
+                       gtk_tree_path_free(srcpath);
+
+                       gtk_tree_store_remove (GTK_TREE_STORE (srcmodel), &srciter);
+
+                       dstpath = gtk_tree_model_get_path (dstmodel, &iter);
+                       dst_indices = gtk_tree_path_get_indices(dstpath);
+                       dst_len = gtk_tree_path_get_depth(dstpath);
+                       presets_list_update_item(ud, dst_indices, dst_len);
+                       gtk_tree_path_free(dstpath);
+
+                       store_presets();
+               }
+               gtk_tree_path_free(path);
+       }
+}
+
+static void
+preset_update_title_deps(signal_user_data_t *ud, ghb_title_info_t *tinfo)
+{
+       GtkWidget *widget;
+
+       ghb_ui_update(ud, "scale_width", 
+                       ghb_int64_value(tinfo->width - tinfo->crop[2] - tinfo->crop[3]));
+       // If anamorphic or keep_aspect, the hight will be automatically calculated
+       gboolean keep_aspect, anamorphic;
+       keep_aspect = ghb_settings_get_boolean(ud->settings, "PictureKeepRatio");
+       anamorphic = ghb_settings_get_boolean(ud->settings, "anamorphic");
+       if (!(keep_aspect || anamorphic))
+       {
+               ghb_ui_update(ud, "scale_height", 
+                       ghb_int64_value(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, "PictureTopCrop");
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+       widget = GHB_WIDGET (ud->builder, "PictureBottomCrop");
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+       bound = tinfo->width / 2 - 2;
+       widget = GHB_WIDGET (ud->builder, "PictureLeftCrop");
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+       widget = GHB_WIDGET (ud->builder, "PictureRightCrop");
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+       if (ghb_settings_get_boolean(ud->settings, "PictureAutoCrop"))
+       {
+               ghb_ui_update(ud, "PictureTopCrop", ghb_int64_value(tinfo->crop[0]));
+               ghb_ui_update(ud, "PictureBottomCrop", ghb_int64_value(tinfo->crop[1]));
+               ghb_ui_update(ud, "PictureLeftCrop", ghb_int64_value(tinfo->crop[2]));
+               ghb_ui_update(ud, "PictureRightCrop", ghb_int64_value(tinfo->crop[3]));
+       }
+}
+
+void
+presets_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_t *ud)
+{
+       GtkTreeModel *store;
+       GtkTreeIter iter;
+       ghb_title_info_t tinfo;
+       GtkWidget *widget;
+       
+       g_debug("presets_list_selection_changed_cb ()");
+       widget = GHB_WIDGET (ud->builder, "presets_remove");
+       if (gtk_tree_selection_get_selected(selection, &store, &iter))
+       {
+               GtkTreePath *treepath;
+               gint *indices, len;
+               GValue *path;
+               gboolean folder;
+
+               treepath = gtk_tree_model_get_path(store, &iter);
+               indices = gtk_tree_path_get_indices(treepath);
+               len = gtk_tree_path_get_depth(treepath);
+
+               path = preset_path_from_indices(presetsPlist, indices, len);
+               ghb_settings_take_value(ud->settings, "preset_selection", path);
+
+               folder = ghb_presets_get_folder(presetsPlist, indices, len);
+               if (!folder)
+               {
+                       ud->dont_clear_presets = TRUE;
+                       // Temporarily set the video_quality range to (0,100)
+                       // This is needed so the video_quality value does not get
+                       // truncated when set.  The range will be readjusted below
+                       GtkWidget *qp = GHB_WIDGET(ud->builder, "VideoQualitySlider");
+                       gtk_range_set_range (GTK_RANGE(qp), 0, 100);
+                       gtk_scale_set_digits(GTK_SCALE(qp), 3);
+                       // Clear the audio list prior to changing the preset.  Existing 
+                       // audio can cause the container extension to be automatically 
+                       // changed when it shouldn't be
+                       ghb_clear_audio_list(ud);
+                       ghb_set_preset_from_indices(ud, indices, len);
+                       gtk_tree_path_free(treepath);
+                       gint titleindex;
+                       titleindex = ghb_settings_combo_int(ud->settings, "title");
+                       ghb_set_pref_audio(titleindex, ud);
+                       ghb_settings_set_boolean(ud->settings, "preset_modified", FALSE);
+                       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);
+
+                       gdouble vqmin, vqmax, step, page;
+                       gint digits;
+                       ghb_vquality_range(ud, &vqmin, &vqmax, &step, &page, &digits);
+                       gtk_range_set_range (GTK_RANGE(qp), vqmin, vqmax);
+                       gtk_range_set_increments (GTK_RANGE(qp), step, page);
+                       gtk_scale_set_digits(GTK_SCALE(qp), digits);
+
+                       gchar *text;
+                       gint crop[4];
+                       GtkWidget *crop_widget;
+                       crop[0] = ghb_settings_get_int(ud->settings, "PictureTopCrop");
+                       crop[1] = ghb_settings_get_int(ud->settings, "PictureBottomCrop");
+                       crop[2] = ghb_settings_get_int(ud->settings, "PictureLeftCrop");
+                       crop[3] = ghb_settings_get_int(ud->settings, "PictureRightCrop");
+                       crop_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(crop_widget), text);
+                       g_free(text);
+               }
+               gtk_widget_set_sensitive(widget, TRUE);
+       }
+       else
+       {
+               g_debug("No selection???  Perhaps unselected.");
+               gtk_widget_set_sensitive(widget, FALSE);
+       }
+}
+
+void
+ghb_clear_presets_selection(signal_user_data_t *ud)
+{
+       GtkTreeView *treeview;
+       GtkTreeSelection *selection;
+       
+       if (ud->dont_clear_presets) return;
+       g_debug("ghb_clear_presets_selection()");
+       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
+       selection = gtk_tree_view_get_selection (treeview);
+       gtk_tree_selection_unselect_all (selection);
+       ghb_settings_set_boolean(ud->settings, "preset_modified", TRUE);
+}
+
+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);
+               gtk_tree_path_free(path);
+       }
+}
+
+void
+presets_default_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+       GValue *preset;
+       gint *indices, len;
+
+       g_debug("presets_default_clicked_cb ()");
+       preset = ghb_settings_get_value(ud->settings, "preset_selection");
+       indices = ghb_preset_indices_from_path(presetsPlist, preset, &len);
+       if (indices)
+       {
+               if (!ghb_presets_get_folder(presetsPlist, indices, len))
+               {
+                       ghb_presets_list_clear_default(ud);
+                       presets_set_default(indices, len);
+                       ghb_presets_list_default(ud);
+               }
+               g_free(indices);
+       }
+}
+
diff --git a/gtk/src/presets.h b/gtk/src/presets.h
new file mode 100644 (file)
index 0000000..c5a870d
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * 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_PRESETS_H_)
+#define _GHB_PRESETS_H_
+
+void ghb_settings_save(signal_user_data_t *ud, const gchar *name);
+void ghb_presets_load(void);
+void ghb_update_from_preset(signal_user_data_t *ud, const gchar *key);
+void ghb_prefs_load(signal_user_data_t *ud);
+void ghb_settings_init(signal_user_data_t *ud);
+void ghb_settings_close();
+void ghb_prefs_to_ui(signal_user_data_t *ud);
+void ghb_prefs_save(GValue *settings);
+void ghb_pref_save(GValue *settings, const gchar *key);
+void ghb_save_queue(GValue *queue);
+GValue* ghb_load_queue();
+void ghb_remove_queue_file(void);;
+gchar* ghb_get_user_config_dir(gchar *subdir);
+void ghb_settings_to_ui(signal_user_data_t *ud, GValue *dict);
+void ghb_clear_presets_selection(signal_user_data_t *ud);
+void ghb_select_preset(GtkBuilder *builder, 
+               const GValue *preset);
+void ghb_select_default_preset(GtkBuilder *builder);
+void ghb_presets_list_init(signal_user_data_t *ud, gint *indices, gint len);
+GValue* ghb_parse_preset_path(const gchar *path);
+gchar* ghb_preset_path_string(const GValue *path);
+gboolean ghb_preset_is_custom(void);
+
+#endif // _GHB_PRESETS_H_
diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c
new file mode 100644 (file)
index 0000000..f8687b7
--- /dev/null
@@ -0,0 +1,1166 @@
+/* -*- 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.
+ */
+
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+#include <glib/gstdio.h>
+#include <gio/gio.h>
+#include "hb.h"
+#include "settings.h"
+#include "hb-backend.h"
+#include "values.h"
+#include "callbacks.h"
+#include "presets.h"
+#include "ghb-dvd.h"
+
+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 ()");
+       // 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))
+       {
+               GtkWidget *widget = GHB_WIDGET (ud->builder, "queue_edit");
+               gtk_widget_set_sensitive (widget, TRUE);
+               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);
+                       gtk_tree_path_free(path);
+               }
+       }
+       else
+       {
+               GtkWidget *widget = GHB_WIDGET (ud->builder, "queue_edit");
+               gtk_widget_set_sensitive (widget, FALSE);
+       }
+}
+
+static void
+add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter)
+{
+       GtkTreeView *treeview;
+       GtkTreeIter iter;
+       GtkTreeStore *store;
+       gchar *info;
+       gint status;
+       GtkTreeIter citer;
+       gchar *dest, *preset, *vol_name, *basename;
+       const gchar *vcodec, *container;
+       gchar *fps, *vcodec_abbr;
+       gint title, start_chapter, end_chapter, width, height;
+       gint source_width, source_height;
+       gboolean pass2, anamorphic, round_dim, keep_aspect, vqtype, turbo;
+       gboolean tweaks;
+       
+       g_debug("update_queue_list ()");
+       if (settings == NULL) return;
+       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
+       store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+               
+       tweaks = ghb_settings_get_boolean(settings, "allow_tweaks");
+       title = ghb_settings_combo_int(settings, "title");
+       start_chapter = ghb_settings_get_int(settings, "start_chapter");
+       end_chapter = ghb_settings_get_int(settings, "end_chapter");
+       pass2 = ghb_settings_get_boolean(settings, "VideoTwoPass");
+       vol_name = ghb_settings_get_string(settings, "volume_label");
+       dest = ghb_settings_get_string(settings, "destination");
+       basename = g_path_get_basename(dest);
+       info = g_strdup_printf 
+       (
+               "<big><b>%s</b></big> "
+               "<small>(Title %d, Chapters %d through %d, %d Video %s)"
+               " --> %s</small>",
+                vol_name, title+1, start_chapter, end_chapter, 
+                pass2 ? 2:1, pass2 ? "Passes":"Pass", basename
+       );
+
+       if (piter)
+               iter = *piter;
+       else
+               gtk_tree_store_append(store, &iter, NULL);
+
+       gtk_tree_store_set(store, &iter, 1, info, 2, "hb-queue-delete", -1);
+       g_free(info);
+       status = ghb_settings_get_int(settings, "job_status");
+       switch (status)
+       {
+               case GHB_QUEUE_PENDING:
+                       gtk_tree_store_set(store, &iter, 0, "hb-queue-job", -1);
+                       break;
+               case GHB_QUEUE_CANCELED:
+                       gtk_tree_store_set(store, &iter, 0, "hb-canceled", -1);
+                       break;
+               case GHB_QUEUE_RUNNING:
+                       gtk_tree_store_set(store, &iter, 0, "hb-working0", -1);
+                       break;
+               case GHB_QUEUE_DONE:
+                       gtk_tree_store_set(store, &iter, 0, "hb-complete", -1);
+                       break;
+               default:
+                       gtk_tree_store_set(store, &iter, 0, "hb-queue-job", -1);
+                       break;
+       }
+
+       GString *str = g_string_new("");
+       gboolean markers;
+       gboolean preset_modified;
+       gint mux;
+       const GValue *path;
+
+       container = ghb_settings_combo_option(settings, "FileFormat");
+       mux = ghb_settings_combo_int(settings, "FileFormat");
+       preset_modified = ghb_settings_get_boolean(settings, "preset_modified");
+       path = ghb_settings_get_value(settings, "preset");
+       preset = ghb_preset_path_string(path);
+       markers = ghb_settings_get_boolean(settings, "ChapterMarkers");
+
+       if (preset_modified)
+               g_string_append_printf(str, 
+                       "<b>Modified Preset Based On:</b> <small>%s</small>\n", 
+                       preset);
+       else
+               g_string_append_printf(str, 
+                       "<b>Preset:</b> <small>%s</small>\n", 
+                       preset);
+
+       if (markers)
+       {
+               g_string_append_printf(str, 
+                       "<b>Format:</b> <small>%s Container, Chapter Markers</small>\n", 
+                       container);
+       }
+       else
+       {
+               g_string_append_printf(str, 
+                       "<b>Format:</b> <small>%s Container</small>\n", container);
+       }
+       if (mux == HB_MUX_MP4)
+       {
+               gboolean ipod, http, large;
+
+               ipod = ghb_settings_get_boolean(settings, "Mp4iPodCompatible");
+               http = ghb_settings_get_boolean(settings, "Mp4HttpOptimize");
+               large = ghb_settings_get_boolean(settings, "Mp4LargeFile");
+               if (http || ipod || large)
+               {
+                       g_string_append_printf(str, "<b>MP4 Options:</b><small>");
+                       if (ipod)
+                               g_string_append_printf(str, " - iPod 5G Support");
+                       if (http)
+                               g_string_append_printf(str, " - Web Optimized");
+                       if (large)
+                               g_string_append_printf(str, " - Large File Size (>4GB)");
+                       g_string_append_printf(str, "</small>\n");
+               }
+       }
+       g_string_append_printf(str, 
+               "<b>Destination:</b> <small>%s</small>\n", dest);
+
+       width = ghb_settings_get_int(settings, "scale_width");
+       height = ghb_settings_get_int(settings, "scale_height");
+       anamorphic = ghb_settings_get_boolean(settings, "anamorphic");
+       round_dim = ghb_settings_get_boolean(settings, "ModDimensions");
+       keep_aspect = ghb_settings_get_boolean(settings, "PictureKeepRatio");
+
+       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)";
+               }
+       }
+       vqtype = ghb_settings_get_boolean(settings, "vquality_type_constant");
+
+       gchar *vq_desc = "Error";
+       gchar *vq_units = "";
+       gchar *vqstr;
+       gdouble vqvalue;
+       if (!vqtype)
+       {
+               vqtype = ghb_settings_get_boolean(settings, "vquality_type_target");
+               if (!vqtype)
+               {
+                       // Has to be bitrate
+                       vqvalue = ghb_settings_get_int(settings, "VideoAvgBitrate");
+                       vq_desc = "Bitrate:";
+                       vq_units = "kbps";
+               }
+               else
+               {
+                       // Target file size
+                       vqvalue = ghb_settings_get_int(settings, "VideoTargetSize");
+                       vq_desc = "Target Size:";
+                       vq_units = "MB";
+               }
+               vqstr = g_strdup_printf("%d", (gint)vqvalue);
+       }
+       else
+       {
+               // Constant quality
+               vqvalue = ghb_settings_get_double(settings, "VideoQualitySlider");
+               vq_desc = "Constant Quality:";
+               if (ghb_settings_get_boolean(settings, "directqp"))
+               {
+                       vqstr = g_strdup_printf("%d", (gint)vqvalue);
+                       vq_units = "(crf)";
+               }
+               else
+               {
+                       vqstr = g_strdup_printf("%.1f", 100*vqvalue);
+                       vq_units = "%";
+               }
+       }
+       fps = ghb_settings_get_string(settings, "VideoFramerate");
+       if (strcmp("source", fps) == 0)
+       {
+               g_free(fps);
+               if (ghb_settings_get_boolean(settings, "PictureDetelecine"))
+                       fps = g_strdup("Same As Source (vfr detelecine)");
+               else
+                       fps = g_strdup("Same As Source (variable)");
+       }
+       else
+       {
+               gchar *tmp;
+               tmp = g_strdup_printf("%s (constant frame rate)", fps);
+               g_free(fps);
+               fps = tmp;
+       }
+       vcodec = ghb_settings_combo_option(settings, "VideoEncoder");
+       vcodec_abbr = ghb_settings_get_string(settings, "VideoEncoder");
+       source_width = ghb_settings_get_int(settings, "source_width");
+       source_height = ghb_settings_get_int(settings, "source_height");
+       g_string_append_printf(str,
+               "<b>Picture:</b> Source: <small>%d x %d, Output %d x %d %s</small>\n",
+                source_width, source_height, width, height, aspect_desc);
+
+       gboolean decomb;
+       gboolean filters = FALSE;
+
+       decomb = ghb_settings_get_boolean(settings, "PictureDecomb");
+       g_string_append_printf(str, "<b>Filters:</b><small>");
+       if (ghb_settings_get_boolean(settings, "PictureDetelecine"))
+       {
+               g_string_append_printf(str, " - Detelecine");
+               filters = TRUE;
+       }
+       if (decomb)
+       {
+               g_string_append_printf(str, " - Decomb");
+               filters = TRUE;
+       }
+       else
+       {
+               gint deint = ghb_settings_combo_int(settings, 
+                                       tweaks ? "tweak_PictureDeinterlace":"PictureDeinterlace");
+               if (deint)
+               {
+                       const gchar *opt = ghb_settings_combo_option(settings,
+                                       tweaks ? "tweak_PictureDeinterlace":"PictureDeinterlace");
+                       g_string_append_printf(str, " - Deinterlace: %s", opt);
+                       filters = TRUE;
+               }
+       }
+       gint denoise = ghb_settings_combo_int(settings, 
+                               tweaks ? "tweak_PictureDenoise":"PictureDenoise");
+       if (denoise)
+       {
+               const gchar *opt = ghb_settings_combo_option(settings,
+                               tweaks ? "tweak_PictureDenoise":"PictureDenoise");
+               g_string_append_printf(str, " - Denoise: %s", opt);
+               filters = TRUE;
+       }
+       gint deblock = ghb_settings_get_int(settings, "PictureDeblock");
+       if (deblock >= 5)
+       {
+               g_string_append_printf(str, " - Deblock (%d)", deblock);
+               filters = TRUE;
+       }
+       if (ghb_settings_get_boolean(settings, "VideoGrayScale"))
+       {
+               g_string_append_printf(str, " - Grayscale");
+               filters = TRUE;
+       }
+       if (!filters)
+               g_string_append_printf(str, " None");
+       g_string_append_printf(str, "</small>\n");
+
+       g_string_append_printf(str,
+               "<b>Video:</b> <small>%s, Framerate: %s, %s %s%s</small>\n",
+                vcodec, fps, vq_desc, vqstr, vq_units);
+
+       turbo = ghb_settings_get_boolean(settings, "VideoTurboTwoPass");
+       if (turbo)
+       {
+               g_string_append_printf(str, "<b>Turbo:</b> <small>On</small>\n");
+       }
+       if (strcmp(vcodec_abbr, "x264") == 0)
+       {
+               gchar *x264opts = ghb_build_x264opts_string(settings);
+               g_string_append_printf(str, 
+                       "<b>x264 Options:</b> <small>%s</small>\n", x264opts);
+               g_free(x264opts);
+       }
+       // Add the audios
+       gint count, ii;
+       const GValue *audio_list;
+
+       audio_list = ghb_settings_get_value(settings, "audio_list");
+       count = ghb_array_len(audio_list);
+       for (ii = 0; ii < count; ii++)
+       {
+               gchar *bitrate, *samplerate, *track;
+               const gchar *acodec, *mix;
+               GValue *asettings;
+
+               asettings = ghb_array_get_nth(audio_list, ii);
+
+               acodec = ghb_settings_combo_option(asettings, "AudioEncoder");
+               bitrate = ghb_settings_get_string(asettings, "AudioBitrate");
+               samplerate = ghb_settings_get_string(asettings, "AudioSamplerate");
+               if (strcmp("source", samplerate) == 0)
+               {
+                       g_free(samplerate);
+                       samplerate = g_strdup("Same As Source");
+               }
+               track = ghb_settings_get_string(asettings, "AudioTrackDescription");
+               mix = ghb_settings_combo_option(asettings, "AudioMixdown");
+               g_string_append_printf(str,
+                       "<b>Audio:</b><small> %s, Encoder: %s, Mixdown: %s, SampleRate: %s, Bitrate: %s</small>",
+                        track, acodec, mix, samplerate, bitrate);
+               if (ii < count-1)
+                       g_string_append_printf(str, "\n");
+               g_free(track);
+               g_free(bitrate);
+               g_free(samplerate);
+       }
+       info = g_string_free(str, FALSE);
+       gtk_tree_store_append(store, &citer, &iter);
+       gtk_tree_store_set(store, &citer, 1, info, -1);
+       g_free(info);
+       g_free(fps);
+       g_free(vcodec_abbr);
+       g_free(vol_name);
+       g_free(dest);
+       g_free(preset);
+}
+
+void
+audio_list_refresh(signal_user_data_t *ud)
+{
+       GtkTreeView *treeview;
+       GtkTreeIter iter;
+       GtkListStore *store;
+       gboolean done;
+       gint row = 0;
+       GValue *audio_list;
+
+       g_debug("ghb_audio_list_refresh ()");
+       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
+               {
+                       const gchar *track, *codec, *br, *sr, *mix;
+                       gchar *drc, *s_track, *s_codec, *s_br, *s_sr, *s_mix;
+                       gdouble s_drc;
+                       GValue *asettings;
+
+                       audio_list = ghb_settings_get_value(ud->settings, "audio_list");
+                       if (row >= ghb_array_len(audio_list))
+                               return;
+                       asettings = ghb_array_get_nth(audio_list, row);
+
+                       track = ghb_settings_combo_option(asettings, "AudioTrack");
+                       codec = ghb_settings_combo_option(asettings, "AudioEncoder");
+                       br = ghb_settings_combo_option(asettings, "AudioBitrate");
+                       sr = ghb_settings_combo_option(asettings, "AudioSamplerate");
+                       mix = ghb_settings_combo_option(asettings, "AudioMixdown");
+                       drc = ghb_settings_get_string(asettings, "AudioTrackDRCSlider");
+
+                       s_track = ghb_settings_get_string(asettings, "AudioTrack");
+                       s_codec = ghb_settings_get_string(asettings, "AudioEncoder");
+                       s_br = ghb_settings_get_string(asettings, "AudioBitrate");
+                       s_sr = ghb_settings_get_string(asettings, "AudioSamplerate");
+                       s_mix = ghb_settings_get_string(asettings, "AudioMixdown");
+                       s_drc = ghb_settings_get_double(asettings, "AudioTrackDRCSlider");
+
+                       gtk_list_store_set(GTK_LIST_STORE(store), &iter, 
+                               // These are displayed in list
+                               0, track,
+                               1, codec,
+                               2, br,
+                               3, sr,
+                               4, mix,
+                               // These are used to set combo values when an item is selected
+                               5, drc,
+                               6, s_track,
+                               7, s_codec,
+                               8, s_br,
+                               9, s_sr,
+                               10, s_mix,
+                               11, s_drc,
+                               -1);
+                       g_free(drc);
+                       g_free(s_track);
+                       g_free(s_codec);
+                       g_free(s_br);
+                       g_free(s_sr);
+                       g_free(s_mix);
+                       done = !gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter);
+                       row++;
+               } while (!done);
+       }
+}
+
+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, *dest;
+       gint count, ii;
+       gint titleindex;
+
+       titleindex = ghb_settings_combo_int(ud->settings, "title");
+       if (titleindex < 0) return FALSE;
+       dest = ghb_settings_get_string(ud->settings, "destination");
+       count = ghb_array_len(ud->queue);
+       for (ii = 0; ii < count; ii++)
+       {
+               GValue *js;
+               gchar *filename;
+
+               js = ghb_array_get_nth(ud->queue, ii);
+               filename = ghb_settings_get_string(js, "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(filename);
+                               g_free(dest);
+                               g_free(message);
+                               return FALSE;
+                       }
+                       g_free(message);
+                       break;
+               }
+               g_free(filename);
+       }
+       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(dest);
+               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(dest);
+               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 = (guint64)10 * 1024 * 1024 * 1024;
+                       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(dest);
+                                       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(dest);
+                       g_free(message);
+                       return FALSE;
+               }
+               g_free(message);
+               g_unlink(dest);
+       }
+       g_free(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;
+       }
+       // Validate filter settings
+       if (!ghb_validate_filters(ud))
+       {
+               return FALSE;
+       }
+       audio_list_refresh(ud);
+       return TRUE;
+}
+
+static gboolean
+queue_add(signal_user_data_t *ud)
+{
+       // Add settings to the queue
+       GValue *settings;
+       gint titleindex;
+       gint titlenum;
+       
+       g_debug("queue_add ()");
+       if (!validate_settings(ud))
+       {
+               return FALSE;
+       }
+       if (ud->queue == NULL)
+               ud->queue = ghb_array_value_new(32);
+       // Make a copy of current settings to be used for the new job
+       settings = ghb_value_dup(ud->settings);
+       ghb_settings_set_int(settings, "job_status", GHB_QUEUE_PENDING);
+       ghb_settings_set_int(settings, "job_unique_id", 0);
+       titleindex = ghb_settings_combo_int(settings, "title");
+       titlenum = ghb_get_title_number(titleindex);
+       ghb_settings_set_int(settings, "titlenum", titlenum);
+       ghb_array_append(ud->queue, settings);
+       add_to_queue_list(ud, settings, NULL);
+       ghb_save_queue(ud->queue);
+
+       return TRUE;
+}
+
+void
+queue_add_clicked_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       g_debug("queue_add_clicked_cb ()");
+       queue_add(ud);
+}
+
+void
+queue_remove_clicked_cb(GtkWidget *widget, gchar *path, signal_user_data_t *ud)
+{
+       GtkTreeView *treeview;
+       GtkTreePath *treepath;
+       GtkTreeModel *store;
+       GtkTreeIter iter;
+       gint row;
+       gint *indices;
+       gint unique_id;
+       GValue *settings;
+       gint status;
+
+       g_debug("queue_remove_clicked_cb ()");
+       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_path_get_depth(treepath) > 1) return;
+       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;
+               if (row >= ghb_array_len(ud->queue))
+                       return;
+               settings = ghb_array_get_nth(ud->queue, row);
+               status = ghb_settings_get_int(settings, "job_status");
+               if (status == GHB_QUEUE_RUNNING)
+               {
+                       // Ask if wants to stop encode.
+                       if (!ghb_cancel_encode(NULL))
+                       {
+                               return;
+                       }
+                       unique_id = ghb_settings_get_int(settings, "job_unique_id");
+                       ghb_remove_job(unique_id);
+               }
+               // Remove the selected item
+               gtk_tree_store_remove(GTK_TREE_STORE(store), &iter);
+               // Remove the corresponding item from the queue list
+               GValue *old = ghb_array_get_nth(ud->queue, row);
+               ghb_value_free(old);
+               ghb_array_remove(ud->queue, row);
+               ghb_save_queue(ud->queue);
+       }
+       else
+       {       
+               gtk_tree_path_free (treepath);
+       }
+}
+
+static gint
+find_last_finished(GValue *queue)
+{
+       GValue *js;
+       gint ii, count;
+       gint status;
+       
+       g_debug("find_last_finished");
+       count = ghb_array_len(queue);
+       for (ii = 0; ii < count; ii++)
+       {
+               js = ghb_array_get_nth(queue, ii);
+               status = ghb_settings_get_int(js, "job_status");
+               if (status != GHB_QUEUE_DONE && status != GHB_QUEUE_RUNNING)
+               {
+                       return ii-1;
+               }
+       }
+       return -1;
+}
+
+// This little bit is needed to prevent the default drag motion
+// handler from expanding rows if you hover over them while
+// dragging.
+// Also controls where valid drop locations are
+gboolean
+queue_drag_motion_cb(
+       GtkTreeView *tv,
+       GdkDragContext *ctx,
+       gint x,
+       gint y,
+       guint time,
+       signal_user_data_t *ud)
+{
+       GtkTreePath *path = NULL;
+       GtkTreeViewDropPosition pos;
+       gint *indices, row, status, finished;
+       GValue *js;
+       GtkTreeIter iter;
+       GtkTreeView *srctv;
+       GtkTreeModel *model;
+       GtkTreeSelection *select;
+
+       // This bit checks to see if the source is allowed to be
+       // moved.  Only pending and canceled items may be moved.
+       srctv = GTK_TREE_VIEW(gtk_drag_get_source_widget(ctx));
+       select = gtk_tree_view_get_selection (srctv);
+       gtk_tree_selection_get_selected (select, &model, &iter);
+       path = gtk_tree_model_get_path (model, &iter);
+       indices = gtk_tree_path_get_indices(path);
+       row = indices[0];
+       gtk_tree_path_free(path);
+       js = ghb_array_get_nth(ud->queue, row);
+       status = ghb_settings_get_int(js, "job_status");
+       if (status != GHB_QUEUE_PENDING && status != GHB_QUEUE_CANCELED)
+       {
+               gdk_drag_status(ctx, 0, time);
+               return TRUE;
+       }
+
+       // The reset checks that the destination is a valid position
+       // in the list.  Can not move above any finished or running items
+       gtk_tree_view_get_dest_row_at_pos (tv, x, y, &path, &pos);
+       if (path == NULL)
+       {
+               gdk_drag_status(ctx, GDK_ACTION_MOVE, time);
+               return TRUE;
+       }
+       // Don't allow *drop into*
+       if (pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE)
+               pos = GTK_TREE_VIEW_DROP_BEFORE;
+       if (pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER)
+               pos = GTK_TREE_VIEW_DROP_AFTER;
+       // Don't allow droping int child items
+       if (gtk_tree_path_get_depth(path) > 1)
+       {
+               gtk_tree_path_up(path);
+               pos = GTK_TREE_VIEW_DROP_AFTER;
+       }
+       indices = gtk_tree_path_get_indices(path);
+       row = indices[0];
+       js = ghb_array_get_nth(ud->queue, row);
+
+       finished = find_last_finished(ud->queue);
+       if (row < finished)
+       {
+               gtk_tree_path_free(path);
+               gdk_drag_status(ctx, 0, time);
+               return TRUE;
+       }
+       if (pos != GTK_TREE_VIEW_DROP_AFTER && 
+               row == finished)
+       {
+               gtk_tree_path_free(path);
+               gdk_drag_status(ctx, 0, time);
+               return TRUE;
+       }
+       gtk_tree_view_set_drag_dest_row(tv, path, pos);
+       gtk_tree_path_free(path);
+       gdk_drag_status(ctx, GDK_ACTION_MOVE, time);
+       return TRUE;
+}
+
+void 
+queue_drag_cb(
+       GtkTreeView *dstwidget, 
+       GdkDragContext *dc, 
+       gint x, gint y, 
+       GtkSelectionData *selection_data, 
+       guint info, guint t, 
+       signal_user_data_t *ud)
+{
+       GtkTreePath *path = NULL;
+       //GtkTreeModel *model;
+       GtkTreeViewDropPosition pos;
+       GtkTreeIter dstiter, srciter;
+       gint *indices, row;
+       GValue *js;
+       
+       GtkTreeModel *dstmodel = gtk_tree_view_get_model(dstwidget);
+                       
+       g_debug("queue_drag_cb ()");
+       // This doesn't work here for some reason...
+       // gtk_tree_view_get_drag_dest_row(dstwidget, &path, &pos);
+       gtk_tree_view_get_dest_row_at_pos (dstwidget, x, y, &path, &pos);
+       // This little hack is needed because attempting to drop after
+       // the last item gives us no path or pos.
+       if (path == NULL)
+       {
+               gint n_children;
+
+               n_children = gtk_tree_model_iter_n_children(dstmodel, NULL);
+               if (n_children)
+               {
+                       pos = GTK_TREE_VIEW_DROP_AFTER;
+                       path = gtk_tree_path_new_from_indices(n_children-1, -1);
+               }
+               else
+               {
+                       pos = GTK_TREE_VIEW_DROP_BEFORE;
+                       path = gtk_tree_path_new_from_indices(0, -1);
+               }
+       }
+       if (path)
+       {
+               if (gtk_tree_path_get_depth(path) > 1)
+                       gtk_tree_path_up(path);
+               if (gtk_tree_model_get_iter (dstmodel, &dstiter, path))
+               {
+                       GtkTreeIter iter;
+                       GtkTreeView *srcwidget;
+                       GtkTreeModel *srcmodel;
+                       GtkTreeSelection *select;
+                       GtkTreePath *srcpath = NULL;
+                       GtkTreePath *dstpath = NULL;
+
+                       srcwidget = GTK_TREE_VIEW(gtk_drag_get_source_widget(dc));
+                       //srcmodel = gtk_tree_view_get_model(srcwidget);
+                       select = gtk_tree_view_get_selection (srcwidget);
+                       gtk_tree_selection_get_selected (select, &srcmodel, &srciter);
+
+                       srcpath = gtk_tree_model_get_path (srcmodel, &srciter);
+                       indices = gtk_tree_path_get_indices(srcpath);
+                       row = indices[0];
+                       gtk_tree_path_free(srcpath);
+                       js = ghb_array_get_nth(ud->queue, row);
+
+                       switch (pos)
+                       {
+                               case GTK_TREE_VIEW_DROP_BEFORE:
+                               case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
+                                       gtk_tree_store_insert_before (GTK_TREE_STORE (dstmodel), 
+                                                                                                       &iter, NULL, &dstiter);
+                                       break;
+
+                               case GTK_TREE_VIEW_DROP_AFTER:
+                               case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
+                                       gtk_tree_store_insert_after (GTK_TREE_STORE (dstmodel), 
+                                                                                                       &iter, NULL, &dstiter);
+                                       break;
+
+                               default:
+                                       break;
+                       }
+                       // Reset job to pending
+                       ghb_settings_set_int(js, "job_status", GHB_QUEUE_PENDING);
+                       add_to_queue_list(ud, js, &iter);
+
+                       dstpath = gtk_tree_model_get_path (dstmodel, &iter);
+                       indices = gtk_tree_path_get_indices(dstpath);
+                       row = indices[0];
+                       gtk_tree_path_free(dstpath);
+                       ghb_array_insert(ud->queue, row, js);
+
+                       srcpath = gtk_tree_model_get_path (srcmodel, &srciter);
+                       indices = gtk_tree_path_get_indices(srcpath);
+                       row = indices[0];
+                       gtk_tree_path_free(srcpath);
+                       ghb_array_remove(ud->queue, row);
+                       gtk_tree_store_remove (GTK_TREE_STORE (srcmodel), &srciter);
+                       ghb_save_queue(ud->queue);
+               }
+               gtk_tree_path_free(path);
+       }
+}
+
+void
+ghb_queue_buttons_grey(signal_user_data_t *ud, gboolean working)
+{
+       GtkWidget *widget;
+       GtkAction *action;
+       gint queue_count;
+       gint titleindex;
+       gboolean title_ok;
+
+       queue_count = ghb_array_len(ud->queue);
+       titleindex = ghb_settings_combo_int(ud->settings, "title");
+       title_ok = (titleindex >= 0);
+
+       widget = GHB_WIDGET (ud->builder, "queue_start1");
+       gtk_widget_set_sensitive (widget, !working && (title_ok || queue_count));
+       widget = GHB_WIDGET (ud->builder, "queue_start2");
+       gtk_widget_set_sensitive (widget, !working && (title_ok || queue_count));
+       action = GHB_ACTION (ud->builder, "queue_start_menu");
+       gtk_action_set_sensitive (action, !working && (title_ok || queue_count));
+       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_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", 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
+queue_start_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+       GValue *js;
+       gboolean running = FALSE;
+       gint count, ii;
+       gint status;
+       gint state;
+
+       count = ghb_array_len(ud->queue);
+       for (ii = 0; ii < count; ii++)
+       {
+               js = ghb_array_get_nth(ud->queue, ii);
+               status = ghb_settings_get_int(js, "job_status");
+               if ((status == GHB_QUEUE_RUNNING) || 
+                       (status == GHB_QUEUE_PENDING))
+               {
+                       running = TRUE;
+                       break;
+               }
+       }
+       if (!running)
+       {
+               // The queue has no running or pending jobs.
+               // Add current settings to the queue, then run.
+               if (!queue_add(ud))
+                       return;
+       }
+       state = ghb_get_queue_state();
+       if (state == GHB_STATE_IDLE)
+       {
+               // Add the first pending queue item and start
+               ud->current_job = ghb_start_next_job(ud, TRUE);
+       }
+}
+
+void
+queue_stop_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+       ud->cancel_encode = TRUE;
+       ghb_cancel_encode(NULL);
+}
+
+void
+queue_pause_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+       ghb_pause_queue();
+}
+
+gboolean
+ghb_reload_queue(signal_user_data_t *ud)
+{
+       GValue *queue;
+       gint unfinished = 0;
+       gint count, ii;
+       gint status;
+       GValue *settings;
+       gchar *message;
+
+       g_debug("ghb_reload_queue");
+       queue = ghb_load_queue();
+       // Look for unfinished entries
+       count = ghb_array_len(queue);
+       for (ii = 0; ii < count; ii++)
+       {
+               settings = ghb_array_get_nth(queue, ii);
+               status = ghb_settings_get_int(settings, "job_status");
+               if (status != GHB_QUEUE_DONE && status != GHB_QUEUE_CANCELED)
+               {
+                       unfinished++;
+               }
+       }
+       if (unfinished)
+       {
+               message = g_strdup_printf(
+                                       "You have %d unfinished job%s in a saved queue.\n\n"
+                                       "Would you like to reload %s?",
+                                       unfinished, 
+                                       (unfinished > 1) ? "s" : "",
+                                       (unfinished > 1) ? "them" : "it");
+               if (ghb_message_dialog(GTK_MESSAGE_QUESTION, message, "No", "Yes"))
+               {
+                       GtkWidget *widget = GHB_WIDGET (ud->builder, "queue_window");
+                       gtk_widget_show (widget);
+
+                       ud->queue = queue;
+                       // First get rid of any old items we don't want
+                       for (ii = count-1; ii >= 0; ii--)
+                       {
+                               settings = ghb_array_get_nth(queue, ii);
+                               status = ghb_settings_get_int(settings, "job_status");
+                               if (status == GHB_QUEUE_DONE || status == GHB_QUEUE_CANCELED)
+                               {
+                                       GValue *old = ghb_array_get_nth(queue, ii);
+                                       ghb_value_free(old);
+                                       ghb_array_remove(queue, ii);
+                               }
+                       }
+                       count = ghb_array_len(queue);
+                       for (ii = 0; ii < count; ii++)
+                       {
+                               settings = ghb_array_get_nth(queue, ii);
+                               ghb_settings_set_int(settings, "job_unique_id", 0);
+                               ghb_settings_set_int(settings, "job_status", GHB_QUEUE_PENDING);
+                               add_to_queue_list(ud, settings, NULL);
+                       }
+                       ghb_queue_buttons_grey(ud, FALSE);
+               }
+               else
+               {
+                       ghb_value_free(queue);
+                       ghb_remove_queue_file();
+               }
+               g_free(message);
+       }
+       return FALSE;
+}
+
+gboolean 
+queue_key_press_cb(
+       GtkWidget *widget, 
+       GdkEventKey *event,
+       signal_user_data_t *ud)
+{
+       GtkTreeView *treeview;
+       GtkTreeSelection *selection;
+       GtkTreeModel *store;
+       GtkTreeIter iter;
+       gint row;
+       gint *indices;
+       gint unique_id;
+       GValue *settings;
+       gint status;
+
+       g_debug("queue_key_press_cb ()");
+       if (event->keyval != GDK_Delete)
+               return FALSE;
+       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
+       store = gtk_tree_view_get_model(treeview);
+
+       selection = gtk_tree_view_get_selection (treeview);
+       if (gtk_tree_selection_get_selected(selection, &store, &iter))
+       {
+               GtkTreePath *treepath;
+
+               treepath = gtk_tree_model_get_path (store, &iter);
+               // 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 FALSE;
+               if (row >= ghb_array_len(ud->queue))
+                       return FALSE;
+               settings = ghb_array_get_nth(ud->queue, row);
+               status = ghb_settings_get_int(settings, "job_status");
+               if (status == GHB_QUEUE_RUNNING)
+               {
+                       // Ask if wants to stop encode.
+                       if (!ghb_cancel_encode(NULL))
+                       {
+                               return TRUE;
+                       }
+                       unique_id = ghb_settings_get_int(settings, "job_unique_id");
+                       ghb_remove_job(unique_id);
+               }
+               // Remove the selected item
+               gtk_tree_store_remove(GTK_TREE_STORE(store), &iter);
+               // Remove the corresponding item from the queue list
+               GValue *old = ghb_array_get_nth(ud->queue, row);
+               ghb_value_free(old);
+               ghb_array_remove(ud->queue, row);
+               ghb_save_queue(ud->queue);
+               return TRUE;
+       }
+       return FALSE;
+}
+
+GValue *ghb_queue_edit_settings = NULL;
+
+void
+queue_edit_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+       GtkTreeView *treeview;
+       GtkTreeSelection *selection;
+       GtkTreeModel *store;
+       GtkTreeIter iter;
+       gint row;
+       gint *indices;
+       gint status;
+
+       g_debug("queue_key_press_cb ()");
+       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
+       store = gtk_tree_view_get_model(treeview);
+
+       selection = gtk_tree_view_get_selection (treeview);
+       if (gtk_tree_selection_get_selected(selection, &store, &iter))
+       {
+               GtkTreePath *treepath;
+
+               treepath = gtk_tree_model_get_path (store, &iter);
+               // 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;
+               if (row >= ghb_array_len(ud->queue))
+                       return;
+               ghb_queue_edit_settings = ghb_array_get_nth(ud->queue, row);
+               status = ghb_settings_get_int(ghb_queue_edit_settings, "job_status");
+               if (status == GHB_QUEUE_PENDING)
+               {
+                       // Remove the selected item
+                       gtk_tree_store_remove(GTK_TREE_STORE(store), &iter);
+                       // Remove the corresponding item from the queue list
+                       ghb_array_remove(ud->queue, row);
+               }
+               gchar *source;
+               source = ghb_settings_get_string(ghb_queue_edit_settings, "source");
+               ghb_do_scan(ud, source, FALSE);
+               g_free(source);
+       }
+}
+
diff --git a/gtk/src/queuehandler.h b/gtk/src/queuehandler.h
new file mode 100644 (file)
index 0000000..c817331
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * queuehandler.h
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ * 
+ * queuehandler.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(_QUEUEHANDLER_H_)
+#define _QUEUEHANDLER_H_
+
+#include <gtk/gtk.h>
+#include "settings.h"
+
+void ghb_queue_buttons_grey(signal_user_data_t *ud, gboolean working);
+
+#endif // _QUEUEHANDLER_H_
diff --git a/gtk/src/quotestring.c b/gtk/src/quotestring.c
new file mode 100644 (file)
index 0000000..c691f5f
--- /dev/null
@@ -0,0 +1,78 @@
+#include <stdio.h>
+#include <string.h>
+#include <libgen.h>
+
+#define BUF_SIZE    72
+
+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 in_buffer[BUF_SIZE];
+    char out_buffer[2*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(in_buffer, BUF_SIZE, infile) != NULL)
+    {
+               int ii, jj;
+        int len;
+               int eol = 0;
+        // Step on any CR LF at end of line
+        len = strlen(in_buffer);
+               if (len > 1 && in_buffer[len-1] == '\n' && in_buffer[len-2] == '\r')
+               {
+                       in_buffer[len-1] = 0;
+                       in_buffer[len-2] = 0;
+                       eol = 1;
+               }
+               else if (len > 0 && in_buffer[len-1] == '\n')
+               {
+                       in_buffer[len-1] = 0;
+                       eol = 1;
+               }
+               for (jj = 0, ii = 0; ii < len; ii++)
+               {
+                       if (in_buffer[ii] == '"')
+                       {
+                               out_buffer[jj++] = '\\';
+                               out_buffer[jj++] = in_buffer[ii];
+                       }
+               else if (in_buffer[ii] == '\r')
+                       { // Skip it
+                       }
+                       else
+                       {
+                               out_buffer[jj++] = in_buffer[ii];
+                       }
+               }
+               out_buffer[jj] = 0;
+               if (eol)
+               fprintf(outfile, "\"%s\\n\"\n", out_buffer);
+               else
+               fprintf(outfile, "\"%s\"\n", out_buffer);
+    }
+    fclose(infile);
+    fclose(outfile);
+       return 0;
+}
diff --git a/gtk/src/renderer_button.c b/gtk/src/renderer_button.c
new file mode 100644 (file)
index 0000000..52cb986
--- /dev/null
@@ -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 (file)
index 0000000..dc898e4
--- /dev/null
@@ -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/resource_data.h b/gtk/src/resource_data.h
new file mode 100644 (file)
index 0000000..f447098
--- /dev/null
@@ -0,0 +1,12682 @@
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple."
+"com/DTDs/PropertyList-1.0.dtd\">\n"
+"<plist version=\"1.0\">\n"
+"<dict>\n"
+"      <key>ghb-ui</key>\n"
+"      <string>&lt;?xml version=&quot;1.0&quot;?&gt;\n"
+"&lt;!--*- mode: xml -*--&gt;\n"
+"&lt;interface&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment1&quot;"
+"&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;100&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;1&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment10&quot"
+";&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;64&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;4&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;16&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment11&quot"
+";&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;6&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;-6&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment12&quot"
+";&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;6&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;-6&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment13&quot"
+";&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;1000&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment14&quot"
+";&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;1000&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment15&quot"
+";&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;1000&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment16&quot"
+";&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;1000&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment17&quot"
+";&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;2000&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;16&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;2&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment18&quot"
+";&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;1200&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;16&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;2&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment19&quot"
+";&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;10&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;1&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment2&quot;"
+"&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;100&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;100&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment3&quot;"
+"&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;20000&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;100&lt;/property&gt"
+";\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;10&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment4&quot;"
+"&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;50000&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;1000&lt;/property&g"
+"t;\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;100&lt;/property&gt"
+";\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment5&quot;"
+"&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;0.1&lt;/property&gt"
+";\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0.63&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment6&quot;"
+"&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;4&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;0.2&lt;/property&gt"
+";\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;2.6&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment7&quot;"
+"&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;4&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;0.20000000000000001"
+"&lt;/property&gt;\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;0.20000000000000001"
+"&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;2.3999999999999999&lt;/prope"
+"rty&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment8&quot;"
+"&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;16&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;3&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment9&quot;"
+"&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;16&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment20&quot"
+";&gt;\n"
+"    &lt;property name=&quot;upper&quot;&gt;15&lt;/property&gt;\n"
+"    &lt;property name=&quot;lower&quot;&gt;4&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
+"    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+"    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkUIManager&quot; id=&quot;uimanager1&quot;&g"
+"t;\n"
+"    &lt;child&gt;\n"
+"      &lt;object class=&quot;GtkActionGroup&quot; id=&quot;actiongroup1"
+"&quot;&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;menuitem1&quo"
+"t;&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;menuitem1&lt;/propert"
+"y&gt;\n"
+"            &lt;property name=&quot;label&quot; translatable=&quot;yes&"
+"quot;&gt;_File&lt;/property&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;source1&quot;"
+"&gt;\n"
+"            &lt;property name=&quot;stock_id&quot;&gt;gtk-open&lt;/prop"
+"erty&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;source1&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;label&quot;&gt;_Source&lt;/property"
+"&gt;\n"
+"            &lt;signal handler=&quot;source_button_clicked_cb&quot; nam"
+"e=&quot;activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;destination1&"
+"quot;&gt;\n"
+"            &lt;property name=&quot;stock_id&quot;&gt;gtk-save-as&lt;/p"
+"roperty&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;destination1&lt;/prop"
+"erty&gt;\n"
+"            &lt;property name=&quot;label&quot;&gt;_Destination&lt;/pro"
+"perty&gt;\n"
+"            &lt;signal handler=&quot;destination_browse_clicked_cb&quot"
+"; name=&quot;activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;preferences&q"
+"uot;&gt;\n"
+"            &lt;property name=&quot;stock_id&quot;&gt;gtk-preferences&l"
+"t;/property&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;preferences&lt;/prope"
+"rty&gt;\n"
+"            &lt;signal handler=&quot;prefs_dialog_cb&quot; name=&quot;a"
+"ctivate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;quit1&quot;&g"
+"t;\n"
+"            &lt;property name=&quot;stock_id&quot;&gt;gtk-quit&lt;/prop"
+"erty&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;quit1&lt;/property&gt"
+";\n"
+"            &lt;signal handler=&quot;on_quit1_activate&quot; name=&quot"
+";activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;menuitem2&quo"
+"t;&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;menuitem2&lt;/propert"
+"y&gt;\n"
+"            &lt;property name=&quot;label&quot; translatable=&quot;yes&"
+"quot;&gt;_Queue&lt;/property&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;queue_add_men"
+"u&quot;&gt;\n"
+"            &lt;property name=&quot;sensitive&quot;&gt;False&lt;/proper"
+"ty&gt;\n"
+"            &lt;property name=&quot;icon-name&quot;&gt;hb-add-queue&lt;"
+"/property&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;queue_add_menu&lt;/pr"
+"operty&gt;\n"
+"            &lt;property name=&quot;label&quot;&gt;_Add Queue&lt;/prope"
+"rty&gt;\n"
+"            &lt;signal handler=&quot;queue_add_clicked_cb&quot; name=&q"
+"uot;activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;queue_start_m"
+"enu&quot;&gt;\n"
+"            &lt;property name=&quot;sensitive&quot;&gt;False&lt;/proper"
+"ty&gt;\n"
+"            &lt;property name=&quot;icon-name&quot;&gt;hb-play&lt;/prop"
+"erty&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;queue_start_menu&lt;/"
+"property&gt;\n"
+"            &lt;property name=&quot;label&quot;&gt;_Start Queue&lt;/pro"
+"perty&gt;\n"
+"            &lt;signal handler=&quot;queue_start_clicked_cb&quot; name="
+"&quot;activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;queue_pause_m"
+"enu&quot;&gt;\n"
+"            &lt;property name=&quot;sensitive&quot;&gt;False&lt;/proper"
+"ty&gt;\n"
+"            &lt;property name=&quot;icon-name&quot;&gt;hb-pause&lt;/pro"
+"perty&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;queue_pause_menu&lt;/"
+"property&gt;\n"
+"            &lt;property name=&quot;label&quot; translatable=&quot;yes&"
+"quot;&gt;_Pause Queue&lt;/property&gt;\n"
+"            &lt;signal handler=&quot;queue_pause_clicked_cb&quot; name="
+"&quot;activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;queue_stop_me"
+"nu&quot;&gt;\n"
+"            &lt;property name=&quot;sensitive&quot;&gt;False&lt;/proper"
+"ty&gt;\n"
+"            &lt;property name=&quot;icon-name&quot;&gt;hb-stop&lt;/prop"
+"erty&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;queue_stop_menu&lt;/p"
+"roperty&gt;\n"
+"            &lt;property name=&quot;label&quot; translatable=&quot;yes&"
+"quot;&gt;S_top Queue&lt;/property&gt;\n"
+"            &lt;signal handler=&quot;queue_stop_clicked_cb&quot; name=&"
+"quot;activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;menuitem3&quo"
+"t;&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;menuitem3&lt;/propert"
+"y&gt;\n"
+"            &lt;property name=&quot;label&quot; translatable=&quot;yes&"
+"quot;&gt;_View&lt;/property&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkToggleAction&quot; id=&quot;hbfd&qu"
+"ot;&gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;False&lt;/property"
+"&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;hbfd&lt;/property&gt;"
+"\n"
+"            &lt;property name=&quot;label&quot; translatable=&quot;yes&"
+"quot;&gt;HandBrake For _Dumbies&lt;/property&gt;\n"
+"            &lt;signal handler=&quot;hbfd_toggled_cb&quot; name=&quot;t"
+"oggled&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;show_activity"
+"_menu&quot;&gt;\n"
+"            &lt;property name=&quot;icon-name&quot;&gt;hb-activity&lt;/"
+"property&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;show_activity_menu&lt"
+";/property&gt;\n"
+"            &lt;property name=&quot;label&quot; translatable=&quot;yes&"
+"quot;&gt;Show _Activity&lt;/property&gt;\n"
+"            &lt;signal handler=&quot;show_activity_clicked_cb&quot; nam"
+"e=&quot;activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;show_preview_"
+"menu&quot;&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;show_preview_menu&lt;"
+"/property&gt;\n"
+"            &lt;property name=&quot;label&quot; translatable=&quot;yes&"
+"quot;&gt;Show _Preview&lt;/property&gt;\n"
+"            &lt;signal handler=&quot;preview_button_clicked_cb&quot; na"
+"me=&quot;activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;show_queue_me"
+"nu&quot;&gt;\n"
+"            &lt;property name=&quot;icon-name&quot;&gt;hb-queue&lt;/pro"
+"perty&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;show_queue_menu&lt;/p"
+"roperty&gt;\n"
+"            &lt;property name=&quot;label&quot; translatable=&quot;yes&"
+"quot;&gt;Show _Queue&lt;/property&gt;\n"
+"            &lt;signal handler=&quot;show_queue_clicked_cb&quot; name=&"
+"quot;activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;menuitem4&quo"
+"t;&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;menuitem4&lt;/propert"
+"y&gt;\n"
+"            &lt;property name=&quot;label&quot; translatable=&quot;yes&"
+"quot;&gt;_Help&lt;/property&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;about&quot;&g"
+"t;\n"
+"            &lt;property name=&quot;stock_id&quot; translatable=&quot;y"
+"es&quot;&gt;gtk-about&lt;/property&gt;\n"
+"            &lt;property name=&quot;name&quot;&gt;about&lt;/property&gt"
+";\n"
+"            &lt;signal handler=&quot;about_activate_cb&quot; name=&quot"
+";activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkAction&quot; id=&quot;guide&quot;&g"
+"t;\n"
+"            &lt;property name=&quot;name&quot;&gt;guide&lt;/property&gt"
+";\n"
+"            &lt;property name=&quot;label&quot; translatable=&quot;yes&"
+"quot;&gt;_Guide&lt;/property&gt;\n"
+"            &lt;signal handler=&quot;guide_activate_cb&quot; name=&quot"
+";activate&quot;/&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"      &lt;/object&gt;\n"
+"    &lt;/child&gt;\n"
+"    &lt;ui&gt;\n"
+"      &lt;menubar name=&quot;menubar1&quot;&gt;\n"
+"        &lt;menu action=&quot;menuitem1&quot;&gt;\n"
+"          &lt;menuitem action=&quot;source1&quot;/&gt;\n"
+"          &lt;menuitem action=&quot;destination1&quot;/&gt;\n"
+"          &lt;separator/&gt;\n"
+"          &lt;menuitem action=&quot;preferences&quot;/&gt;\n"
+"          &lt;separator/&gt;\n"
+"          &lt;menuitem action=&quot;quit1&quot;/&gt;\n"
+"        &lt;/menu&gt;\n"
+"        &lt;menu action=&quot;menuitem2&quot;&gt;\n"
+"          &lt;menuitem action=&quot;queue_add_menu&quot;/&gt;\n"
+"          &lt;menuitem action=&quot;queue_start_menu&quot;/&gt;\n"
+"          &lt;menuitem action=&quot;queue_pause_menu&quot;/&gt;\n"
+"          &lt;menuitem action=&quot;queue_stop_menu&quot;/&gt;\n"
+"        &lt;/menu&gt;\n"
+"        &lt;menu action=&quot;menuitem3&quot;&gt;\n"
+"          &lt;menuitem action=&quot;hbfd&quot;/&gt;\n"
+"          &lt;menuitem action=&quot;show_activity_menu&quot;/&gt;\n"
+"          &lt;menuitem action=&quot;show_preview_menu&quot;/&gt;\n"
+"          &lt;menuitem action=&quot;show_queue_menu&quot;/&gt;\n"
+"        &lt;/menu&gt;\n"
+"        &lt;menu action=&quot;menuitem4&quot;&gt;\n"
+"          &lt;menuitem action=&quot;about&quot;/&gt;\n"
+"          &lt;menuitem action=&quot;guide&quot;/&gt;\n"
+"        &lt;/menu&gt;\n"
+"      &lt;/menubar&gt;\n"
+"    &lt;/ui&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkWindow&quot; id=&quot;hb_window&quot;&gt;\n"
+"    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;\n"
+"    &lt;property name=&quot;title&quot; translatable=&quot;yes&quot;&gt"
+";HandBrake&lt;/property&gt;\n"
+"    &lt;property name=&quot;default_width&quot;&gt;500&lt;/property&gt;"
+"\n"
+"    &lt;property name=&quot;default_height&quot;&gt;400&lt;/property&gt"
+";\n"
+"    &lt;property name=&quot;icon_name&quot;&gt;hb-icon&lt;/property&gt;"
+"\n"
+"    &lt;signal handler=&quot;window_destroy_event_cb&quot; name=&quot;d"
+"estroy_event&quot;/&gt;\n"
+"    &lt;signal handler=&quot;window_delete_event_cb&quot; name=&quot;de"
+"lete_event&quot;/&gt;\n"
+"    &lt;child&gt;\n"
+"      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox1&quot;&gt;\n"
+"        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;\n"
+"        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK"
+" | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RE"
+"LEASE_MASK&lt;/property&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox1&quot;&gt;"
+"\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox2&quot;"
+"&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkMenuBar&quot; constructor=&"
+"quot;uimanager1&quot; id=&quot;menubar1&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;fill&quot;&gt;False&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox3&q"
+"uot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkToolbar&quot; id=&quot;"
+"toolbar1&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;toolbar_style&quot;&gt;"
+"GTK_TOOLBAR_BOTH&lt;/property&gt;\n"
+"                        &lt;property name=&quot;icon_size&quot;&gt;GTK_"
+"ICON_SIZE_DND&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkToolButton&quot; id"
+"=&quot;toolbutton1&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip-text&quot; "
+"translatable=&quot;yes&quot;&gt;Choose Video Source&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Source&lt;/property&gt;\n"
+"                            &lt;property name=&quot;icon_name&quot;&gt;"
+"hb-source&lt;/property&gt;\n"
+"                            &lt;signal handler=&quot;source_button_clic"
+"ked_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkToolButton&quot; id"
+"=&quot;queue_start1&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;sensitive&quot;&gt;"
+"False&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip-text&quot; "
+"translatable=&quot;yes&quot;&gt;Start Encoding&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Start&lt;/property&gt;\n"
+"                            &lt;property name=&quot;icon_name&quot;&gt;"
+"hb-play&lt;/property&gt;\n"
+"                            &lt;signal handler=&quot;queue_start_clicke"
+"d_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkToolButton&quot; id"
+"=&quot;queue_pause1&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;sensitive&quot;&gt;"
+"False&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip-text&quot; "
+"translatable=&quot;yes&quot;&gt;Pause Encoding&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Pause&lt;/property&gt;\n"
+"                            &lt;property name=&quot;icon_name&quot;&gt;"
+"hb-pause&lt;/property&gt;\n"
+"                            &lt;signal handler=&quot;queue_pause_clicke"
+"d_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkToolButton&quot; id"
+"=&quot;queue_add&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;sensitive&quot;&gt;"
+"False&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip-text&quot; "
+"translatable=&quot;yes&quot;&gt;Add to Queue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Add to Queue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;icon_name&quot;&gt;"
+"hb-add-queue&lt;/property&gt;\n"
+"                            &lt;signal handler=&quot;queue_add_clicked_"
+"cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkToolButton&quot; id"
+"=&quot;show_queue&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip-text&quot; "
+"translatable=&quot;yes&quot;&gt;Show Queue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Show Queue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;icon_name&quot;&gt;"
+"hb-queue&lt;/property&gt;\n"
+"                            &lt;signal handler=&quot;show_queue_clicked"
+"_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkToolButton&quot; id"
+"=&quot;show_activity&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip-text&quot; "
+"translatable=&quot;yes&quot;&gt;Show Activity Window&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Activity Window&lt;/property&gt;\n"
+"                            &lt;property name=&quot;icon_name&quot;&gt;"
+"hb-activity&lt;/property&gt;\n"
+"                            &lt;signal handler=&quot;show_activity_clic"
+"ked_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbo"
+"x48&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;placeholder/&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;placeholder/&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkCheckButton&quot; i"
+"d=&quot;show_presets&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip-text&quot; "
+"translatable=&quot;yes&quot;&gt;Show/Hide the presets list&lt;/property"
+"&gt;\n"
+"                            &lt;property name=&quot;relief&quot;&gt;GTK"
+"_RELIEF_NONE&lt;/property&gt;\n"
+"                            &lt;property name=&quot;active&quot;&gt;Tru"
+"e&lt;/property&gt;\n"
+"                            &lt;property name=&quot;draw_indicator&quot"
+";&gt;True&lt;/property&gt;\n"
+"                            &lt;signal handler=&quot;show_presets_toggl"
+"ed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkImage&quot; id="
+"&quot;drawerimage&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;icon_size&quot;"
+"&gt;5&lt;/property&gt;\n"
+"                                &lt;property name=&quot;icon_name&quot;"
+"&gt;hb-drawer&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;2"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                      &lt;packing&gt;\n"
+"                        &lt;property name=&quot;expand&quot;&gt;False&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;position&quot;&gt;1&lt;"
+"/property&gt;\n"
+"                      &lt;/packing&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;fill&quot;&gt;False&lt;/pro"
+"perty&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;1&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkFrame&quot; id=&quot;frame1"
+"&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;label_xalign&quot;&gt;0&lt;"
+"/property&gt;\n"
+"                    &lt;property name=&quot;shadow_type&quot;&gt;GTK_SH"
+"ADOW_NONE&lt;/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkAlignment&quot; id=&quo"
+"t;alignment1&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;left_padding&quot;&gt;1"
+"2&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkVBox&quot; id=&quot"
+";vbox3&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkHBox&quot; id=&"
+"quot;hbox2&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;spacing&quot;&g"
+"t;5&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;source_title&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;xalign&quot"
+";&gt;0&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;Source Title&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkHBox&quot; id=&"
+"quot;hbox5&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;spacing&quot;&g"
+"t;4&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;label3&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;Title&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;expand&quot"
+";&gt;False&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;fill&quot;&"
+"gt;False&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkComboBox&qu"
+"ot; id=&quot;title&quot;&gt;\n"
+"                                    &lt;property name=&quot;width_reque"
+"st&quot;&gt;150&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;has_frame&q"
+"uot;&gt;False&lt;/property&gt;\n"
+"                                    &lt;signal handler=&quot;title_chan"
+"ged_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;expand&quot"
+";&gt;False&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;1&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkAlignment&q"
+"uot; id=&quot;chapter_box&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;xscale&quot"
+";&gt;0&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox4&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label4&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Chapters&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;fil"
+"l&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkSpi"
+"nButton&quot; id=&quot;start_chapter&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;adj"
+"ustment&quot;&gt;adjustment1&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;st"
+"art_chapter_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label5&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt; thru &lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;fil"
+"l&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;2&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkSpi"
+"nButton&quot; id=&quot;end_chapter&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;adj"
+"ustment&quot;&gt;adjustment2&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;en"
+"d_chapter_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;3&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;2&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkAlignment&q"
+"uot; id=&quot;alignment41&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;xalign&quot"
+";&gt;1&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;xscale&quot"
+";&gt;0&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox42&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;spacing"
+"&quot;&gt;7&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label6&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0.10000000149011612&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Duration:&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;fil"
+"l&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;title_duration&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;hh:mm:ss&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;10&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;3&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;position&quot;&"
+"gt;1&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                    &lt;child type=&quot;label&quot;&gt;\n"
+"                      &lt;object class=&quot;GtkLabel&quot; id=&quot;la"
+"bel7&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;label&quot; translatabl"
+"e=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Source&amp;lt;/b&amp;gt;&lt;/prop"
+"erty&gt;\n"
+"                        &lt;property name=&quot;use_markup&quot;&gt;Tru"
+"e&lt;/property&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;2&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkHSeparator&quot; id=&quot;h"
+"separator1&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;3&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkFrame&quot; id=&quot;frame2"
+"&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;label_xalign&quot;&gt;0&lt;"
+"/property&gt;\n"
+"                    &lt;property name=&quot;shadow_type&quot;&gt;GTK_SH"
+"ADOW_NONE&lt;/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkAlignment&quot; id=&quo"
+"t;alignment3&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;left_padding&quot;&gt;1"
+"2&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkVBox&quot; id=&quot"
+";vbox4&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkHBox&quot; id=&"
+"quot;hbox6&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;label8&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;File:&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;expand&quot"
+";&gt;False&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;fill&quot;&"
+"gt;False&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkEntry&quot;"
+" id=&quot;destination&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;can_focus&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;tooltip-tex"
+"t&quot; translatable=&quot;yes&quot;&gt;Destination path with file name"
+" for output.&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;width_chars"
+"&quot;&gt;41&lt;/property&gt;\n"
+"                                    &lt;signal handler=&quot;destinatio"
+"n_entry_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                    &lt;signal handler=&quot;destinatio"
+"n_grab_cb&quot; name=&quot;grab-focus&quot; after=&quot;yes&quot;/&gt;\n"
+"                                    &lt;accelerator key=&quot;d&quot; s"
+"ignal=&quot;grab-focus&quot; modifiers=&quot;GDK_MOD1_MASK&quot;/&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;1&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkButton&quot"
+"; id=&quot;destination_browse&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;can_focus&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;relief&quot"
+";&gt;GTK_RELIEF_NONE&lt;/property&gt;\n"
+"                                    &lt;signal handler=&quot;destinatio"
+"n_browse_clicked_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkAlignme"
+"nt&quot; id=&quot;alignment4&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;xscale&"
+"quot;&gt;0&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;yscale&"
+"quot;&gt;0&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkHBo"
+"x&quot; id=&quot;hbox7&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;spa"
+"cing&quot;&gt;2&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kImage&quot; id=&quot;image2&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";stock&quot;&gt;gtk-open&lt;/property&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                              &lt;packing&gt;\n"
+"                                                &lt;property name=&quot"
+";expand&quot;&gt;False&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";fill&quot;&gt;False&lt;/property&gt;\n"
+"                                              &lt;/packing&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kLabel&quot; id=&quot;label9&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";label&quot; translatable=&quot;yes&quot;&gt;Browse&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";use_underline&quot;&gt;True&lt;/property&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                              &lt;packing&gt;\n"
+"                                                &lt;property name=&quot"
+";expand&quot;&gt;False&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";fill&quot;&gt;False&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";position&quot;&gt;1&lt;/property&gt;\n"
+"                                              &lt;/packing&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;expand&quot"
+";&gt;False&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;fill&quot;&"
+"gt;False&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;2&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkHBox&quot; id=&"
+"quot;container_box&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;spacing&quot;&g"
+"t;8&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;label10&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;Container:&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;expand&quot"
+";&gt;False&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;fill&quot;&"
+"gt;False&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkComboBox&qu"
+"ot; id=&quot;FileFormat&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;tooltip-tex"
+"t&quot; translatable=&quot;yes&quot;&gt;Output file container type&lt;/"
+"property&gt;\n"
+"                                    &lt;signal handler=&quot;container_"
+"changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;expand&quot"
+";&gt;False&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;1&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkAlignment&q"
+"uot; id=&quot;alignment39&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;xalign&quot"
+";&gt;0.10000000149011612&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;xscale&quot"
+";&gt;0&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;Mp4iPodCompatible&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;iPod 5G Support&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;settin"
+"g_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;expand&quot"
+";&gt;False&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;2&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkCheckButton"
+"&quot; id=&quot;Mp4HttpOptimize&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;can_focus&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;Web optimized&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;tooltip-tex"
+"t&quot; translatable=&quot;yes&quot;&gt;Tunes the MP4 to be better suit"
+"ed for streaming&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;draw_indica"
+"tor&quot;&gt;True&lt;/property&gt;\n"
+"                                    &lt;signal handler=&quot;http_opt_c"
+"hanged_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;expand&quot"
+";&gt;False&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;3&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkCheckButton"
+"&quot; id=&quot;Mp4LargeFile&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;can_focus&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;tooltip-tex"
+"t&quot; translatable=&quot;yes&quot;&gt;Caution: This option will likel"
+"y break device compatiblity with all but the AppleTV Take 2. Checking t"
+"his box enables a 64 bit mp4 file which can be over 4 GB.&lt;/property&"
+"gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;Large file size (&amp;gt;4GB)&lt;/prop"
+"erty&gt;\n"
+"                                    &lt;property name=&quot;draw_indica"
+"tor&quot;&gt;True&lt;/property&gt;\n"
+"                                    &lt;signal handler=&quot;setting_wi"
+"dget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;4&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;position&quot;&"
+"gt;1&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                    &lt;child type=&quot;label&quot;&gt;\n"
+"                      &lt;object class=&quot;GtkLabel&quot; id=&quot;la"
+"bel11&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;label&quot; translatabl"
+"e=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;D&amp;lt;/u&amp;"
+"gt;estination&amp;lt;/b&amp;gt;&lt;/property&gt;\n"
+"                        &lt;property name=&quot;use_markup&quot;&gt;Tru"
+"e&lt;/property&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;4&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkHSeparator&quot; id=&quot;h"
+"separator2&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;5&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkNotebook&quot; id=&quot;setting"
+"s_box&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkHBox&quot; id=&quot;picture"
+"_tab&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;property name=&quot;spacing&quot;&gt;3&lt;/prop"
+"erty&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbo"
+"x5&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;frame5&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignment9&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;top_padding&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;bottom_padding&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkVBox&quot; "
+"id=&quot;vbox11&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox14&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label23&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Dimenstions:&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;source_dimensions&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox15&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label24&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Aspect: &lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;source_aspect&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;1&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox16&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label25&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Frame Rate:&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;source_frame_rate&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label26&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Source Picture Parameters"
+"&amp;lt;/b&amp;gt;&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;padding&quot;&gt;2&"
+"lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;Cropping1&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignment5&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;top_padding&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;bottom_padding&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;property name=&quot;right_padding&q"
+"uot;&gt;2&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkVBox&quot; "
+"id=&quot;vbox6&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox54&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label13&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Autocrop:&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;crop_auto&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;On&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox55&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label12&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Crop:&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;crop_values&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;1&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox10&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label76&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Crop Dimensions:&lt;/property&"
+"gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;crop_dimensions&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label16&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Cropping&amp;lt;/b&amp;gt"
+";&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;padding&quot;&gt;2&"
+"lt;/property&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;1"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkVBox&quot; id=&quot"
+";vbox7&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkFrame&quot; id="
+"&quot;frame3&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label_xalign&qu"
+"ot;&gt;0&lt;/property&gt;\n"
+"                                &lt;property name=&quot;shadow_type&quo"
+"t;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkAlignment&q"
+"uot; id=&quot;alignment7&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;top_padding"
+"&quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;bottom_padd"
+"ing&quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;left_paddin"
+"g&quot;&gt;12&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;right_paddi"
+"ng&quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkVBox&qu"
+"ot; id=&quot;vbox8&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkHBo"
+"x&quot; id=&quot;hbox11&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kLabel&quot; id=&quot;label14&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";xalign&quot;&gt;0&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";label&quot; translatable=&quot;yes&quot;&gt;Scale Dimensions:&lt;/prop"
+"erty&gt;\n"
+"                                                &lt;property name=&quot"
+";width_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                              &lt;packing&gt;\n"
+"                                                &lt;property name=&quot"
+";expand&quot;&gt;False&lt;/property&gt;\n"
+"                                              &lt;/packing&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kLabel&quot; id=&quot;scale_dimensions&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";label&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                              &lt;packing&gt;\n"
+"                                                &lt;property name=&quot"
+";position&quot;&gt;1&lt;/property&gt;\n"
+"                                              &lt;/packing&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkHBo"
+"x&quot; id=&quot;hbox26&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kLabel&quot; id=&quot;label15&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";xalign&quot;&gt;0&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";label&quot; translatable=&quot;yes&quot;&gt;Optimal for Source:&lt;/pr"
+"operty&gt;\n"
+"                                                &lt;property name=&quot"
+";width_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                              &lt;packing&gt;\n"
+"                                                &lt;property name=&quot"
+";expand&quot;&gt;False&lt;/property&gt;\n"
+"                                              &lt;/packing&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kLabel&quot; id=&quot;scale_auto&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";label&quot; translatable=&quot;yes&quot;&gt;On&lt;/property&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                              &lt;packing&gt;\n"
+"                                                &lt;property name=&quot"
+";position&quot;&gt;1&lt;/property&gt;\n"
+"                                              &lt;/packing&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkHBo"
+"x&quot; id=&quot;hbox27&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kLabel&quot; id=&quot;label17&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";xalign&quot;&gt;0&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";label&quot; translatable=&quot;yes&quot;&gt;Anamorphic:&lt;/property&g"
+"t;\n"
+"                                                &lt;property name=&quot"
+";width_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                              &lt;packing&gt;\n"
+"                                                &lt;property name=&quot"
+";expand&quot;&gt;False&lt;/property&gt;\n"
+"                                              &lt;/packing&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kLabel&quot; id=&quot;scale_anamorphic&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";label&quot; translatable=&quot;yes&quot;&gt;On&lt;/property&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                              &lt;packing&gt;\n"
+"                                                &lt;property name=&quot"
+";position&quot;&gt;1&lt;/property&gt;\n"
+"                                              &lt;/packing&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;2&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child type=&quot;label&quot;&gt;\n"
+"                                  &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;label19&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Scaling&amp;lt;/b&amp"
+";gt;&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;use_markup&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;expand&quot;&gt"
+";False&lt;/property&gt;\n"
+"                                &lt;property name=&quot;padding&quot;&g"
+"t;2&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;2"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbo"
+"x9&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;frame4&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignment8&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;top_padding&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;bottom_padding&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkVBox&quot; "
+"id=&quot;vbox10&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;VideoGrayScale&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;This filter removes the col"
+"or components of the picture.&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;Grayscale&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;settin"
+"g_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;0&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;PictureDetelecine&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;Remove interlacing artifact"
+"s caused by the telecine process often applied to movies.&lt;/property&"
+"gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;Detelecine&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;settin"
+"g_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                        &lt;signal handler=&quot;tweak_"
+"setting_cb&quot; name=&quot;button-press-event&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;1&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;expand&"
+"quot;&gt;False&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;PictureDecomb&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;Decomb is a selective deint"
+"erlacer. It will only deinterlace frames that appear to need it. It gen"
+"erally produces better quality than the normal deinterlacer.&lt;/proper"
+"ty&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;De-Comb&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;active&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;settin"
+"g_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                        &lt;signal handler=&quot;tweak_"
+"setting_cb&quot; name=&quot;button-press-event&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;expand&"
+"quot;&gt;False&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox25&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label41&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Deblock:&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;10&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment20&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0.55&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kHScale&quot; id=&quot;PictureDeblock&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";can_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";tooltip-text&quot; translatable=&quot;yes&quot;&gt;This is a filter th"
+"at gets applied before encoding.  If the source looks blocky before enc"
+"oding, you may want to use this.&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";adjustment&quot;&gt;adjustment20&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";digits&quot;&gt;0&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";value_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;setting_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;format_deblock_cb&quot; name=&quot;format-value&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;3&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox12&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label20&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;sel"
+"ectable&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Deinterlace:&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;10&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkCom"
+"boBox&quot; id=&quot;PictureDeinterlace&quot;&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_request&quot;&gt;100&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;Removes interlacing artifac"
+"ts. Since deinterlacing degrades picture quality, leave it off unless y"
+"ou know you need it.&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;se"
+"tting_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                            &lt;signal handler=&quot;tw"
+"eak_setting_cb&quot; name=&quot;button-press-event&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkCom"
+"boBoxEntry&quot; id=&quot;tweak_PictureDeinterlace&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;se"
+"tting_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                            &lt;child internal-child=&q"
+"uot;entry&quot;&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kEntry&quot; id=&quot;comboboxentry-entry1&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";can_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";width_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;deint_tweak_focus_out_cb&quot; name=&quot;focus_out_event&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;2&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;expand&"
+"quot;&gt;False&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;padding"
+"&quot;&gt;2&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;4&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox13&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label21&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;sel"
+"ectable&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Denoise:&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;10&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkCom"
+"boBox&quot; id=&quot;PictureDenoise&quot;&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_request&quot;&gt;100&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;This filter removes noise o"
+"r grain from the picture.&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;se"
+"tting_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                            &lt;signal handler=&quot;tw"
+"eak_setting_cb&quot; name=&quot;button-press-event&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkCom"
+"boBoxEntry&quot; id=&quot;tweak_PictureDenoise&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;se"
+"tting_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                            &lt;child internal-child=&q"
+"uot;entry&quot;&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kEntry&quot; id=&quot;comboboxentry-entry2&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";can_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";width_chars&quot;&gt;15&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;denoise_tweak_focus_out_cb&quot; name=&quot;focus_out_event&quot;/&gt"
+";\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;2&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;expand&"
+"quot;&gt;False&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;padding"
+"&quot;&gt;2&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;5&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label22&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Picture Cleanup&amp;lt;/b"
+"&amp;gt;&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;padding&quot;&gt;2&"
+"lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkVBox&quot; id=&quot"
+";vbox16&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkHBox&quot; id=&"
+"quot;hbox56&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;label69&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;xalign&quot"
+";&gt;0.75999999046325684&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;yalign&quot"
+";&gt;1&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Preview:&amp;lt;/b&am"
+"p;gt;&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;use_markup&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;preview_dims&quot;&gt;\n"
+"                                    &lt;property name=&quot;width_reque"
+"st&quot;&gt;85&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;xalign&quot"
+";&gt;0.20999999344348907&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;yalign&quot"
+";&gt;0&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;--&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;1&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;1"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkHBox&quot; id=&quot"
+";hbox35&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkButton&quot; id"
+"=&quot;preview_button&quot;&gt;\n"
+"                                &lt;property name=&quot;width_request&q"
+"uot;&gt;118&lt;/property&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;can_focus&quot;"
+"&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;receives_defaul"
+"t&quot;&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;tooltip-text&qu"
+"ot; translatable=&quot;yes&quot;&gt;Open the full size preview&lt;/prop"
+"erty&gt;\n"
+"                                &lt;property name=&quot;relief&quot;&gt"
+";GTK_RELIEF_HALF&lt;/property&gt;\n"
+"                                &lt;signal handler=&quot;preview_button"
+"_clicked_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                                &lt;signal handler=&quot;preview_button"
+"_size_allocate_cb&quot; name=&quot;size_allocate&quot;/&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkHBox&quot; "
+"id=&quot;hbox49&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkImage&q"
+"uot; id=&quot;preview_button_image&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;icon_si"
+"ze&quot;&gt;6&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;icon_na"
+"me&quot;&gt;hb-icon&lt;/property&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;2"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                      &lt;packing&gt;\n"
+"                        &lt;property name=&quot;position&quot;&gt;1&lt;"
+"/property&gt;\n"
+"                      &lt;/packing&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child type=&quot;tab&quot;&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;pictur"
+"e_label&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;Picture&lt;/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;tab_fill&quot;&gt;False&lt;"
+"/property&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox17&"
+"quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbo"
+"x12&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;Encoding1&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignment10&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;top_padding&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;bottom_padding&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkVBox&quot; "
+"id=&quot;vbox13&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;spacing&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox18&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label28&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Video Codec:&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;11&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment11&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kComboBox&quot; id=&quot;VideoEncoder&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;vcodec_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pad"
+"ding&quot;&gt;4&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;expand&"
+"quot;&gt;False&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox19&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label29&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Framerate:&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;11&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment12&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kComboBox&quot; id=&quot;VideoFramerate&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;setting_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pad"
+"ding&quot;&gt;4&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;expand&"
+"quot;&gt;False&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;1&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;VideoTwoPass&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;2-Pass Encoding&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;settin"
+"g_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkAlignme"
+"nt&quot; id=&quot;alignment13&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;xscale&"
+"quot;&gt;0.23999999463558197&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkChe"
+"ckButton&quot; id=&quot;VideoTurboTwoPass&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Turbo First Pass&lt;/property&"
+"gt;\n"
+"                                            &lt;property name=&quot;act"
+"ive&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;dra"
+"w_indicator&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;se"
+"tting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;3&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;placeholder/&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label30&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Encoding&amp;lt;/b&amp;gt"
+";&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;padding&quot;&gt;2&"
+"lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;placeholder/&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                      &lt;packing&gt;\n"
+"                        &lt;property name=&quot;expand&quot;&gt;False&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;padding&quot;&gt;4&lt;/"
+"property&gt;\n"
+"                      &lt;/packing&gt;\n"
+"                    &lt;/child&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbo"
+"x14&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;frame6&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignment14&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;top_padding&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;bottom_padding&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkVBox&quot; "
+"id=&quot;vbox15&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox20&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkRad"
+"ioButton&quot; id=&quot;vquality_type_bitrate&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Bitrate (kbps):    &lt;/proper"
+"ty&gt;\n"
+"                                            &lt;property name=&quot;dra"
+"w_indicator&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;se"
+"tting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment15&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0.11999999731779099&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0.10000000149011612&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kSpinButton&quot; id=&quot;VideoAvgBitrate&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";can_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";adjustment&quot;&gt;adjustment3&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;setting_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox21&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkRad"
+"ioButton&quot; id=&quot;vquality_type_target&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Target Size (MB):&lt;/property"
+"&gt;\n"
+"                                            &lt;property name=&quot;dra"
+"w_indicator&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;gro"
+"up&quot;&gt;vquality_type_bitrate&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;ta"
+"rget_size_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment16&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0.11999999731779099&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0.10000000149011612&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kSpinButton&quot; id=&quot;VideoTargetSize&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";can_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";adjustment&quot;&gt;adjustment4&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;target_size_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;1&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox22&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkRad"
+"ioButton&quot; id=&quot;vquality_type_constant&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Quality:&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;act"
+"ive&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;dra"
+"w_indicator&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;gro"
+"up&quot;&gt;vquality_type_target&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;se"
+"tting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkHSc"
+"ale&quot; id=&quot;VideoQualitySlider&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;adj"
+"ustment&quot;&gt;adjustment5&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;dig"
+"its&quot;&gt;3&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;val"
+"ue_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;se"
+"tting_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                            &lt;signal handler=&quot;fo"
+"rmat_vquality_cb&quot; name=&quot;format-value&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkAlignme"
+"nt&quot; id=&quot;alignment17&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;xscale&"
+"quot;&gt;0.8399999737739563&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkChe"
+"ckButton&quot; id=&quot;constant_rate_factor&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Constant Rate Factor&lt;/prope"
+"rty&gt;\n"
+"                                            &lt;property name=&quot;act"
+"ive&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;dra"
+"w_indicator&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;se"
+"tting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;3&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label31&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Quality&amp;lt;/b&amp;gt;"
+"&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;padding&quot;&gt;2&"
+"lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;placeholder/&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                      &lt;packing&gt;\n"
+"                        &lt;property name=&quot;padding&quot;&gt;2&lt;/"
+"property&gt;\n"
+"                        &lt;property name=&quot;position&quot;&gt;1&lt;"
+"/property&gt;\n"
+"                      &lt;/packing&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child type=&quot;tab&quot;&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label3"
+"2&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;Video&lt;/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;1&lt;/pro"
+"perty&gt;\n"
+"                    &lt;property name=&quot;tab_fill&quot;&gt;False&lt;"
+"/property&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkVBox&quot; id=&quot;audio_t"
+"ab&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkFrame&quot; id=&quot;fr"
+"ame7&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;property name=&quot;label_xalign&quot;&gt;0"
+"&lt;/property&gt;\n"
+"                        &lt;property name=&quot;shadow_type&quot;&gt;GT"
+"K_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkAlignment&quot; id="
+"&quot;alignment18&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;top_padding&quot;&g"
+"t;2&lt;/property&gt;\n"
+"                            &lt;property name=&quot;bottom_padding&quot"
+";&gt;2&lt;/property&gt;\n"
+"                            &lt;property name=&quot;left_padding&quot;&"
+"gt;12&lt;/property&gt;\n"
+"                            &lt;property name=&quot;right_padding&quot;"
+"&gt;2&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkVBox&quot; id=&"
+"quot;vbox17&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;spacing&quot;&g"
+"t;2&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkHBox&quot; "
+"id=&quot;hbox23&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;spacing&quo"
+"t;&gt;5&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkButton&"
+"quot; id=&quot;audio_add&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;receive"
+"s_default&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;Add new audio settings to t"
+"he list&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;relief&"
+"quot;&gt;GTK_RELIEF_NONE&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;audio_"
+"add_clicked_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkIma"
+"ge&quot; id=&quot;image4&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;sto"
+"ck&quot;&gt;gtk-add&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;expand&"
+"quot;&gt;False&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkButton&"
+"quot; id=&quot;audio_remove&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;receive"
+"s_default&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;Remove the selected audio s"
+"ettings&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;relief&"
+"quot;&gt;GTK_RELIEF_NONE&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;audio_"
+"remove_clicked_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkIma"
+"ge&quot; id=&quot;image8&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;sto"
+"ck&quot;&gt;gtk-remove&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;expand&"
+"quot;&gt;False&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;1&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkAlignme"
+"nt&quot; id=&quot;alignment42&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;xalign&"
+"quot;&gt;0.98000001907348633&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;xscale&"
+"quot;&gt;0.40000000596046448&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkVBo"
+"x&quot; id=&quot;vbox18&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kLabel&quot; id=&quot;label2&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";label&quot; translatable=&quot;yes&quot;&gt;Dynamic Range Compression&"
+"lt;/property&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kHScale&quot; id=&quot;AudioTrackDRCSlider&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";can_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";adjustment&quot;&gt;adjustment6&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";restrict_to_fill_level&quot;&gt;False&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";fill_level&quot;&gt;3823.35009765625&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";value_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;audio_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                              &lt;packing&gt;\n"
+"                                                &lt;property name=&quot"
+";position&quot;&gt;1&lt;/property&gt;\n"
+"                                              &lt;/packing&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;expand&quot"
+";&gt;False&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkTable&quot;"
+" id=&quot;table2&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;n_rows&quot"
+";&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;n_columns&q"
+"uot;&gt;5&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkComboBo"
+"x&quot; id=&quot;AudioTrack&quot;&gt;\n"
+"                                        &lt;property name=&quot;width_r"
+"equest&quot;&gt;215&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;audio_"
+"track_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;top_att"
+"ach&quot;&gt;1&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;bottom_"
+"attach&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkComboBo"
+"x&quot; id=&quot;AudioEncoder&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;audio_"
+"codec_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;left_at"
+"tach&quot;&gt;1&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;right_a"
+"ttach&quot;&gt;2&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;top_att"
+"ach&quot;&gt;1&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;bottom_"
+"attach&quot;&gt;2&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;x_optio"
+"ns&quot;&gt;GTK_FILL&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkComboBo"
+"x&quot; id=&quot;AudioSamplerate&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;audio_"
+"widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;left_at"
+"tach&quot;&gt;3&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;right_a"
+"ttach&quot;&gt;4&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;top_att"
+"ach&quot;&gt;1&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;bottom_"
+"attach&quot;&gt;2&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;x_optio"
+"ns&quot;&gt;GTK_FILL&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkLabel&q"
+"uot; id=&quot;label35&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;Track&lt;/property&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;x_optio"
+"ns&quot;&gt;GTK_FILL&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkLabel&q"
+"uot; id=&quot;label36&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;Codec&lt;/property&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;left_at"
+"tach&quot;&gt;1&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;right_a"
+"ttach&quot;&gt;2&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;x_optio"
+"ns&quot;&gt;GTK_FILL&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;x_paddi"
+"ng&quot;&gt;12&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkLabel&q"
+"uot; id=&quot;label37&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;Bitrate&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;justify"
+"&quot;&gt;GTK_JUSTIFY_CENTER&lt;/property&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;left_at"
+"tach&quot;&gt;2&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;right_a"
+"ttach&quot;&gt;3&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;x_optio"
+"ns&quot;&gt;GTK_FILL&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;x_paddi"
+"ng&quot;&gt;10&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkLabel&q"
+"uot; id=&quot;label38&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;Sample Rate&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;justify"
+"&quot;&gt;GTK_JUSTIFY_CENTER&lt;/property&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;left_at"
+"tach&quot;&gt;3&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;right_a"
+"ttach&quot;&gt;4&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;x_optio"
+"ns&quot;/&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkLabel&q"
+"uot; id=&quot;label39&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;Mix&lt;/property&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;left_at"
+"tach&quot;&gt;4&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;right_a"
+"ttach&quot;&gt;5&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;x_optio"
+"ns&quot;&gt;GTK_FILL&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkComboBo"
+"x&quot; id=&quot;AudioMixdown&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;audio_"
+"mix_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;left_at"
+"tach&quot;&gt;4&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;right_a"
+"ttach&quot;&gt;5&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;top_att"
+"ach&quot;&gt;1&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;bottom_"
+"attach&quot;&gt;2&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;x_optio"
+"ns&quot;&gt;GTK_FILL&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkComboBo"
+"x&quot; id=&quot;AudioBitrate&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;audio_"
+"widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;left_at"
+"tach&quot;&gt;2&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;right_a"
+"ttach&quot;&gt;3&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;top_att"
+"ach&quot;&gt;1&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;bottom_"
+"attach&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;expand&quot"
+";&gt;False&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;1&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkTreeView&qu"
+"ot; id=&quot;audio_list&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;can_focus&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;headers_cli"
+"ckable&quot;&gt;True&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;position&qu"
+"ot;&gt;2&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child type=&quot;label&quot;&gt;\n"
+"                          &lt;object class=&quot;GtkLabel&quot; id=&quo"
+"t;label40&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Encoding&amp;lt;/b&amp;gt;&lt"
+";/property&gt;\n"
+"                            &lt;property name=&quot;use_markup&quot;&gt"
+";True&lt;/property&gt;\n"
+"                          &lt;/object&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbo"
+"xj01&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;property name=&quot;spacing&quot;&gt;5&lt;/"
+"property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;framej01&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignmentj01&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;top_padding&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;bottom_padding&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;property name=&quot;right_padding&q"
+"uot;&gt;2&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkHBox&quot; "
+"id=&quot;hboxj02&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;spacing&quo"
+"t;&gt;5&lt;/property&gt;\n"
+"\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkComboBo"
+"x&quot; id=&quot;SourceAudioLang&quot;&gt;\n"
+"                                        &lt;property name=&quot;width_r"
+"equest&quot;&gt;150&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;settin"
+"g_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;labelj01&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Preferred Audio Language&"
+"amp;lt;/b&amp;gt;&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;framej02&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignmentj02&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;top_padding&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;bottom_padding&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;property name=&quot;right_padding&q"
+"uot;&gt;2&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkHBox&quot; "
+"id=&quot;hboxj03&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;spacing&quo"
+"t;&gt;5&lt;/property&gt;\n"
+"\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkComboBo"
+"x&quot; id=&quot;Subtitles&quot;&gt;\n"
+"                                        &lt;property name=&quot;width_r"
+"equest&quot;&gt;150&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;subtit"
+"le_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;SubtitlesForced&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;has_too"
+"ltip&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;These are subtitles that a "
+"regular DVD player would automatically show.&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;Allow only forced subtitles&lt;/pr"
+"operty&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;settin"
+"g_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;1&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;labelj02&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Subtitles&amp;lt;/b&amp;g"
+"t;&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;1"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                      &lt;packing&gt;\n"
+"                        &lt;property name=&quot;expand&quot;&gt;False&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;position&quot;&gt;3&lt;"
+"/property&gt;\n"
+"                      &lt;/packing&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child type=&quot;tab&quot;&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label4"
+"8&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;Audio/Subtitles&lt;/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;2&lt;/pro"
+"perty&gt;\n"
+"                    &lt;property name=&quot;tab_fill&quot;&gt;False&lt;"
+"/property&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkHBox&quot; id=&quot;x264_ta"
+"b&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;property name=&quot;spacing&quot;&gt;2&lt;/prop"
+"erty&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbo"
+"x21&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;frame9&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignment25&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkVBox&quot; "
+"id=&quot;vbox22&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox31&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label49&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Number:  &lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkSpi"
+"nButton&quot; id=&quot;x264_refs&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;too"
+"ltip-text&quot; translatable=&quot;yes&quot;&gt;Selects the number of r"
+"eference frames that can be used. Slows down encoding.  Good typical va"
+"lues are 3 to 5. Animation can benefit from more (8 to 10).&lt;/propert"
+"y&gt;\n"
+"                                            &lt;property name=&quot;adj"
+"ustment&quot;&gt;adjustment8&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;x2"
+"64_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;x264_mixed_refs&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;This option allows x264 to "
+"have greater control over reference frames.  Improves quality, but slow"
+"s down encoding. &lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;Mixed References&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;active&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;x264_w"
+"idget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;expand&"
+"quot;&gt;False&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;1&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label50&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Reference Frames&amp;lt;/"
+"b&amp;gt;&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;padding&quot;&gt;2&"
+"lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;frame10&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignment26&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;top_padding&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;bottom_padding&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;property name=&quot;right_padding&q"
+"uot;&gt;2&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkVBox&quot; "
+"id=&quot;vbox24&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;spacing&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox32&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label51&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Number:  &lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;14&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment27&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kSpinButton&quot; id=&quot;x264_bframes&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";can_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";tooltip-text&quot; translatable=&quot;yes&quot;&gt;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.&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";adjustment&quot;&gt;adjustment9&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;x264_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;expand&"
+"quot;&gt;False&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox33&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label52&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Direct Prediction:  &lt;/prope"
+"rty&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;14&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment28&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kComboBox&quot; id=&quot;x264_direct&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";tooltip-text&quot; translatable=&quot;yes&quot;&gt;This option can imp"
+"rove compression efficiency. &lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;x264_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;expand&"
+"quot;&gt;False&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;1&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkTable&q"
+"uot; id=&quot;table8&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;n_rows&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;n_colum"
+"ns&quot;&gt;2&lt;/property&gt;\n"
+"\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;x264_bpyramid&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;Allows B-Frames to be used "
+"as references for other B-Frames. Improves encoding efficiency with lit"
+"tle speed penalty&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;Pyramidal B-Frames&lt;/property&gt"
+";\n"
+"                                        &lt;property name=&quot;active&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;x264_w"
+"idget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;x264_weighted_bframes&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;Turn on weighted prediction"
+" for B-Frames.  Improves compression efficiency and has little speed pe"
+"nalty. &lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;Weighted B-Frames&lt;/property&gt;"
+"\n"
+"                                        &lt;property name=&quot;active&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;x264_w"
+"idget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;left_at"
+"tach&quot;&gt;1&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;right_a"
+"ttach&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label53&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;B-Frames&amp;lt;/b&amp;gt"
+";&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;1"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;frame11&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignment29&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;top_padding&quo"
+"t;&gt;6&lt;/property&gt;\n"
+"                                &lt;property name=&quot;bottom_padding&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;property name=&quot;right_padding&q"
+"uot;&gt;2&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkTextView&qu"
+"ot; id=&quot;x264Option&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;can_focus&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;Your selected options will "
+"appear here. \n"
+"You can edit these and add additional options.  \n"
+"\n"
+"Default values will not be shown. The defaults are:\n"
+"ref=1:mixed-refs=0:bframes=0:direct=spatial:b-pyramid=0:\n"
+"weightb=0:me=hex:merange=16:subme=5:\n"
+"analyse=some:8x8dct=0:deblock=0,0:trellis=0:\n"
+"no-fast-pskip=0:no-dct-decimate=0:cabac=1&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;wrap_mode&q"
+"uot;&gt;GTK_WRAP_CHAR&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;accepts_tab"
+"&quot;&gt;False&lt;/property&gt;\n"
+"                                    &lt;signal handler=&quot;x264_focus"
+"_out_cb&quot; name=&quot;focus_out_event&quot;/&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label54&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Manual Options String&amp"
+";lt;/b&amp;gt;&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Tru"
+"e&lt;/property&gt;\n"
+"                            &lt;property name=&quot;padding&quot;&gt;2&"
+"lt;/property&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;2"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                      &lt;packing&gt;\n"
+"                        &lt;property name=&quot;expand&quot;&gt;True&lt"
+";/property&gt;\n"
+"                      &lt;/packing&gt;\n"
+"                    &lt;/child&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbo"
+"x25&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;frame12&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignment30&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;top_padding&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;bottom_padding&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;property name=&quot;right_padding&q"
+"uot;&gt;2&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkVBox&quot; "
+"id=&quot;vbox26&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;spacing&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox34&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label55&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Method: &lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;14&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment31&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kComboBox&quot; id=&quot;x264_me&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";tooltip-text&quot; translatable=&quot;yes&quot;&gt;This sets the shape"
+" of the area x264 searches when estimating motion. Your choices are a d"
+"iamond, a hexagon, a more complex hexagonal shape, or searching the ent"
+"ire frame. You are best off using Uneven Multi-Hexagonal searching.&lt;"
+"/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;x264_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox36&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label57&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Range: &lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;14&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment32&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kSpinButton&quot; id=&quot;x264_merange&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";can_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";tooltip-text&quot; translatable=&quot;yes&quot;&gt;This range is the r"
+"adius, in pixels, x264 should use for motion estimation searches. It on"
+"ly has an effect when you use Uneven Multi-Hexagonal or Exhaustive sear"
+"ching. 24, 32, and 64 are good values.&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";adjustment&quot;&gt;adjustment10&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;x264_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;1&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox37&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label58&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Subpixel Method:&lt;/property&"
+"gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;14&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment33&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0.05000000074505806&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kComboBox&quot; id=&quot;x264_subme&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";tooltip-text&quot; translatable=&quot;yes&quot;&gt;Determines how moti"
+"on estimation decisions are made. 1 is lowest quality and fastest. 9 is"
+" highest quality and slowest.  5 or 6 are commonly used values.&lt;/pro"
+"perty&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;x264_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox38&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label59&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Analysis:&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;wid"
+"th_chars&quot;&gt;14&lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment34&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kComboBox&quot; id=&quot;x264_analyse&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";tooltip-text&quot; translatable=&quot;yes&quot;&gt;Determines which ma"
+"croblock partitions are analyzed.\n"
+"&quot;Some&quot; is p8x8, b8x8, i8x8, i4x4.&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;x264_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkAli"
+"gnment&quot; id=&quot;alignment34&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kCheckButton&quot; id=&quot;x264_8x8dct&quot;&gt;\n"
+"                                                &lt;property name=&quot"
+";visible&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";can_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK"
+" | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";tooltip-text&quot; translatable=&quot;yes&quot;&gt;High profile featur"
+"e. Breaks picture into 8x8 blocks for analysis. Improves coding efficie"
+"ncy.&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";label&quot; translatable=&quot;yes&quot;&gt;8x8dct&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";active&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";draw_indicator&quot;&gt;True&lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;x264_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;2&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;3&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label60&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Motion Estimation&amp;lt;"
+"/b&amp;gt;&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;padding&quot;&gt;2&"
+"lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkFrame&quot; id=&quo"
+"t;frame13&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label_xalign&quot;&"
+"gt;0&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkAlignment&quot;"
+" id=&quot;alignment35&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;top_padding&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;bottom_padding&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                &lt;property name=&quot;left_padding&qu"
+"ot;&gt;12&lt;/property&gt;\n"
+"                                &lt;property name=&quot;right_padding&q"
+"uot;&gt;2&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkVBox&quot; "
+"id=&quot;vbox27&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;spacing&quo"
+"t;&gt;2&lt;/property&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox39&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label61&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Deblocking: &lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkSpi"
+"nButton&quot; id=&quot;x264_deblock_alpha&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;too"
+"ltip-text&quot; translatable=&quot;yes&quot;&gt;Deblocking filter. Alph"
+"a: determines the strength of the deblocking action.&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;adj"
+"ustment&quot;&gt;adjustment11&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;x2"
+"64_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkSpi"
+"nButton&quot; id=&quot;x264_deblock_beta&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;too"
+"ltip-text&quot; translatable=&quot;yes&quot;&gt;Deblocking filter. Beta"
+": determines when something is a block. Higher values increase sensitiv"
+"ity and will flag more blocks.&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;adj"
+"ustment&quot;&gt;adjustment12&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;x2"
+"64_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;2&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkHBox&qu"
+"ot; id=&quot;hbox40&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label62&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xal"
+"ign&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Trellis: &lt;/property&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                        &lt;child&gt;\n"
+"                                          &lt;object class=&quot;GtkCom"
+"boBox&quot; id=&quot;x264_trellis&quot;&gt;\n"
+"                                            &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;too"
+"ltip-text&quot; translatable=&quot;yes&quot;&gt;Trellis fine-tunes how "
+"bitrate is doled out, so it can reduce file size/bitrate or increase qu"
+"ality. &quot;All&quot; forces it to be used more often than &quot;Final"
+" Macro Block&quot;.&lt;/property&gt;\n"
+"                                            &lt;signal handler=&quot;x2"
+"64_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;exp"
+"and&quot;&gt;False&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;pos"
+"ition&quot;&gt;1&lt;/property&gt;\n"
+"                                          &lt;/packing&gt;\n"
+"                                        &lt;/child&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;1&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;x264_no_fast_pskip&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;This can help with blocking"
+" on solid colors like blue skies, but it also slows down the encode.&lt"
+";/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;No Fast P-Skip&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;active&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;x264_w"
+"idget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;2&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;x264_no_dct_decimate&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;Only use this with constant"
+" quality encoding. It increases quality but also bitrate/file size.&lt;"
+"/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;No DCT Decimate&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;active&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;x264_w"
+"idget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;3&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                    &lt;child&gt;\n"
+"                                      &lt;object class=&quot;GtkCheckBu"
+"tton&quot; id=&quot;x264_cabac&quot;&gt;\n"
+"                                        &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;can_foc"
+"us&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;tooltip"
+"-text&quot; translatable=&quot;yes&quot;&gt;Context Adaptive Binary Ari"
+"thmetic Coding. Improves encoding efficiency at the expense of playback"
+"/decoding efficiency. &lt;/property&gt;\n"
+"                                        &lt;property name=&quot;label&q"
+"uot; translatable=&quot;yes&quot;&gt;CABAC Entropy Encoding&lt;/propert"
+"y&gt;\n"
+"                                        &lt;property name=&quot;active&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;draw_in"
+"dicator&quot;&gt;True&lt;/property&gt;\n"
+"                                        &lt;signal handler=&quot;x264_w"
+"idget_changed_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                                      &lt;/object&gt;\n"
+"                                      &lt;packing&gt;\n"
+"                                        &lt;property name=&quot;positio"
+"n&quot;&gt;4&lt;/property&gt;\n"
+"                                      &lt;/packing&gt;\n"
+"                                    &lt;/child&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child type=&quot;label&quot;&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label63&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Miscellaneous&amp;lt;/b&a"
+"mp;gt;&lt;/property&gt;\n"
+"                                &lt;property name=&quot;use_markup&quot"
+";&gt;True&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;1"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                      &lt;packing&gt;\n"
+"                        &lt;property name=&quot;expand&quot;&gt;False&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;position&quot;&gt;1&lt;"
+"/property&gt;\n"
+"                      &lt;/packing&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child type=&quot;tab&quot;&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;x264_t"
+"ab_label&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;H.264&lt;/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;3&lt;/pro"
+"perty&gt;\n"
+"                    &lt;property name=&quot;tab_fill&quot;&gt;False&lt;"
+"/property&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkVBox&quot; id=&quot;chapter"
+"s_tab&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbo"
+"x30&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkCheckButton&quot; i"
+"d=&quot;ChapterMarkers&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Chapter Markers&lt;/property&gt;\n"
+"                            &lt;property name=&quot;draw_indicator&quot"
+";&gt;True&lt;/property&gt;\n"
+"                            &lt;signal handler=&quot;setting_widget_cha"
+"nged_cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;placeholder/&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;placeholder/&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                      &lt;packing&gt;\n"
+"                        &lt;property name=&quot;expand&quot;&gt;False&l"
+"t;/property&gt;\n"
+"                      &lt;/packing&gt;\n"
+"                    &lt;/child&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkScrolledWindow&quot; id"
+"=&quot;scrolledwindow3&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;can_focus&quot;&gt;True"
+"&lt;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;property name=&quot;hscrollbar_policy&quot;"
+"&gt;GTK_POLICY_AUTOMATIC&lt;/property&gt;\n"
+"                        &lt;property name=&quot;vscrollbar_policy&quot;"
+"&gt;GTK_POLICY_AUTOMATIC&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkTreeView&quot; id=&"
+"quot;chapters_list&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;headers_clickable&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;rules_hint&quot;&gt"
+";True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;enable-search&quot;"
+"&gt;False&lt;/property&gt;\n"
+"                          &lt;/object&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                      &lt;packing&gt;\n"
+"                        &lt;property name=&quot;position&quot;&gt;1&lt;"
+"/property&gt;\n"
+"                      &lt;/packing&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child type=&quot;tab&quot;&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;chapte"
+"rs_label&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;Chapters&lt;/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;4&lt;/pro"
+"perty&gt;\n"
+"                    &lt;property name=&quot;tab_fill&quot;&gt;False&lt;"
+"/property&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;1&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkLabel&quot; id=&quot;label80&qu"
+"ot;&gt;\n"
+"                &lt;property name=&quot;height_request&quot;&gt;1&lt;/p"
+"roperty&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;2&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkProgressBar&quot; id=&quot;prog"
+"ressbar&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;text&quot; translatable=&quot;y"
+"es&quot;/&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;3&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&"
+"gt;\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkFrame&quot; id=&quot;presets_frame&"
+"quot;&gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_"
+"MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTO"
+"N_RELEASE_MASK&lt;/property&gt;\n"
+"            &lt;property name=&quot;border_width&quot;&gt;3&lt;/propert"
+"y&gt;\n"
+"            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/propert"
+"y&gt;\n"
+"            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETC"
+"HED_OUT&lt;/property&gt;\n"
+"            &lt;signal handler=&quot;presets_frame_size_allocate_cb&quo"
+"t; name=&quot;size_allocate&quot;/&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignm"
+"ent21&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;left_padding&quot;&gt;8&lt;/pro"
+"perty&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkVBox&quot; id=&quot;presets"
+"_vbox&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkScrolledWindow&quot; id"
+"=&quot;presets_scroll&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;can_focus&quot;&gt;True"
+"&lt;/property&gt;\n"
+"                        &lt;property name=&quot;hscrollbar_policy&quot;"
+"&gt;GTK_POLICY_AUTOMATIC&lt;/property&gt;\n"
+"                        &lt;property name=&quot;vscrollbar_policy&quot;"
+"&gt;GTK_POLICY_AUTOMATIC&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkTreeView&quot; id=&"
+"quot;presets_list&quot;&gt;\n"
+"                            &lt;property name=&quot;width_request&quot;"
+"&gt;206&lt;/property&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;headers_visible&quo"
+"t;&gt;False&lt;/property&gt;\n"
+"                            &lt;property name=&quot;headers_clickable&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                          &lt;/object&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbo"
+"x31&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkHBox&quot; id=&quot"
+";hbox29&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkButton&quot; id"
+"=&quot;presets_save&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;can_focus&quot;"
+"&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;receives_defaul"
+"t&quot;&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;tooltip-text&qu"
+"ot; translatable=&quot;yes&quot;&gt;Save current settings as new preset"
+"&lt;/property&gt;\n"
+"                                &lt;property name=&quot;relief&quot;&gt"
+";GTK_RELIEF_NONE&lt;/property&gt;\n"
+"                                &lt;signal handler=&quot;presets_save_c"
+"licked_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkImage&quot;"
+" id=&quot;image5&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;stock&quot;"
+"&gt;gtk-add&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;expand&quot;&gt"
+";False&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkButton&quot; id"
+"=&quot;presets_remove&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;can_focus&quot;"
+"&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;receives_defaul"
+"t&quot;&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;tooltip-text&qu"
+"ot; translatable=&quot;yes&quot;&gt;Remove the selected preset&lt;/prop"
+"erty&gt;\n"
+"                                &lt;property name=&quot;relief&quot;&gt"
+";GTK_RELIEF_NONE&lt;/property&gt;\n"
+"                                &lt;signal handler=&quot;presets_remove"
+"_clicked_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkImage&quot;"
+" id=&quot;image6&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;stock&quot;"
+"&gt;gtk-remove&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;expand&quot;&gt"
+";False&lt;/property&gt;\n"
+"                                &lt;property name=&quot;position&quot;&"
+"gt;1&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label1&quot;&gt;\n"
+"                                &lt;property name=&quot;width_request&q"
+"uot;&gt;41&lt;/property&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;position&quot;&"
+"gt;2&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkButton&quot; id"
+"=&quot;presets_default&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;can_focus&quot;"
+"&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;receives_defaul"
+"t&quot;&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;tooltip-text&qu"
+"ot; translatable=&quot;yes&quot;&gt;Make the current preset the default"
+".&lt;/property&gt;\n"
+"                                &lt;property name=&quot;relief&quot;&gt"
+";GTK_RELIEF_NONE&lt;/property&gt;\n"
+"                                &lt;signal handler=&quot;presets_defaul"
+"t_clicked_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkImage&quot;"
+" id=&quot;image1&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;stock&quot;"
+"&gt;gtk-apply&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;position&quot;&"
+"gt;3&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkButton&quot; id"
+"=&quot;presets_restore&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;can_focus&quot;"
+"&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;receives_defaul"
+"t&quot;&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;tooltip-text&qu"
+"ot; translatable=&quot;yes&quot;&gt;Reload HandBrakes standard presets&"
+"lt;/property&gt;\n"
+"                                &lt;property name=&quot;relief&quot;&gt"
+";GTK_RELIEF_NONE&lt;/property&gt;\n"
+"                                &lt;signal handler=&quot;presets_restor"
+"e_clicked_cb&quot; name=&quot;clicked&quot;/&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkImage&quot;"
+" id=&quot;image7&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;stock&quot;"
+"&gt;gtk-refresh&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;position&quot;&"
+"gt;4&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                      &lt;packing&gt;\n"
+"                        &lt;property name=&quot;expand&quot;&gt;False&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;position&quot;&gt;1&lt;"
+"/property&gt;\n"
+"                      &lt;/packing&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child type=&quot;label&quot;&gt;\n"
+"              &lt;object class=&quot;GtkLabel&quot; id=&quot;label34&qu"
+"ot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;&amp;lt;b&amp;gt;Presets&amp;lt;/b&amp;gt;&lt;/property&gt"
+";\n"
+"                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/pr"
+"operty&gt;\n"
+"              &lt;/object&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt"
+";\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"      &lt;/object&gt;\n"
+"    &lt;/child&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkDialog&quot; id=&quot;prefs_dialog&quot;&gt"
+";\n"
+"    &lt;property name=&quot;border_width&quot;&gt;5&lt;/property&gt;\n"
+"    &lt;property name=&quot;modal&quot;&gt;True&lt;/property&gt;\n"
+"    &lt;property name=&quot;window_position&quot;&gt;GTK_WIN_POS_CENTER"
+"_ON_PARENT&lt;/property&gt;\n"
+"    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIA"
+"LOG&lt;/property&gt;\n"
+"    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/propert"
+"y&gt;\n"
+"    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&"
+"gt;\n"
+"    &lt;property name=&quot;has_separator&quot;&gt;False&lt;/property&g"
+"t;\n"
+"    &lt;signal name=&quot;delete_event&quot; handler=&quot;gtk_widget_h"
+"ide_on_delete&quot;/&gt;\n"
+"    &lt;child internal-child=&quot;vbox&quot;&gt;\n"
+"      &lt;object class=&quot;GtkVBox&quot; id=&quot;dialog-vbox6&quot;&"
+"gt;\n"
+"        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;\n"
+"        &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox24&quot;&gt"
+";\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox19&quot"
+";&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkEventBox&quot; id=&quot;eve"
+"ntbox1&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_BUTTON_"
+"MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK&lt;/property&g"
+"t;\n"
+"                    &lt;property name=&quot;visible_window&quot;&gt;Tru"
+"e&lt;/property&gt;\n"
+"                    &lt;property name=&quot;above_child&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                    &lt;signal name=&quot;button_press_event&quot; hand"
+"ler=&quot;easter_egg_cb&quot;/&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkImage&quot; id=&quot;im"
+"age3&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;property name=&quot;icon_size&quot;&gt;6&lt"
+";/property&gt;\n"
+"                        &lt;property name=&quot;icon_name&quot;&gt;hb-i"
+"con&lt;/property&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;placeholder/&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkFrame&quot; id=&quot;frame16&qu"
+"ot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW"
+"_ETCHED_OUT&lt;/property&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;al"
+"ignment6&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;left_padding&quot;&gt;12&lt"
+";/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbo"
+"x29&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkCheckButton&quot; i"
+"d=&quot;use_source_name&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip_text&quot;&"
+"gt;The destination filename will be automatically\n"
+"generated from the source filename or volume\n"
+"label.&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Automatically generate destination&lt;/propert"
+"y&gt;\n"
+"                            &lt;property name=&quot;draw_indicator&quot"
+";&gt;True&lt;/property&gt;\n"
+"                            &lt;signal name=&quot;toggled&quot; handler"
+"=&quot;pref_changed_cb&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkCheckButton&quot; i"
+"d=&quot;chapters_in_destination&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip_text&quot;&"
+"gt;Add chapter numbers to the \n"
+"auto-generated destination name.&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Add chapters to destination name&lt;/property&"
+"gt;\n"
+"                            &lt;property name=&quot;draw_indicator&quot"
+";&gt;True&lt;/property&gt;\n"
+"                            &lt;signal name=&quot;toggled&quot; handler"
+"=&quot;pref_changed_cb&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;1"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkCheckButton&quot; i"
+"d=&quot;reduce_hd_preview&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip_text&quot;&"
+"gt; Automatically reduce the size of High Definition previews.\n"
+"This is helpfull when working on laptops or similar\n"
+"non-hidef screens.  &lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Scale down High Definition previews&lt;/proper"
+"ty&gt;\n"
+"                            &lt;property name=&quot;draw_indicator&quot"
+";&gt;True&lt;/property&gt;\n"
+"                            &lt;signal name=&quot;toggled&quot; handler"
+"=&quot;pref_changed_cb&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;2"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkCheckButton&quot; i"
+"d=&quot;noscale&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip_text&quot;&"
+"gt;When picture settings require that the image \n"
+"dimensions be rounded to some multiple number\n"
+"of pixels. This setting will crop a few extra pixels\n"
+"instead of doing exact cropping and scaling to\n"
+"the required multiple.&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Loose cropping&lt;/property&gt;\n"
+"                            &lt;property name=&quot;draw_indicator&quot"
+";&gt;True&lt;/property&gt;\n"
+"                            &lt;signal name=&quot;toggled&quot; handler"
+"=&quot;pref_changed_cb&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;3"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkCheckButton&quot; i"
+"d=&quot;directqp&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip_text&quot;&"
+"gt;HandBrake allows entry of QP/CRF values for x264 \n"
+"and FFMPEG instead of the percentage metric.\n"
+"This preference is associated with the current\n"
+"preset only.\n"
+"\n"
+"You *MUST* save the current preset to preserve\n"
+"this setting.&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Allow direct QP/CRF&lt;/property&gt;\n"
+"                            &lt;property name=&quot;draw_indicator&quot"
+";&gt;True&lt;/property&gt;\n"
+"                            &lt;signal name=&quot;toggled&quot; handler"
+"=&quot;vcodec_changed_cb&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;4"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkCheckButton&quot; i"
+"d=&quot;EncodeLogLocation&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip_text&quot;&"
+"gt; HandBrake produces 2 activity logs.  \n"
+"One for the session and one for each encoding.\n"
+"Store the individual encode logs in the same\n"
+"location as the movie.&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Store logs in destination video directory&lt;/"
+"property&gt;\n"
+"                            &lt;property name=&quot;draw_indicator&quot"
+";&gt;True&lt;/property&gt;\n"
+"                            &lt;signal name=&quot;toggled&quot; handler"
+"=&quot;pref_changed_cb&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;5"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkCheckButton&quot; i"
+"d=&quot;allow_tweaks&quot;&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Allow Tweaks&lt;/property&gt;\n"
+"                            &lt;property name=&quot;draw_indicator&quot"
+";&gt;True&lt;/property&gt;\n"
+"                            &lt;signal name=&quot;toggled&quot; handler"
+"=&quot;tweaks_changed_cb&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;6"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkCheckButton&quot; i"
+"d=&quot;hbfd_feature&quot;&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Allow HandBrake For Dummies&lt;/property&gt;\n"
+"                            &lt;property name=&quot;draw_indicator&quot"
+";&gt;True&lt;/property&gt;\n"
+"                            &lt;signal name=&quot;toggled&quot; handler"
+"=&quot;hbfd_feature_changed_cb&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;7"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child type=&quot;label&quot;&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label1"
+"8&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;&amp;lt;b&amp;gt;Preferences&amp;lt;/b&amp;gt;&lt;/pro"
+"perty&gt;\n"
+"                    &lt;property name=&quot;use_markup&quot;&gt;True&lt"
+";/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;1&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt"
+";\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child internal-child=&quot;action_area&quot;&gt;\n"
+"          &lt;object class=&quot;GtkHButtonBox&quot; id=&quot;dialog-ac"
+"tion_area6&quot;&gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;layout_style&quot;&gt;GTK_BUTTONBOX"
+"_END&lt;/property&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkButton&quot; id=&quot;pref_ok&q"
+"uot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;receives_default&quot;&gt;True&"
+"lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;gtk-ok&lt;/property&gt;\n"
+"                &lt;property name=&quot;use_stock&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"              &lt;/object&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;pack_type&quot;&gt;GTK_PACK_END&lt;"
+"/property&gt;\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"      &lt;/object&gt;\n"
+"    &lt;/child&gt;\n"
+"    &lt;action-widgets&gt;\n"
+"      &lt;action-widget response=&quot;-5&quot;&gt;pref_ok&lt;/action-w"
+"idget&gt;\n"
+"    &lt;/action-widgets&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkDialog&quot; id=&quot;tweak_dialog&quot;&gt"
+";\n"
+"    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | G"
+"DK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEAS"
+"E_MASK&lt;/property&gt;\n"
+"    &lt;property name=&quot;border_width&quot;&gt;5&lt;/property&gt;\n"
+"    &lt;property name=&quot;modal&quot;&gt;True&lt;/property&gt;\n"
+"    &lt;property name=&quot;window_position&quot;&gt;GTK_WIN_POS_CENTER"
+"_ON_PARENT&lt;/property&gt;\n"
+"    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIA"
+"LOG&lt;/property&gt;\n"
+"    &lt;property name=&quot;has_separator&quot;&gt;False&lt;/property&g"
+"t;\n"
+"    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot"
+";delete_event&quot;/&gt;\n"
+"    &lt;child internal-child=&quot;vbox&quot;&gt;\n"
+"      &lt;object class=&quot;GtkVBox&quot; id=&quot;dialog-vbox7&quot;&"
+"gt;\n"
+"        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;\n"
+"        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK"
+" | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RE"
+"LEASE_MASK&lt;/property&gt;\n"
+"        &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox9&quot;&gt;"
+"\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_"
+"MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTO"
+"N_RELEASE_MASK&lt;/property&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkLabel&quot; id=&quot;label33&qu"
+"ot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;Setting:&lt;/property&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkEntry&quot; id=&quot;tweak_sett"
+"ing&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;max_length&quot;&gt;40&lt;/prop"
+"erty&gt;\n"
+"                &lt;property name=&quot;activates_default&quot;&gt;True"
+"&lt;/property&gt;\n"
+"                &lt;property name=&quot;width_chars&quot;&gt;30&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;truncate_multiline&quot;&gt;Tru"
+"e&lt;/property&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;1&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt"
+";\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child internal-child=&quot;action_area&quot;&gt;\n"
+"          &lt;object class=&quot;GtkHButtonBox&quot; id=&quot;dialog-ac"
+"tion_area7&quot;&gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_"
+"MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTO"
+"N_RELEASE_MASK&lt;/property&gt;\n"
+"            &lt;property name=&quot;layout_style&quot;&gt;GTK_BUTTONBOX"
+"_END&lt;/property&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkButton&quot; id=&quot;tweak_can"
+"cel&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;receives_default&quot;&gt;True&"
+"lt;/property&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;gtk-cancel&lt;/property&gt;\n"
+"                &lt;property name=&quot;use_stock&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"              &lt;/object&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkButton&quot; id=&quot;tweak_ok&"
+"quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;can_default&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                &lt;property name=&quot;has_default&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                &lt;property name=&quot;receives_default&quot;&gt;True&"
+"lt;/property&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;gtk-ok&lt;/property&gt;\n"
+"                &lt;property name=&quot;use_stock&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;1&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;pack_type&quot;&gt;GTK_PACK_END&lt;"
+"/property&gt;\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"      &lt;/object&gt;\n"
+"    &lt;/child&gt;\n"
+"    &lt;action-widgets&gt;\n"
+"      &lt;action-widget response=&quot;0&quot;&gt;tweak_cancel&lt;/acti"
+"on-widget&gt;\n"
+"      &lt;action-widget response=&quot;-5&quot;&gt;tweak_ok&lt;/action-"
+"widget&gt;\n"
+"    &lt;/action-widgets&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkDialog&quot; id=&quot;preset_save_dialog&qu"
+"ot;&gt;\n"
+"    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | G"
+"DK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEAS"
+"E_MASK&lt;/property&gt;\n"
+"    &lt;property name=&quot;border_width&quot;&gt;5&lt;/property&gt;\n"
+"    &lt;property name=&quot;modal&quot;&gt;True&lt;/property&gt;\n"
+"    &lt;property name=&quot;window_position&quot;&gt;GTK_WIN_POS_CENTER"
+"_ON_PARENT&lt;/property&gt;\n"
+"    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIA"
+"LOG&lt;/property&gt;\n"
+"    &lt;property name=&quot;has_separator&quot;&gt;False&lt;/property&g"
+"t;\n"
+"    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot"
+";delete_event&quot;/&gt;\n"
+"    &lt;child internal-child=&quot;vbox&quot;&gt;\n"
+"      &lt;object class=&quot;GtkVBox&quot; id=&quot;dialog-vbox3&quot;&"
+"gt;\n"
+"        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;\n"
+"        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK"
+" | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RE"
+"LEASE_MASK&lt;/property&gt;\n"
+"        &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox28&quot;&gt"
+";\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_"
+"MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTO"
+"N_RELEASE_MASK&lt;/property&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox41&quot"
+";&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label6"
+"4&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;Preset Name:&lt;/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkEntry&quot; id=&quot;Preset"
+"Name&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;"
+"/property&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;property name=&quot;max_length&quot;&gt;40&lt;/"
+"property&gt;\n"
+"                    &lt;property name=&quot;activates_default&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                    &lt;property name=&quot;width_chars&quot;&gt;30&lt;"
+"/property&gt;\n"
+"                    &lt;property name=&quot;truncate_multiline&quot;&gt"
+";True&lt;/property&gt;\n"
+"                    &lt;signal handler=&quot;preset_name_changed_cb&quo"
+"t; name=&quot;changed&quot;/&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;1&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkFrame&quot; id=&quot;frame14&qu"
+"ot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW"
+"_ETCHED_OUT&lt;/property&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;al"
+"ignment36&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;property name=&quot;top_padding&quot;&gt;2&lt;/"
+"property&gt;\n"
+"                    &lt;property name=&quot;bottom_padding&quot;&gt;4&l"
+"t;/property&gt;\n"
+"                    &lt;property name=&quot;left_padding&quot;&gt;12&lt"
+";/property&gt;\n"
+"                    &lt;property name=&quot;right_padding&quot;&gt;4&lt"
+";/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkTextView&quot; id=&quot"
+";PresetDescription&quot;&gt;\n"
+"                        &lt;property name=&quot;height_request&quot;&gt"
+";60&lt;/property&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;can_focus&quot;&gt;True"
+"&lt;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;property name=&quot;wrap_mode&quot;&gt;GTK_"
+"WRAP_WORD&lt;/property&gt;\n"
+"                        &lt;property name=&quot;accepts_tab&quot;&gt;Fa"
+"lse&lt;/property&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child type=&quot;label&quot;&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label6"
+"7&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;&amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&lt;/pro"
+"perty&gt;\n"
+"                    &lt;property name=&quot;use_markup&quot;&gt;True&lt"
+";/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;padding&quot;&gt;2&lt;/property"
+"&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;1&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox43&quot"
+";&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkRadioButton&quot; id=&quot;"
+"preset_type_folder&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;"
+"/property&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;Folder&lt;/property&gt;\n"
+"                    &lt;property name=&quot;active&quot;&gt;True&lt;/pr"
+"operty&gt;\n"
+"                    &lt;property name=&quot;draw_indicator&quot;&gt;Tru"
+"e&lt;/property&gt;\n"
+"                    &lt;signal name=&quot;toggled&quot; handler=&quot;p"
+"reset_type_changed_cb&quot;/&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkRadioButton&quot; id=&quot;"
+"preset_type_normal&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;"
+"/property&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;Preset&lt;/property&gt;\n"
+"                    &lt;property name=&quot;active&quot;&gt;True&lt;/pr"
+"operty&gt;\n"
+"                    &lt;property name=&quot;draw_indicator&quot;&gt;Tru"
+"e&lt;/property&gt;\n"
+"                    &lt;property name=&quot;group&quot;&gt;preset_type_"
+"folder&lt;/property&gt;\n"
+"                    &lt;signal name=&quot;toggled&quot; handler=&quot;p"
+"reset_type_changed_cb&quot;/&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;1&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;2&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt"
+";\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child internal-child=&quot;action_area&quot;&gt;\n"
+"          &lt;object class=&quot;GtkHButtonBox&quot; id=&quot;dialog-ac"
+"tion_area3&quot;&gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_"
+"MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTO"
+"N_RELEASE_MASK&lt;/property&gt;\n"
+"            &lt;property name=&quot;layout_style&quot;&gt;GTK_BUTTONBOX"
+"_END&lt;/property&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkButton&quot; id=&quot;preset_ca"
+"ncel&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;receives_default&quot;&gt;True&"
+"lt;/property&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;gtk-cancel&lt;/property&gt;\n"
+"                &lt;property name=&quot;use_stock&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"              &lt;/object&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkButton&quot; id=&quot;preset_ok"
+"&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;receives_default&quot;&gt;True&"
+"lt;/property&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;gtk-ok&lt;/property&gt;\n"
+"                &lt;property name=&quot;use_stock&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;1&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;pack_type&quot;&gt;GTK_PACK_END&lt;"
+"/property&gt;\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"      &lt;/object&gt;\n"
+"    &lt;/child&gt;\n"
+"    &lt;action-widgets&gt;\n"
+"      &lt;action-widget response=&quot;0&quot;&gt;preset_cancel&lt;/act"
+"ion-widget&gt;\n"
+"      &lt;action-widget response=&quot;-5&quot;&gt;preset_ok&lt;/action"
+"-widget&gt;\n"
+"    &lt;/action-widgets&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkWindow&quot; id=&quot;activity_window&quot;"
+"&gt;\n"
+"    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | G"
+"DK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEAS"
+"E_MASK&lt;/property&gt;\n"
+"    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIA"
+"LOG&lt;/property&gt;\n"
+"    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/propert"
+"y&gt;\n"
+"    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&"
+"gt;\n"
+"    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot"
+";delete_event&quot;/&gt;\n"
+"    &lt;child&gt;\n"
+"      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox37&quot;&gt;\n"
+"        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;\n"
+"        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK"
+" | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RE"
+"LEASE_MASK&lt;/property&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;placeholder/&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkLabel&quot; id=&quot;activity_locat"
+"ion&quot;&gt;\n"
+"            &lt;property name=&quot;justify&quot;&gt;GTK_JUSTIFY_LEFT&l"
+"t;/property&gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt"
+";\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkScrolledWindow&quot; id=&quot;activ"
+"ity_scroll&quot;&gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/propert"
+"y&gt;\n"
+"            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_"
+"MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTO"
+"N_RELEASE_MASK&lt;/property&gt;\n"
+"            &lt;property name=&quot;hscrollbar_policy&quot;&gt;GTK_POLI"
+"CY_AUTOMATIC&lt;/property&gt;\n"
+"            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_IN&"
+"lt;/property&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkTextView&quot; id=&quot;activit"
+"y_view&quot;&gt;\n"
+"                &lt;property name=&quot;width_request&quot;&gt;400&lt;/"
+"property&gt;\n"
+"                &lt;property name=&quot;height_request&quot;&gt;500&lt;"
+"/property&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;editable&quot;&gt;False&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;cursor-visible&quot;&gt;False&l"
+"t;/property&gt;\n"
+"                &lt;property name=&quot;wrap_mode&quot;&gt;GTK_WRAP_CHA"
+"R&lt;/property&gt;\n"
+"              &lt;/object&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt"
+";\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;placeholder/&gt;\n"
+"        &lt;/child&gt;\n"
+"      &lt;/object&gt;\n"
+"    &lt;/child&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkWindow&quot; id=&quot;queue_window&quot;&gt"
+";\n"
+"    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | G"
+"DK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEAS"
+"E_MASK&lt;/property&gt;\n"
+"    &lt;property name=&quot;title&quot; translatable=&quot;yes&quot;&gt"
+";HandBrake Queue&lt;/property&gt;\n"
+"    &lt;property name=&quot;icon_name&quot;&gt;hb-queue&lt;/property&gt"
+";\n"
+"    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIA"
+"LOG&lt;/property&gt;\n"
+"    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/propert"
+"y&gt;\n"
+"    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&"
+"gt;\n"
+"    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot"
+";delete_event&quot;/&gt;\n"
+"    &lt;child&gt;\n"
+"      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox34&quot;&gt;\n"
+"        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;\n"
+"        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK"
+" | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RE"
+"LEASE_MASK&lt;/property&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkToolbar&quot; id=&quot;queue_toolba"
+"r&quot;&gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_"
+"MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTO"
+"N_RELEASE_MASK&lt;/property&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkToolButton&quot; id=&quot;queue"
+"_start2&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;sensitive&quot;&gt;False&lt;/pr"
+"operty&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;Start&lt;/property&gt;\n"
+"                &lt;property name=&quot;icon_name&quot;&gt;hb-play&lt;/"
+"property&gt;\n"
+"                &lt;signal handler=&quot;queue_start_clicked_cb&quot; n"
+"ame=&quot;clicked&quot;/&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkToolButton&quot; id=&quot;queue"
+"_pause2&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;sensitive&quot;&gt;False&lt;/pr"
+"operty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;Pause&lt;/property&gt;\n"
+"                &lt;property name=&quot;icon_name&quot;&gt;hb-pause&lt;"
+"/property&gt;\n"
+"                &lt;signal handler=&quot;queue_pause_clicked_cb&quot; n"
+"ame=&quot;clicked&quot;/&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkToolButton&quot; id=&quot;queue"
+"_stop&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;sensitive&quot;&gt;False&lt;/pr"
+"operty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;Stop&lt;/property&gt;\n"
+"                &lt;property name=&quot;icon_name&quot;&gt;hb-stop&lt;/"
+"property&gt;\n"
+"                &lt;signal handler=&quot;queue_stop_clicked_cb&quot; na"
+"me=&quot;clicked&quot;/&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkToolButton&quot; id=&quot;queue"
+"_edit&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;sensitive&quot;&gt;False&lt;/pr"
+"operty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;Edit&lt;/property&gt;\n"
+"                &lt;property name=&quot;icon_name&quot;&gt;hb-edit&lt;/"
+"property&gt;\n"
+"                &lt;signal handler=&quot;queue_edit_clicked_cb&quot; na"
+"me=&quot;clicked&quot;/&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&"
+"gt;\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox38&quot;&gt"
+";\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkLabel&quot; id=&quot;current_en"
+"code&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"              &lt;/object&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox28&quot"
+";&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;queue_"
+"status&quot;&gt;\n"
+"                    &lt;property name=&quot;justify&quot;&gt;GTK_JUSTIF"
+"Y_LEFT&lt;/property&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;padding&quot;&gt;10&lt;/pro"
+"perty&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;placeholder/&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;placeholder/&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;1&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt"
+";\n"
+"            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&"
+"gt;\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkScrolledWindow&quot; id=&quot;scrol"
+"ledwindow2&quot;&gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/propert"
+"y&gt;\n"
+"            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_"
+"MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTO"
+"N_RELEASE_MASK&lt;/property&gt;\n"
+"            &lt;property name=&quot;hscrollbar_policy&quot;&gt;GTK_POLI"
+"CY_AUTOMATIC&lt;/property&gt;\n"
+"            &lt;property name=&quot;vscrollbar_policy&quot;&gt;GTK_POLI"
+"CY_AUTOMATIC&lt;/property&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkTreeView&quot; id=&quot;queue_l"
+"ist&quot;&gt;\n"
+"                &lt;property name=&quot;width_request&quot;&gt;900&lt;/"
+"property&gt;\n"
+"                &lt;property name=&quot;height_request&quot;&gt;300&lt;"
+"/property&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;headers_visible&quot;&gt;False&"
+"lt;/property&gt;\n"
+"                &lt;property name=&quot;headers_clickable&quot;&gt;Fals"
+"e&lt;/property&gt;\n"
+"                &lt;property name=&quot;hover_expand&quot;&gt;False&lt;"
+"/property&gt;\n"
+"                &lt;signal handler=&quot;queue_key_press_cb&quot; name="
+"&quot;key-press-event&quot;/&gt;\n"
+"              &lt;/object&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt"
+";\n"
+"            &lt;property name=&quot;expand&quot;&gt;True&lt;/property&g"
+"t;\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;placeholder/&gt;\n"
+"        &lt;/child&gt;\n"
+"      &lt;/object&gt;\n"
+"    &lt;/child&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkWindow&quot; id=&quot;preview_window&quot;&"
+"gt;\n"
+"    &lt;property name=&quot;title&quot; translatable=&quot;yes&quot;&gt"
+";Preview&lt;/property&gt;\n"
+"    &lt;property name=&quot;window_position&quot;&gt;GTK_WIN_POS_CENTER"
+"&lt;/property&gt;\n"
+"    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIA"
+"LOG&lt;/property&gt;\n"
+"    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/propert"
+"y&gt;\n"
+"    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&"
+"gt;\n"
+"    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot"
+";delete_event&quot;/&gt;\n"
+"    &lt;child&gt;\n"
+"      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox32&quot;&gt;\n"
+"        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkFrame&quot; id=&quot;frame15&quot;&"
+"gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/propert"
+"y&gt;\n"
+"            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETC"
+"HED_OUT&lt;/property&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignm"
+"ent22&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;top_padding&quot;&gt;4&lt;/prop"
+"erty&gt;\n"
+"                &lt;property name=&quot;bottom_padding&quot;&gt;4&lt;/p"
+"roperty&gt;\n"
+"                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/pr"
+"operty&gt;\n"
+"                &lt;property name=&quot;right_padding&quot;&gt;4&lt;/pr"
+"operty&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkImage&quot; id=&quot;previe"
+"w_image&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;icon_name&quot;&gt;hb-icon&"
+"lt;/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child type=&quot;label&quot;&gt;\n"
+"              &lt;object class=&quot;GtkLabel&quot; id=&quot;label56&qu"
+"ot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;&amp;lt;b&amp;gt;Preview&amp;lt;/b&amp;gt;&lt;/property&gt"
+";\n"
+"                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/pr"
+"operty&gt;\n"
+"              &lt;/object&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox8&quot;&gt;"
+"\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkFrame&quot; id=&quot;Cropping3&"
+"quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW"
+"_ETCHED_OUT&lt;/property&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;al"
+"ignment24&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;property name=&quot;top_padding&quot;&gt;2&lt;/"
+"property&gt;\n"
+"                    &lt;property name=&quot;bottom_padding&quot;&gt;2&l"
+"t;/property&gt;\n"
+"                    &lt;property name=&quot;left_padding&quot;&gt;12&lt"
+";/property&gt;\n"
+"                    &lt;property name=&quot;right_padding&quot;&gt;2&lt"
+";/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbo"
+"x39&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkAlignment&quot; id="
+"&quot;alignment37&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;xalign&quot;&gt;0.3"
+"4000000357627869&lt;/property&gt;\n"
+"                            &lt;property name=&quot;xscale&quot;&gt;0.3"
+"7999999523162842&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkTable&quot; id="
+"&quot;table6&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;n_rows&quot;&gt"
+";5&lt;/property&gt;\n"
+"                                &lt;property name=&quot;n_columns&quot;"
+"&gt;5&lt;/property&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;placeholder/&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;label77&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;Left&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;width_chars"
+"&quot;&gt;4&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;top_attach&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;bottom_atta"
+"ch&quot;&gt;3&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;label74&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;yalign&quot"
+";&gt;1&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;Top&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;left_attach"
+"&quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;right_attac"
+"h&quot;&gt;3&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkSpinButton&"
+"quot; id=&quot;PictureLeftCrop&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;can_focus&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;adjustment&"
+"quot;&gt;adjustment13&lt;/property&gt;\n"
+"                                    &lt;signal handler=&quot;crop_chang"
+"ed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;left_attach"
+"&quot;&gt;1&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;right_attac"
+"h&quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;top_attach&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;bottom_atta"
+"ch&quot;&gt;3&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;x_options&q"
+"uot;/&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;label73&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;yalign&quot"
+";&gt;0&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;Bottom&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;left_attach"
+"&quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;right_attac"
+"h&quot;&gt;3&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;top_attach&"
+"quot;&gt;4&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;bottom_atta"
+"ch&quot;&gt;5&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkSpinButton&"
+"quot; id=&quot;PictureTopCrop&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;can_focus&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;adjustment&"
+"quot;&gt;adjustment14&lt;/property&gt;\n"
+"                                    &lt;signal handler=&quot;crop_chang"
+"ed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;left_attach"
+"&quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;right_attac"
+"h&quot;&gt;3&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;top_attach&"
+"quot;&gt;1&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;bottom_atta"
+"ch&quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;x_options&q"
+"uot;/&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkSpinButton&"
+"quot; id=&quot;PictureBottomCrop&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;can_focus&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;adjustment&"
+"quot;&gt;adjustment15&lt;/property&gt;\n"
+"                                    &lt;signal handler=&quot;crop_chang"
+"ed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;left_attach"
+"&quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;right_attac"
+"h&quot;&gt;3&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;top_attach&"
+"quot;&gt;3&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;bottom_atta"
+"ch&quot;&gt;4&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;x_options&q"
+"uot;/&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkSpinButton&"
+"quot; id=&quot;PictureRightCrop&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;can_focus&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;adjustment&"
+"quot;&gt;adjustment16&lt;/property&gt;\n"
+"                                    &lt;signal handler=&quot;crop_chang"
+"ed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;left_attach"
+"&quot;&gt;3&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;right_attac"
+"h&quot;&gt;4&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;top_attach&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;bottom_atta"
+"ch&quot;&gt;3&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;x_options&q"
+"uot;/&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                                &lt;child&gt;\n"
+"                                  &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;label72&quot;&gt;\n"
+"                                    &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;events&quot"
+";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
+"N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;Right&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;width_chars"
+"&quot;&gt;4&lt;/property&gt;\n"
+"                                  &lt;/object&gt;\n"
+"                                  &lt;packing&gt;\n"
+"                                    &lt;property name=&quot;left_attach"
+"&quot;&gt;4&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;right_attac"
+"h&quot;&gt;5&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;top_attach&"
+"quot;&gt;2&lt;/property&gt;\n"
+"                                    &lt;property name=&quot;bottom_atta"
+"ch&quot;&gt;3&lt;/property&gt;\n"
+"                                  &lt;/packing&gt;\n"
+"                                &lt;/child&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkCheckButton&quot; i"
+"d=&quot;PictureAutoCrop&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;Auto Crop&lt;/property&gt;\n"
+"                            &lt;property name=&quot;draw_indicator&quot"
+";&gt;True&lt;/property&gt;\n"
+"                            &lt;signal handler=&quot;scale_changed_cb&q"
+"uot; name=&quot;toggled&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;1"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child type=&quot;label&quot;&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label8"
+"2&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;&amp;lt;b&amp;gt;Cropping&amp;lt;/b&amp;gt;&lt;/proper"
+"ty&gt;\n"
+"                    &lt;property name=&quot;use_markup&quot;&gt;True&lt"
+";/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;padding&quot;&gt;2&lt;/property"
+"&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkFrame&quot; id=&quot;frame19&qu"
+"ot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOT"
+"ION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_B"
+"UTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW"
+"_ETCHED_OUT&lt;/property&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;al"
+"ignment43&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;property name=&quot;top_padding&quot;&gt;2&lt;/"
+"property&gt;\n"
+"                    &lt;property name=&quot;bottom_padding&quot;&gt;2&l"
+"t;/property&gt;\n"
+"                    &lt;property name=&quot;left_padding&quot;&gt;12&lt"
+";/property&gt;\n"
+"                    &lt;property name=&quot;right_padding&quot;&gt;2&lt"
+";/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbo"
+"x41&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;property name=&quot;spacing&quot;&gt;2&lt;/"
+"property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkHBox&quot; id=&quot"
+";hbox50&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label85&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;width:&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkSpinButton&quot"
+"; id=&quot;scale_width&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;can_focus&quot;"
+"&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;adjustment&quot"
+";&gt;adjustment17&lt;/property&gt;\n"
+"                                &lt;property name=&quot;snap_to_ticks&q"
+"uot;&gt;True&lt;/property&gt;\n"
+"                                &lt;signal handler=&quot;scale_width_ch"
+"anged_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;position&quot;&"
+"gt;1&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkLabel&quot; id="
+"&quot;label86&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;height:&lt;/property&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;position&quot;&"
+"gt;2&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkSpinButton&quot"
+"; id=&quot;scale_height&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;can_focus&quot;"
+"&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;adjustment&quot"
+";&gt;adjustment18&lt;/property&gt;\n"
+"                                &lt;signal handler=&quot;scale_height_c"
+"hanged_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;position&quot;&"
+"gt;3&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkHBox&quot; id=&quot"
+";hbox51&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkCheckButton&quo"
+"t; id=&quot;autoscale&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;can_focus&quot;"
+"&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;Optimal for source&lt;/property&gt;\n"
+"                                &lt;property name=&quot;draw_indicator&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                &lt;signal handler=&quot;scale_changed_"
+"cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                              &lt;/object&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;1"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkHBox&quot; id=&quot"
+";hbox52&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkCheckButton&quo"
+"t; id=&quot;ModDimensions&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;can_focus&quot;"
+"&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;tooltip-text&qu"
+"ot; translatable=&quot;yes&quot;&gt;Constrain dimensions to multiples o"
+"f 16. \n"
+"If not checked, encoding efficiency may be reduced.&lt;/property&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;Align Dimensions (mod 16)&lt;/property&gt;"
+"\n"
+"                                &lt;property name=&quot;draw_indicator&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                &lt;signal handler=&quot;scale_changed_"
+"cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;expand&quot;&gt"
+";False&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;2"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkHBox&quot; id=&quot"
+";hbox53&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;events&quot;&gt;GDK"
+"_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_"
+"MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                            &lt;property name=&quot;spacing&quot;&gt;45"
+"&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkCheckButton&quo"
+"t; id=&quot;anamorphic&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;can_focus&quot;"
+"&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;tooltip-text&qu"
+"ot; translatable=&quot;yes&quot;&gt;Allow non-square pixels. Pixel aspe"
+"ct ratio will be\n"
+"adjusted to keep the video&apos;s original aspect ratio.&lt;/property&g"
+"t;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;Anamorphic&lt;/property&gt;\n"
+"                                &lt;property name=&quot;active&quot;&gt"
+";True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;draw_indicator&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                &lt;signal handler=&quot;scale_changed_"
+"cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;expand&quot;&gt"
+";False&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;object class=&quot;GtkCheckButton&quo"
+"t; id=&quot;PictureKeepRatio&quot;&gt;\n"
+"                                &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;can_focus&quot;"
+"&gt;True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;events&quot;&gt"
+";GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PR"
+"ESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                &lt;property name=&quot;tooltip-text&qu"
+"ot; translatable=&quot;yes&quot;&gt;Changing either dimension automatic"
+"ally adjusts\n"
+"the other to maintain the video&apos;s original aspect ratio.&lt;/prope"
+"rty&gt;\n"
+"                                &lt;property name=&quot;label&quot; tra"
+"nslatable=&quot;yes&quot;&gt;Keep Aspect&lt;/property&gt;\n"
+"                                &lt;property name=&quot;active&quot;&gt"
+";True&lt;/property&gt;\n"
+"                                &lt;property name=&quot;draw_indicator&"
+"quot;&gt;True&lt;/property&gt;\n"
+"                                &lt;signal handler=&quot;scale_changed_"
+"cb&quot; name=&quot;toggled&quot;/&gt;\n"
+"                              &lt;/object&gt;\n"
+"                              &lt;packing&gt;\n"
+"                                &lt;property name=&quot;expand&quot;&gt"
+";False&lt;/property&gt;\n"
+"                                &lt;property name=&quot;position&quot;&"
+"gt;1&lt;/property&gt;\n"
+"                              &lt;/packing&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;expand&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;3"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child type=&quot;label&quot;&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label8"
+"7&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER"
+"_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | G"
+"DK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;&amp;lt;b&amp;gt;Scaling&amp;lt;/b&amp;gt;&lt;/propert"
+"y&gt;\n"
+"                    &lt;property name=&quot;use_markup&quot;&gt;True&lt"
+";/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;padding&quot;&gt;2&lt;/property"
+"&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;1&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox42&quot"
+";&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;al"
+"ignment6&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;xscale&quot;&gt;0&lt;/prope"
+"rty&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbo"
+"x45&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkLabel&quot; id=&quo"
+"t;label18&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;label&quot; transla"
+"table=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Frame&amp;lt;/b&amp;gt;&lt;/p"
+"roperty&gt;\n"
+"                            &lt;property name=&quot;use_markup&quot;&gt"
+";True&lt;/property&gt;\n"
+"                          &lt;/object&gt;\n"
+"                        &lt;/child&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkSpinButton&quot; id"
+"=&quot;preview_frame&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;tooltip-text&quot; "
+"translatable=&quot;yes&quot;&gt;View other frames&lt;/property&gt;\n"
+"                            &lt;property name=&quot;max_length&quot;&gt"
+";2&lt;/property&gt;\n"
+"                            &lt;property name=&quot;has_frame&quot;&gt;"
+"False&lt;/property&gt;\n"
+"                            &lt;property name=&quot;shadow_type&quot;&g"
+"t;GTK_SHADOW_NONE&lt;/property&gt;\n"
+"                            &lt;property name=&quot;adjustment&quot;&gt"
+";adjustment19&lt;/property&gt;\n"
+"                            &lt;property name=&quot;numeric&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;signal handler=&quot;preview_frame_valu"
+"e_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"                          &lt;/object&gt;\n"
+"                          &lt;packing&gt;\n"
+"                            &lt;property name=&quot;position&quot;&gt;1"
+"&lt;/property&gt;\n"
+"                          &lt;/packing&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;placeholder/&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;placeholder/&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;2&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt"
+";\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"      &lt;/object&gt;\n"
+"    &lt;/child&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkAboutDialog&quot; id=&quot;hb_about&quot;&g"
+"t;\n"
+"    &lt;property name=&quot;border_width&quot;&gt;5&lt;/property&gt;\n"
+"    &lt;property name=&quot;title&quot; translatable=&quot;yes&quot;&gt"
+";About HandBrake&lt;/property&gt;\n"
+"    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIA"
+"LOG&lt;/property&gt;\n"
+"    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/propert"
+"y&gt;\n"
+"    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&"
+"gt;\n"
+"    &lt;property name=&quot;program_name&quot;&gt;HandBrake&lt;/propert"
+"y&gt;\n"
+"    &lt;property name=&quot;version&quot;&gt;0.9.2&lt;/property&gt;\n"
+"    &lt;property name=&quot;copyright&quot; translatable=&quot;yes&quot"
+";&gt;Copyright &amp;#xA9; 2008 John Stebbins\n"
+"Copyright &amp;#xA9; Copyright Â© 2004 - 2008, HandBrake Devs&lt;/prope"
+"rty&gt;\n"
+"    &lt;property name=&quot;comments&quot; translatable=&quot;yes&quot;"
+"&gt;HandBrake is a GPL-licensed, multiplatform, multithreaded video tra"
+"nscoder.&lt;/property&gt;\n"
+"    &lt;property name=&quot;website&quot;&gt;http://handbrake.fr&lt;/pr"
+"operty&gt;\n"
+"    &lt;property name=&quot;website_label&quot; translatable=&quot;yes&"
+"quot;&gt;http://handbrake.fr&lt;/property&gt;\n"
+"    &lt;property name=&quot;license&quot; translatable=&quot;yes&quot;&"
+"gt;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.\n"
+"\n"
+"HandBrake is distributed in the hope that it will be useful, but WITHOU"
+"T ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or"
+" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License "
+"for more details.\n"
+"\n"
+"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 Fr"
+"anklin Street, Fifth Floor, Boston, MA 02110-1301, USA.&lt;/property&gt"
+";\n"
+"    &lt;property name=&quot;authors&quot;&gt;ghb author:\n"
+"  John Stebbins\n"
+"\n"
+"HandBrake authors:\n"
+"  Eric Petit\n"
+"  Laurent Aimar\n"
+"  John Allen\n"
+"  Joe Crain\n"
+"  Damiano Galassi\n"
+"  Edward Groenendaal\n"
+"  Rodney Hester\n"
+"  Andrew Kimpton\n"
+"  Chris Lee\n"
+"  Chris Long\n"
+"  Brian Mario\n"
+"  Maurj\n"
+"  Mirkwood\n"
+"  Nyx\n"
+"  Philippe Rigaux\n"
+"  Jonathon Rubin\n"
+"  Scott\n"
+"  Chris Thoman\n"
+"  Mark Krenek\n"
+"  Van Jacobson\n"
+"\n"
+"liba52 authors:\n"
+"  Aaron Holtzman\n"
+"  Michel Lespinasse\n"
+"  Gildas Bazin\n"
+"  Billy Biggs\n"
+"  Eduard Hasenleithner\n"
+"  H&amp;#xE5;kan Hjort\n"
+"  Charles M. Hannum\n"
+"  Chris Hodges\n"
+"  Michael Holzt\n"
+"  Angelos Keromytis\n"
+"  David I. Lehn\n"
+"  Don Mahurin\n"
+"  Jim Miller\n"
+"  Takefumi Sayo\n"
+"  Shoji Tokunaga\n"
+"\n"
+"libavcodec authors:\n"
+"  Fabrice Bellard\n"
+"  Alex Beregszaszi\n"
+"  Brian Foley\n"
+"  Arpad Gereoffy\n"
+"  Philip Gladstone\n"
+"  Falk Hueffner\n"
+"  Zdenek Kabelac\n"
+"  Nick Kurshev\n"
+"  Michael Niedermayer\n"
+"  Fran&amp;#xE7;ois Revol\n"
+"  Dieter Shirley\n"
+"  Juan J. Sierralta\n"
+"  Lionel Ulmer\n"
+"\n"
+"libdts authors:\n"
+"  Gildas Bazin\n"
+"  Sam Hocevar\n"
+"\n"
+"libdvdcss authors:\n"
+"  Billy Biggs\n"
+"  St&amp;#xE9;phane Borel\n"
+"  H&amp;#xE5;kan Hjort\n"
+"  Samuel Hocevar\n"
+"  Eugenio Jarosiewicz\n"
+"  Jon Lech Johansen\n"
+"  Markus Kuespert\n"
+"  Pascal Levesque\n"
+"  Steven M. Schultz\n"
+"  David Sieb&amp;#xF6;rger\n"
+"  Alex Strelnikov\n"
+"  German Tischler\n"
+"  Gildas Bazin\n"
+"\n"
+"libdvdread authors:\n"
+"  Bj&amp;#xF6;rn Englund\n"
+"  H&amp;#xE5;kan Hjort\n"
+"  Billy Biggs\n"
+"  Christian Wolff\n"
+"\n"
+"libfaac authors:\n"
+"  M. Bakker\n"
+"  Tony Lenox\n"
+"  RageOMatic\n"
+"  thebard\n"
+"  Ivan Dimkovic\n"
+"  Krzysztof Nikiel\n"
+"\n"
+"libmp3lame authors:\n"
+"  Mike Cheng\n"
+"  Robert Hegemann\n"
+"  Frank Klemm\n"
+"  Alexander Leidinger\n"
+"  Naoki Shibata\n"
+"  Mark Taylor\n"
+"  Takehiro Tominiga\n"
+"  Iv&amp;#xE1;n Cavero Belaunde\n"
+"  Gabriel Bouvigne\n"
+"  Florian Bomers\n"
+"  CISC\n"
+"  John Dahlstrom\n"
+"  John Dee\n"
+"  Albert Faber\n"
+"  Peter Gubanov\n"
+"  Lars Magne Ingebrigtsen\n"
+"  Yosi Markovich\n"
+"  Zdenek Kabelac\n"
+"  Iwasa Kazmi\n"
+"  Guillaume Lessard\n"
+"  Steve Lhomme\n"
+"  Don Melton\n"
+"  Viral Shah\n"
+"  Acy Stapp\n"
+"  Roel VdB\n"
+"\n"
+"libmp4v2 authors:\n"
+"  Dave Mackie\n"
+"  Alix Marchandise-Franquet\n"
+"  Bill May\n"
+"  Massimo Villari\n"
+"  Waqar Mohsin\n"
+"  Richard Chen\n"
+"  Rob Arnold\n"
+"  Howdy Pierce\n"
+"  Steven Schultz\n"
+"  sergent@io.com\n"
+"  Sean Gilligan\n"
+"  Michael Rossberg\n"
+"  Luis F. Ramirez\n"
+"  Petter Reinholdtsen\n"
+"\n"
+"libmpeg2 authors:\n"
+"  Aaron Holtzman\n"
+"  Michel Lespinasse\n"
+"  Bruno Barreyra\n"
+"  Gildas Bazin\n"
+"  Alexander W. Chin\n"
+"  Stephen Crowley\n"
+"  Didier Gautheron\n"
+"  Ryan C. Gordon\n"
+"  Peter Gubanov\n"
+"  H&amp;#xE5;kan Hjort\n"
+"  Nicolas Joly\n"
+"  Gerd Knorr\n"
+"  David I. Lehn\n"
+"  Olie Lho\n"
+"  Rick Niles\n"
+"  Real Ouellet\n"
+"  Bajusz Peter\n"
+"  Franck Sicard\n"
+"  Brion Vibber\n"
+"  Martin Vogt\n"
+"  Fredrik Vraalsen\n"
+"libogg authors:\n"
+"  Christopher Montgomery\n"
+"\n"
+"libsamplerate authors:\n"
+"  Erik de Castro Lopo\n"
+"\n"
+"libvorbis authors:\n"
+"  Christopher Montgomery\n"
+"\n"
+"libx264 authors:\n"
+"  Laurent Aimar\n"
+"\n"
+"libxvidcore authors:\n"
+"  Christoph Lampert\n"
+"  Michael Militzer\n"
+"  Peter Ross\n"
+"  Benjamin Herrenschmidt\n"
+"  Daniel Smith\n"
+"  Dirk Knop\n"
+"  Edouard Gomez\n"
+"  Guillaume Morin\n"
+"  MinChen\n"
+"  Pascal Massimino\n"
+"  Radoslaw Czyz\n"
+"\n"
+"&lt;/property&gt;\n"
+"    &lt;property name=&quot;logo_icon_name&quot;&gt;hb-icon&lt;/propert"
+"y&gt;\n"
+"    &lt;property name=&quot;wrap_license&quot;&gt;True&lt;/property&gt;"
+"\n"
+"    &lt;signal handler=&quot;hb_about_response_cb&quot; name=&quot;resp"
+"onse&quot;/&gt;\n"
+"    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot"
+";delete_event&quot;/&gt;\n"
+"    &lt;child internal-child=&quot;vbox&quot;&gt;\n"
+"      &lt;object class=&quot;GtkVBox&quot; id=&quot;dialog-vbox4&quot;&"
+"gt;\n"
+"        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;\n"
+"        &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;placeholder/&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child internal-child=&quot;action_area&quot;&gt;\n"
+"          &lt;object class=&quot;GtkHButtonBox&quot; id=&quot;dialog-ac"
+"tion_area4&quot;&gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;layout_style&quot;&gt;GTK_BUTTONBOX"
+"_END&lt;/property&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;pack_type&quot;&gt;GTK_PACK_END&lt;"
+"/property&gt;\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"      &lt;/object&gt;\n"
+"    &lt;/child&gt;\n"
+"  &lt;/object&gt;\n"
+"  &lt;object class=&quot;GtkDialog&quot; id=&quot;update_dialog&quot;&g"
+"t;\n"
+"    &lt;property name=&quot;border_width&quot;&gt;5&lt;/property&gt;\n"
+"    &lt;property name=&quot;modal&quot;&gt;True&lt;/property&gt;\n"
+"    &lt;property name=&quot;window_position&quot;&gt;center-on-parent&l"
+"t;/property&gt;\n"
+"    &lt;property name=&quot;type_hint&quot;&gt;dialog&lt;/property&gt;\n"
+"    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/propert"
+"y&gt;\n"
+"    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&"
+"gt;\n"
+"    &lt;property name=&quot;has_separator&quot;&gt;False&lt;/property&g"
+"t;\n"
+"    &lt;child internal-child=&quot;vbox&quot;&gt;\n"
+"      &lt;object class=&quot;GtkVBox&quot; id=&quot;dialog-vbox6&quot;&"
+"gt;\n"
+"        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;\n"
+"        &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;\n"
+"        &lt;child&gt;\n"
+"          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox24&quot;&gt"
+";\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox19&quot"
+";&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkEventBox&quot; id=&quot;eve"
+"ntbox2&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;events&quot;&gt;GDK_BUTTON_"
+"MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK&lt;/property&g"
+"t;\n"
+"                    &lt;property name=&quot;visible_window&quot;&gt;Fal"
+"se&lt;/property&gt;\n"
+"                    &lt;property name=&quot;above_child&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkImage&quot; id=&quot;im"
+"age3&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;events&quot;&gt;GDK_POI"
+"NTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK"
+" | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                        &lt;property name=&quot;icon_name&quot;&gt;hb-i"
+"con&lt;/property&gt;\n"
+"                        &lt;property name=&quot;icon-size&quot;&gt;6&lt"
+";/property&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;0&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;placeholder/&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;expand&quot;&gt;False&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;0&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox1&quot;"
+"&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label3"
+"&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;xalign&quot;&gt;0&lt;/prope"
+"rty&gt;\n"
+"                    &lt;property name=&quot;xpad&quot;&gt;10&lt;/proper"
+"ty&gt;\n"
+"                    &lt;property name=&quot;ypad&quot;&gt;5&lt;/propert"
+"y&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;&amp;lt;b&amp;gt;A new version of HandBrake is availab"
+"le!&amp;lt;/b&amp;gt;&lt;/property&gt;\n"
+"                    &lt;property name=&quot;use_markup&quot;&gt;True&lt"
+";/property&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;0&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkLabel&quot; id=&quot;update"
+"_message&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;xalign&quot;&gt;0&lt;/prope"
+"rty&gt;\n"
+"                    &lt;property name=&quot;xpad&quot;&gt;10&lt;/proper"
+"ty&gt;\n"
+"                    &lt;property name=&quot;ypad&quot;&gt;5&lt;/propert"
+"y&gt;\n"
+"                    &lt;property name=&quot;label&quot; translatable=&q"
+"uot;yes&quot;&gt;HandBrake xxx is now available (you have yyy).&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;expand&quot;&gt;False&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;1&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"                &lt;child&gt;\n"
+"                  &lt;object class=&quot;GtkFrame&quot; id=&quot;frame2"
+"&quot;&gt;\n"
+"                    &lt;property name=&quot;visible&quot;&gt;True&lt;/p"
+"roperty&gt;\n"
+"                    &lt;property name=&quot;label_xalign&quot;&gt;0&lt;"
+"/property&gt;\n"
+"                    &lt;property name=&quot;shadow_type&quot;&gt;etched"
+"-out&lt;/property&gt;\n"
+"                    &lt;child&gt;\n"
+"                      &lt;object class=&quot;GtkAlignment&quot; id=&quo"
+"t;alignment2&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;left_padding&quot;&gt;1"
+"2&lt;/property&gt;\n"
+"                        &lt;child&gt;\n"
+"                          &lt;object class=&quot;GtkScrolledWindow&quot"
+"; id=&quot;update_scroll&quot;&gt;\n"
+"                            &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+"                            &lt;property name=&quot;can_focus&quot;&gt;"
+"True&lt;/property&gt;\n"
+"                            &lt;property name=&quot;hscrollbar_policy&q"
+"uot;&gt;automatic&lt;/property&gt;\n"
+"                            &lt;property name=&quot;vscrollbar_policy&q"
+"uot;&gt;automatic&lt;/property&gt;\n"
+"                            &lt;child&gt;\n"
+"                              &lt;placeholder/&gt;\n"
+"                            &lt;/child&gt;\n"
+"                          &lt;/object&gt;\n"
+"                        &lt;/child&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                    &lt;child type=&quot;label&quot;&gt;\n"
+"                      &lt;object class=&quot;GtkLabel&quot; id=&quot;la"
+"bel88&quot;&gt;\n"
+"                        &lt;property name=&quot;visible&quot;&gt;True&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;label&quot; translatabl"
+"e=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Release Notes&amp;lt;/b&amp;gt;&l"
+"t;/property&gt;\n"
+"                        &lt;property name=&quot;use_markup&quot;&gt;Tru"
+"e&lt;/property&gt;\n"
+"                      &lt;/object&gt;\n"
+"                    &lt;/child&gt;\n"
+"                  &lt;/object&gt;\n"
+"                  &lt;packing&gt;\n"
+"                    &lt;property name=&quot;position&quot;&gt;2&lt;/pro"
+"perty&gt;\n"
+"                  &lt;/packing&gt;\n"
+"                &lt;/child&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;1&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt"
+";\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"        &lt;child internal-child=&quot;action_area&quot;&gt;\n"
+"          &lt;object class=&quot;GtkHButtonBox&quot; id=&quot;dialog-ac"
+"tion_area6&quot;&gt;\n"
+"            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;layout_style&quot;&gt;end&lt;/prope"
+"rty&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkButton&quot; id=&quot;update_sk"
+"ip&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;receives_default&quot;&gt;True&"
+"lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;Skip This Version&lt;/property&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;0&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"            &lt;child&gt;\n"
+"              &lt;object class=&quot;GtkButton&quot; id=&quot;update_re"
+"mind&quot;&gt;\n"
+"                &lt;property name=&quot;visible&quot;&gt;True&lt;/prope"
+"rty&gt;\n"
+"                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/pro"
+"perty&gt;\n"
+"                &lt;property name=&quot;receives_default&quot;&gt;True&"
+"lt;/property&gt;\n"
+"                &lt;property name=&quot;label&quot; translatable=&quot;"
+"yes&quot;&gt;Remind Me Later&lt;/property&gt;\n"
+"              &lt;/object&gt;\n"
+"              &lt;packing&gt;\n"
+"                &lt;property name=&quot;position&quot;&gt;1&lt;/propert"
+"y&gt;\n"
+"              &lt;/packing&gt;\n"
+"            &lt;/child&gt;\n"
+"          &lt;/object&gt;\n"
+"          &lt;packing&gt;\n"
+"            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&"
+"gt;\n"
+"            &lt;property name=&quot;pack_type&quot;&gt;end&lt;/property"
+"&gt;\n"
+"            &lt;property name=&quot;position&quot;&gt;0&lt;/property&gt"
+";\n"
+"          &lt;/packing&gt;\n"
+"        &lt;/child&gt;\n"
+"      &lt;/object&gt;\n"
+"    &lt;/child&gt;\n"
+"    &lt;action-widgets&gt;\n"
+"      &lt;action-widget response=&quot;-5&quot;&gt;update_skip&lt;/acti"
+"on-widget&gt;\n"
+"      &lt;action-widget response=&quot;0&quot;&gt;update_remind&lt;/act"
+"ion-widget&gt;\n"
+"    &lt;/action-widgets&gt;\n"
+"  &lt;/object&gt;\n"
+"&lt;/interface&gt;\n"
+"</string>\n"
+"      <key>icons</key>\n"
+"      <dict>\n"
+"              <key>hb-activity</key>\n"
+"              <data>\n"
+"R2RrUAAAEBgBAQACAAAAgAAAACAAAAAg////AP///wD///8A////AP///wD///8A////AP/"
+"//wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///"
+"8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////A"
+"P///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/"
+"//8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A///"
+"/AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///w"
+"D///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/"
+"///AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//"
+"/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8"
+"A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP"
+"///wAAAAAAlpaWmZaWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wl"
+"pb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW"
+"/5aWlv+Wlpb/lpaW/5aWlv+WlpaZAAAAAAAAAACUlJT////////////////////////////"
+"///////////////////////////////////////////////////////////////////////"
+"///////////////////////////////////////////////////5SUlP8AAAAAAAAAAJKSk"
+"v/+/v7//v7+//7+/v/+/v7//v7+//7+/v///v7//v7+//7+/v/+/////v7+//7+/v///v7/"
+"/v7+//7+/v/+/v7///7+//7+/v/+/v7//v7+//7+/v///v7//v7///7+/v/+/v7//v7+///"
+"+/v/+/v7/kpKS/wAAAAAAAAAAkJCP//39/f/9/f3/hISE/zMzM/8zMzP/MzMz/zMzM/8zMz"
+"P/MzMz/zMzM/8zMzP/MzMz/zMzM/8zMzP/MzMz/zMzM/8zMzP/MzMz/zMzM/8zMzP/MzMz/"
+"zMzM/8zMzP/MzMz/zMzM/+Eg4T//f39//39/f+PkJD/AAAAAAAAAACNjY3/+/v7//v7+/8z"
+"MzP/TU1N/01NTf9NTU3/TU1N/01NTf9NTU3/TU1N/01NTf9NTU3/TU1N/01NTf9NTU3/TU1"
+"N/01NTf9NTU3/TU1N/01NTf9NTU3/TU1N/01NTf9NTU3/TU1N/zMzM//8+/v//Pz7/42Njf"
+"8AAAAAAAAAAI2Njf/7+/v/+/v7/zMzM/9NTU3//////01NTf9NTU3/TU1N/01NTf9NTU3/T"
+"U1N/01NTf9NTU3/TU1N/01NTf9NTU3/TU1N/01NTf9NTU3/TU1N/01NTf9NTU3/TU1N/01N"
+"Tf9NTU3/MzMz//z7+//8/Pv/jY2N/wAAAAAAAAAAioqK//r6+//6+vr/MzMz/0tMS/9MS0v"
+"//////0xLS/9LS0z/S0tM/0xMS/9MTEz/TExM/0xMS/9MTEz/TExL/0xMTP9LTEz/S0tM/0"
+"xLTP9MTEz/TExM/0xMS/9LTEz/S0tL/0xMTP8zMzP/+vv6//r7+v+Kior/AAAAAAAAAACHh"
+"of/+fn5//n5+P8zMzP/SkpK//////9KSkr/SkpK////////////SkpK/0pKSv9KSUr/SkpK"
+"/0pKSv9KSkr/SUpK/0pKSv9KSkr/SkpK/0lKSf9KSkr/SkpJ/0pKSv9KSkn/SkpJ/zMzM//"
+"4+fj/+fn4/4aHh/8AAAAAAAAAAIODhP/39/b/9vf3/zMzM/9HSEj/SEhI/0hISP9ISEj/SE"
+"dH/0dHSP9IR0f/R0hI/0dHSP9ISEj/SEhI/0hISP9ISEj/SEhI/0hISP9ISEf/R0dI/0hHS"
+"P9ISEj/SEhI/0hISP9HSEj/MzMz//f29v/29/b/g4OD/wAAAAAAAAAAgH9///X19P/19fX/"
+"MzMz/0ZFRf9GRkX/RUZG/0VFRf9GRkX/RUZG/0VGRf9GRUX/RUZF/0VGRv9GRkb/RkVF/0V"
+"FRf9GRkX/RUVG/0VGRv9FRkX/RkZF/0ZGRv9FRkb/RkVF/0ZFRf8zMzP/9fX1//X19f9/f4"
+"D/AAAAAAAAAAB8fHz/8/Pz//Pz8/8zMzP/Q0ND/0NDQ/9CQ0P/Q0ND/0NDQ/9DQ0P/Q0ND/"
+"0NDQ/9DQ0P/Q0ND/0NDQ/9DQkP/Q0ND/0NDQ/9DQ0P/Q0ND/0NDQ/9DQ0P/QkND/0NDQ/9D"
+"Q0P/Q0ND/zMzM//z8/P/8/Tz/3x8fP8AAAAAAAAAAHh3d//x8fH/8fHx/zMzM/9BQED/QEB"
+"A/0BAQP9AQED/QEBA/0BAQP9AQEH/QUFA/0BBQP9AQED/QUFA/0BBQf9AQUD/QUBA/0BBQP"
+"9AQUD/QEBA/0BAQP9AQUD/QEFA/0BAQP9BQED/MzMz//Hx8f/x8fH/eHh4/wAAAAAAAAAAd"
+"HR0/+/v7//v7/D/MzMz/z0+Pv89PT7/PT09/z0+Pv89Pj3/PT09/z49Pf89PT3/PT0+/z09"
+"Pv89PT7/PT09/z4+Pv89PT3/PT49/z09Pf8+Pj7/PT0+/z09Pf89PT3/PT09/z49Pv8zMzP"
+"/7+/v/+/w7/90dHT/AAAAAAAAAABwcHD/7e3t/+3t7f8zMzP/Ojo7/zo7Ov86Ozv/Ojs6/z"
+"o6Ov86Ozv/Ozo6/zo6Ov87Ojv/Ozs7/zs7Ov87Ojr/Ojo6/zs7O/87Ojv/Ojo6/zs7O/86O"
+"zr/Ozs7/zs6O/87Ozr/Ojo6/zMzM//t7e3/7e3t/3BwcP8AAAAAAAAAAGxsbP/r6uv/6+vr"
+"/zMzM/83Nzf/ODc4/zg4OP84ODj/ODc4/zg3N/84ODj/ODc3/zc3OP84ODf/ODg4/zg4OP8"
+"3Nzj/ODc4/zg4OP84ODf/Nzg3/zc3OP84ODj/ODg4/zc4OP83ODj/MzMz/+vr6//r6+v/bG"
+"xs/wAAAAAAAAAAaGho/+np6f/p6en/MzMz/zU1NP81NDX/NDU1/zU1Nf81NDX/NTU1/zU1N"
+"f80NTT/NDU1/zU1Nf81NDX/NTU1/zU1Nf81NTX/NDU1/zQ1NP81NDX/NTQ1/zU0Nf80NTX/"
+"NTU1/zU0Nf8zMzP/6enp/+no6f9oaGj/AAAAAAAAAABkZWX/5+fn/+fn5/8zMzP/MjIz/zI"
+"yMv8yMjL/MjIy/zIyMv8yMjL/MjIy/zIyMv8yMzL/MjIy/zIyMv8yMjL/MjIy/zIyMv8yMj"
+"L/MjIy/zMzMv8yMjL/MjIy/zMzMv8yMjL/MjIy/zMzM//n5+f/5+fn/2RkZP8AAAAAAAAAA"
+"GBhYf/l5eX/5eXl/zMzM/8vMC//Ly8v/y8vMP8vLy//MDAv/zAvL/8wLy//MC8w/zAwMP8w"
+"MC//MDAv/zAwMP8vMDD/LzAw/zAvL/8wMDD/MC8w/y8wMP8vMDD/Ly8v/zAwL/8wMDD/MzM"
+"z/+Xl5f/l5eX/YWFg/wAAAAAAAAAAXVxd/+Pj4//j4+P/MzMz/y0tLf8tLi3/LS4t/y0tLf"
+"8tLS3/LS0t/y0tLf8uLS3/LS4t/y0tLv8tLS3/LS0u/y4tLf8tLi7/LS0t/y0tLf8tLi3/L"
+"S0t/y0tLf8tLS3/LS4t/y0tLf8zMzP/4+Pj/+Pj4/9cXV3/AAAAAAAAAABZWlr/4uHi/+Lh"
+"4f8zMzP/Kysr/ysrK/8rKyv/Kysr/ysrK/8rKyv/Kysr/ywrK/8sKyv/LCss/ysrK/8rKyv"
+"/Kysr/ysrK/8rLCv/Kyss/ysrK/8rKyv/LCsr/ysrK/8rKyz/Kysr/zMzM//h4eL/4eHi/1"
+"pZWv8AAAAAAAAAA1ZWVv/g4N//4ODf/zMzM/8pKin/Kioq/yopKf8qKin/KSoq/yopKv8pK"
+"in/KSkq/yopKf8pKSn/KSkq/yopKv8pKSn/KSkq/ykqKf8qKSn/KSkp/ykpKv8qKSn/KSkq"
+"/yoqKv8pKSn/MzMz/+Dg4P/f4OD/V1ZX/wAAAAMAAAANVFNT/97e3//f3t//eHh3/zMzM/8"
+"zMzP/MzMz/zMzM/8zMzP/MzMz/zMzM/8zMzP/MzMz/zMzM/8zMzP/MzMz/zMzM/8zMzP/Mz"
+"Mz/zMzM/8zMzP/MzMz/zMzM/8zMzP/MzMz/zMzM/94d3f/3t7e/9/f3/9TU1P/AAAADQAAA"
+"BxRUVD/3d3d/93d3f/d3d3/3d3d/93d3f/d3d3/3d3d/93e3f/d3d3/3d3d/93d3f/d3d3/"
+"3d3d/93d3f/d3d3/3d3d/93d3f/d3d3/3d3d/93d3f/d3d3/3d3d/93d3f/d3d3/3d3d/93"
+"d3f/d3d3/3d3d/1BQUf8AAAAcAAAAJU5OTv/c29z/3Nzc/9zb3P/c3Nz/3Nzc/9zc3P/b3N"
+"z/29zc/9zc3P/c3Nz/3Nzc/9vc3P/c3Nz/3Nzc/9zc3P/c3Nz/3Nzc/9zc2//c3Nz/3Nzc/"
+"9zc3P/c3Nz/29zc/9zb3P/c3Nz/3Nzc/9zc3P/c3Nv/Tk5O/wAAACUAAAAdQj9Cs0xMS/9M"
+"S0z/TEtM/0xMTP9MTEz/TExM/0tMS/9MTEz/TEtM/0xLTP9MTEv/TExM/0xMTP9MS0z/S0x"
+"M/0xLTP9MTEz/TEtM/0xMTP9MTEz/S0xL/0xMTP9MTEz/S0tM/0xLTP9MTEz/TExL/0xMTP"
+"9CP0KzAAAAHQAAAA4AAAAeAAAAKQAAAC0AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuA"
+"AAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAA"
+"AC4AAAAuAAAALgAAAC4AAAAtAAAAKQAAAB4AAAAOAAAABAAAAAcAAAAKAAAACwAAAAsAAAA"
+"LAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACw"
+"AAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAAKAAAABwAAAAQAA"
+"AABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAA"
+"AQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAE"
+"AAAABAAAAAQAAAAEAAAABAAAAAQ==\n"
+"              </data>\n"
+"              <key>hb-add-queue</key>\n"
+"              <data>\n"
+"R2RrUAAAEBgBAQACAAAAgAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAZWVlvYKCgueCgoLngoKC54KCgueCgoLngoKC54KCgueCgoLngoKC54KCgueCg"
+"oLngoKC54KCgueCgoLngoKC54KCgueCgoLngoKC54KCgueCgoLngoKC54KCgueCgoLngoKC"
+"54KCgueCgoLngoKC52VlZb0AAAAAAAAAAAAAAACDg4Po///////////////////////////"
+"///////////////////////////////////////////////////////////////////////"
+"/////////////////////////////////////////o5/P/g4OD6AAAAAAAAAAAAAAAAIODg"
+"+j//////Pv9//v6/P/5+Pv/+fj7//f2+v/39vr/9/b6//f2+v/39vr/9PP4//Tz+P/08/j/"
+"9PP4//Tz+P/08/j/9PP4//Tz+P/w7/X/8O/1//Dv9f/w7/X/8O/1//Dv9f/w7/X//////+j"
+"n8/+Dg4PoAAAAAAAAAAAAAAAAg4OD6P/////7+vz/U4H2/0p59P9IePP/RXnw/0Z89v9Lhf"
+"r/V5r//zRfu/8dMGn/ERER/xEREf8XHzr/KUWH/1GH//9Ti///Snzw/yhBd/8SFBj/HytL/"
+"0l6+v9epv//WqD//1WR////////6Ofz/4ODg+gAAAAAAAAAAAAAAAB5eXni//////n4+/9C"
+"eO3/P3Tx/0J08/9GdfT/Rnj6/0mB/f9Tlv//TIHh/0Vuvf8+XJP/M1OP/yU/ef8ZMGX/I0G"
+"R/ypMnf8rTp7/Ijx4/xEaMv8ZKVP/NGDI/zpsvP8wXKf/J0mS///////o5/P/eXl54gAAAA"
+"AAAAAAAAAAAHl5eeL/////9/b6/0B55f9Bd+z/Snrz/1R++f9Tf/7/U4b//1iS+/9nnv//b"
+"6f//3Sx//9hnv//PGGv/xUjQv8ECh7/Dhcy/xcmSv8nPXT/HS5V/x8yXv8nRob/IDdr/xYl"
+"Sv8UGS///////+jn8/95eXniAAAAAAAAAAAAAAAAeXl54v/////08/j/OG/e/0F04/9Tf+z"
+"/ZI///1+P//9Zh/v/UHft/1J48f9DbMb/Pmyq/zlgov8qR3b/BwkM/wAAAP8AAAD/BAUI/x"
+"oiOv8ZK0r/FydA/w8XHf8MEBz/DRAj/xYaM///////6Ofz/3l5eeIAAAAAAAAAAAAAAAB5e"
+"Xni//////Tz+P8zXuD/PWng/0985v9fl///WpD//0176f82TJT/GiVJ/xMeN/8SITT/Dhkr"
+"/wcMFP8AAAD/AwMI/wEBA/8BAgP/BwkP/wQJDP8EBwr/AwUH/xosW/8qSZ7/P2nX///////"
+"o5/P/eXl54gAAAAAAAAAAAAAAAHl5eeL/////9PP3/zRX1v89ZN3/TXnm/1iP9/9NfuX/O2"
+"K4/yAtVP8HChX/CAwd/xQcP/8gK0P/FRww/wcKF/8GCRP/AgMG/wAAAP8AAAD/CRAc/wkPG"
+"/8BAgL/FCVN/yZElf8/aNf///z5/+jn8/95eXniAAAAAAAAAAAAAAAAeXl54v/////08/j/"
+"O1nC/z9l2v9Kde7/TXrk/zdbpP8jO2n/CxUi/xAcO/8sQZD/VXv//3yt//9Pbrv/GiZN/wo"
+"RIP8DBQr/AAAA/wACAP8lOmz/JDhn/wcKC/8AAQL/Bwwg/x0mUP//////6Ofz/3l5eeIAAA"
+"AAAAAAAAAAAABubm7b//////Tz+P82UsD/Pl3P/0pr2/9KbtL/NFet/ylKmf8pQ5T/J0i5/"
+"ydP0/8qV+r/FkTF/wchdP8AAij/CRs//xcqU/8fMF7/HCpX/xQfPP8WIEH/ISxh/xUfQf8M"
+"ESD/DQ4O///////o5/P/bm5u2wAAAAAAAAAAAAAAAG5ubtv/////8O/1/zFRuv85V8L/RWD"
+"M/0Zjyv84Wbz/NFe9/ztd0f9cgen/Yobr/1594f83U57/Jzp2/x0pW/8hOHb/MEqb/zhTrP"
+"80TJ//Dxct/w8WLf8rPIP/Jzl6/xklTP8SFiH//////+jn8/9ubm7bAAAAAAAAAAAAAAAAb"
+"m5u2//////w7/T/LVKy/zNStv8+V7//QVnF/z1byv9AY9j/TnP2/5m6//+sxff/p7Xg/36G"
+"k/9gbpH/RVyd/0JbtP9IZtr/Smzr/0dn3P8NEyn/Gzoi/2+Cev+AnoL/fZl4/2l5ZP/S7sr"
+"/6Ofz/25ubtsAAAAAAAAAAAAAAABubm7b//////Dv9P8tUqT/LEys/zRNuP84Tcb/P1XG/1"
+"91z/+Mo9z/zdXu/////f//////6+75/7XC5/9aeM//c4f4/1dw9v9FYfD/S2vp/0FWRP+v0"
+"Yj/yuue/8ntnP/I7Zz/yeue/7bYjv+4yqr/bm5u2wAAAAAAAAAAAAAAAG5ubtv/////8O7x"
+"/zhQvv84T8b/PlTR/zZS2v9KaN//dY7l/77K8P/+////////////////////7/T9/8bQ8/+"
+"htv//Wnn9/zRV9f9uj5T/0/Co/8rymP+s5nb/qelv/6npb/+r53b/yvKY/9Twqf9SaDixAA"
+"AAAAAAAAAAAAAAbm5u2//////w7/L/MT2f/y88pf8zQq//KEC2/zxXvf91iMr/1tXg/97d5"
+"P/d3eX/3t7m/97f5v/j4+b/0dTi/5Oj2v9HYc7/QmeK/9Lmpv+164L/mthj/6Hbbf+f1m3/"
+"oNVt/6Pcbv+c22b/uO6E/9Toqf8yRyF1AAAAAAAAAABubm7b//7///Dv9f8UFDn/DA06/w0"
+"QQ/8KD0z/KDBi/0RKcf98dob/dnOR/3p3mf99fp7/e3+b/4CDlv98f4z/OUBp/zJZVv+UuH"
+"b/weqQ/5nVZP+t6Xj/o9tx/0VcL/9FXC//o9lw/6rjdf+SzV//uuKK/5CzbusPMAlFAAAAA"
+"G5ubtv8+///8O/1/woKGv8AABX/AQEa/wABIP8BAiD/BgYj/xEPK/8QDzn/ERBB/xERRv8R"
+"EUX/EhE9/xERM/8HCCX/SUw//7HYhv+j3XL/ndNs/6DYcP+Vx2j/N0km/zRHI/+JuV3/ksR"
+"i/42/Xf+UymP/qMx//0dJMY4AAAAAbm5u2/r5///w7/X/DhE2/wkLMv8ICzT/CQo1/wgJMv"
+"8GCTL/Awk1/wMHOf8DBTv/AQM9/wEEP/8CBDr/AwQ0/wYHMP9Ua0j/p9R9/6Ldcf+Xy2z/Q"
+"Vgu/zRGI/86Tib/OU0m/zJDIf88Uij/jL1e/5bMYf+izXf/Umg7uQAAAABubm7b+Pf//+7t"
+"9v8tNHL/Jips/yYqaf8mKWX/Jihh/yMpYf8gLmb/IShd/yAkWP8dIVb/HCRc/x4kW/8hJFv"
+"/IiZd/1RrT/+gz3f/o9xz/5DBZP87Tyf/MEIg/zlNJv85TSb/MkQh/ztRKP+IuVz/lMli/5"
+"vIcP9LYTS5AAAAAG5ubtv39v//9/X6/////////////////////////////////////////"
+"///////////////////////////////////prmV/5rLcP+YzGv/h7da/4q7Xf+Brlf/MUIg"
+"/zFCIf+Brlf/i7xe/4i5XP+Qw2P/j71m/zNGI44AAAAAbm5u2+jn8//q6fT/6un0/+zr9f/"
+"r6vX/6+r1/+vq9f/r6vX/6+r1/+vq9f/r6vX/6+r1/+vq9f/r6vX/6+r1/+vq9f+0uLn/eJ"
+"5a/5nQav+CsVf/j8Jh/4a3W/83TSb/OUwm/4a2W/+OwmH/g7FZ/5rRa/9hh0PrCAwFRQAAA"
+"ABFRUWxZWVl42VlZeNlZWXjZWVl42VlZeNlZWXjZWVl42VlZeNlZWXjZWVl42VlZeNlZWXj"
+"ZWVl42VlZeNlZWXjZWVl42VlZeMYIg+sh75c/43CYf+ArFf/f65Y/3yqVf98qVX/f61X/3+"
+"tV/+NwmH/iL9d/xolEXQAAAAAAAAAAAMDAxoAAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAA"
+"AfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8iMhapgbpW/"
+"43HX/+EtVr/h7Zd/4a3Xf+Etlv/jcZg/4G8V/8jMhenAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAPFwmIVoE4/3WsTf96slD/erJR/3SsTf9WgTj/EBgKkAAAAA"
+"QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAEwAAABkAAABJBwwFhg0W"
+"CKMOFgikCAwEiQABAE0AAAAZAAAAEwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAFAAAACgAAAAoAAAAPAAAADwAAAA8AAAAPAAAACgAAAAoAAAAFAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-canceled</key>\n"
+"              <data>\n"
+"R2RrUAAABBgBAQACAAAAQAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAg"
+"IGXxsbf18bG39fGxt/Xxsbf18bG39fGxt/BQICBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAEAQEFozExxPpMTf/7TU7/+01O//tNTv/7TU7/+kxN/6MxMcQEAQEFAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAEAQEFojAwxPlCQ//5OTn/+jk6//k5Of/6OTr/+jk6//k5Of/5QkP/ojA"
+"wxAQBAQUAAAAAAAAAAAAAAAAEAQEFoS4vxPhBQf/4Nzj/9zg4//c3OP/4ODn/+Dg5//g3OP"
+"/4ODj/+Dg5//dBQf+hLi/EBAEBBQAAAAAAAAAAXBoaf/ZFRv/1Nzf/9jY3//Y2N//2Njf/9"
+"jY3//U2N//2Njf/9TEy//QsLP/zJSX/8jM0/1waGn8AAAAAAAAAAFsZGX/0Q0P/8zU1//M1"
+"Nf/zNTb/8zU1//IwMP/yJif/8R8e//AbG//wGxv/8Bsb//ErK/9bGRl/AAAAAAAAAABaGRl"
+"/8j8///AzNP/xMzT/8DAw/+0jI//rGxv/6xob/+wbG//rGxv/6xsb/+wbG//sKSn/WhkZfw"
+"AAAAAAAAAAWRgYf+88PP/uMjL/6yoq/+UcHP/kGhr/5Boa/+QaGv/kGhr/5Boa/+QaGv/kG"
+"hr/5iYm/1kYGH8AAAAAAAAAAFcXGH/tOTn/5ykp/90aG//cGhn/3BkZ/9wZGv/cGhn/3BoZ"
+"/9wZGf/cGRn/3BkZ/94jI/9XFxh/AAAAAAAAAABWFxd/6DQ0/9YbG//UGBn/1BgY/9MZGf/"
+"UGRn/1BgY/9QYGf/UGBj/1BkY/9MZGf/TISH/VhcXfwAAAAAAAAAABAEBBZAiIsTKGxv/zB"
+"cY/8sYGP/LFxf/zBgY/8wYGP/LGBj/yxcY/8wYGP/KGxz/iyAgxAQBAQUAAAAAAAAAAAAAA"
+"AAEAQEFiB4fxMQZGf/FFxf/xRcX/8UXF//EFxf/xRcX/8UXF//EGRn/iB8fxAQBAQUAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAgQBARWGHR7NvxkZ/8AYGP/AGBj/wBgY/8AYGP+/GRn/hh0ezQQ"
+"BARUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAbBAEBN1MWFZpSFRaeUxUWoVMVFaFTFR"
+"WeUxYVmgQBATcAAAAbAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAsAAAAOAAAAE"
+"QAAABMAAAATAAAAEQAAAA4AAAALAAAABQAAAAAAAAAAAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-complete</key>\n"
+"              <data>\n"
+"R2RrUAAABBgBAQACAAAAQAAAABAAAAAQG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu"
+"/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvw"
+"AAG78Afxu/AP8bvwD/G78A/xu/AP8bvwB/G78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AA"
+"Bu/AAAbvwA/G78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AP8bvwA/G78AABu/AAAb"
+"vwAAG78AABu/AAAbvwA/G78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/1DOO/+16qz/G78"
+"A/xu/AD8bvwAAG78AABu/AAAbvwAAG78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AP"
+"+97LX/5Pfh/xu/AP8bvwD/G78AABu/AAAbvwAAG78Afxu/AP8bvwD/G78A/xu/AP8bvwD/G"
+"78A/xu/AP9Y0ET//////4nee/8bvwD/G78A/xu/AH8bvwAAG78AABu/AP8bvwD/G78A/xu/"
+"AP8bvwD/G78A/xu/AP8bvwD/wO25//L78P8yxhr/G78A/xu/AP8bvwD/G78AABu/AAAbvwD"
+"/G78A/xu/AP8bvwD/fttv/6Lll/8bvwD/W9FI//////+T4Yb/G78A/xu/AP8bvwD/G78A/x"
+"u/AAAbvwAAG78A/xu/AP8bvwD/G78A/9v11///////Y9NQ/8DtuP/2/PX/Ocgi/xu/AP8bv"
+"wD/G78A/xu/AP8bvwAAG78AABu/AP8bvwD/G78A/xu/AP+n5p3///////j99///////neOR"
+"/xu/AP8bvwD/G78A/xu/AP8bvwD/G78AABu/AAAbvwB/G78A/xu/AP8bvwD/T846//v++v/"
+"/////6vnn/znHIf8bvwD/G78A/xu/AP8bvwD/G78Afxu/AAAbvwAAG78AABu/AP8bvwD/G7"
+"8A/xu/AP+P4IL/6fnm/3TYZP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AAAbvwAAG78AABu/A"
+"AAbvwA/G78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AD8bvwAA"
+"G78AABu/AAAbvwAAG78AABu/AD8bvwD/G78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu"
+"/AD8bvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AH8bvwD/G78A/xu/AP8bvw"
+"D/G78Afxu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AA"
+"Bu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AAA==\n"
+"              </data>\n"
+"              <key>hb-drawer</key>\n"
+"              <data>\n"
+"R2RrUAAAEBgBAQACAAAAgAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGxsbJ0RERGBycnKfm5ub2Le3t/"
+"+3t7f/t7e3/7e3t/+YmJjVOzs7VAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAjY+MnMjJyNvl5+P57e/s/+3v7P/t7+z/7e/s/+Tl4/iysrL5AAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACPj4+cyMjI297e3vng4OD/4ODg/+Dg4P/g4"
+"OD/5eXl/7e3t/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIGBgZy"
+"urq7bvLy8+be3t/+3t7f/t7e3/7e3t/+3t7f/t7e3/6ioqP+urq7/s7Oz/7e3t/+3t7f/t7"
+"e3/7e3t/+3t7f/t7e3/7e3t/+3t7f/kJCQySwsLD8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAl5eXnNTU1Nvx8fH59vb2//b29v/29vb/9vb2//b29v+3t7f/"
+"6urq//Ly8v/6+vr////////////////////////////////////////////w8PD/paWl5wA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACXl5ec1NTU2/Hx8fn29v"
+"b/9vb2//b29v/29vb/9vb2/7e3t/++vr7/xMTE/8vLy//Pz8//z8/P/8/Pz//Pz8//z8/P/"
+"8/Pz//Pz8//4eHh//////+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAJeXl5zU1NTb8fHx+fb29v/29vb/9vb2//b29v/29vb/t7e3/9nf6f/h5/H/6O7"
+"5/+3z/v/t8/7/7fP+/+3z/v/t8/7/7fP+/+3z/v/Pz8///////7e3t/8AAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAl5eXnNTU1Nvx8fH59vb2//b29v/29vb/9"
+"vb2//b29v+3t7f/2d/p/4KKjP+GjpH/iZGU/4mRlP+JkZT/iZGU/+3z/v+JkZT/7fP+/8/P"
+"z///////t7e3/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBgYG"
+"crq6u27y8vPm3t7f/t7e3/7e3t/+3t7f/t7e3/7e3t//Z3+n/4efx/+ju+f/t8/7/7fP+/+"
+"3z/v/t8/7/7fP+/+3z/v/t8/7/z8/P//////+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAGBgYGCfn5+f2NjY2P//////////////////////////t7e3"
+"/+rq6v/y8vL/+vr6///////////////////////////////////////Pz8///////7e3t/8"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYGBgYJ+fn5/Y2NjY//"
+"////////////////////////+3t7f/6urq/4KKjP+GjpH/iZGU/4mRlP+JkZT/iZGU/////"
+"/+JkZT//////8/Pz///////t7e3/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAABgYGBgn5+fn9jY2Nj//////////////////////////7e3t//q6ur/8vLy//r"
+"6+v//////////////////////////////////////z8/P//////+3t7f/AAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBgYGCfn5+f2NjY2P///////////////"
+"///////////t7e3/zJZvv8zXMT/NV/L/zZhz/82Yc//NmHP/zZhz/82Yc//NmHP/zZhz//P"
+"z8///////7e3t/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYGB"
+"gYJ+fn5/Y2NjY//////////////////////////+3t7f/Mlm+//Ly8v/6+vr///////////"
+"///////////zZhz///////NmHP/8/Pz///////t7e3/wAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAABgYGBgn5+fn9jY2Nj//////////////////////////7e3"
+"t/8yWb7/M1zE/zVfy/82Yc//NmHP/zZhz/82Yc//NmHP/zZhz/82Yc//z8/P//Dw8P+3t7f"
+"/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBgYGCfn5+f2NjY2P"
+"//////////////////////////t7e3/+rq6v/y8vL/+vr6/////////////////////////"
+"//////////////Pz8//8PDw/7e3t/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAYGBgYJ+fn5/Y2NjY//////////////////////////+3t7f/6urq/4KKjP+"
+"GjpH/iZGU/4mRlP+JkZT/iZGU//////+JkZT//////8/Pz///////t7e3/wAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgYGBgn5+fn9jY2Nj//////////////"
+"////////////7e3t//q6ur/8vLy//r6+v//////////////////////////////////////"
+"z8/P//////+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGB"
+"gYGCfn5+f2NjY2P//////////////////////////t7e3/9nf6f/h5/H/6O75/+3z/v/t8/"
+"7/7fP+/+3z/v/t8/7/7fP+/+3z/v/Pz8///////7e3t/8AAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAYGBgYJ+fn5/Y2NjY//////////////////////////+3"
+"t7f/2d/p/4KKjP+GjpH/iZGU/4mRlP+JkZT/iZGU/+3z/v+JkZT/7fP+/8/Pz///////t7e"
+"3/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgYGBgn5+fn9jY2N"
+"j//////////////////////////7e3t//Z3+n/4efx/+ju+f/t8/7/7fP+/+3z/v/t8/7/7"
+"fP+/+3z/v/t8/7/z8/P//////+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAGBgYGCfn5+f2NjY2P//////////////////////////t7e3/+rq6v/y8vL"
+"/+vr6///////////////////////////////////////Pz8///////7e3t/8AAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYGBgYJ+fn5/Y2NjY/////////////"
+"/////////////+3t7f/6urq/4KKjP+GjpH/iZGU/4mRlP+JkZT/iZGU//////+JkZT/////"
+"/8/Pz///////t7e3/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAF"
+"fX19hnp6eoNjY2Nj//////////////////////////7e3t//q6ur/8vLy//r6+v////////"
+"//////////////////////////////z8/P//////+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAQAAAAIAAAAFAAAAB2BgYGafn5+j2NjY2v//////////////////////////"
+"t7e3/76+vv/ExMT/y8vL/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//h4eH//////7e"
+"3t/8AAAACAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAAABwAAAA0AAAASYGBgbZ6enqjX19"
+"fc//////////////////////////+3t7f/6urq//Ly8v/6+vr//////////////////////"
+"//////////////////////39/f/o6Oj5QAAAAcAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAMA"
+"AAAKAAAAEgAAABlgYGBynp6eq9fX193/////////////////////6enp8be3t/+oqKj/rq6"
+"u/7Ozs/+3t7f/t7e3/7e3t/+3t7f/t7e3/7e3t/+3t7f/t7e3/6ampuk0NDRVAAAACgAAAA"
+"MAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAANGxsbNkRERG1xcXGompqa3Le3t/+3t7f/t"
+"7e3/7e3t/+3t7f/t7e3/wAAACIAAAAiAAAAIgAAACEAAAAgAAAAHwAAAB0AAAAcAAAAGgAA"
+"ABgAAAAVAAAAEgAAAA0AAAAHAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAUAAAA"
+"HAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAA8AAAAQAAAAEAAAABAAAAAQAAAADw"
+"AAAA8AAAAOAAAADQAAAAwAAAALAAAACgAAAAkAAAAHAAAABQAAAAIAAAABAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-edit</key>\n"
+"              <data>\n"
+"R2RrUAAAEBgBAQACAAAAgAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAADAAAAAwAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADg5G+/4ORvf8AAAALAAAA"
+"CAAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAA"
+"AAA3aFt/92hrf/dYS2/3CAtP8AAAAQAAAACQAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAQAAAANygbX/d4a3/3aFt/9ygrX/a3yx/2Z3r/8AAAASAAAACQA"
+"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"
+"ODj/ODg4/zg4OP8AAABhAAAAYwAAAGAAAAAUAAAADgAAAAkAAAAEAAAAAgAAAAEAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAACwAAAA8AAAAQAAAADQAAAAkAAAAEA"
+"AAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAA"
+"DAAAABQAAAAUAAAADAAAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-icon</key>\n"
+"              <data>\n"
+"R2RrUAABABgBAQACAAACAAAAAIAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAARgAAAEkAAABIAAAASQAAABsAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAKQAAAA"
+"SAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAXwAAANc0CBz/VAco/0wHJf8ZCBH/AAAA6QAAAHsAAAABAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAkAAAAKAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAByCgwP/wAAAFIAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgUDxX/qgA7//oDYv//Cmn//gp"
+"o//IEYP+IADD/DBAT/wAAAFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAABEAAAAzCgtGvkAAADkAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"KwgJC+0AAADcAAAAGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAuGsAJP//Amv//yt6//9Ihv//TIj//zWA//8Vdf9tACT/AAAA5gAAA"
+"CkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAMQAAAD/IB8A/xgXA/8AAA"
+"BtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACdAAAA/wAAAHQAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgUDRT53QBU//8K"
+"bP//SYX//3Sa//98nf//cpj//z+F/+sFYf8ZBxD/AAAAgAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAsDxIU82BfAP9oaAD/DRES+QAAADkAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAShMXHP8GBwn/AAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAASBcJEf/tAFr//xFv//9Si///fp3//3+d//+Cnv//U4"
+"v//g5r/08GJv8AAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAdHQD//Pw"
+"A/66sAP8AAADgAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAB0AAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAADEAAAA/woMDe0AAAA"
+"TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAgAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAfFRAW7+sAWf//DG3//0eF//9zmf//gJ3//3ub//9Jh//2CWf/NAcc/wAAAIAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAsDRIh829uAP///wD/Xl0A/wAAAKgAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAACOAAAA0wAAABcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAASA4QFP8AAAD/AAAAyAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAPgAAAFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8BAQLrugBC//8EbP//JHb//0O"
+"D//9Hhf//QIL//yJ6/8wATv8YFR77AAAARwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AIAEBAL/xsYA////AP8xMgj/AAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAADOAAAA0AAAABYAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACfAAkA"
+"/wAAAP8AAACoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAABtAAAADAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAJwZAQr/0AFR//8EbP//Bmz//wVt//8Fbf/5AGH/OQAR/wAAA"
+"J8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAA1DAuAP///wD/0dAA/wYGB+sAAA"
+"ASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8YHCL/AAAAxQAAAAYAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgUGB+sAFQD/AAAA/wAAAIAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAACAAAAcAAAACYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKgAA"
+"AOMPAAH/igAz/8IAS/+rAEH/cwAo/zMADv8UGR7/AAAASAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAC8FCBf1bWwA////AP+WlQD/AAAAqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAALkAAAD/AAAAjAAAAAAAAAAAAAAAAAAAAAAAAAANAAAABAAAAAAAAAAAAAAAAAAAA"
+"AAAAABkBRoN/wAkB/8FAQb/AAAAWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGUAAAB6"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAALYFDAz/AAAA/wAAAP8AAA"
+"j/AAAA/wAAALMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAACgAAABMAAABFAAAARwAAAFgAAAB4AAAAvQAAA/+srAD///8"
+"A/2lrDv8AAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"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"
+"/0g6LP8aFRD/AAEA/wAAAP8AAAD/NCof/4luUv/GnnT/w5ty/7aQa/9hTDb/BgYG/wAAAMY"
+"AAAAaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbAA"
+"AAcAAAAIQAAADDBwEL/wAAAP8AAAD/AIEA/wDLAP8AjAD/AG8A/wAAAP8AgAD/APsA/wCdA"
+"P8AGwD/AAAA/wA4AP8LFw//AAAAcwAAAAAAAAAQAAAANgAAAAUAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAZhoYJP8AIAT/AJkx/wCdMv8AnzH/AHot/wBjMv8AaTL/ADwd/wJuIf8GpD"
+"P/AGcx/wBlMf8AXjD/AEwc/wCYL/8AlS//AE4f/wBgMP8AZjH/AGUy/wBtK/8AEQP/AAAAt"
+"gAAAAUAAAAAAAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAA1AcDAP8fGRP/BgUE/wMCAv8EAwL/BgU"
+"D/wEBAf8AAAD/BAMD/zwwJf8qIhr/AwMC/wAAAP8AAAD/AAAA/xANCv9KPCz/f2ZM/7GOav"
+"+Yelr/CAYE/xEREP8VFBP/Dg4N/wYHDPkAAAB4AAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMYGiLwAAAA/wAA"
+"AP8ACgD/AAIA/xALGPIJBw7sAAAA/QAvAP8AHQD/BgEJ/wAAAKcAAACaAAAA/wAAAJ4AAAA"
+"BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjBINF/8AX"
+"Br/AKM0/wCbMf8AjzL/AGMx/wBoMv8AViz/BmQf/xO1M/8AYzH/AGcx/wBlMf8Abiz/AJ0w"
+"/wCQLf8ATCP/AGYz/wBnMf8AcTT/AC4L/xMQGu8AAAAqAAAAAAAAACAAAAAsAAAAAAAAAAA"
+"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"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAgysrAP///gD/19cA/wYGAP8AAABjAAAAAAAAAGUcIi"
+"v4AAAA/wgGAP90WwD/1asA//zLAP//1QD//9QA/+a5AP95XwD/FhID/wAAANkAAAB4AAAAB"
+"QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgwBlLf8AAADqAAAAUAAAALAAeiP/AHA"
+"y/wBiMf8CcDH/K8Ix/zbYMf8ZmjH/AFsx/wBqMf8AmzH/AHQx/wt3Mf8uyDH/M9Ex/zTXM/"
+"8klCP/AXQk/wCrNf8AYiD/AB0K/wkeGf8AAADgAAAAewAAAKcAAADJAAAAzAAAAMMAAACzA"
+"AAAbQAAACYAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB1DwUC/8UuAP/RMgD/zjEA/84xAP/OMQD"
+"/zjEA/84xAP/OMQD/2DMA/5wkAP8BAQH/AAAAgAAAAAAAAAAAAAAAEgAAAEEAAABlAAAAgw"
+"AAAIMAAAC1AAAAuQAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC8AAAAnAAAAG4AA"
+"ADUXl0A////AP+bmwD/AAAG+QAAAEQAAACCCw0Q/wAAAP8HBwT/ExMM/wcHBP8CAQD/IRkA"
+"/3lgAP/6zQH//9gB///YAf/luQD/g2YA/xsYDf8AAACMAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAYgBPI/gACAXrAAAAwwRQHf8AfjP/AF0x/wt+Mf8xzjH/NNUx/xWSM"
+"f8AWjH/AHcx/wCRMf8LezH/Lscx/zPSMf8y0DL/MsYu/w5nHP8AjzD/AIIw/wBQJv8AWC3/"
+"Amc1/wBmLf8BZy7/AAAA1AAAAJAAAAB8AAAAaAAAACsAAAAGAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAALEJAAD/xi8A/9MyAP/OMQD/zjEA/88wAP/OMQD/zjEA/9MyAP/bNAD/bRkA/"
+"wADBf8AAADbAAAAsgAAALsCAgTrBgYG/wsLC/8WFhf/LCwr/yYlIv9DQT7/RkRB/0VEQf9F"
+"Q0D/RUNA/0VDQP9FQ0D/RkVB/zs6N/8qKSj/IiQo/wAADP+bmwD///8A/2FgAP8BAgXrAAA"
+"ArAUGC/8WFgz/iopU/93dh//JyXv/EBAJ/wYHCe0AAADrBQcN7zsuAP/pvgD//9YB///RAf"
+"//4QH/sIwA/xQZJv8AAABmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAgAAABVAAAAgQAAAIAAAACAAAAAgAAAAHwAAAB2AAAA3gBp"
+"MP8AWSr/ADoU/wB7MP8AXDH/DoQx/zLPMf8y0DH/DoEx/wBbMf8AgjH/AYMx/yWwMf801TH"
+"/Mc4x/zTVMv8ZoSv/AHAs/wBrMv8AXzH/AGc0/wBtNP8AZjH/EmA+/wIHBesAAACLAAAAdw"
+"AAAFAAAAA4AAAAJQAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATA0PE/+AGgD/2TQA"
+"/9kzAP/WNQH/0joE/9U2Av/ZNwL/zDQC/10WAP8AAAH/BwgI/wIBAP8aGBb/T05M/wAAAIg"
+"AAABmtLS0ZlVVVWYAAABmAAAAZg8PD2YPDw9mDw8PZg8PD2YPDw9mDw8PZg8PD2YKCgpmBQ"
+"UFZgoFBWZBQUT/AAAA/9jYAP/8/AD/Hx8A/wAAAf8AAQL/BgYD/6qqaf///63///+m/9DQg"
+"P8EBAH/AAAAiwAAAAAAAAAWAAAAyiUeAP/NpAH//9QB///MAv//1gH/kHEA/xUaJPUAAAA+"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABTAAAA4AE"
+"AAP8BDgL/E2IX/xZbFf8KKgn/AgsC/wEIBP8FEQ7/AEol/wBqNP8ASSH/AH8s/wBhMv8Ogj"
+"H/MtAx/y/NMf8GeTH/AF4x/wCBMf8UmDH/M9Ex/zLPMf811DH/HK4x/wBuMv8AYjL/AGQz/"
+"wBrNP8AXy3/ADsc/wASCv8GFw7/CAgK/wIAAf8AAAD/AwME/wcHCf8UFhz/AAAA4QAAACUA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmQQHC/9VDwD/mSQA/5QkAP+TJQH/lSQA/3IdAP"
+"8sCwD/AAAA/z0+Pv8AAABmAAAAZwAAAGYFBQVmGRkZZs3NzWb///9mS0tLZgAAAGYAAABmA"
+"AAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZiQkLP8lJQD///8A/8vL"
+"AP8AAAD/AAAAywoKC/+pqWj///+m////nP///53//Pyd/0NDJ/8AAADrAAAAtgAAAC8AAAA"
+"zAAAJ+35lAP//2wH//8sB///OAf//1gH/UUAA/wAAANAAAAAGAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAKsAAADQAAAAsgAAANsRLxf/IY8f/zLQMP8uw"
+"iz/I7gt/wqQKP8AXyL/AGgy/wBeLf8Afin/AGgy/w6DMf8z0TH/JMAx/wBwMf8AZDH/AX8x"
+"/ym7Mf801DH/MtIx/xuqMf8BZTH/AF8x/wBjMv8AYC3/ADEX/wAGBP8AGgj/AGUg/wBjG/8"
+"ADQD/AgAC/wAAAOcAAACoAAAAgQAAAIQAAACFAAAAHQAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAABAAAAcQ4XHvYAAAD/AAAA/wAAAP8AAAT/AABB/wAAB/8xMS7/AAAAZgAAAGYAAABm"
+"AAAAZgAAAGZQUFBm8PDwZubm5mYtLS1mAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgA"
+"AAGYAAABmAAAAZgAAAGYAAABmCAgU/3x8AP///wD/jo4A/wAAA/8AAAB/EREX/319Tv///6"
+"n///+c////nf///6n/rq5s/wAAAP8AAAD/AAAAlwAAABABAgXremEA///bAf//ywH//8wB/"
+"//WAv/BnwD/DQ8T+QAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA"
+"AAA2AAAAdgAAALgAAADEAAAA3w5XOv8BRCT/FpQx/zLTMv821zL/L9Ez/xK0Mv8AeTH/AGM"
+"x/wCKMP8AcDH/DoEx/zXUMf8bsjH/AGEx/wB4Mf8PlDH/M88x/zPTMf8UqjH/AGkx/wBdMf"
+"8AajP/AFwl/wAFA/8AJQv/AHgl/wCKK/8APg3/DQ0S/wAAANQAAABwAAAAGgAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAzAEAAP8AAAD"
+"NAAAA+wAAXv8AAP//AABC/zAwJf8AAABmAAAAZgAAAGYAAABmAAAAZnh4eGb19fVm4eHhZj"
+"c3N2YAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAHgHB"
+"wT/yMgA////AP9FRQD/AgIO/wAAAGYAAADIIyMS/+rqk////6n///+m/8PAcf8ICAT/CQkK"
+"/w8PD/8AAQH/AAAAgwAAAOd+ZQD//9sB///IA///zAH//9AB//PFAP8jHgX/AAAAZgAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASgAAAKwACATrAG"
+"Uw/wBmM/8AWzH/EYgx/zDNMf821jH/Lcwx/wqdMf8AYDH/AIMx/wB4Mf8NgzH/M9Ex/xOtM"
+"f8AZjH/AIAx/ye5Mf811TH/GLcx/wByMf8AWzH/AGwx/wCOMv8AlS3/AGcf/wCeMf8AZx//"
+"AQEB/xMQGO8AAACVAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAQAAAJkLCgr/AAAAhBkZGWYAAADFAABF/wAA//8AAIz/CQkA/"
+"wAAAG4AAABmAAAAZgAAAGYAAABmqqqqZvDw8Gbm5uZmLS0tZgAAAGYAAABmAAAAZgAAAGYA"
+"AABmAAAAZgAAAGYAAABmAAAAZgAAAGYFBQVmMzM+/0BAAP///wD/ysoA/wAAAP8AAADBHh4"
+"eZgAAAJMAAAD/YWE6/7Ozbf9jYjv/Dw4G/xgYGf8AAACuAAAAqQAAAN8GBwr5AAAA/Y90AP"
+"//2wH//8sC///MAf//zQH//80A/0k7Av8AAAB0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoAAAByAAAAxwBVJ/kAYDH/Bm8x/yOv"
+"Mf831zH/JsUx/wB6Mf8AczH/AH8x/wVnMf8pxDH/BJUx/wBsMf8ZozH/NNEx/xS0Mf8AfjH"
+"/AGEx/wCCMf8AlzH/AI8x/wCPMv8AljT/AFMf/wEWDv8QIh/xAAAAdgAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAACaAAAA"
+"/wIBAf8yMjL/AAAAiwAAAJUAAAD7AAD1/wAA2f8AAAX/AAAAiwAAAGYAAABmAAAAZgAAAGb"
+"X19dm5ubmZubm5mYyMjJmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAA"
+"AAZgAAAG4AABD/fHwA////AP+OjgD/AAAA/wAAAI4AAABmAAAAmAkJCf8AAAD/AQEB/wAAA"
+"P8AAADlBAQEowcHB6MODg6jBgYGow0NEP8BAAD/yKIA///UAf//zQH//84B///QAf/yxgD/"
+"JyML/wAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAABAAAAQAAAAJ8BJBHuAWUw/xuiM/801DH/F60x/wBpMf8AeT"
+"H/Bm8x/x+8Mf8AgDH/DYox/yvKMf8RsDH/AIAx/wBtMf8AiTH/AIAx/wBnMf8AYzH/AGMx/"
+"wBhMf8AXC//AWMy/wFhMv0AAADaAAAAtQAAALoAAACoAAAAgQAAAH8AAABLAAAAEQAAAAIA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"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"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALh/AAD/nAAA/8Y1H"
+"v/1wrf//+Pc//3f1//839f/tj48/5UAAP+ZAAD/mQAA/5oAAP+dAAD/oAAA/6QAAP+lAAD/"
+"pQAA/6QAAP+iAAD/ogAA/5oAAP+QAAD/jwAA/5AAAP+QAAD/kAAA/5AAAP+QAAD/kAAA/48"
+"AAP+PAAD/kAAA/5EAAP+XAAD/nwAA/6IAAP+mAAD/ogAA/6EAAP+hAAD/ngAA/5sAAP+ZAA"
+"D/mgAA/5kAAP+aAAD/mwAA/6gAAP95AAD/HAAA/wAAAP8UGhD/b3JG/8bEdP/8+53///+i/"
+"///nf///Jj///6a////n////6b/2tqG/zExHf8TExT/vaJj/0RAM/8AAAD/GSAs/0hEOP9m"
+"WDb/rI1G/7ibW///w0n/wZZD/wYHCf+ziDX/p3Qk/5loIP+dbCH/TjUQ/2JGFv/7uzz/+bt"
+"D///DPP+zlE//AAAI/3NoTv/vvFX/mYNR/ygtM/8lGwj/m3gy/+y4UP/9wEn//8lJ/35rPv"
+"8AAAj/WFNL/5hrJv+cayD/hFsc/7F5Iv+wkVX/Hik4/5eFW/9ANiL/DhMi/6iLUf//z0n/a"
+"1Qj/wAAANIAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAuGMAAP/MLRX//YFG//7b0P//39j/+t/X///b1f+3PTv"
+"/lQAA/5gAAP+ZAAD/mgAA/5kAAP+ZAAD/mwAA/5kAAP+aAAD/mgAA/5oAAP+aAAD/nAAA/5"
+"sAAP+cAAD/nAAA/50AAP+cAAD/nAAA/5wAAP+cAAD/mgAA/5sAAP+cAAD/nAAA/5sAAP+bA"
+"AD/mgAA/5oAAP+ZAAD/mQAA/5kAAP+ZAAD/lgAA/5sAAP+ZAAD/mgAA/5kAAP+YAAD/lwAA"
+"/58AAP+bAAD/egAA/zYAAP8AAAD/AAIB/z9FK/+5t23//v2d////nP///53///yX///+m//"
+"//6X/z8+C/wcLDv+cg0v/XE8w/wAEDP+agkr/3as//9ilN//Vnin/zKlS//7DSf/Pplb/ER"
+"QY/8KbUP+pdCH/kGMf/0IuDv8AAAD/Z0gX//+9Pf//vzv/+MBS/0E/OP8AAAH/FRcb/yMhH"
+"v8AAAL/WUAR/+yzPf//yUH//r8///2+Qv/9vT///8RG/3dkO/8JDxj/oH9B/6ZoHP+jahv/"
+"y5lF/zE2Pv+GdlT//8lH//G9S/9VRij/AAQS/5mHXv/Tq03/Ghwe/wAAAJUAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"C4bSAJ//93Of/8fET/+tjO///g2P/83tf//9vV/7g+PP+VAAD/mgAA/5oAAP+YAAD/mwAA/"
+"5kAAP+aAAD/mQAA/5kAAP+ZAAD/mgAA/5sAAP+YAAD/mQAA/5sAAP+XAAD/mQAA/5kAAP+Z"
+"AAD/mgAA/5kAAP+aAAD/mgAA/5kAAP+ZAAD/mQAA/5kAAP+ZAAD/mQAA/5gAAP+YAAD/mgA"
+"A/5sAAP+bAAD/mgAA/5sAAP+aAAD/mwAA/5sAAP+YAAD/mgAA/5wAAP+gAAD/oQAA/4QAAP"
+"9ZAAD/HQIA/wIEA/85QSf/ycl7////p////p3///2Z////mv/v8JT/DQ8M/yEeGv8GChD/X"
+"04o/9qlNP/Nmi//w5Et/8WQK/+7kkP/6K08/86nVP8QFBj/yaNS/654Iv+IXR3/dVEZ/yUY"
+"Bv+8hij//8ZC///JTP+chlX/DRQh/5+JWv9PS0D/BQkQ/wwIAf/qsj///8RF//28Pf/usT3"
+"/5Kcz//e5P///vz3/979L/0U9Lf9HRTz/4aM5/+WpPf9kYln/XFtT//XAUf//vTv//8E7//"
+"/ESP95Yzj/AgYU/29rW/83MSH/AAAAyAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKh6NRX//3s6//p1Pv/8y7z//eHb"
+"//3b1f//1dL/t0A9/5YAAP+YAAD/lQAA/5sAAP+aAAD/mQAA/5oAAP+YAAD/mQAA/5gAAP+"
+"WAAD/mgAA/5oAAP+ZAAD/mgAA/5YAAP+YAAD/mQAA/5kAAP+aAAD/mQAA/5oAAP+aAAD/mw"
+"AA/5kAAP+ZAAD/mwAA/5oAAP+aAAD/mQAA/5QAAP+YAAD/mQAA/5YAAP+ZAAD/mgAA/5oAA"
+"P+XAAD/mQAA/5sAAP+ZAAD/mgAA/5kAAP+aAAD/nAAA/6MAAP+ZAQH/ewUC/zcCAP8NEQr/"
+"jJBZ///7mf///Zf///+k/7q6c/8AAAP/YFlE/yYqL/9yYz7/16M1/7WDKP+kcSP/h10d/y8"
+"gCv+XaRz/xJ1Q/wsQGf/HolH/1pgp/5RkHv+bZx//jmgo//e4Q//EmED/S0Qz/xggLP+Xgl"
+"P//8dE///KU/9bUTr/AwIA//G1PP/hpDT/tH8n/6VyIv+ZaSH/wYsu//q6PP//x0L/jHZF/"
+"wAACv+wjED/l4Vc/0NEQv/xvk7//8I8//q7Qf/5u0P//8FA///FRv95ZTr/AgYP/xETFf8I"
+"CgvsAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAgIA6HP//ezn/9G44//y7qP/+493//dnV///h2P+3QT//jgAA/6kSCf"
+"+pFAr/lAAA/5sAAP+aAAD/mAAA/5oAAP+aAAD/mwAA/5oAAP+ZAAD/mQAA/5sAAP+ZAAD/m"
+"AAA/5kAAP+ZAAD/mgAA/5oAAP+bAAD/mgAA/5kAAP+aAAD/mQAA/5oAAP+YAAD/mgAA/5UA"
+"AP+kDgf/xDEZ/50GA/+YAAD/mgAA/5gAAP+ZAAD/mgAA/5sAAP+aAAD/mgAA/5sAAP+ZAAD"
+"/nAAA/5oAAP+XAAD/nAEA/6MHA/+oBgP/6lMq/8NZLP8OAAD/l5pg////pf///6P/pqVi/w"
+"ABCP+tklP/U0gs/zo7N//UpD3/p3Yj/0w0EP8AAAD/IhcH/5hnHv/ClEH/MS0j/0hDOP/ru"
+"lT/15w0/6B2P/9fUjf/Pzot/wAACf8dGxz/uZpY///EQ//9vDz//8ZN/1tPNP8cHyP/7rVH"
+"/6VyIv+XZiD/j2If/5loIP+cayD/46Y1///IT/9kVzj/AAAA/w4SF/8GCxX/qIAu///KRP/"
+"lqTz/r3so/6x5Jv/dojb//8M//9OtV/8GCAv/AAAA/wAAALcAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAKhMJ/+dpN"
+"P/8azL/+qaM//7m4P/+39f//+ri/9SDf/+dAgD/7V4u/+9lMv+mDwf/mAAA/5YAAP+bAAD/"
+"lgAA/5YAAP+aAAD/mQAA/5oAAP+bAAD/mQAA/5kAAP+aAAD/mwAA/5oAAP+ZAAD/mQAA/5o"
+"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"
+"8+uYP/MnDT/zpkq/8+eN/87PDf/YVtQ/6FyLf+YZRz/elMY/6BvJP91Zkn/FB0s/7CRSv+t"
+"jUb/BAcM/wAAAIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAxHgzEf//dTr/+HhL///Tyf/53tv/+tzY//vUx/"
+"/8eUf/+G83//pxOv/7cDn/+XE7//pzOP/8dDv/9W0+/7EgEP+VAAD/mgAA/5EAAP/JPB7//"
+"4I+//10O//7dDv/+nQ7/7YiEf+VAAD/lQAA/60UCv/1ajX/+Xk5//pxOv/2cDr/+3I7//hx"
+"Of/3cTv/93I3//pwO//6dTj/+Hc5//t7O//4dDn/+XI6//tyPP+yIxH/lwAA/5cAAP+ZAAD"
+"/mAAA/5kAAP8yAwH/AAAA/yEfAP+afAH/wZkC/25ZAP8AAAD/AwEB/wAAAP8NEBb/kG88/3"
+"ZQFf8BAAD/nnUk/+CqNv91ZT//JS45/8eiS//eqDH/06U9/3NiOf8CBA//Lywl/7SRQv/ap"
+"jf/1qEx/21fPv9QTD3/1bJk/82XNv+fbB//il8e/0QvD/+UYB3/0JQs///DPv/8v0X/6bNG"
+"/wsJAv8ICw7/xZtE///HTP+PdT7/AgcS/1pLLv/utDz/169W/8OXOP/Omy//1aAz/5N8Rv8"
+"fICH/tYg+/6FuJ/+kcCH/tJFO/x8pO/+XhFb/zqdP/82kSv8zPUn/AAAAyAAAAAQAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAABkHhIK/95/I///mhj/+69b//7g2P/+3tr/++Te//2li//6bDH/93A8//lzOP/2cTz/"
+"+HE7//pwO//9dTv/uigT/5UAAP+ZAAD/lQAA/9ZHI///ezv/+2w///pvPP/+dj//yTke/40"
+"AAP+gCwb/82cz//t5Ov/7cTr/+XA7//dyOP/4bT3/+3E4//pvNv/5azz/9XI4//lzOf/7cj"
+"v//HE6//huPP/6cD3//HU5/7spFP+TAAD/mQAA/6MNBv+pEgn/kQAA/8g2Gv+jSyX/MBIK/"
+"wAAAf8AAAD/AAAB/zQVDf90NBn/AAAB/0o+K/+qdif/NSQK/wYFAv/HlCv/26c4/2lbOP8A"
+"AAX/PkA+/4JwRP81Mij/AAUU/2lbOP/TpkL/1aEw/82bMP/Yoi//dGQ8/2JRKP/VrVP/3ah"
+"I/45iIf8hFgb/LiAK/55pIP/HmUj/27FX/9uxWP+aiV//ERYe/xkZGP8UFRX/KSsr/w8WI/"
+"+KeE7//sRJ///DPf/Yr1j/zqA7/9CdMP/RnjD/vphF/xQYHv9oUR//yZc9/8ChZf9NTET/V"
+"lJG/9i3cf/HoU3/1aI0/2RfT/8KDRTvAAAAHwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAADFTjUA//+0E//8qwf"
+"/+rpa//vd2P/83tv/+9TI//h6R//2bjX/8207//puPf/7bzn/+HA3//93Pv/PQR//kgAA/5"
+"gAAP+eBwT/8Ggz//p1Ov/7cTr/+nI3//13O//dUSn/owsG/9JDIf/9dzr/+XM6//htPv/6c"
+"zj/+m0///hwPf/6dDj/+HE6//lxO//8cTv/+nA8//lxOP/7cDr/+nA3//tzOf/7cjz/vi4Y"
+"/5MAAP+SAAD/2Ukk//hrMf+vFgf/4FQt//+GSP/ze0P/yFgw/65OK/+/ZST/334l/zIXCf8"
+"RExP/l2wr/45gHP8oGwj/ZEoU/8WdRP9dUjf/AAAE/xcVE/8MCwz/AgYS/zMzLf+ihUL/z5"
+"w0/76KKP+qeSX/toUq/9eiLv+Ld0r/Ojct/8WcQf/XqUX/jGgs/1I2EP9gQhT/voQq/9CaN"
+"v/PpET/cGE8/wYKEv9WTzz/wqBT/x4iKP8ZGxr/1atZ///ERP/8vj//+rtA/8yfS/+GZib/"
+"rn4m/8yZM//SoDb/inhL/w4QEv9IQC7/SUU5/xwfI//BmkP/yps1/6R+Kv/Vny3/mX9B/wU"
+"LE/8AAABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAADcBAgLrrHQG//+1F//5pgn//MF3//3f4v/64+D/+6WK/"
+"/poNP/6ejb/95Ql//iSJP/5bz3//HQ7//RrM/+qFQr/iwAA/8IuF//6eTn/+XE7//1yOf/5"
+"bjz/+3I6//ptO//2cDX/+ng6//p0Of/+cTz/+HM3//dwOf/8cDf//XI2//V0Nv/5cDv/93Y"
+"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"
+"TMd/0xFMf/frD7/wZEt/5hyIv/dqz7/SkEp/wAAALgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAPRAVG/ESCgD/soYF//7EAP//wRn//9aw///i7//+x4v/+a4N//urD//6qhX/96wU//"
+"afHv/5jSr/+Xs1//hwOf/5bT7/8XI4//dwPP/7cDr/+HM4//pwO//5fDb/9qca//ivEv/3r"
+"xP/+qAd//eEL//5gDH/+Z4e//iuE//6qxT/+agX//eoGP/2nh//9KoX//uuEv/2qhf/+K4T"
+"//umEP/5l0L/+cvC///i2v/84N7//tLN//+vQP//tQn/vYkM/w4LAP8gFwf/o3st/2hYNf8"
+"AAAT/Jigp/wADC/9xYTz/z5ow/6FwIv+jcSP/k2Uf/59tIf/RnDn/WVI+/wgQHf+xlFH/2K"
+"Iv/72JK/+ZZyD/qnAh/82RLv/Oo0j/Wkwt/yogDf+whSv/tokr/08+Gv8TDwz/AgUM/6+VW"
+"f/YoS7/yJcv/8COLf+zgSj/r34n/8+ZNP/RnjT/q4c+/wECBP8SFRn/tpE//8yYLf+baSD/"
+"nmYf/7V7Jf/KmT3/YVY6/wAHFP+McDD/16Ix/9mkM/9rVin/Oj09/9KlQf/OnDH/0Z42/82"
+"fRP8iIiD/AAAAuAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANgAAAMoAAAD/VEUA/"
+"+i8AP//zRj//9OV///h6v/+1Yj//cED//msDf/2qRf/+KoV//auFP/5qxb/9Zch//aZIf/6"
+"mCP/+nM2//tuN//6bzv/93Y5//SnGP/5rhP//KwT//mnGP/5qhX/9qoX//epF//2qhb/+Kg"
+"X//urFf/7shH/+K4U//qtE//7rBP/+aoV//ipFv/5phT/+6sP//3Vn///5OP//d7i//vUx/"
+"//vT3/+7UD/3JTBf8AAAD/OysN/6Z8Lv9hVDf/AAAI/0I0Ff+zkkj/GB4p/3FhOf++iy3/n"
+"2og/4lZG/8pHQn/i14d/72FJv+ojU7/Bg0Z/x8gIf+4k0H/2aEu/8+VMf/QoUj/iXpR/x8l"
+"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"
+"RSDL/W1A6/1pNLv8UEAX/PS4O/zgpCv8CBQj/AAAAhAAAAFIAAABKAAAAQwAAADgAAAAvAA"
+"AAJwAAACAAAAAbAAAAEwAAAA0AAAAIAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB"
+"AAAABhUVFQwAAAAPAAAAFAAAABgAAAAdAAAAIQAAACcAAAAuAAAANAAAADkAAABAAAAATwA"
+"AAK4iLDf/AAAB/xUVFf81Nzn4b3J0/nV3e/8iIyT/AAAA/0lKTP+srK3/09PT/83Nzf/Ly8"
+"v/z8/P/8fHx/+BgYH/fX19/35+fv9/f3//fn5+/4CAgP98fHz/goKC/4mJif+hoaH/u7u7/"
+"7q6uv+pqKj+enp5+UJAPfceHBn/BAQE/w4OEpoAAgJgAQEBmBgXFv9+ZTD8Wk40/yAZDf+X"
+"cCP/tYUs/25ePP8AAAb/a1Ij/659Kv+mcB3/qXYl/6GBQ/9OTET/AAEF/wMDCP8DBgv/gmo"
+"9/6hzIf+pbyL/cEwX/0s0EP+fbSL/n24i/6d6Jv+meyn/p3sp/6J4KP8UDgT/QzMS/8maNv"
+"+/lkj/k3lF/1RKM/8SFRf/Exol/0VEO/9RSTT/ICIk/wAAAf8AAAD/Eg0D/3FVG/9uUBL/E"
+"RAP/wAAAKkAAABfAAAAVQAAAEsAAABDAAAAOAAAADAAAAAoAAAAIQAAABoAAAAUAAAADwAA"
+"AAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAcAAAANAAAAEQAAABUAAAAbAAAAIA"
+"AAACcAAAAuAAAANAAAADoAAABBAAAASAAAAKoPEhf/CAgJ/ywsLPxDRUb7cnN1/oWEhP+Cg"
+"oH/gICA/zg4OP9YWFj/np6e/8/Pz//Nzc3/zc3N/83Nzf/Nzc3/y8vL/4uLi/96enr/gICA"
+"/4CAgP9/f3//f39//4GBgf+BgYH/fX19/4KCgv/Nzc3/1dXV/9fX1//Nzc3/kJCQ/4GBgf9"
+"LS0v0Hx4d9gYGBv8AAACoAAAA0gsND/8HCAr/gV8f/6+CLP+leSf/qoAv/0A4Jf8ECA7/em"
+"Q6/5x7Qv9kW0n/HSc0/yokF/+BYyf/Qz0u/wACBv+Sd0X/p3Af/3hNF/8LCAP/bUsX/6RwI"
+"f+odSP/k3Y8/zAlEP8rIAr/JRsJ/wEBAP8AAAD/GhoY/xIVF/8AAAb/Bw0b/1RTSP+3mFH/"
+"16Y+/9mnO/++mkr/ISYr/wQBAP9zVxr+NCQH/w8WIf8AAACpAAAAbAAAAGEAAABWAAAATAA"
+"AAEIAAAA5AAAAMAAAACcAAAAhAAAAGAAAABMAAAAMAAAACQAAAAMAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAMAAAAHAAAADAAAABEAAAAWAAAAGwAAACMAAAAqAAAAMAAAADcAAAA/AAAARgAAAE8l"
+"Ljj/AAAA/y4wMvxxc3b+hYSE/4aGhf+BgYH/fX19/35+fv+BgYH/fn5+/5qamv/Ly8v/zs7"
+"O/87Ozv/Nzc3/zs7O/8/Pz//Ozs7/lZWV/3t7e/9/f3//f39//319ff9+fn7/fn5+/4CAgP"
+"96enr/n5+f/9fX1//Ozs7/vr6+/5KSkv+JiYn/hYWF/4WFhf84ODj8AAAA/yIqM/8AAABKE"
+"hce/wwHAP+fdij/pXko/6R5KP+pfSn/lG4n/wgGAv8LDRL/DhIa/w0RGv9sVyr/p30q/7aL"
+"N/9FPzD/EhYb/6B7Nv+FWhr/Ri4O/1M5Ev+aaiH/pHQr/4BtSv8pKzD/AAAB/wAAAP8nHQr"
+"/WEIW/1ZAFf84KQz/AAAA/0VFQv+vllv/0qE6/9WfLf/PnDH/06A4/8agS/8kKS7/AAAA/w"
+"AAAP8RFRr/AAAAkwAAAHYAAABsAAAAYAAAAFUAAABLAAAAQQAAADYAAAAuAAAAJgAAAB4AA"
+"AAYAAAAEQAAAAsAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAABgAAAAwAAAARAAAAFAAAABw"
+"AAAAkAAAAKAAAAC8AAAA3AAAAQQAAAEkAAABRAAAAugAAAP8fISP/e3t9/4KCgf+Ghob/ho"
+"aG/4WFhf+Dg4P/goKC/35+fv+VlZX/xcXF/8vLy//Jycn/zc3N/83Nzf/Nzc3/zc3N/9DQ0"
+"P+dnZ3/e3t7/4GBgf+CgoL/gICA/4GBgf+CgoL/goKC/5KSkv+pqan/paWl/4uLi/97e3v/"
+"ZmZm/0lJSf8nJyf/FRUV/wcHB/8LCwr/BwkM/wAAAF4AAADDEw0B/4dkHv6oeyj/pHko/6Z"
+"6KP+qfin/KiAK/wAAAP8wIwr/hWcr/7GELf+neyf/rYU1/0M9Lf8dISf/pX0x/51vIv+mdS"
+"X/mWsh/2BHIP84Mif/Cg0S/wEDB/92Xi3/n3Ym/6Z8Kf+yhCz/u4wv/19KIP8HBgb/kWwv/"
+"612H/+cayD/kWgh/7yMLf/HkzD/Z1g0/gwTIP8NEBT4AAAA1QAAAKQAAAB+AAAAcwAAAGkA"
+"AABcAAAAUQAAAEcAAAA9AAAANAAAACwAAAAkAAAAHQAAABYAAAAPAAAACQAAAAYAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAP//AQAAAAYAAAAJAAAADwAAABQAAAAYAAAAHwAAACcAAAAuAAAANgAAAD4AAABHA"
+"AAAUAAAAHUPExb/Kiop/yMjIv8ICAj/FhYW/zo6Ov9ZWVn/VVVV/2dnZ/92dnb/eHh4/4KC"
+"gv+Ghob/ioqK/46Ojv+enp7/nZ2d/5ycnP+cnJz/mJiY/4uLi/9+fn7/fn5+/3h4eP93d3f"
+"/d3d3/3V1df9zc3P/aWlp/09PT/8cHBz/DQ0N/wYGBv8DAwP/BQUF/yoqKv9HR0f/ioqK/2"
+"RkZP4AAAD/AAAApgAAAGMbIy3/PC0P/qp+LP+leSf/rYAq/2RKGf8LDxT/YlQ4/6d7Kf6nd"
+"iT/pnYl/6Z5J/+tgzX/Qz4w/xQWGf+qgzf/onwx/2FIGv8WEAX/OCsO/1tNL/8AAgz/Ukk0"
+"/66CLv+sfir/qHsp/6Z5J/+deTP/FBQT/0g3Hf+pdCP/nGsh/zQkC/8yIgr/qnso/3pYGv8"
+"WFRT/AAAAyAAAAJ8AAACQAAAAhQAAAHgAAABuAAAAYgAAAFYAAABMAAAAQgAAADkAAAAvAA"
+"AAJwAAACAAAAAYAAAAEwAAAAwAAAAHAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAABwAAAAoAAAAQ"
+"AAAAFQAAABsAAAAjAAAAKAAAADAAAAA5AAAAQgAAAEsAAABTAAAA2x4eHfiYmJj8qqqq/ou"
+"Li/9LS0v/Kioq/w0NDf8NDQ3/DQ0N/wYGBv8PDw//ISEh/ykpKf82Njb/MDAw/y8vL/8wMD"
+"D/NDQ0/zU1Nf8gICD/GRkZ/xsbG/8WFhb/AQEB/wUFBf8HBwf/DQ0N/xQUFP8SEhL/Li4u/"
+"zU1Nf9qamr/dHR0/6Ghof/Kysr/5+fn/+3t7f/S0tL/np6e/wAAAP8AAADeAAAAXBcbIPoA"
+"AAD/fmQv/rmHLf9+XR3/Dw8P/35vT/+sfCn/nWsg/55sIf9vSxf/lmoi/6+EMf9VTDb/AAE"
+"F/0lCMf8UEg7/CAYC/2hNGP+vhTT/QD01/ysqJv+iejX/pHAg/4RbHP+SZSD/rHwl/3ZkPv"
+"8ABAv/eFcc/5VnH/8eFAf/AAAA/25MGP+VbCP+GhIH/wAAAN0AAACiAAAAlQAAAIkAAAB8A"
+"AAAcQAAAGYAAABbAAAAUAAAAEUAAAA7AAAANAAAACsAAAAjAAAAGwAAABUAAAAPAAAACQAA"
+"AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAACwAAABAAAAAWAAAAHQAAACMAAAAqAAAAMQ"
+"AAADkAAABCAAAATQAAAFYAAADqGxsa9by8vP/AwMD/v7+//76+vv+xsbH/xMTE/97e3v/Ky"
+"sr/pKSk/6Ojo/+ioqL/pqam/3h4eP9MTEz/UlJS/09PT/8sLCz/KSkp/ywsLP8qKir/QUFB"
+"/1dXV/9XV1f/c3Nz/35+fv+Tk5P/qamp/6mpqf+0tLT/u7u7//X19f/6+vr/9fX1//b19f/"
+"y8fH/5eXk/5ybmv0qKSf+AAAA/wwOEfcAAABaAAAAZiYuO/8eGRH/X0UT/iogC/8eGA7/pX"
+"oq/6BwIv+gbSL/jF4d/w0JAv9vTxr/toQo/3ZlQP8AAQv/CAYD/045Ef+ZcSb/toYr/3NaK"
+"v8AAA7/bmA//6t3Iv+ZaSD/JxsI/3ZQGf+sdyL/bV9A/wACCv9+Wxz/dVEa/xsSBf8nGwj/"
+"flgd/iofCP8AAADxAAAAoAAAAJQAAACIAAAAfQAAAHIAAABmAAAAWwAAAFIAAABHAAAAPwA"
+"AADYAAAAsAAAAJAAAAB0AAAAWAAAADwAAAAoAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"gAAAAYAAAAJAAAAEAAAABUAAAAbAAAAIQAAACgAAAAyAAAAOAAAAEIAAABKAAAAVQAAAJkY"
+"Gh7/HBsb/0tKSP1sbGv8tbW1/76+vv/l5eX/9/f3//b29v/19fX/8/Pz//Pz8//09PT/2Nj"
+"Y/76+vv/CwsL/wsLC/7e3t/+2trb/tra2/7W1tf+6urr/w8PD/8LCwv/AwMD/w8PD/8XFxf"
+"+7u7v/tLS0/6urqv+kpKL/uLi3/sHAvv63tbP/h4WE/UtLS/oXGBv1CQoM8gAAANkAAACmA"
+"AAAeAAAAFoAAABXAAAAXQAAAMQTGCL/AAAA/zArH/+rgC7/o3Ul/6JuIv9YOBH/EgwE/1g+"
+"Ev+mgj3/Gxwb/yooI/+Ycyv/rH8q/551J/+xgyv/Uj0V/wAABv9/aDn/rXkk/1I4Ev8PCgP"
+"/lWYe/657JP9eSyf/AwQG/6N4KP+mdSb/lWoj/1A8Gv4WEQr/HSY0/wAAAJwAAACPAAAAhQ"
+"AAAHsAAABvAAAAZgAAAFsAAABQAwYNTQAAAD4AAAA1AAAALQAAACUAAAAeAAAAFgAAABAAA"
+"AAMAAAABgAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAkAAAAPAAAAFAAAABk"
+"AAAAeAAAAJgAAAC4AAAA3AAAAPgAAAEcAAABQAAAAWgAAAGwAAAC7Iyw4/wwNDv8sKyr/T0"
+"9N/ZiXlv+gnp7/n5+e/8PCwv/JyMj+5ubm/+7u7v/j4+P/srKy/7Gxsf+ysrH/m5ub/5qam"
+"v+mpqb/s7Oz/66urf+gn5//gYCA/mNiYv5HRkX9Ojg3/S8uK/4tLSz/GRoa/xETFf8AAADw"
+"DQ4Q9h4iK/sAAADgAAAAswAAAIMAAABrAAAAZAAAAF4AAABaAAAAVwAAAFMAAABSAAAAWQA"
+"AAHoJCw7zDQ8S/2lQH/2vgiz/oXEk/4heHf+PYx7/mHMr/1RLOP8cGRL/nXw6/7KDK/9fRx"
+"j/clQc/7OFLP9GMxD/AAMK/3NjQP+aax7/Wz0T/0EsD/+kdi3/mHQs/kw6Fv8AAAD/QCwF/"
+"jAgBP8WFA//JS02/wAAAM0AAACSAAAAigAAAIAAAAB1AAAAbAAAAGIAAABXAAAATwoKDUkA"
+"AAA7AAAANAAAACwAAAAkAAAAHQAAABcAAAASAAAADAAAAAcAAAACAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAABAAAABwAAAAsAAAAPAAAAFgAAABwAAAAjAAAAJwAAADAAAAA3A"
+"AAAQAkJDE8AAABRAAAAWwAAAGQAAABwAAAAjgAAANsbIiv/Iyo0/xofJv8ICQv/DA0O/ycm"
+"Jv8WFhb6LSwr/T49PP0qKCb/Kyop/yIiIv4gICD+ICAg/iEhIf4jIyP+ISAg/R0dHP8LCwz"
+"/Gx8l/x8mMP8LDxT5AAAA8wAAANkAAAC6AAAAoAAAAJgAAACOAAAAhAAAAHgAAABvAAAAZw"
+"AAAGAAAABcAAAAVwAAAFMAAABQAAAAUAAAAE4AAABPAAAAUgAAAGAAAAC1FBge/zkoBvyFY"
+"h3+n3Ai/6Z5Jv+eeC//Iycp/004Ef+7iSz/q30n/zUnC/94WBz/s4Us/zAjDP8AAAD/QjYc"
+"/7KCLP+TaSP/TD0h/ywpJf8nKi7/GRwf/xgdJf8OFBv5AAAA7wAAAL0AAACTAAAAiAAAAH8"
+"AAAB2AAAAbgAAAGUAAABbAAAAUgAAAEoDAw9EBAQEOgAAADEAAAAqAAAAIwAAABwAAAAWAA"
+"AADwAAAAoAAAAHAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD"
+"AAAABwAAAAwAAAARP1V4JAAAAB0AAAAhAAAAKgAAADAAAAA3AAAAPgAAAEYAAABPAAAAVwA"
+"AAF4AAABoAAAAcgAAAH0AAACNAAAAlAAAAJ8AAAC4AAAA0gAAAN4AAAD0AwQF9wAAAPUAAA"
+"DpAAAA3QAAAN4AAADeAAAA3gAAAN4AAADcAAAA2QAAAMcAAACxAAAAqgAAAKIAAACcAAAAl"
+"QAAAI0AAACEAAAAfwAAAHcAAABvAAAAaAAAAGIAAABdAAAAVwAAAFEAAABPAAAASwAAAEoA"
+"AABJAAAARwAAAEcAAABKAAAATQAAAFEAAABpAAEB8A0MC/8lHxH/KSMW/RIRD/8AAAH/DQg"
+"B/0YxDf9LPR/9RTgi/Ec5G/1OOA/9IBgH/wAAAP84KAv/Qi4J/SshDv8hKjb/AAAA4gAAAM"
+"gAAACjAAAAlgAAAJAAAACKAAAAgwAAAHsAAABzAAAAbAAAAGQAAABcAAAAVAAAAEsAAABDA"
+"AAAOwAAADQAAAAsAAAAJgAAAB4AAAAZAAAAEwAAAA0AAAAJAAAABAAAAAEAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAABgAAAAoAAAAQAAAAFA"
+"AAABwAAAAgAAAAJgAAAC0AAAA0AAAAOwAAAEEAAABKAAAAUAAAAFkAAABfAAAAZgAAAG4AA"
+"AB0AAAAfAAAAIQAAACJAAAAjwAAAJQAAACYAAAAnAAAAJ4AAACgAAAAoQAAAKIAAACiAAAA"
+"oAAAAJ4AAACaAAAAmAAAAJUAAACPAAAAiwAAAIUAAAB/AAAAeAAAAHEAAABsAAAAZgAAAF4"
+"AAABaAAAAUwAAAE8AAABLAAAARwAAAEIAAABBAAAAQQAAAEAAAABBAAAAQAAAAEEAAABEAA"
+"AARwAAAEsAAABQAAAAZwAAAHYAAAB5AAAAewAAANYEBgj1DxYi/wMHEP8RFBb/DxAS/wYHC"
+"v8bICj/Iykx/xQcJ/0OFSL9AAAA6AAAAJQAAACJAAAAhAAAAIIAAAB9AAAAeAAAAHMAAABt"
+"AAAAZwAAAF8AAABZBQsOWQAAAEoAAABDAAAAPQAAADYAAAAuAAAAJwAAACEAAAAbAAAAFQA"
+"AABAAAAALAAAACAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAACAAAABQAAAAkAAAAPAAAAEwAAABcAAAAdAAAAIQAAACcA"
+"AAAuAAAANQAAADkAAABBAAAARgAAAE0AAABTAAAAWwAAAF8AAABmAAAAagAAAHAAAAB0AAA"
+"AeQAAAH0AAACAAAAAggAAAIQAAACEAAAAhgAAAIQAAACDAAAAggAAAIEAAAB/AAAAewAAAH"
+"UAAABxAAAAbgAAAGkAAABjAAAAXgAAAFoAAABVAAAAUAAAAEkAAABEAAAAQgAAAD4AAAA8A"
+"AAAOAAAADgAAAA1AAAANwAAADcAAAA2AAAAOQAAADoAAAA/AAAAQQAAAEMAAABJAAAATAAA"
+"AFEAAABWAAAAWwAAAF8AAABnAAAAdgAAAHsAAAB9AAAAfgAAAHYAAAB3AAAAdwAAAHcAAAB"
+"3AAAAcwAAAHIAAABuAAAAbAAAAGgAAABjAAAAXgAAAFoAAABSAAAATQAAAEcAAABBAAAAOg"
+"AAADQAAAAuAAAAKAAAACEAAAAcAAAAFgAAABEAAAAMAAAACAAAAAQAAAABAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAgAAAAcAAAAMDw8PEAAAABQAAAAYAAAAHQAAACIAAAAnAAAALAAAADAAAAA3AA"
+"AAOwAAAEEAAABFAAAASwAAAE8AAABUAAAAWAAAAF0AAABdAAAAYgAAAGUAAABmAAAAaQAAA"
+"GgAAABqAAAAaQAAAGgAAABnAAAAZQAAAGMAAABgAAAAXgAAAFoAAABWAAAAUwAAAE8AAABJ"
+"AAAARgAAAEMAAAA/AAAAOQAAADgAAAA1AAAAMAAAAC8AAAAtAAAALQAAAC4AAAAsAAAALQA"
+"AAC4AAAAvAAAAMAAAADQAAAA1AAAAOgAAADwAAABAAAAARQAAAEgAAABMAAAAUAAAAFMAAA"
+"BXAAAAWgAAAF0AAABeAAAAXgAAAGAAAABgAAAAYAAAAGAAAABeAAAAXAAAAFoAAABXAAAAU"
+"wAAAE8AAABKAAAARAAAAEEAAAA7AAAANgAAADAAAAAsAAAAJgAAACAAAAAcAAAAFgAAABIA"
+"AAAOAAAACQAAAAYAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzMwUAAAAHA"
+"AAACgAAAA8AAAAQAAAAFgAAABkAAAAeAAAAIgAAACYAAAArAAAALwAAADQAAAA3AAAAOQAA"
+"AD4AAABBAAAARAAAAEYAAABKAAAASwAAAEwAAABPAAAATwAAAE8AAABQAAAATwAAAE8AAAB"
+"NAAAASwAAAEoAAABGAAAAQwAAAEAAAAA8AAAAOgAAADgAAAA0AAAALwAAAC4AAAAsAAAAJw"
+"AAACYAAAAmAAAAIwAAACEAAAAgAAAAIQAAACAAAAAiAAAAIwAAACQAAAAmAAAAKgAAACwAA"
+"AAvAAAAMAAAADUAAAA4AAAAOwAAAEAAAABAAAAAQwAAAEcAAABJAAAASgAAAEsAAABNAAAA"
+"TQAAAE0AAABNAAAASwAAAEoAAABJAAAARQAAAEIAAABAAAAAOwAAADcAAAA1AAAALwAAACs"
+"AAAAmAAAAIwAAAB4AAAAaAAAAFQAAABEAAAAMAAAACQAAAAYAAAACAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAFVVCQAAAAcAAAALAAAADQA"
+"AABEAAAAUAAAAGAAAABsAAAAeAAAAIQAAACQAAAAmAAAAKgAAACwAAAAuAAAAMQAAADEAAA"
+"A0AAAANgAAADcAAAA4AAAANwAAADYAAAA4AAAANwAAADYAAAA0AAAAMgAAADAAAAAuAAAAL"
+"AAAACsAAAAoAAAAJQAAACQAAAAhAAAAHgAAAB4AAAAcAAAAGgAAABsAAAAZAAAAGAAAABcA"
+"AAAWAAAAFgAAABgAAAAZAAAAHAAAAB0AAAAeAAAAIQAAACQAAAAkAAAAJwAAACwAAAAtAAA"
+"AMAAAADIAAAA1AAAANwAAADcAAAA4AAAAOgAAADoAAAA6AAAAOwAAADkAAAA5AAAAOQAAAD"
+"YAAAA0AAAAMQAAAC4AAAArAAAAJwAAACUAAAAhAAAAHAAAABgAAAAVAAAAEgAAAA4AAAAMA"
+"AAACAAAAAQAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAEAAAABwAAAAgAAAANGTNMFAAAABEAA"
+"AATAAAAFQAAABYAAAAaAAAAHAAAAB0AAAAfAAAAHwAAACEAAAAjAAAAJAAAACMAAAAkAAAA"
+"JQAAACMAAAAjAAAAIQAAACEAAAAhAAAAHwAAAB0AAAAcAAAAGwAAABYAAAAWAAAAFQAAABU"
+"AAAARAAAAEgAAABIAAAAPAAAADwAAAA0AAAANAAAADQAAAA0AAAAOAAAADwAAAA8AAAARAA"
+"AAEwAAABUAAAAYAAAAGwAAABsAAAAdAAAAHgAAACMAAAAkAAAAJQAAACUAAAAoAAAAKAAAA"
+"CkAAAArAAAALAAAACwAAAArAAAAKQAAACgAAAAnAAAAJgAAACMAAAAiAAAAHwAAABwAAAAb"
+"AAAAFgAAABUAAAAQAAAADwAAAAoAAAAIAAAABgAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAABgAAAAcAAAAIAAAACQAAAAwAAAAMAAA"
+"ADwAAABAAAAAQAAAAEQAAABEAAAATAAAAEwAAABMAAAATAAAAFAAAABEAAAASAAAAEQAAAA"
+"8AAAAPAAAAEAAAAA8AAAANAAAADAAAAAkAAAAJAAAACAAAAAYAAAAGAAAABwAAAAcAAAAEA"
+"AAABQAAAAcAAAAGAAAABgAAAAYAAAAIAAAACAAAAAoAAAAKAAAADQAAAA8AAAAQAAAAEQAA"
+"ABIAAAAUAAAAFgAAABgAAAAZAAAAGwAAABwAAAAdAAAAHAAAAB0AAAAdAAAAHQAAABwAAAA"
+"bAAAAGgAAABkAAAAYAAAAFQAAABUAAAARAAAAEAAAAA8AAAALAAAACQAAAAcAAAAEAAAAAQ"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAACAAAAAwAAAAQAAAAFAAAABAAAA"
+"AYAAAAGAAAABgAAAAYAAAAFAAAABgAAAAUAAAAGAAAABQAAAAQAAAACAAAAAgAAAAIAAAAA"
+"AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAEAAAAAAAAAAAAAAAIAAAAFAAAABwAAAAcAAAAJAAAACQAAAAwAAAANAAAADQAAAA0AAA"
+"AQAAAAEAAAABAAAAAPAAAAEQAAAA8AAAAQAAAAEAAAAA8AAAAPAAAADQAAAAwAAAAKAAAAC"
+"QAAAAgAAAAHAAAABAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAACAAAAAwAAAAIAAAAFAAAABgAAAAcAAAAHAAAABwAAAAYAAAAHAAAA"
+"BgAAAAYAAAAGAAAABQAAAAQAAAAEAAAAAwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-pause</key>\n"
+"              <data>\n"
+"R2RrUAAAEBgBAQACAAAAgAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEfKhNEO1AkgFJwMrNkiT3bcZlE9nGZRPZkiT3"
+"bUnAysztQJIAfKhNEAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnNRhWTmsvrZzDb//A4"
+"Zb/2PGw/+f5wv/w/s3/8P7N/+f5wv/Y8bD/weGW/5zDb/9Pay+tJzUYVgAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"PFQkiP1YmjpzDcPzN6qT/4Pa6/9Hxpv/B65L/tOaB/6vidv+r4nb/tOaB/8Hrkv/R8ab/3/"
+"a5/83qpP+cw3H8P1Ymjg8VCSIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAFRwNMEplLau12Yr/2fKy/8ntnf+x5H7/p+Bx/6fgcv+n4HL/"
+"qOBy/6fgcv+n4HH/p+By/6fgcv+x5H7/ye2d/9nysv+22Yr/SmUtqxUcDTAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4UCSJIYyyrut2Q/9byrv+654"
+"v/pt9x/6becf+m3nH/pt5y/6becf+n33H/pt9x/6bfcf+n3nL/pt9x/6bfcf+m33H/uueL/"
+"9byr/+63JD/SGMsqw4UCSIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAOlAkjrDUhv/S76v/s+OD/6Xdcf+l3XH/pd1w/6Xecf+l3nH/pd1w/6Xdcf+l3XD/pd1"
+"x/6Xdcf+l3XH/pd1x/6Xecf+l3nH/tOSD/9Pvq/+w1If/OlAkjgAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAACIvFVaSuGn8zuun/7bihv+k3HH/o9tw/6PbcP+j23D/o"
+"9xw/6PbcP+k23D/pNtw/6TccP+k23D/pNtw/6Tbcf+k23D/pNtw/6PccP+k3HD/teKH/87s"
+"p/+SuGr8Ii8VVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQlsprbzflP+95JL"
+"/otlw/6Lab/+i2m//otlv/6LacP+i2m//otlw/6LacP+i2m//o9pw/6LZcP+j2m//otpw/6"
+"LacP+i2m//otlw/6LZcP+i2XD/veSS/7zfk/9CWymtAAEAAQAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAABkiD0SJsGL/yOih/6jaeP+g2HD/odhv/6DYb/+h2HD/oNhv/0BWLP9AViz/QFYs"
+"/6DYb/+h12//QFYs/0BWLP9AVSz/nNJr/5rOaf+Xy2f/lcll/5TGY/+by23/w+Kd/4GjWv8"
+"ZIg9EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALj4cgKjPf/+54Y7/n9Vv/5/Vbv+f1m7/n9"
+"Vv/5/Vbv+f1m//QFUs/0BWLP9AViz/n9Vu/53TbP89Uir/PFAo/ztPJ/+Rw2H/kcNh/5HDY"
+"f+Rw2H/kcNh/5HDYf+z2In/ncB2/y0+HIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8VCWz"
+"ttuO/6vaf/+e027/ntNu/57Tbv+d027/ntRu/53Tbv8/VSz/P1Qs/z1SKv+Wymb/ksVi/zp"
+"OJ/86Tif/Ok4n/5HDYf+Rw2H/kcNh/5HDYf+Rw2H/kcNh/6PPd/+v0oj/PFQlswAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAEdiLNu53pL/otR0/5zSbv+c0W7/nNFu/5zRbf+c0W3/nNFt/"
+"z1SKv88UCj/Ok4n/5HDYf+Rw2H/Ok4n/zpOJ/86Tif/kcNh/5HDYf+Rw2H/kcNh/5HDYf+R"
+"w2H/mchq/7fbkP9GYizbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATGku9rfckf+b0G7/mtB"
+"s/5rPbf+az23/ms9t/5nOa/+UyGb/Ok4n/zlOJ/86Tib/kMJg/5DCYf86Tif/Ok0n/zpOJ/"
+"+QwmD/j8Jg/4/CYf+QwWH/kMFg/5DCYP+RwmL/ttyQ/0xoLvYAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAABIYyz2sNmK/5rObf+Zzmz/mc5s/5nObf+WyWj/ksRj/47AYP85TSb/OU0m/zlN"
+"Jv+OwF//jr9g/zlNJv85TSb/OU0m/47AYP+PwF//jsBg/47AX/+Ov1//j8Bg/5DBYv+w2In"
+"/SGMs9gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxTJtun04D/m85v/5jMbP+YzGz/k8dm/4"
+"6/Yf+MvV//jb1e/zhMJv84TCb/OEwm/42+Xv+Mvl//OEwm/zhMJv84TCb/jL1e/42+Xv+Mv"
+"V//jL1e/4y+X/+Mvl7/kcJk/6XPff88UyXbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALkEd"
+"s5zKc/+bzXH/l8ts/5LEZv+LvF7/irtd/4u7Xf+Ku13/N0sl/zdLJf84SyX/irtd/4q7Xf8"
+"3SyX/N0sl/zdLJf+Ku13/irte/4q7Xf+Ku13/irtd/4q7Xf+Tw2j/lcBt/y5BHbMAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAgLBSAirhk/5rMcf+QwmX/iblc/4i4XP+IuFz/iLhc/4i4X"
+"P82SiX/Nkol/zZKJP+HuFv/iLlc/zZKJP82SiX/Nkol/4i5W/+HuFz/iLlc/4i5XP+IuVz/"
+"iLlc/5TFav99p1n/HywUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8WCkRoj0j/lcds/4q"
+"7YP+Gtlv/hbVb/4a2Wv+Gtlv/hrVb/zVJJP81SST/NUgk/4a2Wv+Gtlr/Nkkk/zZIJP81SS"
+"T/hrVb/4a2W/+GtVv/hbVb/4a2W/+IuV7/kcNq/1x+Pv8PFgpEAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAASU0F62BsVv/ibxg/4SzWf+Es1n/g7NZ/4OzWf+Esln/g7NZ/4OzWv+D"
+"s1n/g7JZ/4OzWf+Es1n/g7NZ/4OyWv+Ds1n/g7Ja/4OzWf+Ds1n/g7JZ/4q8YP9/rVj/JTQ"
+"YrQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAERgLVlZ3OfuFulz/hLZb/4GwWP"
+"+AsFf/gbBY/4GwWP+BsFj/gLBY/4GwWP+BsFf/gbBY/4GwV/+BsFj/gLBY/4GwWP+BsFj/g"
+"bBY/4GwWP+EtVv/hbpc/1Z3OvsRGAtWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAGyYRjmeQRf+DuVn/gLJY/3+tV/9/rlf/f65W/3+tV/9/rVf/f65X/3+tVv9/rlf"
+"/f61X/36tV/9/rlb/fq5X/36uV/9/rVf/gLFY/4K6Wf9mkUX/GyURjgAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGCAQiHioTq2iWRv9+uFX/frFW/32rVf98q"
+"1X/fKtW/32rVf99q1b/fatV/32sVf98q1X/faxW/32rVv99rFb/faxV/36xVv9/t1X/aJZG"
+"/x4qE6sGCAQiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"ICwUwGygSq1+KP/94sE//fLFT/3usVP97qlT/e6lV/3upVf97qlT/e6lV/3upVf97qlX/e6"
+"pV/3urVP97sVP/eLBQ/1+LP/8cKBKsCAsFMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIFBwMnFR8Nk0hpL/tqn0b/d7JN/3ixT/95rVH/"
+"eqpT/3qpVP96qVT/eqpT/3mtUf94sVD/drJN/2qeRv9IaS/7FR8OlgUHAywAAAAGAAAAAgA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAABgAAABEAAA"
+"AeDBIIcRgkD7xEZCz/Xo09/22lRv9yr0j/c7RI/3O0Sf9ysEn/baRG/16OPf9EZC3/GSMQv"
+"gwSCHYAAAApAAAAHgAAABEAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAIAAAAJAAAAGAAAACoAAAA3AAAAQQkNBncRGQylGCIPyx0rE+chMBb5IS8"
+"V+R0rE+cYIg/LEBkLpwkOBnsAAABHAAAAQAAAADcAAAAqAAAAGAAAAAkAAAACAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAYAAAARAAAAHgAAACkAAAAwA"
+"AAANgAAADoAAAA+AAAAQgAAAEQAAABEAAAARAAAAEIAAAA+AAAAOgAAADYAAAAwAAAAKQAA"
+"AB4AAAARAAAABgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAgAAAAYAAAAMAAAAEQAAABQAAAAXAAAAGgAAABwAAAAeAAAAHwAAAB8AAAAfAAAAHg"
+"AAABwAAAAaAAAAFwAAABQAAAARAAAADAAAAAYAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAGAAAA"
+"BwAAAAcAAAAIAAAACAAAAAgAAAAHAAAABwAAAAYAAAAGAAAABQAAAAQAAAACAAAAAQAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-play</key>\n"
+"              <data>\n"
+"R2RrUAAAEBgBAQACAAAAgAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEfKhNEO1AkgFJwMrNkiT3bcZlE9nGZRPZkiT3"
+"bUnAysztQJIAfKhNEAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnNRhWTmsvrZzDb//A4"
+"Zb/2PGw/+f5wv/w/s3/8P7N/+f5wv/Y8bD/weGW/5zDb/9Pay+tJzUYVgAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"PFQkiP1YmjpzDcPzN6qT/4Pa6/9Hxpv/B65L/tOaB/6vidv+r4nb/tOaB/8Hrkv/R8ab/3/"
+"a5/83qpP+cw3H8P1Ymjg8VCSIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAFRwNMEplLau12Yr/2fKy/8ntnf+x5H7/p+Bx/6fgcv+n4HL/"
+"qOBy/6fgcv+n4HH/p+By/6fgcv+x5H7/ye2d/9nysv+22Yr/SmUtqxUcDTAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4UCSJIYyyrut2Q/9byrv+654"
+"v/pt9x/6becf+m3nH/pt5y/6becf+n33H/pt9x/6bfcf+n3nL/pt9x/6bfcf+m33H/uueL/"
+"9byr/+63JD/SGMsqw4UCSIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAOlAkjrDUhv/S76v/s+OD/6Xdcf+l3XH/pd1w/6Xecf+l3nH/pd1w/6Xdcf+l3XD/pd1"
+"x/6Xdcf+l3XH/pd1x/6Xecf+l3nH/tOSD/9Pvq/+w1If/OlAkjgAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAACIvFVaSuGn8zuun/7bihv+k3HH/o9tw/6PbcP+j23D/o"
+"9xw/6PbcP+k23D/pNtw/6TccP+k23D/pNtw/6Tbcf+k23D/pNtw/6PccP+k3HD/teKH/87s"
+"p/+SuGr8Ii8VVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQlsprbzflP+95JL"
+"/otlw/6Lab/+i2m//otlv/6LacP+i2m//mc1q/6LacP+i2m//o9pw/6LZcP+j2m//otpw/6"
+"LacP+i2m//otlw/6LZcP+i2XD/veSS/7zfk/9CWymtAAEAAQAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAABkiD0SJsGL/yOih/6jaeP+g2HD/odhv/6DYb/+h2HD/oNhv/6DYb/9JYjL/cJdN"
+"/53Ubf+h12//oddv/6HYb/+f1W7/nNJr/5rOaf+Xy2f/lcll/5TGY/+by23/w+Kd/4GjWv8"
+"ZIg9EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALj4cgKjPf/+54Y7/n9Vv/5/Vbv+f1m7/n9"
+"Vv/5/Vbv+f1m//n9Vv/0VdMP9AViz/S2Q0/36qV/+ZzWn/lsll/5PFYv+Rw2H/kcNh/5HDY"
+"f+Rw2H/kcNh/5HDYf+z2In/ncB2/y0+HIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8VCWz"
+"ttuO/6vaf/+e027/ntNu/57Tbv+d027/ntRu/53Tbv+e1G7/RVww/z1SKv88USn/Ok8n/1B"
+"rNf+DsFf/kcNh/5HDYf+Rw2H/kcNh/5HDYf+Rw2H/kcNh/6PPd/+v0oj/PFQlswAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAEdiLNu53pL/otR0/5zSbv+c0W7/nNFu/5zRbf+c0W3/nNFt/"
+"5nNav9BVyz/Ok4n/zpOJ/86Tif/Ok4n/ztQKP9fgED/jLxe/5HDYf+Rw2H/kcNh/5HDYf+R"
+"w2H/mchq/7fbkP9GYizbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATGku9rfckf+b0G7/mtB"
+"s/5rPbf+az23/ms9t/5nOa/+UyGb/kcNh/z5UKv86Tib/Ok4m/zpOJ/86Tif/Ok0n/zpOJ/"
+"9AViv/cZlM/4/CYf+QwWH/kMFg/5DCYP+RwmL/ttyQ/0xoLvYAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAABIYyz2sNmK/5rObf+Zzmz/mc5s/5nObf+WyWj/ksRj/47AYP+OwF//PlQq/zlN"
+"Jv85TSb/OUwm/zlNJv85TSb/OU0m/1NwOP+EsVj/jsBg/47AX/+Ov1//j8Bg/5DBYv+w2In"
+"/SGMs9gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxTJtun04D/m85v/5jMbP+YzGz/k8dm/4"
+"6/Yf+MvV//jb1e/429X/89Uin/OEwm/zhMJv84TCb/OEwm/0NaLf9ym03/jL1e/42+Xv+Mv"
+"V//jL1e/4y+X/+Mvl7/kcJk/6XPff88UyXbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALkEd"
+"s5zKc/+bzXH/l8ts/5LEZv+LvF7/irtd/4u7Xf+Ku13/irtd/zxRKP84SyX/N0sl/zlOJ/9"
+"gg0H/h7db/4q7Xf+Ku13/irte/4q7Xf+Ku13/irtd/4q7Xf+Tw2j/lcBt/y5BHbMAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAgLBSAirhk/5rMcf+QwmX/iblc/4i4XP+IuFz/iLhc/4i4X"
+"P+IuFz/O1Ao/zZKJP9MZzP/fKlU/4i4W/+IuFz/iLhc/4i5W/+HuFz/iLlc/4i5XP+IuVz/"
+"iLlc/5TFav99p1n/HywUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8WCkRoj0j/lcds/4q"
+"7YP+Gtlv/hbVb/4a2Wv+Gtlv/hrVb/4W2Wv9DXC7/a5JI/4a2Wv+Gtlr/hrZb/4a1W/+Ftl"
+"v/hrVb/4a2W/+GtVv/hbVb/4a2W/+IuV7/kcNq/1x+Pv8PFgpEAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAASU0F62BsVv/ibxg/4SzWf+Es1n/g7NZ/4OzWf+Esln/g7NZ/4CvWP+D"
+"s1n/g7JZ/4OzWf+Es1n/g7NZ/4OyWv+Ds1n/g7Ja/4OzWf+Ds1n/g7JZ/4q8YP9/rVj/JTQ"
+"YrQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAERgLVlZ3OfuFulz/hLZb/4GwWP"
+"+AsFf/gbBY/4GwWP+BsFj/gLBY/4GwWP+BsFf/gbBY/4GwV/+BsFj/gLBY/4GwWP+BsFj/g"
+"bBY/4GwWP+EtVv/hbpc/1Z3OvsRGAtWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAGyYRjmeQRf+DuVn/gLJY/3+tV/9/rlf/f65W/3+tV/9/rVf/f65X/3+tVv9/rlf"
+"/f61X/36tV/9/rlb/fq5X/36uV/9/rVf/gLFY/4K6Wf9mkUX/GyURjgAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGCAQiHioTq2iWRv9+uFX/frFW/32rVf98q"
+"1X/fKtW/32rVf99q1b/fatV/32sVf98q1X/faxW/32rVv99rFb/faxV/36xVv9/t1X/aJZG"
+"/x4qE6sGCAQiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"ICwUwGygSq1+KP/94sE//fLFT/3usVP97qlT/e6lV/3upVf97qlT/e6lV/3upVf97qlX/e6"
+"pV/3urVP97sVP/eLBQ/1+LP/8cKBKsCAsFMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIFBwMnFR8Nk0hpL/tqn0b/d7JN/3ixT/95rVH/"
+"eqpT/3qpVP96qVT/eqpT/3mtUf94sVD/drJN/2qeRv9IaS/7FR8OlgUHAywAAAAGAAAAAgA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAABgAAABEAAA"
+"AeDBIIcRgkD7xEZCz/Xo09/22lRv9yr0j/c7RI/3O0Sf9ysEn/baRG/16OPf9EZC3/GSMQv"
+"gwSCHYAAAApAAAAHgAAABEAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAIAAAAJAAAAGAAAACoAAAA3AAAAQQkNBncRGQylGCIPyx0rE+chMBb5IS8"
+"V+R0rE+cYIg/LEBkLpwkOBnsAAABHAAAAQAAAADcAAAAqAAAAGAAAAAkAAAACAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAYAAAARAAAAHgAAACkAAAAwA"
+"AAANgAAADoAAAA+AAAAQgAAAEQAAABEAAAARAAAAEIAAAA+AAAAOgAAADYAAAAwAAAAKQAA"
+"AB4AAAARAAAABgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAgAAAAYAAAAMAAAAEQAAABQAAAAXAAAAGgAAABwAAAAeAAAAHwAAAB8AAAAfAAAAHg"
+"AAABwAAAAaAAAAFwAAABQAAAARAAAADAAAAAYAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAGAAAA"
+"BwAAAAcAAAAIAAAACAAAAAgAAAAHAAAABwAAAAYAAAAGAAAABQAAAAQAAAACAAAAAQAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-pref</key>\n"
+"              <data>\n"
+"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"
+"AAAAAAADhGbPNxia3/fpKw/4qcuv+Up8b/q8Hf/56y0f+ftNP/S2OW/woOGUoAAAAAAAABA"
+"wEBAQIBAQECAQECBCMxS5uxx+H/0OD0/5+zzv+Uqcf/u83n/8TW7f/B1Or/qr7W/8DQ5//P"
+"3/P/dYqr7wcJFDQAAAABBggLFQAAAAEAAAAAGiA3rC45V+0tOFzoUGSK+pWqyf+uwt//n7P"
+"T/52xz/99lrz/LDxk2QMDCjAAAAAAAgIDBA0QFTIFCQsZCw4lZ1xzm/7D1u3/wdXs/7LI4/"
+"+qwd3/przZ/6i/2/+txeD/t8rj/8PV7P9VaYzeDBIhVTNAV6dXZH/VBAkMGgAAAAECAwYOA"
+"wQJFwMDBxMeKUnGd4+1/6O31P+lu9n/kqfG/5iuzf92j7f/N0tz5BkhM4YWHCxoY3OW62V1"
+"l/BEWID7f5a5/6/E3/+gt9X/rMLe/7rO5v+90er/vM/o/7TI4f+ku9f/prvX/6vA3P+Mo8P"
+"/ssXd/6a61/8fL06cAAAAAAABAQMBAAYMCg0sbS85WO5rgKX/iqHB/5+11P+Xrcz/i6PC/5"
+"OoyP+EnML/aoGo/0JTgP+Uqcv/t8nh/6e92f+nvdn/mbHR/7XJ4/+9z+n/oLnY/4agxf+Qp"
+"8v/r8Xi/7zP5/+nvdn/n7TS/7rM4/+vwtr/douv/h4kOoIAAAAAAAAAAAkIKWY6SV//WmuL"
+"/3GBnv+ClLT/kKfG/5+22P+Rp8j/hZy9/4idv/+PpcX/aHic/1Zpkf+OosH/q7/Y/46myP+"
+"qv9v/tMjk/3qSuP9HWYP/TFt9/1Rlhv9JYYz/mrHS/7jK4/+Wrcv/n7PQ/3eMr/8OFCl9AA"
+"AAAAAAAAAAAAAADRUkdENSdv9qepn/XGuI/1Vmjf90i7T/k6jJ/5au0P+ZsdT/jKTF/4CXu"
+"v99krX/b4Sn/05ji/+Uqcr/j6bI/7DF4f97k7f/RVeK/x8oSdAhKEfXOkRh/ys1UvkvO17H"
+"oLfW/6G10/+PpcX/g5i5/y89W7whLEqaFhsQZwAAAAAFBwgSGSA6uzlCYf8rMlDqExkxnis"
+"2W9xvgqz/gJS0/4SYuf+Qp8n/hZvH/1tymv9fdJj/coeq/5Oqy/+Yr9D/o7fW/0hhi/84SX"
+"L/CAwWQwMHCiENDR1kDREcYQwNG0xxirL/o7fU/4mhwv+WqcX/k6fE/4Wbvv88TmXcAAAAA"
+"QAAAAAIChQ4EhcqjAYIDy4BAgIIExswi05hiP9sfKD/coWo/3aJrP9bbpD/YHed/5Onxv+W"
+"qMP/k6nK/5611P+Yrs//PlN+/zZBYP8YITaiAAAAAAEBAgUAAAABCQoWN2B4pP+csM//kaf"
+"H/5Omwf+ElbL/aHue/y87YN4AAAAAAAAAAQAAAAIBAQIGAAAAAAYIDCcjLkriRVJt/2h4l/"
+"9UY4n/KjZd6z5Qev1IWn3/Znmb/3uOr/+httP/przZ/56z0v9QaJf/PEZi/yIrR/ICBAUOA"
+"AEBBAAAAAERGDeGd5C2/6S20/+pv9v/hJi3/yYwT8cQFSiABwkQSwAAAAAAAAAAAAAAAAAA"
+"AAMAAAAABw0XPCcvTP9DTGT/TFl0/x8nQ9EIDBVBFxw3qDpGa/9MW37/N0dw/5Sqy/+pvtz"
+"/ma7M/4qixf9AVH//Fx43ugsLEiYLDBIrDRMmgV52n/qXrMr/oLXS/6a71/9xhab/GSI9tg"
+"QFCx0AAAAAAAAAAAAAAAEAAAACAAAAAwAAAAQBAgUaDhAjfiQrRN8nMEz+CQoYVQAAAAAJC"
+"hhZOENf/05agf8xPV7/d42x/5qx0f+Yr83/kqfG/4mhxf9nfqT8Rlp7401khutxibL/kabF"
+"/5Onxf+fttT/j6TA/3uKpv9WZ4j/KjVW2AMDCCcAAAABAAAABAAAAAgAAAALAAAADwAAABY"
+"AAAQgAgEMVQQEEGYAAAIaAAACGwQDD2EjKkj5Mjth/11vjf9zhaL/h5y9/5601f+RqMr/iq"
+"HB/4uiw/+GnL//iJ/A/4yhwv+Mo8P/mK/Q/5Sqyf9sgKT/VGGB/2l5l/8wOl7dBAUHHAAAA"
+"AAAAAACAAAABAAAAAUAAAAJAAAADQAAABIAAAEPAAAABwAAAAUAAAAJAAABGAcIEUIoM07U"
+"VWOB/0BMbftBUnrwgJW4/5Cmx/+Tqsz/jqbI/4ykx/+Opcf/kafJ/5Spy/+El7f/bIGm/xs"
+"kQa8PFymJISdC1A4SImwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAgKFDcYHjawCw4XTgwQHFxMXof/cYSm/32Psv+Hnb//iJ/A/"
+"4OYuP+Blrf/cISo/3CAov9UY4X/GB82pwAAAAACBAYRAAAABAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAECAwoAAAAAFRw"
+"sikBLav9kdJX/PUxw8TxIbu5meJv/aXub/0FPcfEgK0vKTV5+/1ZheP8tNVL/BQgMIgAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAATHDOiO0Nc/ztGY/8NER9kCw4cWEVTdP9ca4j/Fh0zuAMD"
+"BQ8ZHTSjMjlU/BMYK4wAAQEKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAUAAAAIAAAADAEABiYLDR6ICw4gmg"
+"EAAxIEAww9LzdT/ztEXP8QFCisAAABDAEBBCEFBhFRAAACFwAAAAwAAAAFAAAAAwAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAA"
+"BAAAAAcAAAALAAAAEwAAARQAAAALAAAACQAAAR0HBxNaCAoYZwEACDwAAAANAAAACwAAARY"
+"AAAAYAAAADgAAAAQAAAADAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-queue</key>\n"
+"              <data>\n"
+"R2RrUAAAEBgBAQACAAAAgAAAACAAAAAg////AP///wD///8A////AP///wD///8A////AP/"
+"//wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///"
+"8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////A"
+"P///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/"
+"//8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A///"
+"/AP///wD///8A////AP///wCIiIi9kJCQ55CQkOeQkJDnkJCQ55CQkOeQkJDnkJCQ55CQkO"
+"eQkJDnkJCQ55CQkOeQkJDnkJCQ55CQkOeQkJDnkJCQ55CQkOeQkJDnkJCQ55CQkOeIiIi9A"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AJCQkOj39vf/9vX2//f2"
+"9//39vf/9/b3//f29//39vf/+Pj5//j4+f/4+Pn/+Pj5//j4+f/4+Pn/+Pj5//j4+f/4+Pj"
+"/9/b3//f29//29fb/9fX1/5CQkOgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP"
+"///wD///8AkJCQ6Pj29////////////////////////////////////////f39//39/f///"
+"////////////////////v7+///////////////////////5+Pj/kJCQ6AAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wCQkJDo9vX1///////1YjX//2Em//9kJ//"
+"/ZSj//2go//9mI///Yhr//2Ia//9nIP//aSr//2op//9jH///Xhn//2Mn//9nKv/zZTj///"
+"////r6+f+QkJDoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AImJi"
+"eL39vb///////9YD///WgD//10A//9fAP//YwD//2cA//9pAP//agD//20A//9rAP//aAD/"
+"/2UC//9gAP//XQD//1wA//9VCf//////+vn5/4mJieIAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAP///wD///8AiYmJ4vX09P/+/v7//00A/+N4SP/ffk7/335O/99+Tv/ffk"
+"7/34JO/+CETf/fjVD/3otS/92EVP/dg1T/3YJU/92BVP/dgVT/3YFU/8nKyv/Jycn/gICA2"
+"4mJieKJiYniiYmJ4np6eq0AAAAAAAAAAAAAAAAAAAAA////AP///wCJiYni9fTz//39/f//"
+"OAD/4HJW//f29//29fb/9/b3//f29//39vf/9/b3//f29//4+Pn/+Pj5//j4+f/4+Pn/+Pj"
+"5//j4+f/4+Pn/+Pj5//j4+P/39vf/9/b3//b19v/19fX/gICA2wAAAAAAAAAAAAAAAAAAAA"
+"D///8A////AImJieLx8PD//Pz9//8QAP/dcVb/+Pb3/////////////////////////////"
+"//////////9/f3//f39///////////////////////+/v7///////////////////////n4"
+"+P+AgIDbAAAAAAAAAAAAAAAAAAAAAP///wD///8AiYmJ4u/u7v/6+vz//wAA/91xVv/29fX"
+"//////wC1C/8AjAD/AIUA/wCAAP8cmAD/AIAA/wB/AP8JbAD/AJIA/wC3AP8AtwD/B1UG/w"
+"R5AP8ApQD/NboA/xm3B///////+vr5/4CAgNsAAAAAAAAAAAAAAAAAAAAA////AP///wCJi"
+"Yni7Ovr//b2+f98AAD/3XFW//f29v//////AI8A/wCLAP8AoQD/AKUA/wC2AP8bqgD/KZwI"
+"/wCNAP8AgwD/AF0A/wBqAP8AiAD/AGEA/wBvAP8AjAD/AHYA///////6+fn/gICA2wAAAAA"
+"AAAAAAAAAAAAAAAD///8A////AICAgNvp6Oj/9fX4/wMFCf9CODn/9fT0//7+/v8AlAD/AH"
+"0A/xqAGv8Xexb/GHsW/xd7Ff8Yexb/F3sV/xd7Fv8Yexb/GHsW/xd7Ff8Xexb/F3sW/xh7F"
+"v8KXgT/ycrK/8nJyf+AgIDbgICA24CAgNuAgIDbenp6rf///wD///8AgICA2+Xk5f/4+Pr/"
+"BQQK/0I4Of/19PP//f39/wCXAP8AbQX/9/b3//b19v/39vf/9/b3//f29//39vf/9/b3//j"
+"4+f/4+Pn/+Pj5//j4+f/4+Pn/+Pj5//j4+f/4+Pn/+Pj4//f29//39vf/9vX2//X19f+AgI"
+"Db////AP///wCAgIDb5+fp//Pz9f8DAQX/Ojc5//Hw8P/8/P3/AIIA/wBrBv/49vf//////"
+"/////////////////////////////////39/f/9/f3///////////////////////7+/v//"
+"////////////////////+fj4/4CAgNv///8A////AICAgNvn5+n/8PDy/wAAAv86Nzn/7+7"
+"u//r6/P8AewD/AGAK//b19f//////RHPt/z5x8v8+cfL/QXv7/0qN/f8yW7H/GSZL/xIePf"
+"8aMnD/NmTX/zlo2f8bM2j/ChIl/zdm1P9HiOX/RWrK///////6+vn/gICA2////wD///8Ag"
+"ICA2+Hh4//x8fP/BQUK/zo3Of/s6+v/9vb5/wBvAP8AWAb/9/b2//////9Gc9n/SHnw/1N+"
+"+f9Tg///WZL//2mh//9wrf//VYv0/xwsVf8IDyf/FSJE/yM3aP8dL1b/JUF8/x0wXP8mGyj"
+"///////r5+f+AgIDb////AP///wCAgIDb4uLk//T09v/n5fL/qqmu/+no6P/19fj/AGsA/w"
+"BUBv/19PT//v7+/z5l0f9Meuf/YZH//1qM//9Ja9P/QF+5/0R0xP8zWJT/Cg8W/wAAAP8BA"
+"AH/Ehkr/xIeMv8NExv/Ex08/zMvWf/+/v7/+/v7/4CAgNv///8A////AICAgNvi4ej/4d7v"
+"/+He7/+sqrL/5eTl//j4+v8AcwL/AF4H//X08//9/f3/O1PM/0l15P9Yj/r/SXjf/yMzX/8"
+"DBAn/DhIm/xUcLP8HCxL/BAUL/wAAAP8AAAD/BwsV/wMFCP8fN3T/TmLI///////z8vH/gI"
+"CA2////wD///8AY2NjsXV1deB1dXXgdXV14HR0dOTn5+n/8/P1/wBoAP8ASAD/8fDw//z8/"
+"f9BUbr/SHDn/0p02f8sTIv/EyJC/xkqaf9Eauz/WILq/xooVP8IDyD/BQgP/wkRHv8kNmb/"
+"DRMh/wYKFv8pGjX/+/v8//X09f+AgIDb////AP///wAdHR0aAAAAHwAAAB8AAAAfgYGB2ef"
+"n6f/w8PL/AFkA/wBeAP/v7u7/+vr8/zxJs/9FY9H/RWbJ/y9SrP8zUrn/PmXf/zli4/8VOJ"
+"v/CRRE/xUrXP8qQoT/IzVu/xAYLv8jMm3/GiVM/x8HBP/y8vP/9fX3/4CAgNv///8A////A"
+"AAAAAAAAAAAAAAAAAAAAACAgIDb4eHj//Hx8/8AXgT/AEwA/+zr6//29vn/LEim/ztWvf9A"
+"WcT/O1vN/1F27f+kwf//o7Tg/3aBl/9DWZb/QVu5/0lq6P86Vbb/BQcQ/yg8gP8vR5v/ISJ"
+"O//Dw8f/u7u//gICA2////wD///8AAAAAAAAAAAAAAAAAAAAAAICAgNzi4uT/9PT2/+fl8v"
+"+qqa7/6ejo//X1+P8oSKP/NU+//zpRzf9NZtL/j6Xf/////v//////+vv//46j4v93jf3/R"
+"2b8/0Jc0/8OESr/GSRF/y5Jqf8vS8P/9fX4/+jn5/+AgIDb////AP///wAAAAAAAAAAAAAA"
+"AAAAAAAAgICA3OLh6P/h3u//4d7v/6yqsv/l5OX/+Pj6/y08o/83SL3/MEzI/1961f/q6vH"
+"/8vH0//Lz9v/z9Pb/7e/0/4+k7f8uTt3/PVLN/yQvav8JCw3/HSts/zNR0v/19fj/4+Li/4"
+"CAgNv///8A////AAAAAAAAAAAAAAAAAAAAAABjY2OxdXV14HV1deB1dXXgdHR05Ofn6f/z8"
+"/X/Cgox/w0PQP8KEEv/GyJR/15bcf9vbIz/cHGT/3F1kP9mZ3v/LTNc/wkRTv8RFFD/DxFJ"
+"/wEBAv8FBxj/ERhO//Pz9v/m5ef/gICA2////wD///8AAAAAAAAAAAAAAAAAAAAAAB0dHRo"
+"AAAAfAAAAHwAAAB+BgYHZ5+fp//Dw8v8CAxj/AgMf/wIDI/8CAyL/DQ8x/w4OPP8NDkP/DQ"
+"5C/w4ON/8CAiP/AgIf/wMEKf8KCEX/AQEK/wAAAP8BAQT/7Ozu/+fn6v+AgIDb////AP///"
+"wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAICAgNvh4eP/8fHz/xEWTP8RFk//"
+"ERVL/xAVSP8NFkv/DRFD/woMQf8KD0X/Dg9D/w8RRP8RFEv/ERlX/xcaXv8FBhP/AQED/wY"
+"JGf/r6+3/4+Pl/4CAgNv///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAgICA2+Li5P/09Pb/4t/3/+Dd9v/h3/T/4d/0/+Hf9P/h3vL/4N7x/+De8f/h3vL/4d7z/"
+"+Hf9f/h3/f/4d/1/+Dd7v/f3Oz/4N7w//n3///f3Oz/gICA2////wD///8AAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgIDb4uHo/+He7//c2OT/3dvl/9zZ5f/c2eX/3Nn"
+"l/9zZ5v/d2eb/3dnm/9zZ5v/c2eb/3Nnl/9za5P/c2OP/3drq/93a7P/c2ej/3drr/9rZ4v"
+"+AgIDb////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGNjY7FxcXHjc"
+"XFx43FxceNxcXHjcXFx43FxceNxcXHjcXFx43FxceNxcXHjcXFx43FxceNxcXHjcXFx43Fx"
+"ceNxcXHjcXFx43FxceNxcXHjcXFx42NjY7H///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAHR0dGgAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHw"
+"AAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfHR0dGv///wD//"
+"/8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////"
+"AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD"
+"///8A////AP///wD///8A////AA==\n"
+"              </data>\n"
+"              <key>hb-queue-delete</key>\n"
+"              <data>\n"
+"R2RrUAAABBgBAQACAAAAQAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAOwAAAHEAAACbAAAAtAAAAJsAAABxAAAAOwAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAARAAAAZAAAALYAAAC4AAAAuAAAALgAAAC4AAAAuAAAALYAAABkAAA"
+"AEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAAL"
+"gAAAC4AAAAuAAAAGQAAAAAAAAAAAAAAAAAAAAAAAAAOwAAALYAAAC4AAAAXAAAAAMAAAC4A"
+"AAAuAAAALgAAAADAAAAXAAAALgAAAC2AAAAOwAAAAAAAAAAAAAAAAAAAHEAAAC4AAAAuAAA"
+"AAMAAAADAAAAAwAAALgAAAADAAAAAwAAAAMAAAC4AAAAuAAAAHEAAAAAAAAAAAAAAAAAAAC"
+"bAAAAuAAAALgAAAC4AAAAAwAAAAMAAAADAAAAAwAAAAMAAAC4AAAAuAAAALgAAACbAAAAAA"
+"AAAAAAAAAAAAAAtAAAALgAAAC4AAAAuAAAALgAAAADAAAAAwAAAAMAAAC4AAAAuAAAALgAA"
+"AC4AAAAtAAAAAAAAAAAAAAAAAAAAJsAAAC4AAAAuAAAALgAAAADAAAAAwAAAAMAAAADAAAA"
+"AwAAALgAAAC4AAAAuAAAAJsAAAAAAAAAAAAAAAAAAABxAAAAuAAAALgAAAADAAAAAwAAAAM"
+"AAAC4AAAAAwAAAAMAAAADAAAAuAAAALgAAABxAAAAAAAAAAAAAAAAAAAAOwAAALYAAAC4AA"
+"AAXAAAAAMAAAC4AAAAuAAAALgAAAADAAAAXAAAALgAAAC2AAAAOwAAAAAAAAAAAAAAAAAAA"
+"AAAAABkAAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAZAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAEQAAAGQAAAC2AAAAuAAAALgAAAC4AAAAuAAAALgAAAC2AAAAZAA"
+"AABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOwAAAHEAAACbAAAAtAAAAJsAAA"
+"BxAAAAOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-queue-job</key>\n"
+"              <data>\n"
+"R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP/"
+"//wD///8A////AP///wD///8AMjIyPGxsbIlqamon////AP///wD///8A////AP///wD///"
+"8A////AP///wD///8AXV1dHmxsbE2MjIyTQkJCybCwsPyjo6P/QEBAY////wD///8A////A"
+"P///wD///8AAAAAEHFxcUZgYGCEsbGxyz4+PvqdnZ3/tLW0/y8vL/+enp7SX19fmyAgIDP/"
+"//8A////AGFhYS5hYWFwV1dXu8zMzOtNTU3/eXl5/8HBwf8uLy/ne3t7qU5PTmZfX18l///"
+"/AP///wD///8A////AP///wCjo6O+aWlp/1xcXP+ysrL2PT09tmhoaHsAAAAylJeXC////w"
+"D///8A////AP///wD///8A////AP///wD///8AlJSUvXd3d/9KSkr/srKy9nx8fNhVVVXOz"
+"8/P129vb91iYmLiyMjI42BgYONwcHDjxMTE44eHiKj///8A////AIqKi7hWVVT/XFtY/8XD"
+"wv9EQT//aWdm/769vf85ODf/eXd2/7S0s/8yLy3/iomI/6ampv9aWlq+////AP///wAyLy1"
+"LOkJJ/zNHV/8oMTj/OUtb/0BIT/8sLjD/PEVN/z5GTf8uNDr/N09j/zA7RP8yMS//Q0JCS/"
+"///wD///8AOjMuQTE9Sf8kR2X/JEVj/yBWg/9EVWP/KjhD/y42PP9FVWP/NT1D/yZEXf8zN"
+"Tj/ODQy/zY3OEH///8A////ADctI0QuS2T/NmSM/z1bdv82ZYv/RWWD/zlad/8wWHn/RGWC"
+"/z9eef88XXn/QVtx/zZBS/82LidE////AP///wA3MStEJEpr/xxXh/8eVYP/Fl2Y/ys/T/8"
+"lTG3/EmCh/x1Rff8dVYP/H1J9/xpakP8mRmH/PScVRP///wD///8AMCcgRC5GWv80ZpD/NW"
+"GH/zVkjP88WXL/Ol17/zRljv8zYoj/NWKJ/zdgg/8yaZf/L0RW/zMkGET///8A////ADEtK"
+"UIlQVr/H1F7/yJLbf8mRF3/Iklr/yZEXv8tOUL/HlB6/yVFYf8lRmL/IE50/yg+UP8zKSJC"
+"////AP///wApKCVRJjtL/x5Gaf8eR2j/HUpv/x5GaP8iQVv/KTZA/x5Haf8eSW3/HUlt/x9"
+"FZP8nOUf/KyMeUf///wAAAAAAGBkYRCoqKMIqKinFKCsrxygrLMkoKSrLJyoqyygpKcsoKi"
+"rLKCsrySgrLMcpKyvFKSopwhgYGEQAAAAAAAAAAP///wD///8A////AP///wD///8AAAAAA"
+"QAAAAIAAAACAAAAAf///wD///8A////AP///wD///8AAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-queue-pass1</key>\n"
+"              <data>\n"
+"R2RrUAAAAoABAQACAAAAOAAAAA4AAAALgICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4C"
+"AgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/9fX5//////////////////////////"
+"/////////////////////////////19fn/gICA/4CAgP/z8/j/////////////////rq6u/"
+"2hoaP+pqan///////////////////////Pz+P+AgID/gICA//Dw9v//////////////////"
+"////Xl5e/52dnf//////////////////////8PD2/4CAgP+AgID/7ezz///////////////"
+"///////9eXl7/nZ2d///////////////////////t7PP/gICA/4CAgP/q6fH///////////"
+"///////////15eXv+dnZ3//////////////////////+rp8f+AgID/gICA/+jn8P///////"
+"///////////////Xl5e/52dnf//////////////////////6Ofw/4CAgP+AgID/5eTv////"
+"/////////////3p6ev80NDT/SEhI/6SkpP/////////////////l5O//gICA/4CAgP/l5O/"
+"//////////////////////////////////////////////////////+Xk7/+AgID/gICA/9"
+"/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/4CAgP8fH"
+"x//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f"
+"/w==\n"
+"              </data>\n"
+"              <key>hb-queue-pass2</key>\n"
+"              <data>\n"
+"R2RrUAAAAoABAQACAAAAOAAAAA4AAAALgICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4C"
+"AgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/9fX5//////////////////////////"
+"/////////////////////////////19fn/gICA/4CAgP/z8/j////////////c3Nz/cnJy/"
+"19fX/94eHj/7u7u//////////////////Pz+P+AgID/gICA//Dw9v//////////////////"
+"/////////zg4OP+xsbH/////////////////8PD2/4CAgP+AgID/7ezz///////////////"
+"///////+tra3/RUVF//Pz8//////////////////t7PP/gICA/4CAgP/q6fH///////////"
+"//////zc3N/0JCQv/j4+P//////////////////////+rp8f+AgID/gICA/+jn8P///////"
+"////+jo6P80NDT/xMTE////////////////////////////6Ofw/4CAgP+AgID/5eTv////"
+"////////oKCg/yAgIP8qKir/Kioq/6Kiov/////////////////l5O//gICA/4CAgP/l5O/"
+"//////////////////////////////////////////////////////+Xk7/+AgID/gICA/9"
+"/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/4CAgP8fH"
+"x//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f"
+"/w==\n"
+"              </data>\n"
+"              <key>hb-queue-subtitle</key>\n"
+"              <data>\n"
+"R2RrUAAAAoABAQACAAAAOAAAAA4AAAALgICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4C"
+"AgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/9fX5//////////////////////////"
+"/////////////////////////////19fn/gICA/4CAgP/z8/j/////////////////29vb/"
+"21tbf9TU1P/d3d3//////////////////Pz+P+AgID/gICA//Dw9v////////////////+U"
+"lJT/QUFB/+bm5v//////////////////////8PD2/4CAgP+AgID/7ezz///////////////"
+"//+zs7P9MTEz/Li4u/8bGxv/////////////////t7PP/gICA/4CAgP/q6fH///////////"
+"////////////X19f9xcXH/JiYm//Hx8f///////////+rp8f+AgID/gICA/+jn8P///////"
+"//////////7+/v//////+rq6v8fHx//39/f////////////6Ofw/4CAgP+AgID/5eTv////"
+"/////////////3x8fP9OTk7/TExM/3R0dP/////////////////l5O//gICA/4CAgP/l5O/"
+"//////////////////////////////////////////////////////+Xk7/+AgID/gICA/9"
+"/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/4CAgP8fH"
+"x//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f"
+"/w==\n"
+"              </data>\n"
+"              <key>hb-remove</key>\n"
+"              <data>\n"
+"R2RrUAAAEBgBAQACAAAAgAAAACAAAAAg////AP///wD///8A////AP///wD///8A////AP/"
+"//wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///"
+"8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////A"
+"P///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/"
+"//8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A///"
+"/AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///w"
+"D///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/"
+"///AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAG8LTFEuy4wgLwuL7O7Ly/bvC4v9rwuL/a7Ly/"
+"bvC4vs7suMIC8LTFE/wAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP"
+"///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7Ly9Wuy4vrdxLS//qZ"
+"GT/7HJy/+t3d//reXn/63l5/+t3d//scnL/6mRk/9xLS/+7Li+tuywvVgAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAP///wD///8A////AP///wD///8A////AAAAAAAAAAAAAAAAAAAAAAC"
+"8LS0iuy0vjt1MTf3sa2v/7HV1/+5sbP/yXV3/9kxM//o/P//6Pz//9kxM//JdXf/ubGz/7H"
+"V1/+xra//dTE39uy0vjrwtLSIAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///"
+"wD///8AAAAAAAAAAAAAAAAAuiswMLotMKvnXFz/7HFx//BlZf/2SUn/+zo5//s5Ov/7OTr/"
+"+jk6//s5Of/6Ojr/+jk5//o5Of/2SEj/8GVl/+xxcf/nXFz/ui0wq7owMDAAAAAAAAAAAAA"
+"AAAD///8A////AP///wD///8A////AP///wAAAAAAAAAAALwtLSK5LS6r6V1d/+1vb//0VV"
+"X/+Tk5//o5Of/6OTn/+jk5//o5Of/6OTn/+Tk5//k5Of/5OTn/+Tk5//k5Of/6OTn/9FVV/"
+"+1vb//pXV3/ui0uq7wtLSIAAAAAAAAAAP///wD///8A////AP///wD///8A////AAAAAAAA"
+"AAAAty0tjuZVVf/ua2v/9ExM//g4OP/5ODn/+Dk4//g4OP/4ODj/+Dg4//g5Of/4ODj/+Tg"
+"4//g4Of/4OTn/+Dk4//g5Of/5ODj/9E1M/+5ra//mVVX/uS0tjgAAAAAAAAAA////AP///w"
+"D///8A////AP///wD///8AAAAAALgsLFbZQ0P87mdo//NPT//3Nzf/9zc4//g4OP/3Nzf/9"
+"zc3//c4N//3ODj/9zg4//c4OP/3Nzj/9zg4//c3N//3Nzf/9zg4//c3N//4Nzj/809P/+5o"
+"Z//ZQ0T8uCwsVgAAAAD///8A////AP///wD///8A////AP///wD/AAABtSwuretaWv/wWFj"
+"/9jc2//Y3Nv/2Njf/9Tc3//Y3N//1Nzf/9jY3//U3N//2Njf/9jc3//Y3N//1Nzf/9jc3//"
+"Y3N//2Njf/9TY2//Y2N//2Nzf/8FhY/+taWv+3LC6t/wAAAf///wD///8A////AP///wD//"
+"/8A////ALgpLUTUOzz/7mBg//M/P//0NjX/9DU2//U2Nv/0NTb/9TY1//Q1Nf/0Njb/9DY2"
+"//U2Nv/1NTb/9DY1//U2Nv/1MzP/8y8v//MqKv/zJib/8iMj//IfIP/wKir/7FhY/8w5Of+"
+"0KS1E////AP///wD///8A////AP///wD///8AsywsgOVHSP/vU1P/8zQ1//I1Nf/zNTX/8z"
+"U1//M1Nf/zNTX/8zU1//M1Nf/zNTX/8zU1//MxMf/yKir/8SQk//EeHv/xGxv/8Rsb//EbG"
+"//xGxv/8Rsb//EbG//uRET/2kJD/7MqLID///8A////AP///wD///8A////AP///wCzKSyz"
+"6k5P//BFRf/xNDT/8TQ0//E0NP/YLy//2S8v/9kvL//ZLy//2S8v/9goKP/YISD/1xsa/9c"
+"YGP/XGBj/1xgY/9cYGP/XFxj/1xgY/+8aG//vGxv/7xsb/+4yMv/jR0f/sykrs////wD///"
+"8A////AP///wD///8A////ALIqK9vtUFD/8Do6//AzM//wMzP/8DMz/9guLv/+6+v//uvr/"
+"/3q6v/96ur//enp//3p6f/96en//enp//3p6f/96en//enp//3p6f/UGBj/7Bsa/+0aGv/s"
+"Ghv/7SMj/+dFRv+yKivb////AP///wD///8A////AP///wD///8AsSsr9u1OTv/uNDT/7jI"
+"y/+4yMv/uMjL/1i0t//3r6//96ur//enp//3p6f/96en//enp//3p6f/96en//enp//3p6f"
+"/96en//enp/9EXF//qGhr/6Roa/+kaGv/pHBz/6UFB/7ErK/b///8A////AP///wD///8A/"
+"///AP///wCwKSv27EhI/+0yMv/sMTH/7TEx/+0xMf/TJib//enp//3o6f/86On//enp//3o"
+"6f/96Oj//Onp//3o6P/96en//enp//3p6f/96ej/zxYX/+YaGf/mGhr/5hoa/+YbG//mOTr"
+"/sCkr9v///wD///8A////AP///wD///8A////AK8oKtvpPj7/6zMz/+swMP/rMDD/5ycn/8"
+"wZGf/86Oj//Ojp//zp6P/86Oj//Ojp//zo6P/86Oj//Ojp//zo6P/86Oj//Ojp//zo6f/LF"
+"hb/4hoZ/+IZGf/iGRn/4h4e/94wMf+vKSnb////AP///wD///8A////AP///wD///8ArCgp"
+"s+I1Nf/pNDT/6i8v/+UlJf/fGRr/yBYW/8cWFv/HFhb/xxYW/8cWFv/HFhb/xxYW/8cWFv/"
+"HFhb/xxYW/8cWFv/HFhb/xxYW/8cWFv/eGBj/3xkZ/94ZGf/gICD/0yoq/64oKbP///8A//"
+"//AP///wD///8A////AP///wCrKCiA1Sws/+k0NP/iJSX/2xkZ/9oYGP/aGBn/2hgY/9oYG"
+"P/aGBj/2hgY/9oYGP/aGBj/2hkY/9oYGf/aGBj/2hkY/9oYGP/aGBj/2hkY/9oYGP/aGBn/"
+"2hgY/9sgIP/FJif/rSgqgP///wD///8A////AP///wD///8A////AK0mKUTAJyj/4Swr/9g"
+"bG//VGBj/1hgY/9YYF//WFxj/1RgY/9YYGP/WGBj/1hgY/9YYGP/WGBj/1hgX/9YYGP/WFx"
+"j/1hcY/9UYGP/WGBj/1hgY/9YXGP/WGRn/1SAg/7YlJv+tJilE////AP///wD///8A////A"
+"P///wD///8A/wAAAaomJq3IIiP/0xka/9IXF//SFxf/0hgX/9IXF//RFxf/0hgX/9IYGP/S"
+"GBf/0hcY/9IXF//SGBf/0RgY/9IXF//SFxf/0hcX/9IXF//SFxf/0hcX/9IZGf/DISH/qyY"
+"orf8AAAH///8A////AP///wD///8A////AP///wAAAAAAqScnVrMkJPrJGxv/zRgY/80WFv"
+"/OFxf/zhcW/84XF//OFxf/zhcW/84XF//NFxb/zhcX/84XF//OFhb/zhYX/80WF//OFhf/z"
+"hYW/84XF//OGBj/yRsb/7MjJPqpJydWAAAAAP///wD///8A////AP///wD///8A////AAAA"
+"AAAAAAAAqSYojrcfIP/JGBj/yhYW/8oWFv/KFxf/yhYW/8oWFv/KFhb/yhcX/8oXFv/LFhf"
+"/yhYX/8oWFv/KFhb/yhcW/8oWFv/KFhb/yhYX/8kXF/+2HyD/qSYojgAAAAAAAAAA////AP"
+"///wD///8A////AP///wD///8AAAAAAAAAAAClJiYiqSUnq7YeHv/FFhb/xxYW/8YWFv/GF"
+"hb/xxYW/8YWFv/HFhb/xhYW/8YWFv/HFhb/xxYW/8cWFv/GFhb/xhYW/8YWFv/GFRb/tx4e"
+"/6clJaulJiYiAAAAAAAAAAD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAC"
+"lJSUwpiUlq7MeIP/AGBj/wxUW/8MWFv/DFRX/wxUW/8QVFv/EFhX/wxUV/8MWFv/DFhb/wx"
+"YW/8QWFf/DFRb/vxgY/7IeH/+mJSesoSQkMQAAAAAAAAAAAAAAAP///wD///8A////AP///"
+"wD///8A////AAAAAAAAAAAAAAAAAAAAAAKQISEnoCQkk60gIfq2Gxz/vxYW/8EVFv/BFhX/"
+"wRYV/8EVFf/BFRX/wRUV/8EVFv/BFRb/vxcX/7YbHP+sISL6nCIkloAdHSwAAAAGAAAAAgA"
+"AAAAAAAAA////AP///wD///8A////AP///wD///8AAAAAAAAAAAAAAAABAAAABgAAABEAAA"
+"AefhsbcZgiI7yrISL/sR0e/7caGv+7Fxf/vhYW/74WFv+7Fxj/txoa/7EdHv+rISH/liIiv"
+"nkaGnYAAAApAAAAHgAAABEAAAAGAAAAAQAAAAD///8A////AP///wD///8A////AP///wAA"
+"AAAAAAAAAAAAAAIAAAAJAAAAGAAAACoAAAA3BAAAQV4VFXeAHR2lkB8iy5wjJOejJCb5oiQ"
+"l+Z0iI+eSHyHLfxsbp1sVFXsEAABHAAAAQAAAADcAAAAqAAAAGAAAAAkAAAACAAAAAP///w"
+"D///8A////AP///wD///8A////AAAAAAAAAAAAAAAAAQAAAAYAAAARAAAAHgAAACkAAAAwA"
+"AAANgAAADoAAAA+AAAAQgAAAEQAAABEAAAARAAAAEIAAAA+AAAAOgAAADYAAAAwAAAAKQAA"
+"AB4AAAARAAAABgAAAAEAAAAA////AP///wD///8A////AP///wD///8AAAAAAAAAAAAAAAA"
+"AAAAAAgAAAAYAAAAMAAAAEQAAABQAAAAXAAAAGgAAABwAAAAeAAAAHwAAAB8AAAAfAAAAHg"
+"AAABwAAAAaAAAAFwAAABQAAAARAAAADAAAAAYAAAACAAAAAAAAAAD///8A////AP///wD//"
+"/8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAGAAAA"
+"BwAAAAcAAAAIAAAACAAAAAgAAAAHAAAABwAAAAYAAAAGAAAABQAAAAQAAAACAAAAAQAAAAA"
+"AAAAAAAAAAP///wD///8A////AA==\n"
+"              </data>\n"
+"              <key>hb-source</key>\n"
+"              <data>\n"
+"R2RrUAAAEBgBAQACAAAAgAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAKCgoUKCgoUzk5OXEAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACIiIkJISEiIX19fzYODg/+ioqL/e3t"
+"79gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVFRUqNzc3d1VVVb1+fn75Y"
+"mJi/1FRUf/Ozs7//////729vf9gYGH/EhISKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQ0NGy8vL1xgYGC"
+"se3t764mJif+3t7f/4ODg/0VFRf8AAAD/eHh4///////+/v7/PDw8/1ZWVv80MzOAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcHBw0nJ"
+"ydLS0tLmmVlZd2Kior/f39//ywsLP8mJib/2NjY//////+urq7/AAAA/ykpKf+kpKT/kpKS"
+"/2pqav9SU1LNNjY2iA4ODiQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAHBwcOjo6OoBlZWXNfX19/2BgYP+NjY3/6urq//////9ERET/AAAA/4yMjP/29vb/y8"
+"zL/2VlZP9YWFj/XV1d5DY2NpoeHR5TCAgIFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAABUVFSo8PDxuZGRktH19ffmZmZn/v7+//6CgoP8AAAD/Hh4e/+bm5v//////"
+"n5+f/w4ODv89PT7/b29u/1lYWfI6Ozq0JycmZQ0NDSIAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFJSUqNqamrkioqK/01NTf8pKSn/fX19//////////"
+"7/Kysr/wMDA/94eHj/v7+//4eGhv9jY2P/VFRUxTY2NoATExMyAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAg4KD//Hx8f+w"
+"sLD/AAAA/ycnJ//39/f/6enp/56env8+Pj7/Xl5f/1JTUtUwLy+RGxsbSwICAgYAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAABpaWnv7u7u/ysrK/8gISD/XV5e/3l5ef9PUE/kODg4oyYmJlwLCwsbA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGpqav95enr/ZmVl/3N0c/90dXX"
+"/e3t7/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4"
+"CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP8AAAAAAAAAAAAAAAAAA"
+"AAAdHN0/9vb2//Y2Nj/GBgY/wAAAP9UVFT/+fn5///////Y2Nj/GBgY/wAAAP9UVFT/+fn5"
+"///////Y2Nj/GBgY/wAAAP9UVFT/+fn5///////Y2Nj/GBgY/wAAAP9UVFT/+fn5///////"
+"Y2Nj/eHh5/wAAAAAAAAAAAAAAAAAAAABubm7/2NjY/xgYGP8AAAD/VFRU//n5+f//////2N"
+"jY/xgYGP8AAAD/VFRU//n5+f//////2NjY/xgYGP8AAAD/VFRU//n5+f//////2NjY/xgYG"
+"P8AAAD/VFRU//n5+f//////2NjY/xgYGP9ubm7/AAAAAAAAAAAAAAAAAAAAAGNjY/9jZGT/"
+"ZGNj/2NkY/9jZGT/Y2Nj/2NkY/9jY2T/Y2Nj/2NjZP9jZGP/ZGNj/2RjY/9jY2P/Y2Nj/2N"
+"jZP9kZGP/ZGNk/2NkY/9kZGP/Y2Nj/2NjY/9jY2P/ZGNk/2NjY/9jZGP/Y2Rj/2RjY/8AAA"
+"AAAAAAAAAAAAAAAAAAAAAAADk5Ov84Oz3/NTxC/zU9Q/83Oz7/OTo6/zg6PP81PUP/ODo7/"
+"zk5Of85OTn/OTk5/zk6O/82O0D/OTo7/zk5Of85OTn/OTk6/zg7Pf82PUL/NT1D/zU8Qv84"
+"OTr/OTk5/zk5Of85OTn/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODk7/zQ/Sf8oS2f/JU5"
+"y/y5FWP82O0D/L0JS/yJSef80Pkb/UHuh/zk5Of85OTr/NT5F/ypJY/82PUL/OTk5/1B7of"
+"84OTv/ND9J/yhKZv8lT3P/J01t/zY9Qv85OTn/OTk5/zk5Of8AAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAA5OTn/Nzo9/zFBTf8mTGv/KEto/zFCUf8jUHf/F1yW/zBATf9QfKH/ODk5/zY6"
+"Pf8uRVf/Kkpj/zY8QP84ODj/UHuh/zg4Of82Oj3/MEFN/yZMb/8uRVn/Nzk9/zk5Of85ODn"
+"/ODg4/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADg3Of80PEP/J0po/yROcv8uQlT/KEln/x"
+"9Tgf8UYKD/K0de/057o/83Nzj/MzxD/yVNbv8wQE7/Nzk6/zg4OP9Qe6H/ODg4/zY7P/8qR"
+"17/Kkdf/zQ7Qf84ODn/ODg4/zg3N/84Nzj/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjg6"
+"/y1CU/8dVob/I05z/y1DVv8yO0T/LkBP/x9Uf/8wPkj/UHyh/zc3OP8yPET/JExt/zI7Q/8"
+"3Nzf/Nzc2/1B7of83Nzf/MjtD/yNQdP8xPkn/Nzg3/zc3Nv83Nzf/Nzc2/zc2N/8AAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAA2Njb/Lj9P/0N5qP9KeqT/TXqj/1B8of9Pe6H/Snuk/0V6p"
+"/9LeqT/T3qh/0h6pv8+eaz/TXuj/xh0wv9Qe6H/UHuh/1B7of9Pe6H/Snuk/097of9Qe6H/"
+"UHuh/0F5qv82Njb/NjY2/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADU1NP8YWpH/HlF8/yV"
+"JaP8YWpD/K0FU/x5RfP8eUXz/GFqR/x5RfP81NTb/MTpB/xpWif8hTnL/EWKl/x5RfP8lSW"
+"f/JUlo/xRem/8uPUn/JUln/xRem/8uPUn/Cmq6/y48Sf80NTX/AAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAMzQ0/x1Re/8nRVz/EWGl/xpVhv8hTXH/Dmav/xdZkP8eUXv/J0Vc/zQ0M/8t"
+"PEj/B27E/yBNcf8RYaX/JEhn/x5Re/8RYaX/J0Rc/x5Re/8RYaX/JkRd/x5Re/8RYaX/NDQ"
+"z/zQzNP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzMjL/HVB7/x1Qe/8dUHv/GVSF/yZEXP"
+"8aVYX/EWGk/x1Qe/8dUHv/MjIy/ypAUf8aVYX/GlSF/xBhpP8mRFz/HVB7/x1Qe/8RYaT/J"
+"kNc/x1Qe/8RYaT/JkRc/w1lr/8sO0f/MzIy/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAx"
+"Mv8uNTn/SXql/0x7pP9KeqT/Snql/057ov9Qe6D/T3ui/057ov9Oe6L/Tnui/097of9Qe6H"
+"/Tnui/0l7pv9Ieqb/S3uk/097of9Qe6H/Tnui/0p6pf9JeqX/SHqm/zAzNv8yMTH/AAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAALzI1/yg+Uf8hR2b/Jj5T/yNGYf8kQ13/KjlF/yw2P/8rN"
+"0L/KTpJ/yg8S/8pPEv/KjhD/y4zNf8rNz//Ikdn/yBKa/8lQFb/KjhC/ys2P/8pOkf/JUJZ"
+"/yNFYv8hSWr/KzhE/zAwMP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsMzf/IkNf/xlSgf8"
+"eS3D/GlB9/x1Mdf8hRWL/IEdn/x9HZ/8eSW//Hkhu/x5Kb/8jQl3/KzQ7/yk5Rv8aUXz/Gk"
+"97/x9HZ/8iQ1//IEdo/x9HZ/8fSWz/Hkpv/xtPef8pOkj/Ly8w/wAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAACwyN/8jQFj/Gk56/xlRgP8ZUH3/Gk55/xpOd/8YUYD/Gk98/xtNdf8cS3L/"
+"HEty/yBDYf8qNDv/KDlH/xlQfv8aT3v/HEt0/xtNd/8YUID/Gk98/x1Kcf8dSm//Gk55/yg"
+"5R/8uLi//AAAAAAAAAAAAAAAAAAAAAgAAAAYAAAAMKzAz/yc5SP8gQl3/Hkdr/x9EYv8eRW"
+"j/HExy/xtMdP8dSW//Hkdo/x5GaP8fRWb/IUFc/ykzO/8oNkH/HUpt/xxKcP8dSW7/HEt0/"
+"xtLdP8cS3H/H0Rl/yBEYP8eRmj/KTZC/y0tLf8AAAAMAAAABgAAAAIAAAAFAAAAFwAAACws"
+"Li3/KjAz/ykxN/8oMzz/KDI4/yg0Pf8nNkD/JjVA/yg1P/8nMzz/JzQ+/yc0PP8oMjr/Ky8"
+"w/youMf8nNT//JzVA/yg1QP8nNkD/JjVA/yc1P/8oNDv/KDI6/yg0PP8rLjH/LCws/wAAAC"
+"wAAAAXAAAABQAAAAUAAAAXAAAALCIjItkrLCr/LCwq/yssKv8rLCv/LCwq/yssK/8rLCv/L"
+"Cwr/ysrKv8sKyv/Kywr/yssK/8rLCv/LCsr/ywrKv8sKyr/LCsq/ywrKv8rLCr/LCwr/ysr"
+"K/8sLCr/LCwr/ywsKv8jIiLZAAAALAAAABcAAAAFAAAAAgAAAAYAAAAMAAAAEgAAABcAAAA"
+"cAAAAIQAAACUAAAApAAAALAAAAC8AAAAyAAAANAAAADYAAAA3AAAANwAAADcAAAA3AAAANg"
+"AAADQAAAAyAAAALwAAACwAAAApAAAAJQAAACEAAAAcAAAAFwAAABIAAAAMAAAABgAAAAIAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAA"
+"AQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAE"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-stop</key>\n"
+"              <data>\n"
+"R2RrUAAAEBgBAQACAAAAgAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAEgUFGL41Nv++NTb/vjU2/741Nv++NTb/vjU2/741Nv++NTb"
+"/vjU2/741Nv++NTb/vjU2/xIFBRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAEBBXCNTX/+FdY//thYf/7Y"
+"WH/+2Fh//thYf/7YWH/+2Fh//thYf/7YWH/+2Fh//thYf/4V1j/wjU1/xAEBBUAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"PBAQVwjU1//hTVP/6P0D/+jk6//o5Ov/6OTr/+jk6//o5Ov/6OTr/+jk6//o5Ov/6OTr/+j"
+"k6//o/QP/4U1T/wjU1/xAEBBUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAADwQEFcE0Nf/3UlP/+T8///k5Of/5OTn/+Tk6//o4Of/6OTn/"
+"+Tk5//k5Ov/6OTr/+jk6//o5Ov/5OTn/+Tk5//o/P//3UVP/wTQ1/w8EBBUAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8EBBXANDT/91FS//g+P//4OD"
+"n/+Tg5//k5Of/4ODn/+Tg5//g4Of/4ODn/+Dg5//k5Of/5ODn/+Tg5//k5Of/5ODn/+Tk5/"
+"/k+P//3UVL/wDQ0/w8EBBUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP"
+"BAQVvzM1//ZPT//4Pj7/+Dc5//g4OP/4ODj/9zc5//g3Of/4Nzj/9zc5//g4OP/3Nzn/+Dg"
+"5//g3OP/4Nzn/+Dg4//g3OP/4ODn/+Dg5//g+Pv/2Tk//vzM1/w8EBBUAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAADwQEFb4zM//1TE3/9z09//c3N//3Nzf/9zY4//Y3OP/3Nzf/9"
+"jY3//Y3OP/3Nzj/9zc3//c3OP/3Nzf/9zc4//c3N//3Nzj/9zc3//c3OP/2Nzj/9jc4//c9"
+"Pf/1TU3/vjMz/w8EBBUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC4MzT/9U1N//Y8Pf/1Nzf"
+"/9Tc3//Y2N//2Njf/9jY3//Y2N//2Njf/9TY3//Y2N//2Nzf/9TY3//U2N//2Njf/9TY3//"
+"Y2N//2Njf/9jc3//U1Nf/1MDH/9Cwt//QwMP/uQkP/uDM0/wAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAALcyM//3VFX/9TU2//U2N//1Njb/9TU2//U1Nv/0Njb/9TU2//U1Nv/0NTb/9DY2"
+"//U1Nv/0Njf/9DY2//U2Nv/0MzT/9C0u//IoKP/yIyP/8R4e//EbG//xGxv/8Rsb//M+Pv+"
+"3MjP/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtjEy//VSUv/0NTX/8zU1//M0Nf/zNTX/8z"
+"U1//M1Nv/zNTb/8zU1//Q1Nf/zNTX/9DQ1//MxMv/yKyz/8iUl//EeHv/xGxv/8Rsb//EbG"
+"//xGxv/8Rsb//EbG//xGxv/8zw8/7YxMv8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC1MTL/"
+"9E9P//I0NP/yNDT/8jQ0//I0Nf/yNDT/8jQ1//I0Nf/yNDT/8jQ0//EuL//wJyf/8B4f/+8"
+"aG//vGxv/7hsa/+8bG//vGhv/7xsb/+8bG//vGhr/7xsb/+8bG//xOTn/tTEy/wAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAALQxMf/zTU3/8TMz//EzNP/xMzT/8TMz//EzNP/xMzP/8TQ0/"
+"/AuLv/uJSX/7B0c/+waGv/tGhr/7Bob/+0bG//tGxr/7Rsa/+0bG//sGhr/7Bsb/+0bGv/s"
+"Gxr/7Bob/+44OP+0MTH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsjAx//FJSf/wMzP/7zI"
+"z/+8yM//wMjP/7zIz/+8xMf/tJyf/6h4e/+kbGv/pGhr/6hob/+kaG//qGhr/6Roa/+oaGv"
+"/pGhr/6Rsb/+kaGv/pGhr/6hoa/+kbG//pGxv/7DQ0/7IwMf8AAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAACxMDD/8EdI/+4yMv/vMjL/7zIy/+8xMv/tLCz/6SIi/+YaGv/lGhr/5Roa/+Ya"
+"Gv/lGhr/5hoa/+YaGv/mGhr/5hoa/+YaGv/mGhr/5hoa/+YaGf/lGhr/5hoa/+UaGv/pMjL"
+"/sTAw/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAvL//vRET/7jEy/+0xMv/tMTH/6ioq/+"
+"UeH//iGhn/4hoa/+IaGf/iGhn/4hkZ/+IZGv/iGhn/4hoa/+IaGv/iGRn/4hkZ/+IaGf/hG"
+"Rr/4hoa/+EaGv/iGhr/4hoa/+UwMP+wLy//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAri4v"
+"/+5CQ//sMDD/7DAw/+gpKv/hHR7/3hkZ/94aGf/dGhn/3hkZ/94ZGf/eGRr/3hkZ/90aGf/"
+"eGhn/3Roa/94ZGf/eGRn/3RkZ/90ZGf/eGRn/3hkZ/90ZGf/eGRn/4S0t/64uL/8AAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAACtLi//7T8//+swMP/nKyr/3R4f/9kZGf/aGBn/2hkZ/9oZG"
+"P/aGBn/2hkY/9oYGf/ZGRj/2hkZ/9oZGf/ZGRj/2hkY/9oYGf/aGBn/2RkZ/9oZGf/ZGRn/"
+"2RkZ/9oZGP/dKir/rS4v/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKwuLf/rPT3/6zAv/94"
+"hIv/VGBj/1RgZ/9YZGP/VGBj/1hgY/9UYGP/VGRn/1hgY/9UZGf/VGBj/1hgY/9YYGP/WGB"
+"n/1RgY/9YYGP/VGBj/1RkY/9UZGf/VGRj/1RgY/9gnJ/+sLi3/AAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAqy0t/+U1Nf/jLCz/0hkY/9EYGP/SGBj/0RcY/9IYF//RGBj/0RgY/9EYGP/R"
+"GBj/0RgY/9EYGP/RGBj/0RcY/9EYGP/RFxj/0hgX/9IYGP/RGBf/0RgY/9EYGP/SGxv/zCc"
+"n/6stLf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBAQVryws/9UqK//NGhn/zRcX/80XF/"
+"/NFxj/zRcY/80YF//NFxf/zRcX/80YF//OGBf/zRcX/80YGP/NFxj/zRgY/80XF//NFxj/z"
+"RgY/84YGP/NFxj/zRoa/8gjJP+qLCz/DgQEFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAOBAQVqiws/8UhIf/JGRn/yhcY/8oXF//JFxf/yRcX/8kXF//JFxf/yRgX/8kXGP/KFxf"
+"/yRcX/8kXF//JFxj/yRcX/8kXF//JFxf/yRcX/8kZGf/FISH/qSws/w4EBBUAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBAQVqCss/8IfIP/GGBj/xhYX/8YXF//GF"
+"xf/xhcX/8UWF//GFxb/xhcW/8YXF//FFxb/xhcX/8UXF//GFxb/xhYX/8YWFv/GGBf/wiAg"
+"/6grLP8OAwQVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"OAwQWpyss/78dHf/CGBf/wxcX/8IXF//DFhf/wxcW/8MXFv/DFxf/whYX/8MWF//DFxb/wh"
+"cW/8MWF//CFhb/whgY/78dHv+nKyz/DgQEFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAYOBAQgpisr/70cHP/BFxf/wRYW/8AWF//AFhb/"
+"wBYW/8AWFv/AFhb/wBYX/8AWFv/AFhb/wBcW/8AYF/+9HBz/pisr/w4EBCAAAAAGAAAAAgA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAGAAAAEAAAAB4OAw"
+"Q6pSor/7sbG/+/GRn/vxkZ/78ZGf+/GRn/vxkZ/78ZGf+/GRn/vxkZ/78ZGf+/GRn/uxsb/"
+"6UqK/8OAwQ6AAAAHgAAABAAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAgAAAAgAAAAXAAAAKgAAADYQBARRpCsq/6UpKv+kKir/pCkr/6QpK/+lKSr/pSk"
+"q/6QqKv+kKSr/pSkq/6UqKv+kKyr/EAQEUQAAADYAAAAqAAAAFwAAAAgAAAACAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAABgAAABAAAAAeAAAAKAAAAC8AAAA0A"
+"AAAOQAAAD0AAABAAAAAQwAAAEQAAABEAAAAQwAAAEAAAAA9AAAAOQAAADQAAAAvAAAAKAAA"
+"AB4AAAAQAAAABgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"CAAAABgAAAAwAAAAQAAAAFAAAABcAAAAZAAAAHAAAAB0AAAAeAAAAHwAAAB8AAAAeAAAAHQ"
+"AAABwAAAAZAAAAFwAAABQAAAAQAAAADAAAAAYAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAQAAAAEAAAABQAAAAYAAAAHAAAA"
+"BwAAAAgAAAAIAAAACAAAAAgAAAAHAAAABwAAAAYAAAAFAAAABAAAAAQAAAACAAAAAQAAAAA"
+"AAAAAAAAAAAAAAAAAAAAAAAAAAA==\n"
+"              </data>\n"
+"              <key>hb-working0</key>\n"
+"              <data>\n"
+"R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP/"
+"//wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5s"
+"4x/717hP+cOcb/iBDv/4gQ7/+cOcb/vXuE/+bOMf///wD///8A////AP///wD///8A////A"
+"P///wD/zZxj/5Qp1v+AAP//gAD//4AA//+AAP//gAD//4AA//+UKdb/zZxj////AP///wD/"
+"//8A////AP///wD/zZxj/4QI9/+AAP//gAD//4AA//+IEP//iBD//4AA//+AAP//gAD//4Q"
+"I9//NnGP///8A////AP///wD/5s4x/5Qp1v+AAP//gAD//4AA///mzv/////////////u3v"
+"//qVL//4AA//+AAP//lCnW/+bOMf///wD///8A/717hP+AAP//iBD//+7e//+YMf//qVL//"
+"5gx//+hQv//1q3///////+pUv//gAD//4AA//+9e4T///8A////AP+cOcb/gAD//9at////"
+"////5s7//4gQ//+AAP//gAD//4AA///Wrf//7t7//4AA//+AAP//nDnG////AP///wD/iBD"
+"v/7Fj///////////////////FjP//gAD//4AA///BhP//zZz////////BhP//sWP//4gQ7/"
+"///wD///8A/4gQ7/+xY///wYT////////NnP//wYT//4AA//+AAP//xYz//////////////"
+"////7Fj//+IEO////8A////AP+cOcb/gAD//4AA///u3v//1q3//4AA//+AAP//gAD//4gQ"
+"///mzv///////9at//+AAP//nDnG////AP///wD/vXuE/4AA//+AAP//qVL////////Wrf/"
+"/oUL//6FC//+pUv//mDH//+7e//+IEP//gAD//717hP///wD///8A/+bOMf+UKdb/gAD//4"
+"AA//+pUv//7t7/////////////5s7//4AA//+AAP//gAD//5Qp1v/mzjH///8A////AP///"
+"wD/zZxj/4QI9/+AAP//gAD//4AA//+AAP//gAD//4AA//+AAP//gAD//4QI9//NnGP///8A"
+"////AP///wD///8A////AP/NnGP/lCnW/4AA//+AAP//gAD//4AA//+AAP//gAD//5Qp1v/"
+"NnGP///8A////AP///wD///8A////AP///wD///8A/+bOMf+9e4T/nDnG/4gQ7/+IEO//nD"
+"nG/717hP/mzjH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////A"
+"P///wD///8A////AP///wD///8A////AP///wD///8A////AA==\n"
+"              </data>\n"
+"              <key>hb-working1</key>\n"
+"              <data>\n"
+"R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP/"
+"//wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5c"
+"sx/79/hP+fP8b/iRLv/4kS7/+fP8b/v3+E/+XLMf///wD///8A////AP///wD///8A////A"
+"P///wD/y5hj/5Uq1v+AAP//gAD//4AA//+AAP//gAD//4AA//+VKtb/y5hj////AP///wD/"
+"//8A////AP///wD/y5hj/4cO9/+AAP//iBD//6BA//+AAP//iBD//4AA//+AAP//gAD//4c"
+"O9//LmGP///8A////AP///wD/5csx/5Uq1v+IEP//v4D///fv///fv///gAD////////v3/"
+"//qFD//4AA//+AAP//lSrW/+XLMf///wD///8A/79/hP+IEP//79//////////////58///"
+"4AA//+gQP//16////////+oUP//gAD//4AA//+/f4T///8A////AP+fP8b/gAD//4gQ///3"
+"7/////////////+AAP//gAD//4AA///Xr///79///4AA//+AAP//nz/G////AP///wD/iRL"
+"v/4AA//+AAP///////7Bg///Pn///gAD//4AA//+AAP//oED///////+AAP//gAD//4kS7/"
+"///wD///8A/4kS7/+AAP//gAD///////+gQP//gAD//4AA//+AAP//z5///7Bg////////g"
+"AD//4AA//+JEu////8A////AP+fP8b/gAD//4AA///v3///16///4AA//+AAP//gAD/////"
+"////////9+///4gQ//+AAP//nz/G////AP///wD/v3+E/4AA//+AAP//qFD////////Xr//"
+"/oED//4AA///nz//////////////v3///iBD//79/hP///wD///8A/+XLMf+VKtb/gAD//4"
+"AA//+oUP//79////////+AAP//37////fv//+/gP//iBD//5Uq1v/lyzH///8A////AP///"
+"wD/y5hj/4cO9/+AAP//gAD//4AA//+AAP//gAD//6BA//+IEP//gAD//4cO9//LmGP///8A"
+"////AP///wD///8A////AP/LmGP/lSrW/4AA//+AAP//gAD//4AA//+AAP//gAD//5Uq1v/"
+"LmGP///8A////AP///wD///8A////AP///wD///8A/+XLMf+/f4T/nz/G/4kS7/+JEu//nz"
+"/G/79/hP/lyzH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////A"
+"P///wD///8A////AP///wD///8A////AP///wD///8A////AA==\n"
+"              </data>\n"
+"              <key>hb-working2</key>\n"
+"              <data>\n"
+"R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP/"
+"//wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5c"
+"sx/79/hP+fP8b/iRLv/4kS7/+fP8b/v3+E/+XLMf///wD///8A////AP///wD///8A////A"
+"P///wD/y5hj/5Uq1v+AAP//gAD//4AA//+AAP//gAD//4AA//+VKtb/y5hj////AP///wD/"
+"//8A////AP///wD/y5hj/4cO9/+QIP//9+///9+////fwP//x4///4AA//+AAP//gAD//4c"
+"O9//LmGP///8A////AP///wD/5csx/5Uq1v+AAP//gAD//8+f/////////////8+f//+QIP"
+"//qFD//4AA//+AAP//lSrW/+XLMf///wD///8A/79/hP+AAP//gAD//6hQ/////////////"
+"/////+QIP//t2////////+oUP//gAD//4AA//+/f4T///8A////AP+fP8b/gAD//4AA///v"
+"3///16///7Bg///fv///gAD//4AA///Xr///79///4AA//+AAP//nz/G////AP///wD/iRL"
+"v/4AA//+AAP///////6BA//+AAP//kCD//4AA//+AAP//oED///////+AAP//gAD//4kS7/"
+"///wD///8A/4kS7/+AAP//gAD///////+gQP//gAD//4AA//+QIP//gAD//6BA////////g"
+"AD//4AA//+JEu////8A////AP+fP8b/gAD//4AA///v3///16///4AA//+AAP//37///7Bg"
+"///Xr///79///4AA//+AAP//nz/G////AP///wD/v3+E/4AA//+AAP//qFD///////+3b//"
+"/kCD//////////////////6hQ//+AAP//gAD//79/hP///wD///8A/+XLMf+VKtb/gAD//4"
+"AA//+oUP//kCD//8+f/////////////8+f//+AAP//gAD//5Uq1v/lyzH///8A////AP///"
+"wD/y5hj/4cO9/+AAP//gAD//4AA///Hj///38D//9+////v3///kCD//4cO9//LmGP///8A"
+"////AP///wD///8A////AP/LmGP/lSrW/4AA//+AAP//gAD//4AA//+AAP//gAD//5Uq1v/"
+"LmGP///8A////AP///wD///8A////AP///wD///8A/+XLMf+/f4T/nz/G/4kS7/+JEu//nz"
+"/G/79/hP/lyzH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////A"
+"P///wD///8A////AP///wD///8A////AP///wD///8A////AA==\n"
+"              </data>\n"
+"              <key>hb-working3</key>\n"
+"              <data>\n"
+"R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP/"
+"//wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5c"
+"sx/79/hP+fP8b/iRLv/4kS7/+fP8b/v3+E/+XLMf///wD///8A////AP///wD///8A////A"
+"P///wD/y5hj/5Uq1v+AAP//gAD//7Bg//+wYP//gAD//4AA//+VKtb/y5hj////AP///wD/"
+"//8A////AP///wD/y5hj/4cO9/+AAP//gAD//4AA//+/gP///////9ev//+IEP//gAD//4c"
+"O9//LmGP///8A////AP///wD/5csx/5Uq1v+AAP//gAD//6hQ///v3/////////////////"
+"//79///4AA//+AAP//lSrW/+XLMf///wD///8A/79/hP+AAP//gAD//6hQ////////16///"
+"8+f////////58///5gw//+AAP//gAD//4AA//+/f4T///8A////AP+fP8b/gAD//4AA///v"
+"3///16///4AA//+/gP//x4///4gQ//+oUP//58///4AA//+AAP//nz/G////AP///wD/iRL"
+"v/4AA//+AAP///////6BA//+AAP//gAD//4AA//+AAP//oED///////+AAP//gAD//4kS7/"
+"///wD///8A/4kS7/+AAP//gAD///////+gQP//gAD//4AA//+AAP//gAD//6BA////////g"
+"AD//4AA//+JEu////8A////AP+fP8b/gAD//4AA///nz///qFD//4gQ///Hj///v4D//4AA"
+"///Xr///79///4AA//+AAP//nz/G////AP///wD/v3+E/4AA//+AAP//gAD//5gw///nz//"
+"//////8+f///Xr////////6hQ//+AAP//gAD//79/hP///wD///8A/+XLMf+VKtb/gAD//4"
+"AA///v3///////////////////79///6hQ//+AAP//gAD//5Uq1v/lyzH///8A////AP///"
+"wD/y5hj/4cO9/+AAP//iBD//9ev////////v4D//4AA//+AAP//gAD//4cO9//LmGP///8A"
+"////AP///wD///8A////AP/LmGP/lSrW/4AA//+AAP//sGD//7Bg//+AAP//gAD//5Uq1v/"
+"LmGP///8A////AP///wD///8A////AP///wD///8A/+XLMf+/f4T/nz/G/4kS7/+JEu//nz"
+"/G/79/hP/lyzH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////A"
+"P///wD///8A////AP///wD///8A////AP///wD///8A////AA==\n"
+"              </data>\n"
+"              <key>hb-working4</key>\n"
+"              <data>\n"
+"R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP/"
+"//wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5c"
+"sx/79/hP+fP8b/iRLv/4kS7/+fP8b/v3+E/+XLMf///wD///8A////AP///wD///8A////A"
+"P///wD/y5hj/5Uq1v+AAP//gAD//4AA//+AAP//gAD//4gQ//+VKtb/y5hj////AP///wD/"
+"//8A////AP///wD/y5hj/4cO9/+AAP//gAD//4AA//+AAP//iBD//4gQ///v3///iBD//4c"
+"O9//LmGP///8A////AP///wD/5csx/5Uq1v+AAP//gAD//6hQ///v3//////////////37/"
+"///////7+A//+AAP//lSrW/+XLMf///wD///8A/79/hP+AAP//gAD//6hQ////////16///"
+"5gw//+wYP/////////////37///iBD//4AA//+/f4T///8A////AP+fP8b/gAD//4AA///v"
+"3///16///4AA//+AAP//z5/////////nz///37///6hQ//+AAP//nz/G////AP///wD/iRL"
+"v/4AA//+AAP///////6BA//+AAP//gAD//4AA//+AAP//gAD//4AA//+AAP//gAD//4kS7/"
+"///wD///8A/4kS7/+AAP//gAD//4AA//+AAP//gAD//4AA//+AAP//gAD//6BA////////g"
+"AD//4AA//+JEu////8A////AP+fP8b/gAD//6BA///fv///58/////////Pn///gAD//4AA"
+"///Xr///79///4AA//+AAP//nz/G////AP///wD/v3+E/4AA//+IEP//9+/////////////"
+"/sGD//6BA///Xr////////6hQ//+AAP//gAD//79/hP///wD///8A/+XLMf+VKtb/gAD//7"
+"+A////////9+//////////////79///6hQ//+AAP//gAD//5Uq1v/lyzH///8A////AP///"
+"wD/y5hj/4cO9/+IEP//79///4gQ//+AAP//gAD//4AA//+AAP//gAD//4cO9//LmGP///8A"
+"////AP///wD///8A////AP/LmGP/lSrW/4gQ//+AAP//gAD//4AA//+AAP//gAD//5Uq1v/"
+"LmGP///8A////AP///wD///8A////AP///wD///8A/+XLMf+/f4T/nz/G/4kS7/+JEu//nz"
+"/G/79/hP/lyzH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////A"
+"P///wD///8A////AP///wD///8A////AP///wD///8A////AA==\n"
+"              </data>\n"
+"              <key>hb-working5</key>\n"
+"              <data>\n"
+"R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP/"
+"//wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5c"
+"sx/79/hP+fP8b/iRLv/4kS7/+fP8b/v3+E/+XLMf///wD///8A////AP///wD///8A////A"
+"P///wD/y5hj/5Uq1v+AAP//gAD//4AA//+AAP//gAD//4AA//+VKtb/y5hj////AP///wD/"
+"//8A////AP///wD/y5hj/4cO9/+AAP//gAD//4AA//+AAP//iBD//4AA//+AAP//gAD//4c"
+"O9//LmGP///8A////AP///wD/5csx/5Uq1v+AAP//gAD//6hQ///v3//////////////v3/"
+"//qFD//4AA//+QIP//lSrW/+XLMf///wD///8A/79/hP+AAP//gAD//6hQ////////16///"
+"5gw//+gQP//16/////////Pn///9+///4AA//+/f4T///8A////AP+fP8b/gAD//4AA//+Q"
+"IP//t2///4AA//+AAP//gAD//7Bg/////////////9+///+AAP//nz/G////AP///wD/iRL"
+"v/4AA///Hj///z5///5Ag//+AAP//gAD//5Ag///fv//////////////fwP//gAD//4kS7/"
+"///wD///8A/4kS7/+AAP//38D/////////////37///5Ag//+AAP//gAD//5Ag///Pn///x"
+"4///4AA//+JEu////8A////AP+fP8b/gAD//9+//////////////7Bg//+AAP//gAD//4AA"
+"//+3b///kCD//4AA//+AAP//nz/G////AP///wD/v3+E/4AA///37///z5/////////Xr//"
+"/oED//6BA///Xr////////6hQ//+AAP//gAD//79/hP///wD///8A/+XLMf+VKtb/kCD//4"
+"AA//+oUP//79//////////////79///6hQ//+AAP//gAD//5Uq1v/lyzH///8A////AP///"
+"wD/y5hj/4cO9/+AAP//gAD//4AA//+AAP//gAD//4AA//+AAP//gAD//4cO9//LmGP///8A"
+"////AP///wD///8A////AP/LmGP/lSrW/4AA//+AAP//gAD//4AA//+AAP//gAD//5Uq1v/"
+"LmGP///8A////AP///wD///8A////AP///wD///8A/+XLMf+/f4T/nz/G/4kS7/+JEu//nz"
+"/G/79/hP/lyzH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////A"
+"P///wD///8A////AP///wD///8A////AP///wD///8A////AA==\n"
+"              </data>\n"
+"      </dict>\n"
+"      <key>internal-defaults</key>\n"
+"      <dict>\n"
+"              <key>Initialization</key>\n"
+"              <dict>\n"
+"                      <key>anamorphic</key>\n"
+"                      <true />\n"
+"                      <key>audio_list</key>\n"
+"                      <array>\n"
+"                      </array>\n"
+"                      <key>autoscale</key>\n"
+"                      <false />\n"
+"                      <key>end_chapter</key>\n"
+"                      <integer>100</integer>\n"
+"                      <key>folder</key>\n"
+"                      <string></string>\n"
+"                      <key>preset</key>\n"
+"                      <array>\n"
+"                              <string>Normal</string>\n"
+"                      </array>\n"
+"                      <key>preset_selection</key>\n"
+"                      <array>\n"
+"                              <string>Normal</string>\n"
+"                      </array>\n"
+"                      <key>preset_type_folder</key>\n"
+"                      <false />\n"
+"                      <key>preset_type_normal</key>\n"
+"                      <true />\n"
+"                      <key>scale_height</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>scale_width</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>start_chapter</key>\n"
+"                      <integer>1</integer>\n"
+"                      <key>title</key>\n"
+"                      <string>none</string>\n"
+"                      <key>tweak_PictureDecomb</key>\n"
+"                      <string></string>\n"
+"                      <key>tweak_PictureDetelecine</key>\n"
+"                      <string></string>\n"
+"                      <key>volume_label</key>\n"
+"                      <string>New Video</string>\n"
+"                      <key>vquality_type_bitrate</key>\n"
+"                      <false />\n"
+"                      <key>vquality_type_constant</key>\n"
+"                      <false />\n"
+"                      <key>vquality_type_target</key>\n"
+"                      <false />\n"
+"                      <key>x264_8x8dct</key>\n"
+"                      <false />\n"
+"                      <key>x264_analyse</key>\n"
+"                      <string>some</string>\n"
+"                      <key>x264_bframes</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>x264_bpyramid</key>\n"
+"                      <false />\n"
+"                      <key>x264_cabac</key>\n"
+"                      <true />\n"
+"                      <key>x264_deblock_alpha</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>x264_deblock_beta</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>x264_direct</key>\n"
+"                      <string>spatial</string>\n"
+"                      <key>x264_me</key>\n"
+"                      <string>hex</string>\n"
+"                      <key>x264_merange</key>\n"
+"                      <integer>16</integer>\n"
+"                      <key>x264_mixed_refs</key>\n"
+"                      <false />\n"
+"                      <key>x264_no_dct_decimate</key>\n"
+"                      <false />\n"
+"                      <key>x264_no_fast_pskip</key>\n"
+"                      <false />\n"
+"                      <key>x264_refs</key>\n"
+"                      <integer>1</integer>\n"
+"                      <key>x264_subme</key>\n"
+"                      <integer>6</integer>\n"
+"                      <key>x264_trellis</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>x264_weighted_bframes</key>\n"
+"                      <false />\n"
+"              </dict>\n"
+"              <key>Preferences</key>\n"
+"              <dict>\n"
+"                      <key>EncodeLogLocation</key>\n"
+"                      <false />\n"
+"                      <key>allow_tweaks</key>\n"
+"                      <false />\n"
+"                      <key>chapters_in_destination</key>\n"
+"                      <false />\n"
+"                      <key>default_source</key>\n"
+"                      <string>/dev/dvd</string>\n"
+"                      <key>destination_dir</key>\n"
+"                      <string></string>\n"
+"                      <key>hbfd</key>\n"
+"                      <false />\n"
+"                      <key>hbfd_feature</key>\n"
+"                      <false />\n"
+"                      <key>nocheckvquality</key>\n"
+"                      <false />\n"
+"                      <key>noscale</key>\n"
+"                      <false />\n"
+"                      <key>reduce_hd_preview</key>\n"
+"                      <true />\n"
+"                      <key>show_presets</key>\n"
+"                      <true />\n"
+"                      <key>update_skip_version</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>use_source_name</key>\n"
+"                      <true />\n"
+"                      <key>version</key>\n"
+"                      <string>0.1</string>\n"
+"              </dict>\n"
+"              <key>Presets</key>\n"
+"              <dict>\n"
+"                      <key>AudioList</key>\n"
+"                      <array>\n"
+"                              <dict>\n"
+"                                      <key>AudioBitrate</key>\n"
+"                                      <string>192</string>\n"
+"                                      <key>AudioEncoder</key>\n"
+"                                      <string>ac3</string>\n"
+"                                      <key>AudioMixdown</key>\n"
+"                                      <string>dpl2</string>\n"
+"                                      <key>AudioSamplerate</key>\n"
+"                                      <string>source</string>\n"
+"                                      <key>AudioTrack</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>AudioTrackDRCSlider</key>\n"
+"                                      <real>1</real>\n"
+"                                      <key>AudioTrackDescription</key>\n"
+"                                      <string></string>\n"
+"                              </dict>\n"
+"                      </array>\n"
+"                      <key>ChapterMarkers</key>\n"
+"                      <true />\n"
+"                      <key>Default</key>\n"
+"                      <false />\n"
+"                      <key>FileFormat</key>\n"
+"                      <string>mp4</string>\n"
+"                      <key>Folder</key>\n"
+"                      <false />\n"
+"                      <key>ModDimensions</key>\n"
+"                      <true />\n"
+"                      <key>Mp4HttpOptimize</key>\n"
+"                      <false />\n"
+"                      <key>Mp4LargeFile</key>\n"
+"                      <false />\n"
+"                      <key>Mp4iPodCompatible</key>\n"
+"                      <false />\n"
+"                      <key>PictureAutoCrop</key>\n"
+"                      <true />\n"
+"                      <key>PictureBottomCrop</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>PictureDeblock</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>PictureDecomb</key>\n"
+"                      <false />\n"
+"                      <key>PictureDeinterlace</key>\n"
+"                      <string>none</string>\n"
+"                      <key>PictureDenoise</key>\n"
+"                      <string>none</string>\n"
+"                      <key>PictureDetelecine</key>\n"
+"                      <true />\n"
+"                      <key>PictureHeight</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>PictureKeepRatio</key>\n"
+"                      <true />\n"
+"                      <key>PictureLeftCrop</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>PicturePAR</key>\n"
+"                      <integer>2</integer>\n"
+"                      <key>PictureRightCrop</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>PictureTopCrop</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>PictureWidth</key>\n"
+"                      <integer>0</integer>\n"
+"                      <key>PresetDescription</key>\n"
+"                      <string></string>\n"
+"                      <key>PresetName</key>\n"
+"                      <string>Name Missing</string>\n"
+"                      <key>SourceAudioLang</key>\n"
+"                      <string>und</string>\n"
+"                      <key>Subtitles</key>\n"
+"                      <string>none</string>\n"
+"                      <key>SubtitlesForced</key>\n"
+"                      <true />\n"
+"                      <key>Type</key>\n"
+"                      <integer>1</integer>\n"
+"                      <key>UsesMaxPictureSettings</key>\n"
+"                      <false />\n"
+"                      <key>UsesPictureFilters</key>\n"
+"                      <true />\n"
+"                      <key>UsesPictureSettings</key>\n"
+"                      <integer>2</integer>\n"
+"                      <key>VideoAvgBitrate</key>\n"
+"                      <integer>1800</integer>\n"
+"                      <key>VideoEncoder</key>\n"
+"                      <string>x264</string>\n"
+"                      <key>VideoFramerate</key>\n"
+"                      <string>source</string>\n"
+"                      <key>VideoGrayScale</key>\n"
+"                      <false />\n"
+"                      <key>VideoQualitySlider</key>\n"
+"                      <real>0.59999999999999998</real>\n"
+"                      <key>VideoQualityType</key>\n"
+"                      <integer>2</integer>\n"
+"                      <key>VideoTargetSize</key>\n"
+"                      <integer>700</integer>\n"
+"                      <key>VideoTurboTwoPass</key>\n"
+"                      <false />\n"
+"                      <key>VideoTwoPass</key>\n"
+"                      <false />\n"
+"                      <key>constant_rate_factor</key>\n"
+"                      <true />\n"
+"                      <key>directqp</key>\n"
+"                      <false />\n"
+"                      <key>x264Option</key>\n"
+"                      <string></string>\n"
+"              </dict>\n"
+"              <key>XlatPresets</key>\n"
+"              <dict>\n"
+"                      <key>anamorphic</key>\n"
+"                      <true />\n"
+"                      <key>autoscale</key>\n"
+"                      <false />\n"
+"                      <key>vquality_type_bitrate</key>\n"
+"                      <false />\n"
+"                      <key>vquality_type_constant</key>\n"
+"                      <false />\n"
+"                      <key>vquality_type_target</key>\n"
+"                      <false />\n"
+"              </dict>\n"
+"      </dict>\n"
+"      <key>standard-presets</key>\n"
+"      <array>\n"
+"              <dict>\n"
+"                      <key>ChildrenArray</key>\n"
+"                      <array>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>48</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AC3 Passthru</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>AC3 Passthru</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>Auto</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <true />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MP4 file</string>\n"
+"                                      <key>Folder</key>\n"
+"                                      <false />\n"
+"                                      <key>Mp4LargeFile</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>2</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>720</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s universally compatible, full resolution s"
+"ettings for all current Apple devices: iPod, iPhone, AppleTV, and Macs<"
+"/string>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>Universal</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>2500</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.5899999737739563</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>2</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <false />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-"
+"fast-pskip=1</string>\n"
+"                              </dict>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>48</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <true />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MP4 file</string>\n"
+"                                      <key>Mp4iPodCompatible</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>320</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s low resolution settings for the iPod. Opt"
+"imized for great playback on the iPod screen, with smaller file size.</"
+"string>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>iPod</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <false />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.64709997177124023</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <false />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsi"
+"ze=2000:analyse=all:me=umh:no-fast-pskip=1</string>\n"
+"                              </dict>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>128</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>48</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <true />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MP4 file</string>\n"
+"                                      <key>Mp4iPodCompatible</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>480</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s settings for the iPhone and iPod Touch.</"
+"string>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>iPhone &amp; iPod Touch</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <false />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>960</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.5899999737739563</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>2</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <false />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>level=30:cabac=0:ref=2:mixed-refs:analyse=all:me=umh:no-fa"
+"st-pskip=1</string>\n"
+"                              </dict>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>48</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AC3 Passthru</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>AC3 Passthru</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>Auto</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <true />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MP4 file</string>\n"
+"                                      <key>Folder</key>\n"
+"                                      <false />\n"
+"                                      <key>Mp4LargeFile</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>2</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>960</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s settings for the AppleTV, including Dolby"
+" Digital 5.1 AC3 sound. Provides a good balance between quality and fil"
+"e size, and optimizes performance.</string>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>AppleTV</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>2500</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.5899999737739563</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>2</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <false />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:di"
+"rect=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all</string>\n"
+"                              </dict>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>Auto</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <true />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MP4 file</string>\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s high profile settings for use with QuickT"
+"ime. It can be slow, so use it when the Normal preset doesn&apos;t look"
+" good enough.</string>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>QuickTime</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>1800</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.64709997177124023</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTurboTwoPass</key>\n"
+"                                      <true />\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <true />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subm"
+"e=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1</string>\n"
+"                              </dict>\n"
+"                              <dict>\n"
+"                                      <key>ChildrenArray</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioList</key>\n"
+"                                                      <array>\n"
+"                                                              <dict>\n"
+"                                                                      <key>AudioBitrate</key>\n"
+"                                                                      <string>160</string>\n"
+"                                                                      <key>AudioEncoder</key>\n"
+"                                                                      <string>AAC (faac)</string>\n"
+"                                                                      <key>AudioMixdown</key>\n"
+"                                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                                      <key>AudioSamplerate</key>\n"
+"                                                                      <string>48</string>\n"
+"                                                                      <key>AudioTrack</key>\n"
+"                                                                      <integer>1</integer>\n"
+"                                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                                      <real>1</real>\n"
+"                                                                      <key>AudioTrackDescription</key>\n"
+"                                                                      <string></string>\n"
+"                                                              </dict>\n"
+"                                                              <dict>\n"
+"                                                                      <key>AudioBitrate</key>\n"
+"                                                                      <string>160</string>\n"
+"                                                                      <key>AudioEncoder</key>\n"
+"                                                                      <string>AC3 Passthru</string>\n"
+"                                                                      <key>AudioMixdown</key>\n"
+"                                                                      <string>AC3 Passthru</string>\n"
+"                                                                      <key>AudioSamplerate</key>\n"
+"                                                                      <string>Auto</string>\n"
+"                                                                      <key>AudioTrack</key>\n"
+"                                                                      <integer>1</integer>\n"
+"                                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                                      <real>1</real>\n"
+"                                                                      <key>AudioTrackDescription</key>\n"
+"                                                                      <string></string>\n"
+"                                                              </dict>\n"
+"                                                      </array>\n"
+"                                                      <key>ChapterMarkers</key>\n"
+"                                                      <true />\n"
+"                                                      <key>Default</key>\n"
+"                                                      <false />\n"
+"                                                      <key>FileFormat</key>\n"
+"                                                      <string>MP4 file</string>\n"
+"                                                      <key>Mp4LargeFile</key>\n"
+"                                                      <true />\n"
+"                                                      <key>PictureBottomCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureDeblock</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureDeinterlace</key>\n"
+"                                                      <string>0</string>\n"
+"                                                      <key>PictureDenoise</key>\n"
+"                                                      <string>0</string>\n"
+"                                                      <key>PictureDetelecine</key>\n"
+"                                                      <false />\n"
+"                                                      <key>PictureHeight</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureKeepRatio</key>\n"
+"                                                      <false />\n"
+"                                                      <key>PictureLeftCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PicturePAR</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>PictureRightCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureTopCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureWidth</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PresetDescription</key>\n"
+"                                                      <string>HandBrake&apos;s deprecated settings for the AppleTV, in"
+"cluding Dolby Digital 5.1 AC3 sound. Provides a good balance between qu"
+"ality and file size, and optimizes performance. This is the AppleTV pre"
+"set from HandBrake 0.9.2, and while it is offered as a service to legac"
+"y users, it is no longer supported.</string>\n"
+"                                                      <key>PresetName</key>\n"
+"                                                      <string>AppleTV Legacy</string>\n"
+"                                                      <key>Subtitles</key>\n"
+"                                                      <string>None</string>\n"
+"                                                      <key>Type</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>UsesMaxPictureSettings</key>\n"
+"                                                      <true />\n"
+"                                                      <key>UsesPictureFilters</key>\n"
+"                                                      <true />\n"
+"                                                      <key>UsesPictureSettings</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>VideoAvgBitrate</key>\n"
+"                                                      <integer>2500</integer>\n"
+"                                                      <key>VideoEncoder</key>\n"
+"                                                      <string>H.264 (x264)</string>\n"
+"                                                      <key>VideoFramerate</key>\n"
+"                                                      <string>Same as source</string>\n"
+"                                                      <key>VideoGrayScale</key>\n"
+"                                                      <false />\n"
+"                                                      <key>VideoQualitySlider</key>\n"
+"                                                      <real>0.64709997177124023</real>\n"
+"                                                      <key>VideoQualityType</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>VideoTargetSize</key>\n"
+"                                                      <integer>700</integer>\n"
+"                                                      <key>VideoTwoPass</key>\n"
+"                                                      <false />\n"
+"                                                      <key>x264Option</key>\n"
+"                                                      <string>bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:trellis=1"
+":cabac=0</string>\n"
+"                                              </dict>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioList</key>\n"
+"                                                      <array>\n"
+"                                                              <dict>\n"
+"                                                                      <key>AudioBitrate</key>\n"
+"                                                                      <string>128</string>\n"
+"                                                                      <key>AudioEncoder</key>\n"
+"                                                                      <string>AAC (faac)</string>\n"
+"                                                                      <key>AudioMixdown</key>\n"
+"                                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                                      <key>AudioSamplerate</key>\n"
+"                                                                      <string>48</string>\n"
+"                                                                      <key>AudioTrack</key>\n"
+"                                                                      <integer>1</integer>\n"
+"                                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                                      <real>1</real>\n"
+"                                                                      <key>AudioTrackDescription</key>\n"
+"                                                                      <string></string>\n"
+"                                                              </dict>\n"
+"                                                      </array>\n"
+"                                                      <key>ChapterMarkers</key>\n"
+"                                                      <true />\n"
+"                                                      <key>Default</key>\n"
+"                                                      <false />\n"
+"                                                      <key>FileFormat</key>\n"
+"                                                      <string>MP4 file</string>\n"
+"                                                      <key>Mp4iPodCompatible</key>\n"
+"                                                      <true />\n"
+"                                                      <key>PictureAutoCrop</key>\n"
+"                                                      <true />\n"
+"                                                      <key>PictureBottomCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureDeblock</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureDeinterlace</key>\n"
+"                                                      <string>0</string>\n"
+"                                                      <key>PictureDenoise</key>\n"
+"                                                      <string>0</string>\n"
+"                                                      <key>PictureDetelecine</key>\n"
+"                                                      <false />\n"
+"                                                      <key>PictureHeight</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureKeepRatio</key>\n"
+"                                                      <true />\n"
+"                                                      <key>PictureLeftCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PicturePAR</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureRightCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureTopCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureWidth</key>\n"
+"                                                      <integer>480</integer>\n"
+"                                                      <key>PresetDescription</key>\n"
+"                                                      <string>HandBrake&apos;s deprecated settings for the iPhone and "
+"iPod Touch. This is the iPhone preset from HandBrake 0.9.2, and while i"
+"t is offered as a service to legacy users, it is no longer supported.</"
+"string>\n"
+"                                                      <key>PresetName</key>\n"
+"                                                      <string>iPhone Legacy</string>\n"
+"                                                      <key>Subtitles</key>\n"
+"                                                      <string>None</string>\n"
+"                                                      <key>Type</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>UsesMaxPictureSettings</key>\n"
+"                                                      <false />\n"
+"                                                      <key>UsesPictureFilters</key>\n"
+"                                                      <true />\n"
+"                                                      <key>UsesPictureSettings</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>VideoAvgBitrate</key>\n"
+"                                                      <integer>960</integer>\n"
+"                                                      <key>VideoEncoder</key>\n"
+"                                                      <string>H.264 (x264)</string>\n"
+"                                                      <key>VideoFramerate</key>\n"
+"                                                      <string>Same as source</string>\n"
+"                                                      <key>VideoGrayScale</key>\n"
+"                                                      <false />\n"
+"                                                      <key>VideoQualitySlider</key>\n"
+"                                                      <real>0.64709997177124023</real>\n"
+"                                                      <key>VideoQualityType</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>VideoTargetSize</key>\n"
+"                                                      <integer>700</integer>\n"
+"                                                      <key>VideoTwoPass</key>\n"
+"                                                      <false />\n"
+"                                                      <key>x264Option</key>\n"
+"                                                      <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip="
+"1:trellis=1</string>\n"
+"                                              </dict>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioList</key>\n"
+"                                                      <array>\n"
+"                                                              <dict>\n"
+"                                                                      <key>AudioBitrate</key>\n"
+"                                                                      <string>160</string>\n"
+"                                                                      <key>AudioEncoder</key>\n"
+"                                                                      <string>AAC (faac)</string>\n"
+"                                                                      <key>AudioMixdown</key>\n"
+"                                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                                      <key>AudioSamplerate</key>\n"
+"                                                                      <string>48</string>\n"
+"                                                                      <key>AudioTrack</key>\n"
+"                                                                      <integer>1</integer>\n"
+"                                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                                      <real>1</real>\n"
+"                                                                      <key>AudioTrackDescription</key>\n"
+"                                                                      <string></string>\n"
+"                                                              </dict>\n"
+"                                                      </array>\n"
+"                                                      <key>ChapterMarkers</key>\n"
+"                                                      <true />\n"
+"                                                      <key>Default</key>\n"
+"                                                      <false />\n"
+"                                                      <key>FileFormat</key>\n"
+"                                                      <string>MP4 file</string>\n"
+"                                                      <key>Mp4iPodCompatible</key>\n"
+"                                                      <true />\n"
+"                                                      <key>PictureAutoCrop</key>\n"
+"                                                      <true />\n"
+"                                                      <key>PictureBottomCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureDeblock</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureDeinterlace</key>\n"
+"                                                      <string>0</string>\n"
+"                                                      <key>PictureDenoise</key>\n"
+"                                                      <string>0</string>\n"
+"                                                      <key>PictureDetelecine</key>\n"
+"                                                      <false />\n"
+"                                                      <key>PictureHeight</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureKeepRatio</key>\n"
+"                                                      <true />\n"
+"                                                      <key>PictureLeftCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PicturePAR</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureRightCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureTopCrop</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>PictureWidth</key>\n"
+"                                                      <integer>640</integer>\n"
+"                                                      <key>PresetDescription</key>\n"
+"                                                      <string>HandBrake&apos;s high resolution settings for older 5 an"
+"d 5.5G iPods. Good video quality, great for viewing on a TV using your "
+"iPod. This is the iPod High-Rez preset from 0.9.2.</string>\n"
+"                                                      <key>PresetName</key>\n"
+"                                                      <string>iPod Legacy</string>\n"
+"                                                      <key>Subtitles</key>\n"
+"                                                      <string>None</string>\n"
+"                                                      <key>Type</key>\n"
+"                                                      <integer>0</integer>\n"
+"                                                      <key>UsesMaxPictureSettings</key>\n"
+"                                                      <false />\n"
+"                                                      <key>UsesPictureFilters</key>\n"
+"                                                      <true />\n"
+"                                                      <key>UsesPictureSettings</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>VideoAvgBitrate</key>\n"
+"                                                      <integer>1500</integer>\n"
+"                                                      <key>VideoEncoder</key>\n"
+"                                                      <string>H.264 (x264)</string>\n"
+"                                                      <key>VideoFramerate</key>\n"
+"                                                      <string>Same as source</string>\n"
+"                                                      <key>VideoGrayScale</key>\n"
+"                                                      <false />\n"
+"                                                      <key>VideoQualitySlider</key>\n"
+"                                                      <real>0.64709997177124023</real>\n"
+"                                                      <key>VideoQualityType</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>VideoTargetSize</key>\n"
+"                                                      <integer>700</integer>\n"
+"                                                      <key>VideoTwoPass</key>\n"
+"                                                      <false />\n"
+"                                                      <key>x264Option</key>\n"
+"                                                      <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bu"
+"fsize=2000:analyse=all:me=umh:no-fast-pskip=1</string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>Folder</key>\n"
+"                                      <true />\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>Legacy</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                              </dict>\n"
+"                      </array>\n"
+"                      <key>Folder</key>\n"
+"                      <true />\n"
+"                      <key>PresetName</key>\n"
+"                      <string>Apple</string>\n"
+"                      <key>Type</key>\n"
+"                      <integer>0</integer>\n"
+"              </dict>\n"
+"              <dict>\n"
+"                      <key>ChildrenArray</key>\n"
+"                      <array>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>Auto</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <true />\n"
+"                                      <key>Default</key>\n"
+"                                      <true />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MP4 file</string>\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s normal, default settings.</string>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>Normal</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>1500</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.64709997177124023</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTurboTwoPass</key>\n"
+"                                      <true />\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <true />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>ref=2:bframes=2:me=umh</string>\n"
+"                              </dict>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>Auto</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <false />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MP4 file</string>\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s traditional, faster, lower-quality settin"
+"gs.</string>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>Classic</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>1000</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>MPEG-4 (FFmpeg)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.64709997177124023</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <false />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string></string>\n"
+"                              </dict>\n"
+"                      </array>\n"
+"                      <key>Folder</key>\n"
+"                      <true />\n"
+"                      <key>PresetName</key>\n"
+"                      <string>Basic</string>\n"
+"                      <key>Type</key>\n"
+"                      <integer>0</integer>\n"
+"              </dict>\n"
+"              <dict>\n"
+"                      <key>ChildrenArray</key>\n"
+"                      <array>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>Auto</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <true />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MKV file</string>\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDecomb</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s settings for cartoons, anime, and CGI.</s"
+"tring>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>Animation</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>1000</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.64709997177124023</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTurboTwoPass</key>\n"
+"                                      <true />\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <true />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:m"
+"e=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-"
+"rd=1,1:subme=9</string>\n"
+"                              </dict>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AC3 Passthru</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>AC3 Passthru</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>Auto</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <true />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MKV file</string>\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s preset for consistently excellent quality"
+" in one pass, with the downside of entirely unpredictable file sizes an"
+"d bitrates.</string>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>Constant Quality Rate</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>2000</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.60000002384185791</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>2</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTurboTwoPass</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <false />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:"
+"trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1</string>\n"
+"                              </dict>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AC3 Passthru</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>AC3 Passthru</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>Auto</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <true />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MKV file</string>\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s preset for feature films.</string>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>Film</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>1800</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.64709997177124023</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTurboTwoPass</key>\n"
+"                                      <true />\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <true />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:m"
+"e=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1</st"
+"ring>\n"
+"                              </dict>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>Auto</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <true />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MKV file</string>\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDecomb</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s settings for video from television.</stri"
+"ng>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>Television</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>1300</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.64709997177124023</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTurboTwoPass</key>\n"
+"                                      <true />\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <true />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:m"
+"e=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-r"
+"d=1,1</string>\n"
+"                              </dict>\n"
+"                      </array>\n"
+"                      <key>Folder</key>\n"
+"                      <true />\n"
+"                      <key>PresetName</key>\n"
+"                      <string>High Profile</string>\n"
+"                      <key>Type</key>\n"
+"                      <integer>0</integer>\n"
+"              </dict>\n"
+"              <dict>\n"
+"                      <key>ChildrenArray</key>\n"
+"                      <array>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>128</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>48</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <true />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MP4 file</string>\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>208</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <true />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>368</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s settings for the Sony PlayStation Portabl"
+"e.</string>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>PSP</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <false />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>1024</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>MPEG-4 (FFmpeg)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.64709997177124023</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <false />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string></string>\n"
+"                              </dict>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>48</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <false />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MP4 file</string>\n"
+"                                      <key>PictureAutoCrop</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s settings for the Sony PlayStation 3.</str"
+"ing>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>PS3</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>2500</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.64709997177124023</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <false />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>level=41:me=umh</string>\n"
+"                              </dict>\n"
+"                              <dict>\n"
+"                                      <key>AudioList</key>\n"
+"                                      <array>\n"
+"                                              <dict>\n"
+"                                                      <key>AudioBitrate</key>\n"
+"                                                      <string>160</string>\n"
+"                                                      <key>AudioEncoder</key>\n"
+"                                                      <string>AAC (faac)</string>\n"
+"                                                      <key>AudioMixdown</key>\n"
+"                                                      <string>Dolby Pro Logic II</string>\n"
+"                                                      <key>AudioSamplerate</key>\n"
+"                                                      <string>48</string>\n"
+"                                                      <key>AudioTrack</key>\n"
+"                                                      <integer>1</integer>\n"
+"                                                      <key>AudioTrackDRCSlider</key>\n"
+"                                                      <real>1</real>\n"
+"                                                      <key>AudioTrackDescription</key>\n"
+"                                                      <string></string>\n"
+"                                              </dict>\n"
+"                                      </array>\n"
+"                                      <key>ChapterMarkers</key>\n"
+"                                      <false />\n"
+"                                      <key>Default</key>\n"
+"                                      <false />\n"
+"                                      <key>FileFormat</key>\n"
+"                                      <string>MP4 file</string>\n"
+"                                      <key>PictureBottomCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeblock</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureDeinterlace</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDenoise</key>\n"
+"                                      <string>0</string>\n"
+"                                      <key>PictureDetelecine</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureHeight</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureKeepRatio</key>\n"
+"                                      <false />\n"
+"                                      <key>PictureLeftCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PicturePAR</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>PictureRightCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureTopCrop</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PictureWidth</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>PresetDescription</key>\n"
+"                                      <string>HandBrake&apos;s settings for the Microsoft Xbox 360.</str"
+"ing>\n"
+"                                      <key>PresetName</key>\n"
+"                                      <string>Xbox 360</string>\n"
+"                                      <key>Subtitles</key>\n"
+"                                      <string>None</string>\n"
+"                                      <key>Type</key>\n"
+"                                      <integer>0</integer>\n"
+"                                      <key>UsesMaxPictureSettings</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureFilters</key>\n"
+"                                      <true />\n"
+"                                      <key>UsesPictureSettings</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoAvgBitrate</key>\n"
+"                                      <integer>2000</integer>\n"
+"                                      <key>VideoEncoder</key>\n"
+"                                      <string>H.264 (x264)</string>\n"
+"                                      <key>VideoFramerate</key>\n"
+"                                      <string>Same as source</string>\n"
+"                                      <key>VideoGrayScale</key>\n"
+"                                      <false />\n"
+"                                      <key>VideoQualitySlider</key>\n"
+"                                      <real>0.64709997177124023</real>\n"
+"                                      <key>VideoQualityType</key>\n"
+"                                      <integer>1</integer>\n"
+"                                      <key>VideoTargetSize</key>\n"
+"                                      <integer>700</integer>\n"
+"                                      <key>VideoTwoPass</key>\n"
+"                                      <false />\n"
+"                                      <key>x264Option</key>\n"
+"                                      <string>level=40:ref=2:mixed-refs:bframes=3:weightb:subme=9:direct"
+"=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string>\n"
+"                              </dict>\n"
+"                      </array>\n"
+"                      <key>Folder</key>\n"
+"                      <true />\n"
+"                      <key>PresetName</key>\n"
+"                      <string>Gaming Consoles</string>\n"
+"                      <key>Type</key>\n"
+"                      <integer>0</integer>\n"
+"              </dict>\n"
+"      </array>\n"
+"      <key>widget-deps</key>\n"
+"      <dict>\n"
+"              <key>AudioEncoder</key>\n"
+"              <array>\n"
+"                      <string>AudioBitrate</string>\n"
+"                      <string>AudioSamplerate</string>\n"
+"                      <string>AudioMixdown</string>\n"
+"                      <string>AudioTrackDRCSlider</string>\n"
+"              </array>\n"
+"              <key>ChapterMarkers</key>\n"
+"              <array>\n"
+"                      <string>chapters_list</string>\n"
+"              </array>\n"
+"              <key>FileFormat</key>\n"
+"              <array>\n"
+"                      <string>Mp4LargeFile</string>\n"
+"                      <string>Mp4HttpOptimize</string>\n"
+"                      <string>Mp4iPodCompatible</string>\n"
+"              </array>\n"
+"              <key>PictureAutoCrop</key>\n"
+"              <array>\n"
+"                      <string>PictureTopCrop</string>\n"
+"                      <string>PictureBottomCrop</string>\n"
+"                      <string>PictureLeftCrop</string>\n"
+"                      <string>PictureRightCrop</string>\n"
+"              </array>\n"
+"              <key>PictureDecomb</key>\n"
+"              <array>\n"
+"                      <string>PictureDeinterlace</string>\n"
+"                      <string>tweak_PictureDeinterlace</string>\n"
+"              </array>\n"
+"              <key>PictureKeepRatio</key>\n"
+"              <array>\n"
+"                      <string>scale_height</string>\n"
+"              </array>\n"
+"              <key>VideoEncoder</key>\n"
+"              <array>\n"
+"                      <string>x264_tab</string>\n"
+"                      <string>x264_tab_label</string>\n"
+"                      <string>Mp4iPodCompatible</string>\n"
+"                      <string>directqp</string>\n"
+"              </array>\n"
+"              <key>VideoTwoPass</key>\n"
+"              <array>\n"
+"                      <string>VideoTurboTwoPass</string>\n"
+"              </array>\n"
+"              <key>anamorphic</key>\n"
+"              <array>\n"
+"                      <string>PictureKeepRatio</string>\n"
+"                      <string>scale_height</string>\n"
+"              </array>\n"
+"              <key>autoscale</key>\n"
+"              <array>\n"
+"                      <string>scale_width</string>\n"
+"                      <string>scale_height</string>\n"
+"              </array>\n"
+"              <key>title</key>\n"
+"              <array>\n"
+"                      <string>queue_add</string>\n"
+"                      <string>queue_add_menu</string>\n"
+"                      <string>preview_button</string>\n"
+"                      <string>show_preview_menu</string>\n"
+"                      <string>preview_frame</string>\n"
+"                      <string>picture_label</string>\n"
+"                      <string>picture_tab</string>\n"
+"                      <string>chapters_label</string>\n"
+"                      <string>chapters_tab</string>\n"
+"                      <string>title</string>\n"
+"                      <string>start_chapter</string>\n"
+"                      <string>end_chapter</string>\n"
+"              </array>\n"
+"              <key>use_source_name</key>\n"
+"              <array>\n"
+"                      <string>chapters_in_destination</string>\n"
+"              </array>\n"
+"              <key>vquality_type_bitrate</key>\n"
+"              <array>\n"
+"                      <string>VideoAvgBitrate</string>\n"
+"              </array>\n"
+"              <key>vquality_type_constant</key>\n"
+"              <array>\n"
+"                      <string>VideoQualitySlider</string>\n"
+"                      <string>constant_rate_factor</string>\n"
+"                      <string>VideoTwoPass</string>\n"
+"                      <string>VideoTurboTwoPass</string>\n"
+"              </array>\n"
+"              <key>vquality_type_target</key>\n"
+"              <array>\n"
+"                      <string>VideoTargetSize</string>\n"
+"              </array>\n"
+"              <key>x264_bframes</key>\n"
+"              <array>\n"
+"                      <string>x264_weighted_bframes</string>\n"
+"                      <string>x264_bpyramid</string>\n"
+"                      <string>x264_direct</string>\n"
+"              </array>\n"
+"              <key>x264_cabac</key>\n"
+"              <array>\n"
+"                      <string>x264_trellis</string>\n"
+"              </array>\n"
+"              <key>x264_me</key>\n"
+"              <array>\n"
+"                      <string>x264_merange</string>\n"
+"              </array>\n"
+"              <key>x264_refs</key>\n"
+"              <array>\n"
+"                      <string>x264_mixed_refs</string>\n"
+"              </array>\n"
+"      </dict>\n"
+"      <key>widget-reverse-deps</key>\n"
+"      <dict>\n"
+"              <key>AudioBitrate</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>AudioEncoder</string>\n"
+"                              <string>ac3</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>AudioMixdown</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>AudioEncoder</string>\n"
+"                              <string>ac3</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>AudioSamplerate</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>AudioEncoder</string>\n"
+"                              <string>ac3</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>AudioTrackDRCSlider</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>AudioEncoder</string>\n"
+"                              <string>ac3</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>Mp4HttpOptimize</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>FileFormat</string>\n"
+"                              <string>mp4|m4v</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>Mp4LargeFile</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>FileFormat</string>\n"
+"                              <string>mp4|m4v</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>Mp4iPodCompatible</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>FileFormat</string>\n"
+"                              <string>mp4|m4v</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"                      <array>\n"
+"                              <string>VideoEncoder</string>\n"
+"                              <string>x264</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>PictureBottomCrop</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>PictureAutoCrop</string>\n"
+"                              <string>FALSE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>PictureDeinterlace</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>PictureDecomb</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>PictureKeepRatio</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>anamorphic</string>\n"
+"                              <string>FALSE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>PictureLeftCrop</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>PictureAutoCrop</string>\n"
+"                              <string>FALSE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>PictureRightCrop</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>PictureAutoCrop</string>\n"
+"                              <string>FALSE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>PictureTopCrop</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>PictureAutoCrop</string>\n"
+"                              <string>FALSE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>VideoAvgBitrate</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>vquality_type_bitrate</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>VideoQualitySlider</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>vquality_type_constant</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>VideoTargetSize</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>vquality_type_target</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>VideoTurboTwoPass</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>vquality_type_constant</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"                      <array>\n"
+"                              <string>VideoTwoPass</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>VideoTwoPass</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>vquality_type_constant</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>chapters_in_destination</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>use_source_name</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>chapters_label</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>chapters_list</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>ChapterMarkers</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>chapters_tab</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>constant_rate_factor</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>vquality_type_constant</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>directqp</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>VideoEncoder</string>\n"
+"                              <string>x264|ffmpeg</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>end_chapter</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>picture_label</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>picture_tab</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>preview_button</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>preview_frame</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>queue_add</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>queue_add_menu</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>scale_height</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>autoscale</string>\n"
+"                              <string>FALSE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"                      <array>\n"
+"                              <string>anamorphic</string>\n"
+"                              <string>FALSE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"                      <array>\n"
+"                              <string>PictureKeepRatio</string>\n"
+"                              <string>FALSE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>scale_width</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>autoscale</string>\n"
+"                              <string>FALSE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>show_preview_menu</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>start_chapter</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>title</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>title</string>\n"
+"                              <string>none</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>tweak_PictureDeinterlace</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>PictureDecomb</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>x264_bpyramid</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>x264_bframes</string>\n"
+"                              <string>&lt;2</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>x264_direct</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>x264_bframes</string>\n"
+"                              <string>0</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>x264_merange</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>x264_me</string>\n"
+"                              <string>umh|esa</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>x264_mixed_refs</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>x264_refs</string>\n"
+"                              <string>&lt;2</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>x264_tab</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>VideoEncoder</string>\n"
+"                              <string>x264</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>x264_tab_label</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>VideoEncoder</string>\n"
+"                              <string>x264</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>x264_trellis</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>x264_cabac</string>\n"
+"                              <string>TRUE</string>\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
+"              <key>x264_weighted_bframes</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>x264_bframes</string>\n"
+"                              <string>0</string>\n"
+"                              <true />\n"
+"                      </array>\n"
+"              </array>\n"
+"      </dict>\n"
+"</dict>\n"
+"</plist>\n"
diff --git a/gtk/src/resources.c b/gtk/src/resources.c
new file mode 100644 (file)
index 0000000..b98d8dd
--- /dev/null
@@ -0,0 +1,42 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * resources.c
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ * 
+ * resources.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 <glib.h>
+#include <glib-object.h>
+#include <glib/gstdio.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include "settings.h"
+#include "plist.h"
+#include "resources.h"
+#include "values.h"
+
+static const gchar resource_str[] =
+#include "resource_data.h"
+;
+
+static GValue *resources;
+
+void
+ghb_resource_init()
+{
+       resources = ghb_plist_parse(resource_str, sizeof(resource_str)-1);
+}
+
+GValue*
+ghb_resource_get(const gchar *name)
+{
+       GValue *result;
+       result = ghb_dict_lookup(resources, name);
+       return result;
+}
diff --git a/gtk/src/resources.h b/gtk/src/resources.h
new file mode 100644 (file)
index 0000000..dfca11d
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * 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(_RESOURCES_H_)
+#define _RESOURCES_H_
+
+void ghb_resource_init(void);
+GValue* ghb_resource_get(const gchar *name);
+
+#endif // _RESOURCES_H_
diff --git a/gtk/src/resources.list b/gtk/src/resources.list
new file mode 100644 (file)
index 0000000..4e11a0e
--- /dev/null
@@ -0,0 +1,34 @@
+<resources>
+       <section name="icons">
+               <icon name="hb-activity" file="hb-activity.32.png" />
+               <icon name="hb-add-queue" file="hb-add-queue.32.png" />
+               <icon name="hb-canceled" file="hb-canceled.16.png" />
+               <icon name="hb-complete" file="hb-complete.16.png" />
+               <icon name="hb-drawer" file="hb-drawer.32.png" />
+               <icon name="hb-icon" file="hb-icon.128.png" />
+               <icon name="hb-pause" file="hb-pause.32.png" />
+               <icon name="hb-play" file="hb-play.32.png" />
+               <icon name="hb-pref" file="hb-pref.32.png" />
+               <icon name="hb-queue" file="hb-queue.32.png" />
+               <icon name="hb-queue-delete" file="hb-queue-delete.16.png" />
+               <icon name="hb-queue-job" file="hb-queue-job.16.png" />
+               <icon name="hb-queue-pass1" file="hb-queue-pass1.16.png" />
+               <icon name="hb-queue-pass2" file="hb-queue-pass2.16.png" />
+               <icon name="hb-queue-subtitle" file="hb-queue-subtitle.16.png" />
+               <icon name="hb-remove" file="hb-remove.32.png" />
+               <icon name="hb-source" file="hb-source.32.png" />
+               <icon name="hb-stop" file="hb-stop.32.png" />
+               <icon name="hb-edit" file="hb-edit.32.png" />
+               <icon name="hb-working0" file="hb-working0.16.png" />
+               <icon name="hb-working1" file="hb-working1.16.png" />
+               <icon name="hb-working2" file="hb-working2.16.png" />
+               <icon name="hb-working3" file="hb-working3.16.png" />
+               <icon name="hb-working4" file="hb-working4.16.png" />
+               <icon name="hb-working5" file="hb-working5.16.png" />
+       </section>
+       <plist name="internal-defaults" file="internal_defaults.xml" />
+       <plist name="standard-presets" file="standard_presets.xml" />
+       <plist name="widget-deps" file="widget_deps" />
+       <plist name="widget-reverse-deps" file="widget_reverse_deps" />
+       <string name="ghb-ui" file="ghb.ui" />
+</resources>
diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist
new file mode 100644 (file)
index 0000000..5ce2d71
--- /dev/null
@@ -0,0 +1,7337 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>ghb-ui</key>
+       <string>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!--*- mode: xml -*--&gt;
+&lt;interface&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment1&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;100&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;1&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment10&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;64&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;4&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;16&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment11&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;6&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;-6&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment12&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;6&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;-6&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment13&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;1000&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment14&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;1000&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment15&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;1000&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment16&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;1000&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment17&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;2000&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;16&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;2&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment18&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;1200&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;16&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;2&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment19&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;10&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;1&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment2&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;100&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;100&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment3&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;20000&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;100&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;10&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment4&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;50000&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;1000&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;100&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment5&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;0.1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0.63&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment6&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;4&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;0.2&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;2.6&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment7&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;4&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;0.20000000000000001&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;0.20000000000000001&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;2.3999999999999999&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment8&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;16&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;3&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment9&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;16&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment20&quot;&gt;
+    &lt;property name=&quot;upper&quot;&gt;15&lt;/property&gt;
+    &lt;property name=&quot;lower&quot;&gt;4&lt;/property&gt;
+    &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
+    &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+    &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkUIManager&quot; id=&quot;uimanager1&quot;&gt;
+    &lt;child&gt;
+      &lt;object class=&quot;GtkActionGroup&quot; id=&quot;actiongroup1&quot;&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;menuitem1&quot;&gt;
+            &lt;property name=&quot;name&quot;&gt;menuitem1&lt;/property&gt;
+            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;_File&lt;/property&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;source1&quot;&gt;
+            &lt;property name=&quot;stock_id&quot;&gt;gtk-open&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;source1&lt;/property&gt;
+            &lt;property name=&quot;label&quot;&gt;_Source&lt;/property&gt;
+            &lt;signal handler=&quot;source_button_clicked_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;destination1&quot;&gt;
+            &lt;property name=&quot;stock_id&quot;&gt;gtk-save-as&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;destination1&lt;/property&gt;
+            &lt;property name=&quot;label&quot;&gt;_Destination&lt;/property&gt;
+            &lt;signal handler=&quot;destination_browse_clicked_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;preferences&quot;&gt;
+            &lt;property name=&quot;stock_id&quot;&gt;gtk-preferences&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;preferences&lt;/property&gt;
+            &lt;signal handler=&quot;prefs_dialog_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;quit1&quot;&gt;
+            &lt;property name=&quot;stock_id&quot;&gt;gtk-quit&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;quit1&lt;/property&gt;
+            &lt;signal handler=&quot;on_quit1_activate&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;menuitem2&quot;&gt;
+            &lt;property name=&quot;name&quot;&gt;menuitem2&lt;/property&gt;
+            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;_Queue&lt;/property&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;queue_add_menu&quot;&gt;
+            &lt;property name=&quot;sensitive&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;icon-name&quot;&gt;hb-add-queue&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;queue_add_menu&lt;/property&gt;
+            &lt;property name=&quot;label&quot;&gt;_Add Queue&lt;/property&gt;
+            &lt;signal handler=&quot;queue_add_clicked_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;queue_start_menu&quot;&gt;
+            &lt;property name=&quot;sensitive&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;icon-name&quot;&gt;hb-play&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;queue_start_menu&lt;/property&gt;
+            &lt;property name=&quot;label&quot;&gt;_Start Queue&lt;/property&gt;
+            &lt;signal handler=&quot;queue_start_clicked_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;queue_pause_menu&quot;&gt;
+            &lt;property name=&quot;sensitive&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;icon-name&quot;&gt;hb-pause&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;queue_pause_menu&lt;/property&gt;
+            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;_Pause Queue&lt;/property&gt;
+            &lt;signal handler=&quot;queue_pause_clicked_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;queue_stop_menu&quot;&gt;
+            &lt;property name=&quot;sensitive&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;icon-name&quot;&gt;hb-stop&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;queue_stop_menu&lt;/property&gt;
+            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;S_top Queue&lt;/property&gt;
+            &lt;signal handler=&quot;queue_stop_clicked_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;menuitem3&quot;&gt;
+            &lt;property name=&quot;name&quot;&gt;menuitem3&lt;/property&gt;
+            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;_View&lt;/property&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkToggleAction&quot; id=&quot;hbfd&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;hbfd&lt;/property&gt;
+            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;HandBrake For _Dumbies&lt;/property&gt;
+            &lt;signal handler=&quot;hbfd_toggled_cb&quot; name=&quot;toggled&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;show_activity_menu&quot;&gt;
+            &lt;property name=&quot;icon-name&quot;&gt;hb-activity&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;show_activity_menu&lt;/property&gt;
+            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Show _Activity&lt;/property&gt;
+            &lt;signal handler=&quot;show_activity_clicked_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;show_preview_menu&quot;&gt;
+            &lt;property name=&quot;name&quot;&gt;show_preview_menu&lt;/property&gt;
+            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Show _Preview&lt;/property&gt;
+            &lt;signal handler=&quot;preview_button_clicked_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;show_queue_menu&quot;&gt;
+            &lt;property name=&quot;icon-name&quot;&gt;hb-queue&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;show_queue_menu&lt;/property&gt;
+            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Show _Queue&lt;/property&gt;
+            &lt;signal handler=&quot;show_queue_clicked_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;menuitem4&quot;&gt;
+            &lt;property name=&quot;name&quot;&gt;menuitem4&lt;/property&gt;
+            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;_Help&lt;/property&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;about&quot;&gt;
+            &lt;property name=&quot;stock_id&quot; translatable=&quot;yes&quot;&gt;gtk-about&lt;/property&gt;
+            &lt;property name=&quot;name&quot;&gt;about&lt;/property&gt;
+            &lt;signal handler=&quot;about_activate_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkAction&quot; id=&quot;guide&quot;&gt;
+            &lt;property name=&quot;name&quot;&gt;guide&lt;/property&gt;
+            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;_Guide&lt;/property&gt;
+            &lt;signal handler=&quot;guide_activate_cb&quot; name=&quot;activate&quot;/&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+      &lt;/object&gt;
+    &lt;/child&gt;
+    &lt;ui&gt;
+      &lt;menubar name=&quot;menubar1&quot;&gt;
+        &lt;menu action=&quot;menuitem1&quot;&gt;
+          &lt;menuitem action=&quot;source1&quot;/&gt;
+          &lt;menuitem action=&quot;destination1&quot;/&gt;
+          &lt;separator/&gt;
+          &lt;menuitem action=&quot;preferences&quot;/&gt;
+          &lt;separator/&gt;
+          &lt;menuitem action=&quot;quit1&quot;/&gt;
+        &lt;/menu&gt;
+        &lt;menu action=&quot;menuitem2&quot;&gt;
+          &lt;menuitem action=&quot;queue_add_menu&quot;/&gt;
+          &lt;menuitem action=&quot;queue_start_menu&quot;/&gt;
+          &lt;menuitem action=&quot;queue_pause_menu&quot;/&gt;
+          &lt;menuitem action=&quot;queue_stop_menu&quot;/&gt;
+        &lt;/menu&gt;
+        &lt;menu action=&quot;menuitem3&quot;&gt;
+          &lt;menuitem action=&quot;hbfd&quot;/&gt;
+          &lt;menuitem action=&quot;show_activity_menu&quot;/&gt;
+          &lt;menuitem action=&quot;show_preview_menu&quot;/&gt;
+          &lt;menuitem action=&quot;show_queue_menu&quot;/&gt;
+        &lt;/menu&gt;
+        &lt;menu action=&quot;menuitem4&quot;&gt;
+          &lt;menuitem action=&quot;about&quot;/&gt;
+          &lt;menuitem action=&quot;guide&quot;/&gt;
+        &lt;/menu&gt;
+      &lt;/menubar&gt;
+    &lt;/ui&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkWindow&quot; id=&quot;hb_window&quot;&gt;
+    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;title&quot; translatable=&quot;yes&quot;&gt;HandBrake&lt;/property&gt;
+    &lt;property name=&quot;default_width&quot;&gt;500&lt;/property&gt;
+    &lt;property name=&quot;default_height&quot;&gt;400&lt;/property&gt;
+    &lt;property name=&quot;icon_name&quot;&gt;hb-icon&lt;/property&gt;
+    &lt;signal handler=&quot;window_destroy_event_cb&quot; name=&quot;destroy_event&quot;/&gt;
+    &lt;signal handler=&quot;window_delete_event_cb&quot; name=&quot;delete_event&quot;/&gt;
+    &lt;child&gt;
+      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox1&quot;&gt;
+        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox1&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox2&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkMenuBar&quot; constructor=&quot;uimanager1&quot; id=&quot;menubar1&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;fill&quot;&gt;False&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox3&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkToolbar&quot; id=&quot;toolbar1&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;toolbar_style&quot;&gt;GTK_TOOLBAR_BOTH&lt;/property&gt;
+                        &lt;property name=&quot;icon_size&quot;&gt;GTK_ICON_SIZE_DND&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkToolButton&quot; id=&quot;toolbutton1&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Choose Video Source&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Source&lt;/property&gt;
+                            &lt;property name=&quot;icon_name&quot;&gt;hb-source&lt;/property&gt;
+                            &lt;signal handler=&quot;source_button_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkToolButton&quot; id=&quot;queue_start1&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;sensitive&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Start Encoding&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Start&lt;/property&gt;
+                            &lt;property name=&quot;icon_name&quot;&gt;hb-play&lt;/property&gt;
+                            &lt;signal handler=&quot;queue_start_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkToolButton&quot; id=&quot;queue_pause1&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;sensitive&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Pause Encoding&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Pause&lt;/property&gt;
+                            &lt;property name=&quot;icon_name&quot;&gt;hb-pause&lt;/property&gt;
+                            &lt;signal handler=&quot;queue_pause_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkToolButton&quot; id=&quot;queue_add&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;sensitive&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Add to Queue&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Add to Queue&lt;/property&gt;
+                            &lt;property name=&quot;icon_name&quot;&gt;hb-add-queue&lt;/property&gt;
+                            &lt;signal handler=&quot;queue_add_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkToolButton&quot; id=&quot;show_queue&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Show Queue&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Show Queue&lt;/property&gt;
+                            &lt;property name=&quot;icon_name&quot;&gt;hb-queue&lt;/property&gt;
+                            &lt;signal handler=&quot;show_queue_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkToolButton&quot; id=&quot;show_activity&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Show Activity Window&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Activity Window&lt;/property&gt;
+                            &lt;property name=&quot;icon_name&quot;&gt;hb-activity&lt;/property&gt;
+                            &lt;signal handler=&quot;show_activity_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox48&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;placeholder/&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;placeholder/&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;show_presets&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Show/Hide the presets list&lt;/property&gt;
+                            &lt;property name=&quot;relief&quot;&gt;GTK_RELIEF_NONE&lt;/property&gt;
+                            &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                            &lt;signal handler=&quot;show_presets_toggled_cb&quot; name=&quot;toggled&quot;/&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkImage&quot; id=&quot;drawerimage&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;icon_size&quot;&gt;5&lt;/property&gt;
+                                &lt;property name=&quot;icon_name&quot;&gt;hb-drawer&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                      &lt;packing&gt;
+                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                      &lt;/packing&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;fill&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkFrame&quot; id=&quot;frame1&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                    &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_NONE&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment1&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox3&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox2&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;spacing&quot;&gt;5&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkLabel&quot; id=&quot;source_title&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Source Title&lt;/property&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox5&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;spacing&quot;&gt;4&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label3&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Title&lt;/property&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                    &lt;property name=&quot;fill&quot;&gt;False&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkComboBox&quot; id=&quot;title&quot;&gt;
+                                    &lt;property name=&quot;width_request&quot;&gt;150&lt;/property&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;has_frame&quot;&gt;False&lt;/property&gt;
+                                    &lt;signal handler=&quot;title_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                    &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;chapter_box&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox4&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label4&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Chapters&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;fill&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkSpinButton&quot; id=&quot;start_chapter&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;adjustment&quot;&gt;adjustment1&lt;/property&gt;
+                                            &lt;signal handler=&quot;start_chapter_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label5&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt; thru &lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;fill&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkSpinButton&quot; id=&quot;end_chapter&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;adjustment&quot;&gt;adjustment2&lt;/property&gt;
+                                            &lt;signal handler=&quot;end_chapter_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment41&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;xalign&quot;&gt;1&lt;/property&gt;
+                                    &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox42&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;spacing&quot;&gt;7&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label6&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0.10000000149011612&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Duration:&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;fill&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;title_duration&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;hh:mm:ss&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;10&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                    &lt;child type=&quot;label&quot;&gt;
+                      &lt;object class=&quot;GtkLabel&quot; id=&quot;label7&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Source&amp;lt;/b&amp;gt;&lt;/property&gt;
+                        &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkHSeparator&quot; id=&quot;hseparator1&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkFrame&quot; id=&quot;frame2&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                    &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_NONE&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment3&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox4&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox6&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label8&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;File:&lt;/property&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                    &lt;property name=&quot;fill&quot;&gt;False&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkEntry&quot; id=&quot;destination&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Destination path with file name for output.&lt;/property&gt;
+                                    &lt;property name=&quot;width_chars&quot;&gt;41&lt;/property&gt;
+                                    &lt;signal handler=&quot;destination_entry_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                    &lt;signal handler=&quot;destination_grab_cb&quot; name=&quot;grab-focus&quot; after=&quot;yes&quot;/&gt;
+                                    &lt;accelerator key=&quot;d&quot; signal=&quot;grab-focus&quot; modifiers=&quot;GDK_MOD1_MASK&quot;/&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkButton&quot; id=&quot;destination_browse&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;relief&quot;&gt;GTK_RELIEF_NONE&lt;/property&gt;
+                                    &lt;signal handler=&quot;destination_browse_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment4&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                        &lt;property name=&quot;yscale&quot;&gt;0&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox7&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkImage&quot; id=&quot;image2&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;stock&quot;&gt;gtk-open&lt;/property&gt;
+                                              &lt;/object&gt;
+                                              &lt;packing&gt;
+                                                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                                &lt;property name=&quot;fill&quot;&gt;False&lt;/property&gt;
+                                              &lt;/packing&gt;
+                                            &lt;/child&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label9&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Browse&lt;/property&gt;
+                                                &lt;property name=&quot;use_underline&quot;&gt;True&lt;/property&gt;
+                                              &lt;/object&gt;
+                                              &lt;packing&gt;
+                                                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                                &lt;property name=&quot;fill&quot;&gt;False&lt;/property&gt;
+                                                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                              &lt;/packing&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                    &lt;property name=&quot;fill&quot;&gt;False&lt;/property&gt;
+                                    &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkHBox&quot; id=&quot;container_box&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;spacing&quot;&gt;8&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label10&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Container:&lt;/property&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                    &lt;property name=&quot;fill&quot;&gt;False&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkComboBox&quot; id=&quot;FileFormat&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Output file container type&lt;/property&gt;
+                                    &lt;signal handler=&quot;container_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                    &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment39&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;xalign&quot;&gt;0.10000000149011612&lt;/property&gt;
+                                    &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;Mp4iPodCompatible&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;iPod 5G Support&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                    &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkCheckButton&quot; id=&quot;Mp4HttpOptimize&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Web optimized&lt;/property&gt;
+                                    &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Tunes the MP4 to be better suited for streaming&lt;/property&gt;
+                                    &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                    &lt;signal handler=&quot;http_opt_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                    &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkCheckButton&quot; id=&quot;Mp4LargeFile&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;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.&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Large file size (&amp;gt;4GB)&lt;/property&gt;
+                                    &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                    &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;position&quot;&gt;4&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                    &lt;child type=&quot;label&quot;&gt;
+                      &lt;object class=&quot;GtkLabel&quot; id=&quot;label11&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;D&amp;lt;/u&amp;gt;estination&amp;lt;/b&amp;gt;&lt;/property&gt;
+                        &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;position&quot;&gt;4&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkHSeparator&quot; id=&quot;hseparator2&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;position&quot;&gt;5&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkNotebook&quot; id=&quot;settings_box&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkHBox&quot; id=&quot;picture_tab&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;spacing&quot;&gt;3&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox5&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;frame5&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment9&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox11&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox14&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label23&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Dimenstions:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;source_dimensions&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox15&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label24&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Aspect: &lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;source_aspect&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox16&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label25&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Frame Rate:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;source_frame_rate&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label26&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Source Picture Parameters&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;Cropping1&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment5&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;property name=&quot;right_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox6&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox54&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label13&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Autocrop:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;crop_auto&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;On&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox55&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label12&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Crop:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;crop_values&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox10&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label76&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Crop Dimensions:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;crop_dimensions&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label16&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Cropping&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox7&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkFrame&quot; id=&quot;frame3&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                                &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment7&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                    &lt;property name=&quot;right_padding&quot;&gt;2&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox8&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox11&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label14&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Scale Dimensions:&lt;/property&gt;
+                                                &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                              &lt;/object&gt;
+                                              &lt;packing&gt;
+                                                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                              &lt;/packing&gt;
+                                            &lt;/child&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkLabel&quot; id=&quot;scale_dimensions&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;
+                                              &lt;/object&gt;
+                                              &lt;packing&gt;
+                                                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                              &lt;/packing&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox26&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label15&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Optimal for Source:&lt;/property&gt;
+                                                &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                              &lt;/object&gt;
+                                              &lt;packing&gt;
+                                                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                              &lt;/packing&gt;
+                                            &lt;/child&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkLabel&quot; id=&quot;scale_auto&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;On&lt;/property&gt;
+                                              &lt;/object&gt;
+                                              &lt;packing&gt;
+                                                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                              &lt;/packing&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox27&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label17&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Anamorphic:&lt;/property&gt;
+                                                &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                              &lt;/object&gt;
+                                              &lt;packing&gt;
+                                                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                              &lt;/packing&gt;
+                                            &lt;/child&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkLabel&quot; id=&quot;scale_anamorphic&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;On&lt;/property&gt;
+                                              &lt;/object&gt;
+                                              &lt;packing&gt;
+                                                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                              &lt;/packing&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                                &lt;child type=&quot;label&quot;&gt;
+                                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label19&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Scaling&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                    &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox9&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;frame4&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment8&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox10&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;VideoGrayScale&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;This filter removes the color components of the picture.&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Grayscale&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;0&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;PictureDetelecine&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Remove interlacing artifacts caused by the telecine process often applied to movies.&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Detelecine&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                        &lt;signal handler=&quot;tweak_setting_cb&quot; name=&quot;button-press-event&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;PictureDecomb&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Decomb is a selective deinterlacer. It will only deinterlace frames that appear to need it. It generally produces better quality than the normal deinterlacer.&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;De-Comb&lt;/property&gt;
+                                        &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                        &lt;signal handler=&quot;tweak_setting_cb&quot; name=&quot;button-press-event&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                        &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox25&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label41&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Deblock:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;10&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment20&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0.55&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkHScale&quot; id=&quot;PictureDeblock&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;This is a filter that gets applied before encoding.  If the source looks blocky before encoding, you may want to use this.&lt;/property&gt;
+                                                &lt;property name=&quot;adjustment&quot;&gt;adjustment20&lt;/property&gt;
+                                                &lt;property name=&quot;digits&quot;&gt;0&lt;/property&gt;
+                                                &lt;property name=&quot;value_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;
+                                                &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                                &lt;signal handler=&quot;format_deblock_cb&quot; name=&quot;format-value&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox12&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label20&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;selectable&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Deinterlace:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;10&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkComboBox&quot; id=&quot;PictureDeinterlace&quot;&gt;
+                                            &lt;property name=&quot;width_request&quot;&gt;100&lt;/property&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Removes interlacing artifacts. Since deinterlacing degrades picture quality, leave it off unless you know you need it.&lt;/property&gt;
+                                            &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                            &lt;signal handler=&quot;tweak_setting_cb&quot; name=&quot;button-press-event&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkComboBoxEntry&quot; id=&quot;tweak_PictureDeinterlace&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;False&lt;/property&gt;
+                                            &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                            &lt;child internal-child=&quot;entry&quot;&gt;
+                                              &lt;object class=&quot;GtkEntry&quot; id=&quot;comboboxentry-entry1&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                                &lt;signal handler=&quot;deint_tweak_focus_out_cb&quot; name=&quot;focus_out_event&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                        &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;position&quot;&gt;4&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox13&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label21&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;selectable&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Denoise:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;10&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkComboBox&quot; id=&quot;PictureDenoise&quot;&gt;
+                                            &lt;property name=&quot;width_request&quot;&gt;100&lt;/property&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;This filter removes noise or grain from the picture.&lt;/property&gt;
+                                            &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                            &lt;signal handler=&quot;tweak_setting_cb&quot; name=&quot;button-press-event&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkComboBoxEntry&quot; id=&quot;tweak_PictureDenoise&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;False&lt;/property&gt;
+                                            &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                            &lt;child internal-child=&quot;entry&quot;&gt;
+                                              &lt;object class=&quot;GtkEntry&quot; id=&quot;comboboxentry-entry2&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;width_chars&quot;&gt;15&lt;/property&gt;
+                                                &lt;signal handler=&quot;denoise_tweak_focus_out_cb&quot; name=&quot;focus_out_event&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                        &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;position&quot;&gt;5&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label22&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Picture Cleanup&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox16&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox56&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label69&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;xalign&quot;&gt;0.75999999046325684&lt;/property&gt;
+                                    &lt;property name=&quot;yalign&quot;&gt;1&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Preview:&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                    &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkLabel&quot; id=&quot;preview_dims&quot;&gt;
+                                    &lt;property name=&quot;width_request&quot;&gt;85&lt;/property&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;xalign&quot;&gt;0.20999999344348907&lt;/property&gt;
+                                    &lt;property name=&quot;yalign&quot;&gt;0&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;--&lt;/property&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox35&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkButton&quot; id=&quot;preview_button&quot;&gt;
+                                &lt;property name=&quot;width_request&quot;&gt;118&lt;/property&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Open the full size preview&lt;/property&gt;
+                                &lt;property name=&quot;relief&quot;&gt;GTK_RELIEF_HALF&lt;/property&gt;
+                                &lt;signal handler=&quot;preview_button_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                                &lt;signal handler=&quot;preview_button_size_allocate_cb&quot; name=&quot;size_allocate&quot;/&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox49&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkImage&quot; id=&quot;preview_button_image&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;icon_size&quot;&gt;6&lt;/property&gt;
+                                        &lt;property name=&quot;icon_name&quot;&gt;hb-icon&lt;/property&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                      &lt;packing&gt;
+                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                      &lt;/packing&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+                &lt;child type=&quot;tab&quot;&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;picture_label&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Picture&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;tab_fill&quot;&gt;False&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox17&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox12&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;Encoding1&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment10&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox13&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox18&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label28&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Video Codec:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;11&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment11&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkComboBox&quot; id=&quot;VideoEncoder&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;signal handler=&quot;vcodec_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;padding&quot;&gt;4&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox19&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label29&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Framerate:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;11&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment12&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkComboBox&quot; id=&quot;VideoFramerate&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;padding&quot;&gt;4&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;VideoTwoPass&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;2-Pass Encoding&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment13&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;xscale&quot;&gt;0.23999999463558197&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;VideoTurboTwoPass&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Turbo First Pass&lt;/property&gt;
+                                            &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                            &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                          &lt;/object&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;placeholder/&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label30&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Encoding&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;placeholder/&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                      &lt;packing&gt;
+                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                        &lt;property name=&quot;padding&quot;&gt;4&lt;/property&gt;
+                      &lt;/packing&gt;
+                    &lt;/child&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox14&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;frame6&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment14&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox15&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox20&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkRadioButton&quot; id=&quot;vquality_type_bitrate&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Bitrate (kbps):    &lt;/property&gt;
+                                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                            &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment15&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0.11999999731779099&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0.10000000149011612&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkSpinButton&quot; id=&quot;VideoAvgBitrate&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;property name=&quot;adjustment&quot;&gt;adjustment3&lt;/property&gt;
+                                                &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox21&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkRadioButton&quot; id=&quot;vquality_type_target&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Target Size (MB):&lt;/property&gt;
+                                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;group&quot;&gt;vquality_type_bitrate&lt;/property&gt;
+                                            &lt;signal handler=&quot;target_size_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment16&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0.11999999731779099&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0.10000000149011612&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkSpinButton&quot; id=&quot;VideoTargetSize&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;property name=&quot;adjustment&quot;&gt;adjustment4&lt;/property&gt;
+                                                &lt;signal handler=&quot;target_size_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox22&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkRadioButton&quot; id=&quot;vquality_type_constant&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Quality:&lt;/property&gt;
+                                            &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;group&quot;&gt;vquality_type_target&lt;/property&gt;
+                                            &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkHScale&quot; id=&quot;VideoQualitySlider&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;adjustment&quot;&gt;adjustment5&lt;/property&gt;
+                                            &lt;property name=&quot;digits&quot;&gt;3&lt;/property&gt;
+                                            &lt;property name=&quot;value_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;
+                                            &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                            &lt;signal handler=&quot;format_vquality_cb&quot; name=&quot;format-value&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment17&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;xscale&quot;&gt;0.8399999737739563&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;constant_rate_factor&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Constant Rate Factor&lt;/property&gt;
+                                            &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                            &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                          &lt;/object&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label31&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Quality&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;placeholder/&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                      &lt;packing&gt;
+                        &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                      &lt;/packing&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+                &lt;child type=&quot;tab&quot;&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label32&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Video&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                    &lt;property name=&quot;tab_fill&quot;&gt;False&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkVBox&quot; id=&quot;audio_tab&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkFrame&quot; id=&quot;frame7&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                        &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment18&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                            &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                            &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                            &lt;property name=&quot;right_padding&quot;&gt;2&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox17&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox23&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;spacing&quot;&gt;5&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkButton&quot; id=&quot;audio_add&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Add new audio settings to the list&lt;/property&gt;
+                                        &lt;property name=&quot;relief&quot;&gt;GTK_RELIEF_NONE&lt;/property&gt;
+                                        &lt;signal handler=&quot;audio_add_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkImage&quot; id=&quot;image4&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;stock&quot;&gt;gtk-add&lt;/property&gt;
+                                          &lt;/object&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkButton&quot; id=&quot;audio_remove&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Remove the selected audio settings&lt;/property&gt;
+                                        &lt;property name=&quot;relief&quot;&gt;GTK_RELIEF_NONE&lt;/property&gt;
+                                        &lt;signal handler=&quot;audio_remove_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkImage&quot; id=&quot;image8&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;stock&quot;&gt;gtk-remove&lt;/property&gt;
+                                          &lt;/object&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment42&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;xalign&quot;&gt;0.98000001907348633&lt;/property&gt;
+                                        &lt;property name=&quot;xscale&quot;&gt;0.40000000596046448&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox18&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label2&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Dynamic Range Compression&lt;/property&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkHScale&quot; id=&quot;AudioTrackDRCSlider&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;property name=&quot;adjustment&quot;&gt;adjustment6&lt;/property&gt;
+                                                &lt;property name=&quot;restrict_to_fill_level&quot;&gt;False&lt;/property&gt;
+                                                &lt;property name=&quot;fill_level&quot;&gt;3823.35009765625&lt;/property&gt;
+                                                &lt;property name=&quot;value_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;
+                                                &lt;signal handler=&quot;audio_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                              &lt;packing&gt;
+                                                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                              &lt;/packing&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkTable&quot; id=&quot;table2&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;n_rows&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;n_columns&quot;&gt;5&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkComboBox&quot; id=&quot;AudioTrack&quot;&gt;
+                                        &lt;property name=&quot;width_request&quot;&gt;215&lt;/property&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;signal handler=&quot;audio_track_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;top_attach&quot;&gt;1&lt;/property&gt;
+                                        &lt;property name=&quot;bottom_attach&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkComboBox&quot; id=&quot;AudioEncoder&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;signal handler=&quot;audio_codec_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;left_attach&quot;&gt;1&lt;/property&gt;
+                                        &lt;property name=&quot;right_attach&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;top_attach&quot;&gt;1&lt;/property&gt;
+                                        &lt;property name=&quot;bottom_attach&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;x_options&quot;&gt;GTK_FILL&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkComboBox&quot; id=&quot;AudioSamplerate&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;signal handler=&quot;audio_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;left_attach&quot;&gt;3&lt;/property&gt;
+                                        &lt;property name=&quot;right_attach&quot;&gt;4&lt;/property&gt;
+                                        &lt;property name=&quot;top_attach&quot;&gt;1&lt;/property&gt;
+                                        &lt;property name=&quot;bottom_attach&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;x_options&quot;&gt;GTK_FILL&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkLabel&quot; id=&quot;label35&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Track&lt;/property&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;x_options&quot;&gt;GTK_FILL&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkLabel&quot; id=&quot;label36&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Codec&lt;/property&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;left_attach&quot;&gt;1&lt;/property&gt;
+                                        &lt;property name=&quot;right_attach&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;x_options&quot;&gt;GTK_FILL&lt;/property&gt;
+                                        &lt;property name=&quot;x_padding&quot;&gt;12&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkLabel&quot; id=&quot;label37&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Bitrate&lt;/property&gt;
+                                        &lt;property name=&quot;justify&quot;&gt;GTK_JUSTIFY_CENTER&lt;/property&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;left_attach&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;right_attach&quot;&gt;3&lt;/property&gt;
+                                        &lt;property name=&quot;x_options&quot;&gt;GTK_FILL&lt;/property&gt;
+                                        &lt;property name=&quot;x_padding&quot;&gt;10&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkLabel&quot; id=&quot;label38&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Sample Rate&lt;/property&gt;
+                                        &lt;property name=&quot;justify&quot;&gt;GTK_JUSTIFY_CENTER&lt;/property&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;left_attach&quot;&gt;3&lt;/property&gt;
+                                        &lt;property name=&quot;right_attach&quot;&gt;4&lt;/property&gt;
+                                        &lt;property name=&quot;x_options&quot;/&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkLabel&quot; id=&quot;label39&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Mix&lt;/property&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;left_attach&quot;&gt;4&lt;/property&gt;
+                                        &lt;property name=&quot;right_attach&quot;&gt;5&lt;/property&gt;
+                                        &lt;property name=&quot;x_options&quot;&gt;GTK_FILL&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkComboBox&quot; id=&quot;AudioMixdown&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;signal handler=&quot;audio_mix_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;left_attach&quot;&gt;4&lt;/property&gt;
+                                        &lt;property name=&quot;right_attach&quot;&gt;5&lt;/property&gt;
+                                        &lt;property name=&quot;top_attach&quot;&gt;1&lt;/property&gt;
+                                        &lt;property name=&quot;bottom_attach&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;x_options&quot;&gt;GTK_FILL&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkComboBox&quot; id=&quot;AudioBitrate&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;signal handler=&quot;audio_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;left_attach&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;right_attach&quot;&gt;3&lt;/property&gt;
+                                        &lt;property name=&quot;top_attach&quot;&gt;1&lt;/property&gt;
+                                        &lt;property name=&quot;bottom_attach&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                    &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkTreeView&quot; id=&quot;audio_list&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;headers_clickable&quot;&gt;True&lt;/property&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                        &lt;/child&gt;
+                        &lt;child type=&quot;label&quot;&gt;
+                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label40&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Encoding&amp;lt;/b&amp;gt;&lt;/property&gt;
+                            &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                          &lt;/object&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hboxj01&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;property name=&quot;spacing&quot;&gt;5&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;framej01&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignmentj01&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;property name=&quot;right_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkHBox&quot; id=&quot;hboxj02&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;spacing&quot;&gt;5&lt;/property&gt;
+
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkComboBox&quot; id=&quot;SourceAudioLang&quot;&gt;
+                                        &lt;property name=&quot;width_request&quot;&gt;150&lt;/property&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;labelj01&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Preferred Audio Language&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;framej02&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignmentj02&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;property name=&quot;right_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkHBox&quot; id=&quot;hboxj03&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;spacing&quot;&gt;5&lt;/property&gt;
+
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkComboBox&quot; id=&quot;Subtitles&quot;&gt;
+                                        &lt;property name=&quot;width_request&quot;&gt;150&lt;/property&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;signal handler=&quot;subtitle_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;SubtitlesForced&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;has_tooltip&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;These are subtitles that a regular DVD player would automatically show.&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Allow only forced subtitles&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;labelj02&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Subtitles&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                      &lt;packing&gt;
+                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                        &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                      &lt;/packing&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+                &lt;child type=&quot;tab&quot;&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label48&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Audio/Subtitles&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                    &lt;property name=&quot;tab_fill&quot;&gt;False&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkHBox&quot; id=&quot;x264_tab&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox21&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;frame9&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment25&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox22&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox31&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label49&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Number:  &lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkSpinButton&quot; id=&quot;x264_refs&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;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).&lt;/property&gt;
+                                            &lt;property name=&quot;adjustment&quot;&gt;adjustment8&lt;/property&gt;
+                                            &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;x264_mixed_refs&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;This option allows x264 to have greater control over reference frames.  Improves quality, but slows down encoding. &lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Mixed References&lt;/property&gt;
+                                        &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label50&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Reference Frames&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;frame10&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment26&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;property name=&quot;right_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox24&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox32&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label51&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Number:  &lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;14&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment27&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkSpinButton&quot; id=&quot;x264_bframes&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;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.&lt;/property&gt;
+                                                &lt;property name=&quot;adjustment&quot;&gt;adjustment9&lt;/property&gt;
+                                                &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox33&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label52&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Direct Prediction:  &lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;14&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment28&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkComboBox&quot; id=&quot;x264_direct&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;This option can improve compression efficiency. &lt;/property&gt;
+                                                &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkTable&quot; id=&quot;table8&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;n_rows&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;n_columns&quot;&gt;2&lt;/property&gt;
+
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;x264_bpyramid&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Allows B-Frames to be used as references for other B-Frames. Improves encoding efficiency with little speed penalty&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Pyramidal B-Frames&lt;/property&gt;
+                                        &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;x264_weighted_bframes&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Turn on weighted prediction for B-Frames.  Improves compression efficiency and has little speed penalty. &lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Weighted B-Frames&lt;/property&gt;
+                                        &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;left_attach&quot;&gt;1&lt;/property&gt;
+                                        &lt;property name=&quot;right_attach&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label53&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;B-Frames&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;frame11&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment29&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;top_padding&quot;&gt;6&lt;/property&gt;
+                                &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;property name=&quot;right_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkTextView&quot; id=&quot;x264Option&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Your selected options will appear here. 
+You can edit these and add additional options.  
+
+Default values will not be shown. The defaults are:
+ref=1:mixed-refs=0:bframes=0:direct=spatial:b-pyramid=0:
+weightb=0:me=hex:merange=16:subme=5:
+analyse=some:8x8dct=0:deblock=0,0:trellis=0:
+no-fast-pskip=0:no-dct-decimate=0:cabac=1&lt;/property&gt;
+                                    &lt;property name=&quot;wrap_mode&quot;&gt;GTK_WRAP_CHAR&lt;/property&gt;
+                                    &lt;property name=&quot;accepts_tab&quot;&gt;False&lt;/property&gt;
+                                    &lt;signal handler=&quot;x264_focus_out_cb&quot; name=&quot;focus_out_event&quot;/&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label54&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Manual Options String&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                      &lt;packing&gt;
+                        &lt;property name=&quot;expand&quot;&gt;True&lt;/property&gt;
+                      &lt;/packing&gt;
+                    &lt;/child&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox25&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;frame12&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment30&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;property name=&quot;right_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox26&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox34&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label55&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Method: &lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;14&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment31&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkComboBox&quot; id=&quot;x264_me&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;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.&lt;/property&gt;
+                                                &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox36&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label57&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Range: &lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;14&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment32&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkSpinButton&quot; id=&quot;x264_merange&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;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.&lt;/property&gt;
+                                                &lt;property name=&quot;adjustment&quot;&gt;adjustment10&lt;/property&gt;
+                                                &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox37&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label58&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Subpixel Method:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;14&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment33&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0.05000000074505806&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkComboBox&quot; id=&quot;x264_subme&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Determines how motion estimation decisions are made. 1 is lowest quality and fastest. 9 is highest quality and slowest.  5 or 6 are commonly used values.&lt;/property&gt;
+                                                &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox38&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label59&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Analysis:&lt;/property&gt;
+                                            &lt;property name=&quot;width_chars&quot;&gt;14&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment34&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkComboBox&quot; id=&quot;x264_analyse&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Determines which macroblock partitions are analyzed.
+&quot;Some&quot; is p8x8, b8x8, i8x8, i4x4.&lt;/property&gt;
+                                                &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment34&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkCheckButton&quot; id=&quot;x264_8x8dct&quot;&gt;
+                                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;High profile feature. Breaks picture into 8x8 blocks for analysis. Improves coding efficiency.&lt;/property&gt;
+                                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;8x8dct&lt;/property&gt;
+                                                &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                                &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                                &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label60&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Motion Estimation&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkFrame&quot; id=&quot;frame13&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment35&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                                &lt;property name=&quot;right_padding&quot;&gt;2&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox27&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox39&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label61&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Deblocking: &lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkSpinButton&quot; id=&quot;x264_deblock_alpha&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Deblocking filter. Alpha: determines the strength of the deblocking action.&lt;/property&gt;
+                                            &lt;property name=&quot;adjustment&quot;&gt;adjustment11&lt;/property&gt;
+                                            &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkSpinButton&quot; id=&quot;x264_deblock_beta&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Deblocking filter. Beta: determines when something is a block. Higher values increase sensitivity and will flag more blocks.&lt;/property&gt;
+                                            &lt;property name=&quot;adjustment&quot;&gt;adjustment12&lt;/property&gt;
+                                            &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox40&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label62&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Trellis: &lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                        &lt;child&gt;
+                                          &lt;object class=&quot;GtkComboBox&quot; id=&quot;x264_trellis&quot;&gt;
+                                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Trellis fine-tunes how bitrate is doled out, so it can reduce file size/bitrate or increase quality. &quot;All&quot; forces it to be used more often than &quot;Final Macro Block&quot;.&lt;/property&gt;
+                                            &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                          &lt;/packing&gt;
+                                        &lt;/child&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;x264_no_fast_pskip&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;This can help with blocking on solid colors like blue skies, but it also slows down the encode.&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;No Fast P-Skip&lt;/property&gt;
+                                        &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;x264_no_dct_decimate&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Only use this with constant quality encoding. It increases quality but also bitrate/file size.&lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;No DCT Decimate&lt;/property&gt;
+                                        &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                    &lt;child&gt;
+                                      &lt;object class=&quot;GtkCheckButton&quot; id=&quot;x264_cabac&quot;&gt;
+                                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                        &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Context Adaptive Binary Arithmetic Coding. Improves encoding efficiency at the expense of playback/decoding efficiency. &lt;/property&gt;
+                                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;CABAC Entropy Encoding&lt;/property&gt;
+                                        &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                        &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                        &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                                      &lt;/object&gt;
+                                      &lt;packing&gt;
+                                        &lt;property name=&quot;position&quot;&gt;4&lt;/property&gt;
+                                      &lt;/packing&gt;
+                                    &lt;/child&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child type=&quot;label&quot;&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label63&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Miscellaneous&amp;lt;/b&amp;gt;&lt;/property&gt;
+                                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                      &lt;packing&gt;
+                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                      &lt;/packing&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+                &lt;child type=&quot;tab&quot;&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;x264_tab_label&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;H.264&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                    &lt;property name=&quot;tab_fill&quot;&gt;False&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkVBox&quot; id=&quot;chapters_tab&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox30&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;ChapterMarkers&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Chapter Markers&lt;/property&gt;
+                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                            &lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;placeholder/&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;placeholder/&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                      &lt;packing&gt;
+                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                      &lt;/packing&gt;
+                    &lt;/child&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkScrolledWindow&quot; id=&quot;scrolledwindow3&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;property name=&quot;hscrollbar_policy&quot;&gt;GTK_POLICY_AUTOMATIC&lt;/property&gt;
+                        &lt;property name=&quot;vscrollbar_policy&quot;&gt;GTK_POLICY_AUTOMATIC&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkTreeView&quot; id=&quot;chapters_list&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;headers_clickable&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;rules_hint&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;enable-search&quot;&gt;False&lt;/property&gt;
+                          &lt;/object&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                      &lt;packing&gt;
+                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                      &lt;/packing&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+                &lt;child type=&quot;tab&quot;&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;chapters_label&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Chapters&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;position&quot;&gt;4&lt;/property&gt;
+                    &lt;property name=&quot;tab_fill&quot;&gt;False&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkLabel&quot; id=&quot;label80&quot;&gt;
+                &lt;property name=&quot;height_request&quot;&gt;1&lt;/property&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkProgressBar&quot; id=&quot;progressbar&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;text&quot; translatable=&quot;yes&quot;/&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkFrame&quot; id=&quot;presets_frame&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+            &lt;property name=&quot;border_width&quot;&gt;3&lt;/property&gt;
+            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+            &lt;signal handler=&quot;presets_frame_size_allocate_cb&quot; name=&quot;size_allocate&quot;/&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment21&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;left_padding&quot;&gt;8&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkVBox&quot; id=&quot;presets_vbox&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkScrolledWindow&quot; id=&quot;presets_scroll&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;hscrollbar_policy&quot;&gt;GTK_POLICY_AUTOMATIC&lt;/property&gt;
+                        &lt;property name=&quot;vscrollbar_policy&quot;&gt;GTK_POLICY_AUTOMATIC&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkTreeView&quot; id=&quot;presets_list&quot;&gt;
+                            &lt;property name=&quot;width_request&quot;&gt;206&lt;/property&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;headers_visible&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;headers_clickable&quot;&gt;True&lt;/property&gt;
+                          &lt;/object&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox31&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox29&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkButton&quot; id=&quot;presets_save&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Save current settings as new preset&lt;/property&gt;
+                                &lt;property name=&quot;relief&quot;&gt;GTK_RELIEF_NONE&lt;/property&gt;
+                                &lt;signal handler=&quot;presets_save_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkImage&quot; id=&quot;image5&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;stock&quot;&gt;gtk-add&lt;/property&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkButton&quot; id=&quot;presets_remove&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Remove the selected preset&lt;/property&gt;
+                                &lt;property name=&quot;relief&quot;&gt;GTK_RELIEF_NONE&lt;/property&gt;
+                                &lt;signal handler=&quot;presets_remove_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkImage&quot; id=&quot;image6&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;stock&quot;&gt;gtk-remove&lt;/property&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label1&quot;&gt;
+                                &lt;property name=&quot;width_request&quot;&gt;41&lt;/property&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkButton&quot; id=&quot;presets_default&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Make the current preset the default.&lt;/property&gt;
+                                &lt;property name=&quot;relief&quot;&gt;GTK_RELIEF_NONE&lt;/property&gt;
+                                &lt;signal handler=&quot;presets_default_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkImage&quot; id=&quot;image1&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;stock&quot;&gt;gtk-apply&lt;/property&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkButton&quot; id=&quot;presets_restore&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Reload HandBrakes standard presets&lt;/property&gt;
+                                &lt;property name=&quot;relief&quot;&gt;GTK_RELIEF_NONE&lt;/property&gt;
+                                &lt;signal handler=&quot;presets_restore_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkImage&quot; id=&quot;image7&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;stock&quot;&gt;gtk-refresh&lt;/property&gt;
+                                  &lt;/object&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;position&quot;&gt;4&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                      &lt;packing&gt;
+                        &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                      &lt;/packing&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+            &lt;/child&gt;
+            &lt;child type=&quot;label&quot;&gt;
+              &lt;object class=&quot;GtkLabel&quot; id=&quot;label34&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Presets&amp;lt;/b&amp;gt;&lt;/property&gt;
+                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+              &lt;/object&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+      &lt;/object&gt;
+    &lt;/child&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkDialog&quot; id=&quot;prefs_dialog&quot;&gt;
+    &lt;property name=&quot;border_width&quot;&gt;5&lt;/property&gt;
+    &lt;property name=&quot;modal&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;window_position&quot;&gt;GTK_WIN_POS_CENTER_ON_PARENT&lt;/property&gt;
+    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIALOG&lt;/property&gt;
+    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;has_separator&quot;&gt;False&lt;/property&gt;
+    &lt;signal name=&quot;delete_event&quot; handler=&quot;gtk_widget_hide_on_delete&quot;/&gt;
+    &lt;child internal-child=&quot;vbox&quot;&gt;
+      &lt;object class=&quot;GtkVBox&quot; id=&quot;dialog-vbox6&quot;&gt;
+        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+        &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox24&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox19&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkEventBox&quot; id=&quot;eventbox1&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;visible_window&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;above_child&quot;&gt;True&lt;/property&gt;
+                    &lt;signal name=&quot;button_press_event&quot; handler=&quot;easter_egg_cb&quot;/&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkImage&quot; id=&quot;image3&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;property name=&quot;icon_size&quot;&gt;6&lt;/property&gt;
+                        &lt;property name=&quot;icon_name&quot;&gt;hb-icon&lt;/property&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;placeholder/&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkFrame&quot; id=&quot;frame16&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment6&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox29&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;use_source_name&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;tooltip_text&quot;&gt;The destination filename will be automatically
+generated from the source filename or volume
+label.&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Automatically generate destination&lt;/property&gt;
+                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                            &lt;signal name=&quot;toggled&quot; handler=&quot;pref_changed_cb&quot;/&gt;
+                          &lt;/object&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;chapters_in_destination&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;tooltip_text&quot;&gt;Add chapter numbers to the 
+auto-generated destination name.&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Add chapters to destination name&lt;/property&gt;
+                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                            &lt;signal name=&quot;toggled&quot; handler=&quot;pref_changed_cb&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;reduce_hd_preview&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;tooltip_text&quot;&gt; Automatically reduce the size of High Definition previews.
+This is helpfull when working on laptops or similar
+non-hidef screens.  &lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Scale down High Definition previews&lt;/property&gt;
+                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                            &lt;signal name=&quot;toggled&quot; handler=&quot;pref_changed_cb&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;noscale&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;tooltip_text&quot;&gt;When picture settings require that the image 
+dimensions be rounded to some multiple number
+of pixels. This setting will crop a few extra pixels
+instead of doing exact cropping and scaling to
+the required multiple.&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Loose cropping&lt;/property&gt;
+                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                            &lt;signal name=&quot;toggled&quot; handler=&quot;pref_changed_cb&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;directqp&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;tooltip_text&quot;&gt;HandBrake allows entry of QP/CRF values for x264 
+and FFMPEG instead of the percentage metric.
+This preference is associated with the current
+preset only.
+
+You *MUST* save the current preset to preserve
+this setting.&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Allow direct QP/CRF&lt;/property&gt;
+                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                            &lt;signal name=&quot;toggled&quot; handler=&quot;vcodec_changed_cb&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;4&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;EncodeLogLocation&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;tooltip_text&quot;&gt; HandBrake produces 2 activity logs.  
+One for the session and one for each encoding.
+Store the individual encode logs in the same
+location as the movie.&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Store logs in destination video directory&lt;/property&gt;
+                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                            &lt;signal name=&quot;toggled&quot; handler=&quot;pref_changed_cb&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;5&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;allow_tweaks&quot;&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Allow Tweaks&lt;/property&gt;
+                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                            &lt;signal name=&quot;toggled&quot; handler=&quot;tweaks_changed_cb&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;6&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;hbfd_feature&quot;&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Allow HandBrake For Dummies&lt;/property&gt;
+                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                            &lt;signal name=&quot;toggled&quot; handler=&quot;hbfd_feature_changed_cb&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;7&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+                &lt;child type=&quot;label&quot;&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label18&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Preferences&amp;lt;/b&amp;gt;&lt;/property&gt;
+                    &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+        &lt;child internal-child=&quot;action_area&quot;&gt;
+          &lt;object class=&quot;GtkHButtonBox&quot; id=&quot;dialog-action_area6&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;layout_style&quot;&gt;GTK_BUTTONBOX_END&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkButton&quot; id=&quot;pref_ok&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;gtk-ok&lt;/property&gt;
+                &lt;property name=&quot;use_stock&quot;&gt;True&lt;/property&gt;
+              &lt;/object&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;pack_type&quot;&gt;GTK_PACK_END&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+      &lt;/object&gt;
+    &lt;/child&gt;
+    &lt;action-widgets&gt;
+      &lt;action-widget response=&quot;-5&quot;&gt;pref_ok&lt;/action-widget&gt;
+    &lt;/action-widgets&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkDialog&quot; id=&quot;tweak_dialog&quot;&gt;
+    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+    &lt;property name=&quot;border_width&quot;&gt;5&lt;/property&gt;
+    &lt;property name=&quot;modal&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;window_position&quot;&gt;GTK_WIN_POS_CENTER_ON_PARENT&lt;/property&gt;
+    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIALOG&lt;/property&gt;
+    &lt;property name=&quot;has_separator&quot;&gt;False&lt;/property&gt;
+    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot;delete_event&quot;/&gt;
+    &lt;child internal-child=&quot;vbox&quot;&gt;
+      &lt;object class=&quot;GtkVBox&quot; id=&quot;dialog-vbox7&quot;&gt;
+        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+        &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox9&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkLabel&quot; id=&quot;label33&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Setting:&lt;/property&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkEntry&quot; id=&quot;tweak_setting&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;max_length&quot;&gt;40&lt;/property&gt;
+                &lt;property name=&quot;activates_default&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;width_chars&quot;&gt;30&lt;/property&gt;
+                &lt;property name=&quot;truncate_multiline&quot;&gt;True&lt;/property&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+        &lt;child internal-child=&quot;action_area&quot;&gt;
+          &lt;object class=&quot;GtkHButtonBox&quot; id=&quot;dialog-action_area7&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+            &lt;property name=&quot;layout_style&quot;&gt;GTK_BUTTONBOX_END&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkButton&quot; id=&quot;tweak_cancel&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;gtk-cancel&lt;/property&gt;
+                &lt;property name=&quot;use_stock&quot;&gt;True&lt;/property&gt;
+              &lt;/object&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkButton&quot; id=&quot;tweak_ok&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_default&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;has_default&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;gtk-ok&lt;/property&gt;
+                &lt;property name=&quot;use_stock&quot;&gt;True&lt;/property&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;pack_type&quot;&gt;GTK_PACK_END&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+      &lt;/object&gt;
+    &lt;/child&gt;
+    &lt;action-widgets&gt;
+      &lt;action-widget response=&quot;0&quot;&gt;tweak_cancel&lt;/action-widget&gt;
+      &lt;action-widget response=&quot;-5&quot;&gt;tweak_ok&lt;/action-widget&gt;
+    &lt;/action-widgets&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkDialog&quot; id=&quot;preset_save_dialog&quot;&gt;
+    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+    &lt;property name=&quot;border_width&quot;&gt;5&lt;/property&gt;
+    &lt;property name=&quot;modal&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;window_position&quot;&gt;GTK_WIN_POS_CENTER_ON_PARENT&lt;/property&gt;
+    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIALOG&lt;/property&gt;
+    &lt;property name=&quot;has_separator&quot;&gt;False&lt;/property&gt;
+    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot;delete_event&quot;/&gt;
+    &lt;child internal-child=&quot;vbox&quot;&gt;
+      &lt;object class=&quot;GtkVBox&quot; id=&quot;dialog-vbox3&quot;&gt;
+        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+        &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox28&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox41&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label64&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Preset Name:&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkEntry&quot; id=&quot;PresetName&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;max_length&quot;&gt;40&lt;/property&gt;
+                    &lt;property name=&quot;activates_default&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;width_chars&quot;&gt;30&lt;/property&gt;
+                    &lt;property name=&quot;truncate_multiline&quot;&gt;True&lt;/property&gt;
+                    &lt;signal handler=&quot;preset_name_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkFrame&quot; id=&quot;frame14&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment36&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                    &lt;property name=&quot;bottom_padding&quot;&gt;4&lt;/property&gt;
+                    &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                    &lt;property name=&quot;right_padding&quot;&gt;4&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkTextView&quot; id=&quot;PresetDescription&quot;&gt;
+                        &lt;property name=&quot;height_request&quot;&gt;60&lt;/property&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;property name=&quot;wrap_mode&quot;&gt;GTK_WRAP_WORD&lt;/property&gt;
+                        &lt;property name=&quot;accepts_tab&quot;&gt;False&lt;/property&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+                &lt;child type=&quot;label&quot;&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label67&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&lt;/property&gt;
+                    &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox43&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkRadioButton&quot; id=&quot;preset_type_folder&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Folder&lt;/property&gt;
+                    &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                    &lt;signal name=&quot;toggled&quot; handler=&quot;preset_type_changed_cb&quot;/&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkRadioButton&quot; id=&quot;preset_type_normal&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Preset&lt;/property&gt;
+                    &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;group&quot;&gt;preset_type_folder&lt;/property&gt;
+                    &lt;signal name=&quot;toggled&quot; handler=&quot;preset_type_changed_cb&quot;/&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+        &lt;child internal-child=&quot;action_area&quot;&gt;
+          &lt;object class=&quot;GtkHButtonBox&quot; id=&quot;dialog-action_area3&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+            &lt;property name=&quot;layout_style&quot;&gt;GTK_BUTTONBOX_END&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkButton&quot; id=&quot;preset_cancel&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;gtk-cancel&lt;/property&gt;
+                &lt;property name=&quot;use_stock&quot;&gt;True&lt;/property&gt;
+              &lt;/object&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkButton&quot; id=&quot;preset_ok&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;gtk-ok&lt;/property&gt;
+                &lt;property name=&quot;use_stock&quot;&gt;True&lt;/property&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;pack_type&quot;&gt;GTK_PACK_END&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+      &lt;/object&gt;
+    &lt;/child&gt;
+    &lt;action-widgets&gt;
+      &lt;action-widget response=&quot;0&quot;&gt;preset_cancel&lt;/action-widget&gt;
+      &lt;action-widget response=&quot;-5&quot;&gt;preset_ok&lt;/action-widget&gt;
+    &lt;/action-widgets&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkWindow&quot; id=&quot;activity_window&quot;&gt;
+    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIALOG&lt;/property&gt;
+    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&gt;
+    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot;delete_event&quot;/&gt;
+    &lt;child&gt;
+      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox37&quot;&gt;
+        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+        &lt;child&gt;
+          &lt;placeholder/&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkLabel&quot; id=&quot;activity_location&quot;&gt;
+            &lt;property name=&quot;justify&quot;&gt;GTK_JUSTIFY_LEFT&lt;/property&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkScrolledWindow&quot; id=&quot;activity_scroll&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+            &lt;property name=&quot;hscrollbar_policy&quot;&gt;GTK_POLICY_AUTOMATIC&lt;/property&gt;
+            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_IN&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkTextView&quot; id=&quot;activity_view&quot;&gt;
+                &lt;property name=&quot;width_request&quot;&gt;400&lt;/property&gt;
+                &lt;property name=&quot;height_request&quot;&gt;500&lt;/property&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;editable&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;cursor-visible&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;wrap_mode&quot;&gt;GTK_WRAP_CHAR&lt;/property&gt;
+              &lt;/object&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;placeholder/&gt;
+        &lt;/child&gt;
+      &lt;/object&gt;
+    &lt;/child&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkWindow&quot; id=&quot;queue_window&quot;&gt;
+    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+    &lt;property name=&quot;title&quot; translatable=&quot;yes&quot;&gt;HandBrake Queue&lt;/property&gt;
+    &lt;property name=&quot;icon_name&quot;&gt;hb-queue&lt;/property&gt;
+    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIALOG&lt;/property&gt;
+    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&gt;
+    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot;delete_event&quot;/&gt;
+    &lt;child&gt;
+      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox34&quot;&gt;
+        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkToolbar&quot; id=&quot;queue_toolbar&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkToolButton&quot; id=&quot;queue_start2&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;sensitive&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Start&lt;/property&gt;
+                &lt;property name=&quot;icon_name&quot;&gt;hb-play&lt;/property&gt;
+                &lt;signal handler=&quot;queue_start_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkToolButton&quot; id=&quot;queue_pause2&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;sensitive&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Pause&lt;/property&gt;
+                &lt;property name=&quot;icon_name&quot;&gt;hb-pause&lt;/property&gt;
+                &lt;signal handler=&quot;queue_pause_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkToolButton&quot; id=&quot;queue_stop&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;sensitive&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Stop&lt;/property&gt;
+                &lt;property name=&quot;icon_name&quot;&gt;hb-stop&lt;/property&gt;
+                &lt;signal handler=&quot;queue_stop_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkToolButton&quot; id=&quot;queue_edit&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;sensitive&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Edit&lt;/property&gt;
+                &lt;property name=&quot;icon_name&quot;&gt;hb-edit&lt;/property&gt;
+                &lt;signal handler=&quot;queue_edit_clicked_cb&quot; name=&quot;clicked&quot;/&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox38&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkLabel&quot; id=&quot;current_encode&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+              &lt;/object&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox28&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;queue_status&quot;&gt;
+                    &lt;property name=&quot;justify&quot;&gt;GTK_JUSTIFY_LEFT&lt;/property&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;padding&quot;&gt;10&lt;/property&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;placeholder/&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;placeholder/&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkScrolledWindow&quot; id=&quot;scrolledwindow2&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+            &lt;property name=&quot;hscrollbar_policy&quot;&gt;GTK_POLICY_AUTOMATIC&lt;/property&gt;
+            &lt;property name=&quot;vscrollbar_policy&quot;&gt;GTK_POLICY_AUTOMATIC&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkTreeView&quot; id=&quot;queue_list&quot;&gt;
+                &lt;property name=&quot;width_request&quot;&gt;900&lt;/property&gt;
+                &lt;property name=&quot;height_request&quot;&gt;300&lt;/property&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;headers_visible&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;headers_clickable&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;hover_expand&quot;&gt;False&lt;/property&gt;
+                &lt;signal handler=&quot;queue_key_press_cb&quot; name=&quot;key-press-event&quot;/&gt;
+              &lt;/object&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+            &lt;property name=&quot;expand&quot;&gt;True&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;placeholder/&gt;
+        &lt;/child&gt;
+      &lt;/object&gt;
+    &lt;/child&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkWindow&quot; id=&quot;preview_window&quot;&gt;
+    &lt;property name=&quot;title&quot; translatable=&quot;yes&quot;&gt;Preview&lt;/property&gt;
+    &lt;property name=&quot;window_position&quot;&gt;GTK_WIN_POS_CENTER&lt;/property&gt;
+    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIALOG&lt;/property&gt;
+    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&gt;
+    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot;delete_event&quot;/&gt;
+    &lt;child&gt;
+      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox32&quot;&gt;
+        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkFrame&quot; id=&quot;frame15&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment22&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;top_padding&quot;&gt;4&lt;/property&gt;
+                &lt;property name=&quot;bottom_padding&quot;&gt;4&lt;/property&gt;
+                &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                &lt;property name=&quot;right_padding&quot;&gt;4&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkImage&quot; id=&quot;preview_image&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;icon_name&quot;&gt;hb-icon&lt;/property&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+            &lt;/child&gt;
+            &lt;child type=&quot;label&quot;&gt;
+              &lt;object class=&quot;GtkLabel&quot; id=&quot;label56&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Preview&amp;lt;/b&amp;gt;&lt;/property&gt;
+                &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+              &lt;/object&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+        &lt;/child&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox8&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkFrame&quot; id=&quot;Cropping3&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment24&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                    &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                    &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                    &lt;property name=&quot;right_padding&quot;&gt;2&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox39&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment37&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;xalign&quot;&gt;0.34000000357627869&lt;/property&gt;
+                            &lt;property name=&quot;xscale&quot;&gt;0.37999999523162842&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkTable&quot; id=&quot;table6&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;n_rows&quot;&gt;5&lt;/property&gt;
+                                &lt;property name=&quot;n_columns&quot;&gt;5&lt;/property&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;placeholder/&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label77&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Left&lt;/property&gt;
+                                    &lt;property name=&quot;width_chars&quot;&gt;4&lt;/property&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;top_attach&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;bottom_attach&quot;&gt;3&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label74&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;yalign&quot;&gt;1&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Top&lt;/property&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;left_attach&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;right_attach&quot;&gt;3&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkSpinButton&quot; id=&quot;PictureLeftCrop&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;adjustment&quot;&gt;adjustment13&lt;/property&gt;
+                                    &lt;signal handler=&quot;crop_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;left_attach&quot;&gt;1&lt;/property&gt;
+                                    &lt;property name=&quot;right_attach&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;top_attach&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;bottom_attach&quot;&gt;3&lt;/property&gt;
+                                    &lt;property name=&quot;x_options&quot;/&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label73&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;yalign&quot;&gt;0&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Bottom&lt;/property&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;left_attach&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;right_attach&quot;&gt;3&lt;/property&gt;
+                                    &lt;property name=&quot;top_attach&quot;&gt;4&lt;/property&gt;
+                                    &lt;property name=&quot;bottom_attach&quot;&gt;5&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkSpinButton&quot; id=&quot;PictureTopCrop&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;adjustment&quot;&gt;adjustment14&lt;/property&gt;
+                                    &lt;signal handler=&quot;crop_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;left_attach&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;right_attach&quot;&gt;3&lt;/property&gt;
+                                    &lt;property name=&quot;top_attach&quot;&gt;1&lt;/property&gt;
+                                    &lt;property name=&quot;bottom_attach&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;x_options&quot;/&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkSpinButton&quot; id=&quot;PictureBottomCrop&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;adjustment&quot;&gt;adjustment15&lt;/property&gt;
+                                    &lt;signal handler=&quot;crop_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;left_attach&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;right_attach&quot;&gt;3&lt;/property&gt;
+                                    &lt;property name=&quot;top_attach&quot;&gt;3&lt;/property&gt;
+                                    &lt;property name=&quot;bottom_attach&quot;&gt;4&lt;/property&gt;
+                                    &lt;property name=&quot;x_options&quot;/&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkSpinButton&quot; id=&quot;PictureRightCrop&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;adjustment&quot;&gt;adjustment16&lt;/property&gt;
+                                    &lt;signal handler=&quot;crop_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;left_attach&quot;&gt;3&lt;/property&gt;
+                                    &lt;property name=&quot;right_attach&quot;&gt;4&lt;/property&gt;
+                                    &lt;property name=&quot;top_attach&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;bottom_attach&quot;&gt;3&lt;/property&gt;
+                                    &lt;property name=&quot;x_options&quot;/&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                                &lt;child&gt;
+                                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label72&quot;&gt;
+                                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Right&lt;/property&gt;
+                                    &lt;property name=&quot;width_chars&quot;&gt;4&lt;/property&gt;
+                                  &lt;/object&gt;
+                                  &lt;packing&gt;
+                                    &lt;property name=&quot;left_attach&quot;&gt;4&lt;/property&gt;
+                                    &lt;property name=&quot;right_attach&quot;&gt;5&lt;/property&gt;
+                                    &lt;property name=&quot;top_attach&quot;&gt;2&lt;/property&gt;
+                                    &lt;property name=&quot;bottom_attach&quot;&gt;3&lt;/property&gt;
+                                  &lt;/packing&gt;
+                                &lt;/child&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkCheckButton&quot; id=&quot;PictureAutoCrop&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Auto Crop&lt;/property&gt;
+                            &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                            &lt;signal handler=&quot;scale_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+                &lt;child type=&quot;label&quot;&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label82&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Cropping&amp;lt;/b&amp;gt;&lt;/property&gt;
+                    &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkFrame&quot; id=&quot;frame19&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_ETCHED_OUT&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment43&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;top_padding&quot;&gt;2&lt;/property&gt;
+                    &lt;property name=&quot;bottom_padding&quot;&gt;2&lt;/property&gt;
+                    &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                    &lt;property name=&quot;right_padding&quot;&gt;2&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox41&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox50&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label85&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;width:&lt;/property&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkSpinButton&quot; id=&quot;scale_width&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;adjustment&quot;&gt;adjustment17&lt;/property&gt;
+                                &lt;property name=&quot;snap_to_ticks&quot;&gt;True&lt;/property&gt;
+                                &lt;signal handler=&quot;scale_width_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkLabel&quot; id=&quot;label86&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;height:&lt;/property&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkSpinButton&quot; id=&quot;scale_height&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;adjustment&quot;&gt;adjustment18&lt;/property&gt;
+                                &lt;signal handler=&quot;scale_height_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox51&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkCheckButton&quot; id=&quot;autoscale&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Optimal for source&lt;/property&gt;
+                                &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                &lt;signal handler=&quot;scale_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                              &lt;/object&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox52&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkCheckButton&quot; id=&quot;ModDimensions&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Constrain dimensions to multiples of 16. 
+If not checked, encoding efficiency may be reduced.&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Align Dimensions (mod 16)&lt;/property&gt;
+                                &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                &lt;signal handler=&quot;scale_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox53&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                            &lt;property name=&quot;spacing&quot;&gt;45&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkCheckButton&quot; id=&quot;anamorphic&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Allow non-square pixels. Pixel aspect ratio will be
+adjusted to keep the video&apos;s original aspect ratio.&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Anamorphic&lt;/property&gt;
+                                &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                &lt;signal handler=&quot;scale_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                            &lt;child&gt;
+                              &lt;object class=&quot;GtkCheckButton&quot; id=&quot;PictureKeepRatio&quot;&gt;
+                                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                                &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;Changing either dimension automatically adjusts
+the other to maintain the video&apos;s original aspect ratio.&lt;/property&gt;
+                                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Keep Aspect&lt;/property&gt;
+                                &lt;property name=&quot;active&quot;&gt;True&lt;/property&gt;
+                                &lt;property name=&quot;draw_indicator&quot;&gt;True&lt;/property&gt;
+                                &lt;signal handler=&quot;scale_changed_cb&quot; name=&quot;toggled&quot;/&gt;
+                              &lt;/object&gt;
+                              &lt;packing&gt;
+                                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                              &lt;/packing&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;position&quot;&gt;3&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+                &lt;child type=&quot;label&quot;&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label87&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Scaling&amp;lt;/b&amp;gt;&lt;/property&gt;
+                    &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                  &lt;/object&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;padding&quot;&gt;2&lt;/property&gt;
+                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox42&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment6&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox45&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label18&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Frame&amp;lt;/b&amp;gt;&lt;/property&gt;
+                            &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                          &lt;/object&gt;
+                        &lt;/child&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkSpinButton&quot; id=&quot;preview_frame&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;tooltip-text&quot; translatable=&quot;yes&quot;&gt;View other frames&lt;/property&gt;
+                            &lt;property name=&quot;max_length&quot;&gt;2&lt;/property&gt;
+                            &lt;property name=&quot;has_frame&quot;&gt;False&lt;/property&gt;
+                            &lt;property name=&quot;shadow_type&quot;&gt;GTK_SHADOW_NONE&lt;/property&gt;
+                            &lt;property name=&quot;adjustment&quot;&gt;adjustment19&lt;/property&gt;
+                            &lt;property name=&quot;numeric&quot;&gt;True&lt;/property&gt;
+                            &lt;signal handler=&quot;preview_frame_value_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+                          &lt;/object&gt;
+                          &lt;packing&gt;
+                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                          &lt;/packing&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;placeholder/&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;placeholder/&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+      &lt;/object&gt;
+    &lt;/child&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkAboutDialog&quot; id=&quot;hb_about&quot;&gt;
+    &lt;property name=&quot;border_width&quot;&gt;5&lt;/property&gt;
+    &lt;property name=&quot;title&quot; translatable=&quot;yes&quot;&gt;About HandBrake&lt;/property&gt;
+    &lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIALOG&lt;/property&gt;
+    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;program_name&quot;&gt;HandBrake&lt;/property&gt;
+    &lt;property name=&quot;version&quot;&gt;0.9.2&lt;/property&gt;
+    &lt;property name=&quot;copyright&quot; translatable=&quot;yes&quot;&gt;Copyright &amp;#xA9; 2008 John Stebbins
+Copyright &amp;#xA9; Copyright Â© 2004 - 2008, HandBrake Devs&lt;/property&gt;
+    &lt;property name=&quot;comments&quot; translatable=&quot;yes&quot;&gt;HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder.&lt;/property&gt;
+    &lt;property name=&quot;website&quot;&gt;http://handbrake.fr&lt;/property&gt;
+    &lt;property name=&quot;website_label&quot; translatable=&quot;yes&quot;&gt;http://handbrake.fr&lt;/property&gt;
+    &lt;property name=&quot;license&quot; translatable=&quot;yes&quot;&gt;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.&lt;/property&gt;
+    &lt;property name=&quot;authors&quot;&gt;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&amp;#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&amp;#xE7;ois Revol
+  Dieter Shirley
+  Juan J. Sierralta
+  Lionel Ulmer
+
+libdts authors:
+  Gildas Bazin
+  Sam Hocevar
+
+libdvdcss authors:
+  Billy Biggs
+  St&amp;#xE9;phane Borel
+  H&amp;#xE5;kan Hjort
+  Samuel Hocevar
+  Eugenio Jarosiewicz
+  Jon Lech Johansen
+  Markus Kuespert
+  Pascal Levesque
+  Steven M. Schultz
+  David Sieb&amp;#xF6;rger
+  Alex Strelnikov
+  German Tischler
+  Gildas Bazin
+
+libdvdread authors:
+  Bj&amp;#xF6;rn Englund
+  H&amp;#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&amp;#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
+  sergent@io.com
+  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&amp;#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
+
+&lt;/property&gt;
+    &lt;property name=&quot;logo_icon_name&quot;&gt;hb-icon&lt;/property&gt;
+    &lt;property name=&quot;wrap_license&quot;&gt;True&lt;/property&gt;
+    &lt;signal handler=&quot;hb_about_response_cb&quot; name=&quot;response&quot;/&gt;
+    &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot;delete_event&quot;/&gt;
+    &lt;child internal-child=&quot;vbox&quot;&gt;
+      &lt;object class=&quot;GtkVBox&quot; id=&quot;dialog-vbox4&quot;&gt;
+        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+        &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+        &lt;child&gt;
+          &lt;placeholder/&gt;
+        &lt;/child&gt;
+        &lt;child internal-child=&quot;action_area&quot;&gt;
+          &lt;object class=&quot;GtkHButtonBox&quot; id=&quot;dialog-action_area4&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;layout_style&quot;&gt;GTK_BUTTONBOX_END&lt;/property&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;pack_type&quot;&gt;GTK_PACK_END&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+      &lt;/object&gt;
+    &lt;/child&gt;
+  &lt;/object&gt;
+  &lt;object class=&quot;GtkDialog&quot; id=&quot;update_dialog&quot;&gt;
+    &lt;property name=&quot;border_width&quot;&gt;5&lt;/property&gt;
+    &lt;property name=&quot;modal&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;window_position&quot;&gt;center-on-parent&lt;/property&gt;
+    &lt;property name=&quot;type_hint&quot;&gt;dialog&lt;/property&gt;
+    &lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&gt;
+    &lt;property name=&quot;has_separator&quot;&gt;False&lt;/property&gt;
+    &lt;child internal-child=&quot;vbox&quot;&gt;
+      &lt;object class=&quot;GtkVBox&quot; id=&quot;dialog-vbox6&quot;&gt;
+        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+        &lt;property name=&quot;spacing&quot;&gt;2&lt;/property&gt;
+        &lt;child&gt;
+          &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox24&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox19&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkEventBox&quot; id=&quot;eventbox2&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;events&quot;&gt;GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK&lt;/property&gt;
+                    &lt;property name=&quot;visible_window&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;above_child&quot;&gt;True&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkImage&quot; id=&quot;image3&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+                        &lt;property name=&quot;icon_name&quot;&gt;hb-icon&lt;/property&gt;
+                        &lt;property name=&quot;icon-size&quot;&gt;6&lt;/property&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;position&quot;&gt;0&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;placeholder/&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                &lt;property name=&quot;position&quot;&gt;0&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox1&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;label3&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                    &lt;property name=&quot;xpad&quot;&gt;10&lt;/property&gt;
+                    &lt;property name=&quot;ypad&quot;&gt;5&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;A new version of HandBrake is available!&amp;lt;/b&amp;gt;&lt;/property&gt;
+                    &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;position&quot;&gt;0&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkLabel&quot; id=&quot;update_message&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+                    &lt;property name=&quot;xpad&quot;&gt;10&lt;/property&gt;
+                    &lt;property name=&quot;ypad&quot;&gt;5&lt;/property&gt;
+                    &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;HandBrake xxx is now available (you have yyy).&lt;/property&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+                    &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+                &lt;child&gt;
+                  &lt;object class=&quot;GtkFrame&quot; id=&quot;frame2&quot;&gt;
+                    &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                    &lt;property name=&quot;label_xalign&quot;&gt;0&lt;/property&gt;
+                    &lt;property name=&quot;shadow_type&quot;&gt;etched-out&lt;/property&gt;
+                    &lt;child&gt;
+                      &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment2&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;left_padding&quot;&gt;12&lt;/property&gt;
+                        &lt;child&gt;
+                          &lt;object class=&quot;GtkScrolledWindow&quot; id=&quot;update_scroll&quot;&gt;
+                            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                            &lt;property name=&quot;hscrollbar_policy&quot;&gt;automatic&lt;/property&gt;
+                            &lt;property name=&quot;vscrollbar_policy&quot;&gt;automatic&lt;/property&gt;
+                            &lt;child&gt;
+                              &lt;placeholder/&gt;
+                            &lt;/child&gt;
+                          &lt;/object&gt;
+                        &lt;/child&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                    &lt;child type=&quot;label&quot;&gt;
+                      &lt;object class=&quot;GtkLabel&quot; id=&quot;label88&quot;&gt;
+                        &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                        &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;&amp;lt;b&amp;gt;Release Notes&amp;lt;/b&amp;gt;&lt;/property&gt;
+                        &lt;property name=&quot;use_markup&quot;&gt;True&lt;/property&gt;
+                      &lt;/object&gt;
+                    &lt;/child&gt;
+                  &lt;/object&gt;
+                  &lt;packing&gt;
+                    &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                  &lt;/packing&gt;
+                &lt;/child&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+        &lt;child internal-child=&quot;action_area&quot;&gt;
+          &lt;object class=&quot;GtkHButtonBox&quot; id=&quot;dialog-action_area6&quot;&gt;
+            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+            &lt;property name=&quot;layout_style&quot;&gt;end&lt;/property&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkButton&quot; id=&quot;update_skip&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Skip This Version&lt;/property&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;position&quot;&gt;0&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+            &lt;child&gt;
+              &lt;object class=&quot;GtkButton&quot; id=&quot;update_remind&quot;&gt;
+                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;receives_default&quot;&gt;True&lt;/property&gt;
+                &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Remind Me Later&lt;/property&gt;
+              &lt;/object&gt;
+              &lt;packing&gt;
+                &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+              &lt;/packing&gt;
+            &lt;/child&gt;
+          &lt;/object&gt;
+          &lt;packing&gt;
+            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+            &lt;property name=&quot;pack_type&quot;&gt;end&lt;/property&gt;
+            &lt;property name=&quot;position&quot;&gt;0&lt;/property&gt;
+          &lt;/packing&gt;
+        &lt;/child&gt;
+      &lt;/object&gt;
+    &lt;/child&gt;
+    &lt;action-widgets&gt;
+      &lt;action-widget response=&quot;-5&quot;&gt;update_skip&lt;/action-widget&gt;
+      &lt;action-widget response=&quot;0&quot;&gt;update_remind&lt;/action-widget&gt;
+    &lt;/action-widgets&gt;
+  &lt;/object&gt;
+&lt;/interface&gt;
+</string>
+       <key>icons</key>
+       <dict>
+               <key>hb-activity</key>
+               <data>
+R2RrUAAAEBgBAQACAAAAgAAAACAAAAAg////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAAAAAAlpaWmZaWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+WlpaZAAAAAAAAAACUlJT//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////5SUlP8AAAAAAAAAAJKSkv/+/v7//v7+//7+/v/+/v7//v7+//7+/v///v7//v7+//7+/v/+/////v7+//7+/v///v7//v7+//7+/v/+/v7///7+//7+/v/+/v7//v7+//7+/v///v7//v7///7+/v/+/v7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/Tk5O/wAAACUAAAAdQj9Cs0xMS/9MS0z/TEtM/0xMTP9MTEz/TExM/0tMS/9MTEz/TEtM/0xLTP9MTEv/TExM/0xMTP9MS0z/S0xM/0xLTP9MTEz/TEtM/0xMTP9MTEz/S0xL/0xMTP9MTEz/S0tM/0xLTP9MTEz/TExL/0xMTP9CP0KzAAAAHQAAAA4AAAAeAAAAKQAAAC0AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAtAAAAKQAAAB4AAAAOAAAABAAAAAcAAAAKAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAAKAAAABwAAAAQAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQ==
+               </data>
+               <key>hb-add-queue</key>
+               <data>
+R2RrUAAAEBgBAQACAAAAgAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZWVlvYKCgueCgoLngoKC54KCgueCgoLngoKC54KCgueCgoLngoKC54KCgueCgoLngoKC54KCgueCgoLngoKC54KCgueCgoLngoKC54KCgueCgoLngoKC54KCgueCgoLngoKC54KCgueCgoLngoKC52VlZb0AAAAAAAAAAAAAAACDg4Po///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////o5/P/g4OD6AAAAAAAAAAAAAAAAIODg+j//////Pv9//v6/P/5+Pv/+fj7//f2+v/39vr/9/b6//f2+v/39vr/9PP4//Tz+P/08/j/9PP4//Tz+P/08/j/9PP4//Tz+P/w7/X/8O/1//Dv9f/w7/X/8O/1//Dv9f/w7/X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
+               </data>
+               <key>hb-canceled</key>
+               <data>
+R2RrUAAABBgBAQACAAAAQAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAgIGXxsbf18bG39fGxt/Xxsbf18bG39fGxt/BQICBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAQEFozExxPpMTf/7TU7/+01O//tNTv/7TU7/+kxN/6MxMcQEAQEFAAAAAAAAAAAAAAAAAAAAAAAAAAAEAQEFojAwxPlCQ//5OTn/+jk6//k5Of/6OTr/+jk6//k5Of/5QkP/ojAwxAQBAQUAAAAAAAAAAAAAAAAEAQEFoS4vxPhBQf/4Nzj/9zg4//c3OP/4ODn/+Dg5//g3OP/4ODj/+Dg5//dBQf+hLi/EBAEBBQAAAAAAAAAAXBoaf/ZFRv/1Nzf/9jY3//Y2N//2Njf/9jY3//U2N//2Njf/9TEy//QsLP/zJSX/8jM0/1waGn8AAAAAAAAAAFsZGX/0Q0P/8zU1//M1Nf/zNTb/8zU1//IwMP/yJif/8R8e//AbG//wGxv/8Bsb//ErK/9bGRl/AAAAAAAAAABaGRl/8j8///AzNP/xMzT/8DAw/+0jI//rGxv/6xob/+wbG//rGxv/6xsb/+wbG//sKSn/WhkZfwAAAAAAAAAAWRgYf+88PP/uMjL/6yoq/+UcHP/kGhr/5Boa/+QaGv/kGhr/5Boa/+QaGv/kGhr/5iYm/1kYGH8AAAAAAAAAAFcXGH/tOTn/5ykp/90aG//cGhn/3BkZ/9wZGv/cGhn/3BoZ/9wZGf/cGRn/3BkZ/94jI/9XFxh/AAAAAAAAAABWFxd/6DQ0/9YbG//UGBn/1BgY/9MZGf/UGRn/1BgY/9QYGf/UGBj/1BkY/9MZGf/TISH/VhcXfwAAAAAAAAAABAEBBZAiIsTKGxv/zBcY/8sYGP/LFxf/zBgY/8wYGP/LGBj/yxcY/8wYGP/KGxz/iyAgxAQBAQUAAAAAAAAAAAAAAAAEAQEFiB4fxMQZGf/FFxf/xRcX/8UXF//EFxf/xRcX/8UXF//EGRn/iB8fxAQBAQUAAAAAAAAAAAAAAAAAAAAAAAAAAgQBARWGHR7NvxkZ/8AYGP/AGBj/wBgY/8AYGP+/GRn/hh0ezQQBARUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAbBAEBN1MWFZpSFRaeUxUWoVMVFaFTFRWeUxYVmgQBATcAAAAbAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAsAAAAOAAAAEQAAABMAAAATAAAAEQAAAA4AAAALAAAABQAAAAAAAAAAAAAAAA==
+               </data>
+               <key>hb-complete</key>
+               <data>
+R2RrUAAABBgBAQACAAAAQAAAABAAAAAQG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78Afxu/AP8bvwD/G78A/xu/AP8bvwB/G78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwA/G78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AP8bvwA/G78AABu/AAAbvwAAG78AABu/AAAbvwA/G78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/1DOO/+16qz/G78A/xu/AD8bvwAAG78AABu/AAAbvwAAG78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AP+97LX/5Pfh/xu/AP8bvwD/G78AABu/AAAbvwAAG78Afxu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AP9Y0ET//////4nee/8bvwD/G78A/xu/AH8bvwAAG78AABu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AP8bvwD/wO25//L78P8yxhr/G78A/xu/AP8bvwD/G78AABu/AAAbvwD/G78A/xu/AP8bvwD/fttv/6Lll/8bvwD/W9FI//////+T4Yb/G78A/xu/AP8bvwD/G78A/xu/AAAbvwAAG78A/xu/AP8bvwD/G78A/9v11///////Y9NQ/8DtuP/2/PX/Ocgi/xu/AP8bvwD/G78A/xu/AP8bvwAAG78AABu/AP8bvwD/G78A/xu/AP+n5p3///////j99///////neOR/xu/AP8bvwD/G78A/xu/AP8bvwD/G78AABu/AAAbvwB/G78A/xu/AP8bvwD/T846//v++v//////6vnn/znHIf8bvwD/G78A/xu/AP8bvwD/G78Afxu/AAAbvwAAG78AABu/AP8bvwD/G78A/xu/AP+P4IL/6fnm/3TYZP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AAAbvwAAG78AABu/AAAbvwA/G78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AD8bvwAAG78AABu/AAAbvwAAG78AABu/AD8bvwD/G78A/xu/AP8bvwD/G78A/xu/AP8bvwD/G78A/xu/AD8bvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AH8bvwD/G78A/xu/AP8bvwD/G78Afxu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AABu/AAAbvwAAG78AAA==
+               </data>
+               <key>hb-drawer</key>
+               <data>
+R2RrUAAAEBgBAQACAAAAgAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGxsbJ0RERGBycnKfm5ub2Le3t/+3t7f/t7e3/7e3t/+YmJjVOzs7VAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjY+MnMjJyNvl5+P57e/s/+3v7P/t7+z/7e/s/+Tl4/iysrL5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACPj4+cyMjI297e3vng4OD/4ODg/+Dg4P/g4OD/5eXl/7e3t/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIGBgZyurq7bvLy8+be3t/+3t7f/t7e3/7e3t/+3t7f/t7e3/6ioqP+urq7/s7Oz/7e3t/+3t7f/t7e3/7e3t/+3t7f/t7e3/7e3t/+3t7f/kJCQySwsLD8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAl5eXnNTU1Nvx8fH59vb2//b29v/29vb/9vb2//b29v+3t7f/6urq//Ly8v/6+vr////////////////////////////////////////////w8PD/paWl5wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACXl5ec1NTU2/Hx8fn29vb/9vb2//b29v/29vb/9vb2/7e3t/++vr7/xMTE/8vLy//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//4eHh//////+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJeXl5zU1NTb8fHx+fb29v/29vb/9vb2//b29v/29vb/t7e3/9nf6f/h5/H/6O75/+3z/v/t8/7/7fP+/+3z/v/t8/7/7fP+/+3z/v/Pz8///////7e3t/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAl5eXnNTU1Nvx8fH59vb2//b29v/29vb/9vb2//b29v+3t7f/2d/p/4KKjP+GjpH/iZGU/4mRlP+JkZT/iZGU/+3z/v+JkZT/7fP+/8/Pz///////t7e3/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBgYGcrq6u27y8vPm3t7f/t7e3/7e3t/+3t7f/t7e3/7e3t//Z3+n/4efx/+ju+f/t8/7/7fP+/+3z/v/t8/7/7fP+/+3z/v/t8/7/z8/P//////+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBgYGCfn5+f2NjY2P//////////////////////////t7e3/+rq6v/y8vL/+vr6///////////////////////////////////////Pz8///////7e3t/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYGBgYJ+fn5/Y2NjY//////////////////////////+3t7f/6urq/4KKjP+GjpH/iZGU/4mRlP+JkZT/iZGU//////+JkZT//////8/Pz///////t7e3/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgYGBgn5+fn9jY2Nj//////////////////////////7e3t//q6ur/8vLy//r6+v//////////////////////////////////////z8/P//////+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBgYGCfn5+f2NjY2P//////////////////////////t7e3/zJZvv8zXMT/NV/L/zZhz/82Yc//NmHP/zZhz/82Yc//NmHP/zZhz//Pz8///////7e3t/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYGBgYJ+fn5/Y2NjY//////////////////////////+3t7f/Mlm+//Ly8v/6+vr//////////////////////zZhz///////NmHP/8/Pz///////t7e3/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgYGBgn5+fn9jY2Nj//////////////////////////7e3t/8yWb7/M1zE/zVfy/82Yc//NmHP/zZhz/82Yc//NmHP/zZhz/82Yc//z8/P//Dw8P+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBgYGCfn5+f2NjY2P//////////////////////////t7e3/+rq6v/y8vL/+vr6///////////////////////////////////////Pz8//8PDw/7e3t/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYGBgYJ+fn5/Y2NjY//////////////////////////+3t7f/6urq/4KKjP+GjpH/iZGU/4mRlP+JkZT/iZGU//////+JkZT//////8/Pz///////t7e3/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgYGBgn5+fn9jY2Nj//////////////////////////7e3t//q6ur/8vLy//r6+v//////////////////////////////////////z8/P//////+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBgYGCfn5+f2NjY2P//////////////////////////t7e3/9nf6f/h5/H/6O75/+3z/v/t8/7/7fP+/+3z/v/t8/7/7fP+/+3z/v/Pz8///////7e3t/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYGBgYJ+fn5/Y2NjY//////////////////////////+3t7f/2d/p/4KKjP+GjpH/iZGU/4mRlP+JkZT/iZGU/+3z/v+JkZT/7fP+/8/Pz///////t7e3/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgYGBgn5+fn9jY2Nj//////////////////////////7e3t//Z3+n/4efx/+ju+f/t8/7/7fP+/+3z/v/t8/7/7fP+/+3z/v/t8/7/z8/P//////+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBgYGCfn5+f2NjY2P//////////////////////////t7e3/+rq6v/y8vL/+vr6///////////////////////////////////////Pz8///////7e3t/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYGBgYJ+fn5/Y2NjY//////////////////////////+3t7f/6urq/4KKjP+GjpH/iZGU/4mRlP+JkZT/iZGU//////+JkZT//////8/Pz///////t7e3/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAFfX19hnp6eoNjY2Nj//////////////////////////7e3t//q6ur/8vLy//r6+v//////////////////////////////////////z8/P//////+3t7f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAFAAAAB2BgYGafn5+j2NjY2v//////////////////////////t7e3/76+vv/ExMT/y8vL/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//h4eH//////7e3t/8AAAACAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAAABwAAAA0AAAASYGBgbZ6enqjX19fc//////////////////////////+3t7f/6urq//Ly8v/6+vr////////////////////////////////////////////39/f/o6Oj5QAAAAcAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAAKAAAAEgAAABlgYGBynp6eq9fX193/////////////////////6enp8be3t/+oqKj/rq6u/7Ozs/+3t7f/t7e3/7e3t/+3t7f/t7e3/7e3t/+3t7f/t7e3/6ampuk0NDRVAAAACgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAANGxsbNkRERG1xcXGompqa3Le3t/+3t7f/t7e3/7e3t/+3t7f/t7e3/wAAACIAAAAiAAAAIgAAACEAAAAgAAAAHwAAAB0AAAAcAAAAGgAAABgAAAAVAAAAEgAAAA0AAAAHAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAUAAAAHAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAA8AAAAQAAAAEAAAABAAAAAQAAAADwAAAA8AAAAOAAAADQAAAAwAAAALAAAACgAAAAkAAAAHAAAABQAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+               </data>
+               <key>hb-edit</key>
+               <data>
+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AAAAAAAAAAAAAAAAAAAAAAAAAAAA4ODj/ODg4/zg4OP8AAABhAAAAYwAAAGAAAAAUAAAADgAAAAkAAAAEAAAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAACwAAAA8AAAAQAAAADQAAAAkAAAAEAAAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAADAAAABQAAAAUAAAADAAAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+               </data>
+               <key>hb-icon</key>
+               <data>
+R2RrUAABABgBAQACAAACAAAAAIAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAARgAAAEkAAABIAAAASQAAABsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAKQAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXwAAANc0CBz/VAco/0wHJf8ZCBH/AAAA6QAAAHsAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAkAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAC6AAAH/yAYAP+riAD//9dL///k0v//3bL//84V//3BAP/+uwj//bIQ//isFf/+vQn/+7oM//mlGv/4gTL/95Ij//msFP/4qhX/+KkW//24Df//ygL//80B///OAf//0AD//84A///PAP//zgH//8wB///OAP/9wQj/+qwT//u1Cf//ywH//9t6///g5f//2K///9JR///XBP/puwD/Oi4A/wAAAP9JNRD/uowy/1tONP8ECRX/Pzgo/6V7J//QnC//1aEz/31qPf8dIyz/tIk5/2REE/9CLg7/HBMG/5ZkHf/bojT/so9B/0U+K/8AAAD/BAMC/wMFCv8AAAT/OioK/62CJ//XozT/2KQ0/86cMf/Jly//y5sy/86cM//Ily//JyET/3lpP//Qli3/pXAj/11BFP8AAAD/akkW/7h/Kf/PmjH/1J8s/7SXVf8bHiH/WEAQ/xAQDv82KhL/FxMP/xURDP+shjP/2qY0/7+OLf+9iyv/x5Yx/8uaMP/Qmiz/vpxO/ygsMf8AAAT/AQAG/wAAAP8LDRP5AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAABsAAAA2gAAAv9NOwD/2awS///bhf//577//9pd///QBP//zwD//ssC///NAf//zgH//skD//27C//7sRH/96sW//mvE///wgb//88A///NAv//zQH//80B///MAf//ygL//8wB///NAf//zAL//80B///NAP/+yQD//9AY///boP//3dP//9lj///QBf/ktgD/hGwA/yEZAv8HBxD/CAYC/y4lFf9SSDP/AAII/2BWPv+whzf/uIks/8+dMf/Pmy//xZs+/zI0Mv+SdkD/qHAd/6dxIP9HMhD/q4I8/3FkRf8HDBf/GhMG/3lbHP+1iCv/k28i/yYdCf+TbyP/3qg1/8qYMf+4hyr/r30n/51sIf+ufCr/zpky/86dMf8vIwj/UEk1/9elPf+rdyX/flUb/3ZQGf9/VRv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bAAAAFgAAABUAAAAQAAAADwAAAAoAAAAIAAAABgAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAABgAAAAcAAAAIAAAACQAAAAwAAAAMAAAADwAAABAAAAAQAAAAEQAAABEAAAATAAAAEwAAABMAAAATAAAAFAAAABEAAAASAAAAEQAAAA8AAAAPAAAAEAAAAA8AAAANAAAADAAAAAkAAAAJAAAACAAAAAYAAAAGAAAABwAAAAcAAAAEAAAABQAAAAcAAAAGAAAABgAAAAYAAAAIAAAACAAAAAoAAAAKAAAADQAAAA8AAAAQAAAAEQAAABIAAAAUAAAAFgAAABgAAAAZAAAAGwAAABwAAAAdAAAAHAAAAB0AAAAdAAAAHQAAABwAAAAbAAAAGgAAABkAAAAYAAAAFQAAABUAAAARAAAAEAAAAA8AAAALAAAACQAAAAcAAAAEAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAACAAAAAwAAAAQAAAAFAAAABAAAAAYAAAAGAAAABgAAAAYAAAAFAAAABgAAAAUAAAAGAAAABQAAAAQAAAACAAAAAgAAAAIAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAIAAAAFAAAABwAAAAcAAAAJAAAACQAAAAwAAAANAAAADQAAAA0AAAAQAAAAEAAAABAAAAAPAAAAEQAAAA8AAAAQAAAAEAAAAA8AAAAPAAAADQAAAAwAAAAKAAAACQAAAAgAAAAHAAAABAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAwAAAAIAAAAFAAAABgAAAAcAAAAHAAAABwAAAAYAAAAHAAAABgAAAAYAAAAGAAAABQAAAAQAAAAEAAAAAwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+               </data>
+               <key>hb-pause</key>
+               <data>
+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
+               </data>
+               <key>hb-play</key>
+               <data>
+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
+               </data>
+               <key>hb-pref</key>
+               <data>
+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
+               </data>
+               <key>hb-queue</key>
+               <data>
+R2RrUAAAEBgBAQACAAAAgAAAACAAAAAg////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wCIiIi9kJCQ55CQkOeQkJDnkJCQ55CQkOeQkJDnkJCQ55CQkOeQkJDnkJCQ55CQkOeQkJDnkJCQ55CQkOeQkJDnkJCQ55CQkOeQkJDnkJCQ55CQkOeIiIi9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AJCQkOj39vf/9vX2//f29//39vf/9/b3//f29//39vf/+Pj5//j4+f/4+Pn/+Pj5//j4+f/4+Pn/+Pj5//j4+f/4+Pj/9/b3//f29//29fb/9fX1/5CQkOgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8AkJCQ6Pj29////////////////////////////////////////f39//39/f///////////////////////v7+///////////////////////5+Pj/kJCQ6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wCQkJDo9vX1///////1YjX//2Em//9kJ///ZSj//2go//9mI///Yhr//2Ia//9nIP//aSr//2op//9jH///Xhn//2Mn//9nKv/zZTj///////r6+f+QkJDoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AImJieL39vb///////9YD///WgD//10A//9fAP//YwD//2cA//9pAP//agD//20A//9rAP//aAD//2UC//9gAP//XQD//1wA//9VCf//////+vn5/4mJieIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8AiYmJ4vX09P/+/v7//00A/+N4SP/ffk7/335O/99+Tv/ffk7/34JO/+CETf/fjVD/3otS/92EVP/dg1T/3YJU/92BVP/dgVT/3YFU/8nKyv/Jycn/gICA24mJieKJiYniiYmJ4np6eq0AAAAAAAAAAAAAAAAAAAAA////AP///wCJiYni9fTz//39/f//OAD/4HJW//f29//29fb/9/b3//f29//39vf/9/b3//f29//4+Pn/+Pj5//j4+f/4+Pn/+Pj5//j4+f/4+Pn/+Pj5//j4+P/39vf/9/b3//b19v/19fX/gICA2wAAAAAAAAAAAAAAAAAAAAD///8A////AImJieLx8PD//Pz9//8QAP/dcVb/+Pb3///////////////////////////////////////9/f3//f39///////////////////////+/v7///////////////////////n4+P+AgIDbAAAAAAAAAAAAAAAAAAAAAP///wD///8AiYmJ4u/u7v/6+vz//wAA/91xVv/29fX//////wC1C/8AjAD/AIUA/wCAAP8cmAD/AIAA/wB/AP8JbAD/AJIA/wC3AP8AtwD/B1UG/wR5AP8ApQD/NboA/xm3B///////+vr5/4CAgNsAAAAAAAAAAAAAAAAAAAAA////AP///wCJiYni7Ovr//b2+f98AAD/3XFW//f29v//////AI8A/wCLAP8AoQD/AKUA/wC2AP8bqgD/KZwI/wCNAP8AgwD/AF0A/wBqAP8AiAD/AGEA/wBvAP8AjAD/AHYA///////6+fn/gICA2wAAAAAAAAAAAAAAAAAAAAD///8A////AICAgNvp6Oj/9fX4/wMFCf9CODn/9fT0//7+/v8AlAD/AH0A/xqAGv8Xexb/GHsW/xd7Ff8Yexb/F3sV/xd7Fv8Yexb/GHsW/xd7Ff8Xexb/F3sW/xh7Fv8KXgT/ycrK/8nJyf+AgIDbgICA24CAgNuAgIDbenp6rf///wD///8AgICA2+Xk5f/4+Pr/BQQK/0I4Of/19PP//f39/wCXAP8AbQX/9/b3//b19v/39vf/9/b3//f29//39vf/9/b3//j4+f/4+Pn/+Pj5//j4+f/4+Pn/+Pj5//j4+f/4+Pn/+Pj4//f29//39vf/9vX2//X19f+AgIDb////AP///wCAgIDb5+fp//Pz9f8DAQX/Ojc5//Hw8P/8/P3/AIIA/wBrBv/49vf///////////////////////////////////////39/f/9/f3///////////////////////7+/v//////////////////////+fj4/4CAgNv///8A////AICAgNvn5+n/8PDy/wAAAv86Nzn/7+7u//r6/P8AewD/AGAK//b19f//////RHPt/z5x8v8+cfL/QXv7/0qN/f8yW7H/GSZL/xIePf8aMnD/NmTX/zlo2f8bM2j/ChIl/zdm1P9HiOX/RWrK///////6+vn/gICA2////wD///8AgICA2+Hh4//x8fP/BQUK/zo3Of/s6+v/9vb5/wBvAP8AWAb/9/b2//////9Gc9n/SHnw/1N++f9Tg///WZL//2mh//9wrf//VYv0/xwsVf8IDyf/FSJE/yM3aP8dL1b/JUF8/x0wXP8mGyj///////r5+f+AgIDb////AP///wCAgIDb4uLk//T09v/n5fL/qqmu/+no6P/19fj/AGsA/wBUBv/19PT//v7+/z5l0f9Meuf/YZH//1qM//9Ja9P/QF+5/0R0xP8zWJT/Cg8W/wAAAP8BAAH/Ehkr/xIeMv8NExv/Ex08/zMvWf/+/v7/+/v7/4CAgNv///8A////AICAgNvi4ej/4d7v/+He7/+sqrL/5eTl//j4+v8AcwL/AF4H//X08//9/f3/O1PM/0l15P9Yj/r/SXjf/yMzX/8DBAn/DhIm/xUcLP8HCxL/BAUL/wAAAP8AAAD/BwsV/wMFCP8fN3T/TmLI///////z8vH/gICA2////wD///8AY2NjsXV1deB1dXXgdXV14HR0dOTn5+n/8/P1/wBoAP8ASAD/8fDw//z8/f9BUbr/SHDn/0p02f8sTIv/EyJC/xkqaf9Eauz/WILq/xooVP8IDyD/BQgP/wkRHv8kNmb/DRMh/wYKFv8pGjX/+/v8//X09f+AgIDb////AP///wAdHR0aAAAAHwAAAB8AAAAfgYGB2efn6f/w8PL/AFkA/wBeAP/v7u7/+vr8/zxJs/9FY9H/RWbJ/y9SrP8zUrn/PmXf/zli4/8VOJv/CRRE/xUrXP8qQoT/IzVu/xAYLv8jMm3/GiVM/x8HBP/y8vP/9fX3/4CAgNv///8A////AAAAAAAAAAAAAAAAAAAAAACAgIDb4eHj//Hx8/8AXgT/AEwA/+zr6//29vn/LEim/ztWvf9AWcT/O1vN/1F27f+kwf//o7Tg/3aBl/9DWZb/QVu5/0lq6P86Vbb/BQcQ/yg8gP8vR5v/ISJO//Dw8f/u7u//gICA2////wD///8AAAAAAAAAAAAAAAAAAAAAAICAgNzi4uT/9PT2/+fl8v+qqa7/6ejo//X1+P8oSKP/NU+//zpRzf9NZtL/j6Xf/////v//////+vv//46j4v93jf3/R2b8/0Jc0/8OESr/GSRF/y5Jqf8vS8P/9fX4/+jn5/+AgIDb////AP///wAAAAAAAAAAAAAAAAAAAAAAgICA3OLh6P/h3u//4d7v/6yqsv/l5OX/+Pj6/y08o/83SL3/MEzI/1961f/q6vH/8vH0//Lz9v/z9Pb/7e/0/4+k7f8uTt3/PVLN/yQvav8JCw3/HSts/zNR0v/19fj/4+Li/4CAgNv///8A////AAAAAAAAAAAAAAAAAAAAAABjY2OxdXV14HV1deB1dXXgdHR05Ofn6f/z8/X/Cgox/w0PQP8KEEv/GyJR/15bcf9vbIz/cHGT/3F1kP9mZ3v/LTNc/wkRTv8RFFD/DxFJ/wEBAv8FBxj/ERhO//Pz9v/m5ef/gICA2////wD///8AAAAAAAAAAAAAAAAAAAAAAB0dHRoAAAAfAAAAHwAAAB+BgYHZ5+fp//Dw8v8CAxj/AgMf/wIDI/8CAyL/DQ8x/w4OPP8NDkP/DQ5C/w4ON/8CAiP/AgIf/wMEKf8KCEX/AQEK/wAAAP8BAQT/7Ozu/+fn6v+AgIDb////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAICAgNvh4eP/8fHz/xEWTP8RFk//ERVL/xAVSP8NFkv/DRFD/woMQf8KD0X/Dg9D/w8RRP8RFEv/ERlX/xcaXv8FBhP/AQED/wYJGf/r6+3/4+Pl/4CAgNv///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICA2+Li5P/09Pb/4t/3/+Dd9v/h3/T/4d/0/+Hf9P/h3vL/4N7x/+De8f/h3vL/4d7z/+Hf9f/h3/f/4d/1/+Dd7v/f3Oz/4N7w//n3///f3Oz/gICA2////wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgIDb4uHo/+He7//c2OT/3dvl/9zZ5f/c2eX/3Nnl/9zZ5v/d2eb/3dnm/9zZ5v/c2eb/3Nnl/9za5P/c2OP/3drq/93a7P/c2ej/3drr/9rZ4v+AgIDb////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGNjY7FxcXHjcXFx43FxceNxcXHjcXFx43FxceNxcXHjcXFx43FxceNxcXHjcXFx43FxceNxcXHjcXFx43FxceNxcXHjcXFx43FxceNxcXHjcXFx42NjY7H///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHR0dGgAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfHR0dGv///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AA==
+               </data>
+               <key>hb-queue-delete</key>
+               <data>
+R2RrUAAABBgBAQACAAAAQAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOwAAAHEAAACbAAAAtAAAAJsAAABxAAAAOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAZAAAALYAAAC4AAAAuAAAALgAAAC4AAAAuAAAALYAAABkAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAAGQAAAAAAAAAAAAAAAAAAAAAAAAAOwAAALYAAAC4AAAAXAAAAAMAAAC4AAAAuAAAALgAAAADAAAAXAAAALgAAAC2AAAAOwAAAAAAAAAAAAAAAAAAAHEAAAC4AAAAuAAAAAMAAAADAAAAAwAAALgAAAADAAAAAwAAAAMAAAC4AAAAuAAAAHEAAAAAAAAAAAAAAAAAAACbAAAAuAAAALgAAAC4AAAAAwAAAAMAAAADAAAAAwAAAAMAAAC4AAAAuAAAALgAAACbAAAAAAAAAAAAAAAAAAAAtAAAALgAAAC4AAAAuAAAALgAAAADAAAAAwAAAAMAAAC4AAAAuAAAALgAAAC4AAAAtAAAAAAAAAAAAAAAAAAAAJsAAAC4AAAAuAAAALgAAAADAAAAAwAAAAMAAAADAAAAAwAAALgAAAC4AAAAuAAAAJsAAAAAAAAAAAAAAAAAAABxAAAAuAAAALgAAAADAAAAAwAAAAMAAAC4AAAAAwAAAAMAAAADAAAAuAAAALgAAABxAAAAAAAAAAAAAAAAAAAAOwAAALYAAAC4AAAAXAAAAAMAAAC4AAAAuAAAALgAAAADAAAAXAAAALgAAAC2AAAAOwAAAAAAAAAAAAAAAAAAAAAAAABkAAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAuAAAALgAAAC4AAAAZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAGQAAAC2AAAAuAAAALgAAAC4AAAAuAAAALgAAAC2AAAAZAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOwAAAHEAAACbAAAAtAAAAJsAAABxAAAAOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+               </data>
+               <key>hb-queue-job</key>
+               <data>
+R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AMjIyPGxsbIlqamon////AP///wD///8A////AP///wD///8A////AP///wD///8AXV1dHmxsbE2MjIyTQkJCybCwsPyjo6P/QEBAY////wD///8A////AP///wD///8AAAAAEHFxcUZgYGCEsbGxyz4+PvqdnZ3/tLW0/y8vL/+enp7SX19fmyAgIDP///8A////AGFhYS5hYWFwV1dXu8zMzOtNTU3/eXl5/8HBwf8uLy/ne3t7qU5PTmZfX18l////AP///wD///8A////AP///wCjo6O+aWlp/1xcXP+ysrL2PT09tmhoaHsAAAAylJeXC////wD///8A////AP///wD///8A////AP///wD///8AlJSUvXd3d/9KSkr/srKy9nx8fNhVVVXOz8/P129vb91iYmLiyMjI42BgYONwcHDjxMTE44eHiKj///8A////AIqKi7hWVVT/XFtY/8XDwv9EQT//aWdm/769vf85ODf/eXd2/7S0s/8yLy3/iomI/6ampv9aWlq+////AP///wAyLy1LOkJJ/zNHV/8oMTj/OUtb/0BIT/8sLjD/PEVN/z5GTf8uNDr/N09j/zA7RP8yMS//Q0JCS////wD///8AOjMuQTE9Sf8kR2X/JEVj/yBWg/9EVWP/KjhD/y42PP9FVWP/NT1D/yZEXf8zNTj/ODQy/zY3OEH///8A////ADctI0QuS2T/NmSM/z1bdv82ZYv/RWWD/zlad/8wWHn/RGWC/z9eef88XXn/QVtx/zZBS/82LidE////AP///wA3MStEJEpr/xxXh/8eVYP/Fl2Y/ys/T/8lTG3/EmCh/x1Rff8dVYP/H1J9/xpakP8mRmH/PScVRP///wD///8AMCcgRC5GWv80ZpD/NWGH/zVkjP88WXL/Ol17/zRljv8zYoj/NWKJ/zdgg/8yaZf/L0RW/zMkGET///8A////ADEtKUIlQVr/H1F7/yJLbf8mRF3/Iklr/yZEXv8tOUL/HlB6/yVFYf8lRmL/IE50/yg+UP8zKSJC////AP///wApKCVRJjtL/x5Gaf8eR2j/HUpv/x5GaP8iQVv/KTZA/x5Haf8eSW3/HUlt/x9FZP8nOUf/KyMeUf///wAAAAAAGBkYRCoqKMIqKinFKCsrxygrLMkoKSrLJyoqyygpKcsoKirLKCsrySgrLMcpKyvFKSopwhgYGEQAAAAAAAAAAP///wD///8A////AP///wD///8AAAAAAQAAAAIAAAACAAAAAf///wD///8A////AP///wD///8AAAAAAA==
+               </data>
+               <key>hb-queue-pass1</key>
+               <data>
+R2RrUAAAAoABAQACAAAAOAAAAA4AAAALgICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/9fX5///////////////////////////////////////////////////////19fn/gICA/4CAgP/z8/j/////////////////rq6u/2hoaP+pqan///////////////////////Pz+P+AgID/gICA//Dw9v//////////////////////Xl5e/52dnf//////////////////////8PD2/4CAgP+AgID/7ezz//////////////////////9eXl7/nZ2d///////////////////////t7PP/gICA/4CAgP/q6fH//////////////////////15eXv+dnZ3//////////////////////+rp8f+AgID/gICA/+jn8P//////////////////////Xl5e/52dnf//////////////////////6Ofw/4CAgP+AgID/5eTv/////////////////3p6ev80NDT/SEhI/6SkpP/////////////////l5O//gICA/4CAgP/l5O///////////////////////////////////////////////////////+Xk7/+AgID/gICA/9/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/4CAgP8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/w==
+               </data>
+               <key>hb-queue-pass2</key>
+               <data>
+R2RrUAAAAoABAQACAAAAOAAAAA4AAAALgICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/9fX5///////////////////////////////////////////////////////19fn/gICA/4CAgP/z8/j////////////c3Nz/cnJy/19fX/94eHj/7u7u//////////////////Pz+P+AgID/gICA//Dw9v///////////////////////////zg4OP+xsbH/////////////////8PD2/4CAgP+AgID/7ezz//////////////////////+tra3/RUVF//Pz8//////////////////t7PP/gICA/4CAgP/q6fH/////////////////zc3N/0JCQv/j4+P//////////////////////+rp8f+AgID/gICA/+jn8P///////////+jo6P80NDT/xMTE////////////////////////////6Ofw/4CAgP+AgID/5eTv////////////oKCg/yAgIP8qKir/Kioq/6Kiov/////////////////l5O//gICA/4CAgP/l5O///////////////////////////////////////////////////////+Xk7/+AgID/gICA/9/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/4CAgP8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/w==
+               </data>
+               <key>hb-queue-subtitle</key>
+               <data>
+R2RrUAAAAoABAQACAAAAOAAAAA4AAAALgICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/gICA/4CAgP+AgID/9fX5///////////////////////////////////////////////////////19fn/gICA/4CAgP/z8/j/////////////////29vb/21tbf9TU1P/d3d3//////////////////Pz+P+AgID/gICA//Dw9v////////////////+UlJT/QUFB/+bm5v//////////////////////8PD2/4CAgP+AgID/7ezz/////////////////+zs7P9MTEz/Li4u/8bGxv/////////////////t7PP/gICA/4CAgP/q6fH///////////////////////X19f9xcXH/JiYm//Hx8f///////////+rp8f+AgID/gICA/+jn8P/////////////////7+/v//////+rq6v8fHx//39/f////////////6Ofw/4CAgP+AgID/5eTv/////////////////3x8fP9OTk7/TExM/3R0dP/////////////////l5O//gICA/4CAgP/l5O///////////////////////////////////////////////////////+Xk7/+AgID/gICA/9/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/9/e6v/f3ur/397q/4CAgP8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/x8fH/8fHx//Hx8f/w==
+               </data>
+               <key>hb-remove</key>
+               <data>
+R2RrUAAAEBgBAQACAAAAgAAAACAAAAAg////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAG8LTFEuy4wgLwuL7O7Ly/bvC4v9rwuL/a7Ly/bvC4vs7suMIC8LTFE/wAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7Ly9Wuy4vrdxLS//qZGT/7HJy/+t3d//reXn/63l5/+t3d//scnL/6mRk/9xLS/+7Li+tuywvVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8A////AP///wD///8A////AAAAAAAAAAAAAAAAAAAAAAC8LS0iuy0vjt1MTf3sa2v/7HV1/+5sbP/yXV3/9kxM//o/P//6Pz//9kxM//JdXf/ubGz/7HV1/+xra//dTE39uy0vjrwtLSIAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8AAAAAAAAAAAAAAAAAuiswMLotMKvnXFz/7HFx//BlZf/2SUn/+zo5//s5Ov/7OTr/+jk6//s5Of/6Ojr/+jk5//o5Of/2SEj/8GVl/+xxcf/nXFz/ui0wq7owMDAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wAAAAAAAAAAALwtLSK5LS6r6V1d/+1vb//0VVX/+Tk5//o5Of/6OTn/+jk5//o5Of/6OTn/+Tk5//k5Of/5OTn/+Tk5//k5Of/6OTn/9FVV/+1vb//pXV3/ui0uq7wtLSIAAAAAAAAAAP///wD///8A////AP///wD///8A////AAAAAAAAAAAAty0tjuZVVf/ua2v/9ExM//g4OP/5ODn/+Dk4//g4OP/4ODj/+Dg4//g5Of/4ODj/+Tg4//g4Of/4OTn/+Dk4//g5Of/5ODj/9E1M/+5ra//mVVX/uS0tjgAAAAAAAAAA////AP///wD///8A////AP///wD///8AAAAAALgsLFbZQ0P87mdo//NPT//3Nzf/9zc4//g4OP/3Nzf/9zc3//c4N//3ODj/9zg4//c4OP/3Nzj/9zg4//c3N//3Nzf/9zg4//c3N//4Nzj/809P/+5oZ//ZQ0T8uCwsVgAAAAD///8A////AP///wD///8A////AP///wD/AAABtSwuretaWv/wWFj/9jc2//Y3Nv/2Njf/9Tc3//Y3N//1Nzf/9jY3//U3N//2Njf/9jc3//Y3N//1Nzf/9jc3//Y3N//2Njf/9TY2//Y2N//2Nzf/8FhY/+taWv+3LC6t/wAAAf///wD///8A////AP///wD///8A////ALgpLUTUOzz/7mBg//M/P//0NjX/9DU2//U2Nv/0NTb/9TY1//Q1Nf/0Njb/9DY2//U2Nv/1NTb/9DY1//U2Nv/1MzP/8y8v//MqKv/zJib/8iMj//IfIP/wKir/7FhY/8w5Of+0KS1E////AP///wD///8A////AP///wD///8AsywsgOVHSP/vU1P/8zQ1//I1Nf/zNTX/8zU1//M1Nf/zNTX/8zU1//M1Nf/zNTX/8zU1//MxMf/yKir/8SQk//EeHv/xGxv/8Rsb//EbG//xGxv/8Rsb//EbG//uRET/2kJD/7MqLID///8A////AP///wD///8A////AP///wCzKSyz6k5P//BFRf/xNDT/8TQ0//E0NP/YLy//2S8v/9kvL//ZLy//2S8v/9goKP/YISD/1xsa/9cYGP/XGBj/1xgY/9cYGP/XFxj/1xgY/+8aG//vGxv/7xsb/+4yMv/jR0f/sykrs////wD///8A////AP///wD///8A////ALIqK9vtUFD/8Do6//AzM//wMzP/8DMz/9guLv/+6+v//uvr//3q6v/96ur//enp//3p6f/96en//enp//3p6f/96en//enp//3p6f/UGBj/7Bsa/+0aGv/sGhv/7SMj/+dFRv+yKivb////AP///wD///8A////AP///wD///8AsSsr9u1OTv/uNDT/7jIy/+4yMv/uMjL/1i0t//3r6//96ur//enp//3p6f/96en//enp//3p6f/96en//enp//3p6f/96en//enp/9EXF//qGhr/6Roa/+kaGv/pHBz/6UFB/7ErK/b///8A////AP///wD///8A////AP///wCwKSv27EhI/+0yMv/sMTH/7TEx/+0xMf/TJib//enp//3o6f/86On//enp//3o6f/96Oj//Onp//3o6P/96en//enp//3p6f/96ej/zxYX/+YaGf/mGhr/5hoa/+YbG//mOTr/sCkr9v///wD///8A////AP///wD///8A////AK8oKtvpPj7/6zMz/+swMP/rMDD/5ycn/8wZGf/86Oj//Ojp//zp6P/86Oj//Ojp//zo6P/86Oj//Ojp//zo6P/86Oj//Ojp//zo6f/LFhb/4hoZ/+IZGf/iGRn/4h4e/94wMf+vKSnb////AP///wD///8A////AP///wD///8ArCgps+I1Nf/pNDT/6i8v/+UlJf/fGRr/yBYW/8cWFv/HFhb/xxYW/8cWFv/HFhb/xxYW/8cWFv/HFhb/xxYW/8cWFv/HFhb/xxYW/8cWFv/eGBj/3xkZ/94ZGf/gICD/0yoq/64oKbP///8A////AP///wD///8A////AP///wCrKCiA1Sws/+k0NP/iJSX/2xkZ/9oYGP/aGBn/2hgY/9oYGP/aGBj/2hgY/9oYGP/aGBj/2hkY/9oYGf/aGBj/2hkY/9oYGP/aGBj/2hkY/9oYGP/aGBn/2hgY/9sgIP/FJif/rSgqgP///wD///8A////AP///wD///8A////AK0mKUTAJyj/4Swr/9gbG//VGBj/1hgY/9YYF//WFxj/1RgY/9YYGP/WGBj/1hgY/9YYGP/WGBj/1hgX/9YYGP/WFxj/1hcY/9UYGP/WGBj/1hgY/9YXGP/WGRn/1SAg/7YlJv+tJilE////AP///wD///8A////AP///wD///8A/wAAAaomJq3IIiP/0xka/9IXF//SFxf/0hgX/9IXF//RFxf/0hgX/9IYGP/SGBf/0hcY/9IXF//SGBf/0RgY/9IXF//SFxf/0hcX/9IXF//SFxf/0hcX/9IZGf/DISH/qyYorf8AAAH///8A////AP///wD///8A////AP///wAAAAAAqScnVrMkJPrJGxv/zRgY/80WFv/OFxf/zhcW/84XF//OFxf/zhcW/84XF//NFxb/zhcX/84XF//OFhb/zhYX/80WF//OFhf/zhYW/84XF//OGBj/yRsb/7MjJPqpJydWAAAAAP///wD///8A////AP///wD///8A////AAAAAAAAAAAAqSYojrcfIP/JGBj/yhYW/8oWFv/KFxf/yhYW/8oWFv/KFhb/yhcX/8oXFv/LFhf/yhYX/8oWFv/KFhb/yhcW/8oWFv/KFhb/yhYX/8kXF/+2HyD/qSYojgAAAAAAAAAA////AP///wD///8A////AP///wD///8AAAAAAAAAAAClJiYiqSUnq7YeHv/FFhb/xxYW/8YWFv/GFhb/xxYW/8YWFv/HFhb/xhYW/8YWFv/HFhb/xxYW/8cWFv/GFhb/xhYW/8YWFv/GFRb/tx4e/6clJaulJiYiAAAAAAAAAAD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAClJSUwpiUlq7MeIP/AGBj/wxUW/8MWFv/DFRX/wxUW/8QVFv/EFhX/wxUV/8MWFv/DFhb/wxYW/8QWFf/DFRb/vxgY/7IeH/+mJSesoSQkMQAAAAAAAAAAAAAAAP///wD///8A////AP///wD///8A////AAAAAAAAAAAAAAAAAAAAAAKQISEnoCQkk60gIfq2Gxz/vxYW/8EVFv/BFhX/wRYV/8EVFf/BFRX/wRUV/8EVFv/BFRb/vxcX/7YbHP+sISL6nCIkloAdHSwAAAAGAAAAAgAAAAAAAAAA////AP///wD///8A////AP///wD///8AAAAAAAAAAAAAAAABAAAABgAAABEAAAAefhsbcZgiI7yrISL/sR0e/7caGv+7Fxf/vhYW/74WFv+7Fxj/txoa/7EdHv+rISH/liIivnkaGnYAAAApAAAAHgAAABEAAAAGAAAAAQAAAAD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAIAAAAJAAAAGAAAACoAAAA3BAAAQV4VFXeAHR2lkB8iy5wjJOejJCb5oiQl+Z0iI+eSHyHLfxsbp1sVFXsEAABHAAAAQAAAADcAAAAqAAAAGAAAAAkAAAACAAAAAP///wD///8A////AP///wD///8A////AAAAAAAAAAAAAAAAAQAAAAYAAAARAAAAHgAAACkAAAAwAAAANgAAADoAAAA+AAAAQgAAAEQAAABEAAAARAAAAEIAAAA+AAAAOgAAADYAAAAwAAAAKQAAAB4AAAARAAAABgAAAAEAAAAA////AP///wD///8A////AP///wD///8AAAAAAAAAAAAAAAAAAAAAAgAAAAYAAAAMAAAAEQAAABQAAAAXAAAAGgAAABwAAAAeAAAAHwAAAB8AAAAfAAAAHgAAABwAAAAaAAAAFwAAABQAAAARAAAADAAAAAYAAAACAAAAAAAAAAD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAGAAAABwAAAAcAAAAIAAAACAAAAAgAAAAHAAAABwAAAAYAAAAGAAAABQAAAAQAAAACAAAAAQAAAAAAAAAAAAAAAP///wD///8A////AA==
+               </data>
+               <key>hb-source</key>
+               <data>
+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
+               </data>
+               <key>hb-stop</key>
+               <data>
+R2RrUAAAEBgBAQACAAAAgAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgUFGL41Nv++NTb/vjU2/741Nv++NTb/vjU2/741Nv++NTb/vjU2/741Nv++NTb/vjU2/xIFBRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAEBBXCNTX/+FdY//thYf/7YWH/+2Fh//thYf/7YWH/+2Fh//thYf/7YWH/+2Fh//thYf/4V1j/wjU1/xAEBBUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPBAQVwjU1//hTVP/6P0D/+jk6//o5Ov/6OTr/+jk6//o5Ov/6OTr/+jk6//o5Ov/6OTr/+jk6//o/QP/4U1T/wjU1/xAEBBUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwQEFcE0Nf/3UlP/+T8///k5Of/5OTn/+Tk6//o4Of/6OTn/+Tk5//k5Ov/6OTr/+jk6//o5Ov/5OTn/+Tk5//o/P//3UVP/wTQ1/w8EBBUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8EBBXANDT/91FS//g+P//4ODn/+Tg5//k5Of/4ODn/+Tg5//g4Of/4ODn/+Dg5//k5Of/5ODn/+Tg5//k5Of/5ODn/+Tk5//k+P//3UVL/wDQ0/w8EBBUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPBAQVvzM1//ZPT//4Pj7/+Dc5//g4OP/4ODj/9zc5//g3Of/4Nzj/9zc5//g4OP/3Nzn/+Dg5//g3OP/4Nzn/+Dg4//g3OP/4ODn/+Dg5//g+Pv/2Tk//vzM1/w8EBBUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwQEFb4zM//1TE3/9z09//c3N//3Nzf/9zY4//Y3OP/3Nzf/9jY3//Y3OP/3Nzj/9zc3//c3OP/3Nzf/9zc4//c3N//3Nzj/9zc3//c3OP/2Nzj/9jc4//c9Pf/1TU3/vjMz/w8EBBUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC4MzT/9U1N//Y8Pf/1Nzf/9Tc3//Y2N//2Njf/9jY3//Y2N//2Njf/9TY3//Y2N//2Nzf/9TY3//U2N//2Njf/9TY3//Y2N//2Njf/9jc3//U1Nf/1MDH/9Cwt//QwMP/uQkP/uDM0/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALcyM//3VFX/9TU2//U2N//1Njb/9TU2//U1Nv/0Njb/9TU2//U1Nv/0NTb/9DY2//U1Nv/0Njf/9DY2//U2Nv/0MzT/9C0u//IoKP/yIyP/8R4e//EbG//xGxv/8Rsb//M+Pv+3MjP/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtjEy//VSUv/0NTX/8zU1//M0Nf/zNTX/8zU1//M1Nv/zNTb/8zU1//Q1Nf/zNTX/9DQ1//MxMv/yKyz/8iUl//EeHv/xGxv/8Rsb//EbG//xGxv/8Rsb//EbG//xGxv/8zw8/7YxMv8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC1MTL/9E9P//I0NP/yNDT/8jQ0//I0Nf/yNDT/8jQ1//I0Nf/yNDT/8jQ0//EuL//wJyf/8B4f/+8aG//vGxv/7hsa/+8bG//vGhv/7xsb/+8bG//vGhr/7xsb/+8bG//xOTn/tTEy/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALQxMf/zTU3/8TMz//EzNP/xMzT/8TMz//EzNP/xMzP/8TQ0//AuLv/uJSX/7B0c/+waGv/tGhr/7Bob/+0bG//tGxr/7Rsa/+0bG//sGhr/7Bsb/+0bGv/sGxr/7Bob/+44OP+0MTH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsjAx//FJSf/wMzP/7zIz/+8yM//wMjP/7zIz/+8xMf/tJyf/6h4e/+kbGv/pGhr/6hob/+kaG//qGhr/6Roa/+oaGv/pGhr/6Rsb/+kaGv/pGhr/6hoa/+kbG//pGxv/7DQ0/7IwMf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACxMDD/8EdI/+4yMv/vMjL/7zIy/+8xMv/tLCz/6SIi/+YaGv/lGhr/5Roa/+YaGv/lGhr/5hoa/+YaGv/mGhr/5hoa/+YaGv/mGhr/5hoa/+YaGf/lGhr/5hoa/+UaGv/pMjL/sTAw/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAvL//vRET/7jEy/+0xMv/tMTH/6ioq/+UeH//iGhn/4hoa/+IaGf/iGhn/4hkZ/+IZGv/iGhn/4hoa/+IaGv/iGRn/4hkZ/+IaGf/hGRr/4hoa/+EaGv/iGhr/4hoa/+UwMP+wLy//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAri4v/+5CQ//sMDD/7DAw/+gpKv/hHR7/3hkZ/94aGf/dGhn/3hkZ/94ZGf/eGRr/3hkZ/90aGf/eGhn/3Roa/94ZGf/eGRn/3RkZ/90ZGf/eGRn/3hkZ/90ZGf/eGRn/4S0t/64uL/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACtLi//7T8//+swMP/nKyr/3R4f/9kZGf/aGBn/2hkZ/9oZGP/aGBn/2hkY/9oYGf/ZGRj/2hkZ/9oZGf/ZGRj/2hkY/9oYGf/aGBn/2RkZ/9oZGf/ZGRn/2RkZ/9oZGP/dKir/rS4v/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKwuLf/rPT3/6zAv/94hIv/VGBj/1RgZ/9YZGP/VGBj/1hgY/9UYGP/VGRn/1hgY/9UZGf/VGBj/1hgY/9YYGP/WGBn/1RgY/9YYGP/VGBj/1RkY/9UZGf/VGRj/1RgY/9gnJ/+sLi3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqy0t/+U1Nf/jLCz/0hkY/9EYGP/SGBj/0RcY/9IYF//RGBj/0RgY/9EYGP/RGBj/0RgY/9EYGP/RGBj/0RcY/9EYGP/RFxj/0hgX/9IYGP/RGBf/0RgY/9EYGP/SGxv/zCcn/6stLf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBAQVryws/9UqK//NGhn/zRcX/80XF//NFxj/zRcY/80YF//NFxf/zRcX/80YF//OGBf/zRcX/80YGP/NFxj/zRgY/80XF//NFxj/zRgY/84YGP/NFxj/zRoa/8gjJP+qLCz/DgQEFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBAQVqiws/8UhIf/JGRn/yhcY/8oXF//JFxf/yRcX/8kXF//JFxf/yRgX/8kXGP/KFxf/yRcX/8kXF//JFxj/yRcX/8kXF//JFxf/yRcX/8kZGf/FISH/qSws/w4EBBUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBAQVqCss/8IfIP/GGBj/xhYX/8YXF//GFxf/xhcX/8UWF//GFxb/xhcW/8YXF//FFxb/xhcX/8UXF//GFxb/xhYX/8YWFv/GGBf/wiAg/6grLP8OAwQVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAwQWpyss/78dHf/CGBf/wxcX/8IXF//DFhf/wxcW/8MXFv/DFxf/whYX/8MWF//DFxb/whcW/8MWF//CFhb/whgY/78dHv+nKyz/DgQEFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAYOBAQgpisr/70cHP/BFxf/wRYW/8AWF//AFhb/wBYW/8AWFv/AFhb/wBYX/8AWFv/AFhb/wBcW/8AYF/+9HBz/pisr/w4EBCAAAAAGAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAGAAAAEAAAAB4OAwQ6pSor/7sbG/+/GRn/vxkZ/78ZGf+/GRn/vxkZ/78ZGf+/GRn/vxkZ/78ZGf+/GRn/uxsb/6UqK/8OAwQ6AAAAHgAAABAAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAgAAAAXAAAAKgAAADYQBARRpCsq/6UpKv+kKir/pCkr/6QpK/+lKSr/pSkq/6QqKv+kKSr/pSkq/6UqKv+kKyr/EAQEUQAAADYAAAAqAAAAFwAAAAgAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAABgAAABAAAAAeAAAAKAAAAC8AAAA0AAAAOQAAAD0AAABAAAAAQwAAAEQAAABEAAAAQwAAAEAAAAA9AAAAOQAAADQAAAAvAAAAKAAAAB4AAAAQAAAABgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAABgAAAAwAAAAQAAAAFAAAABcAAAAZAAAAHAAAAB0AAAAeAAAAHwAAAB8AAAAeAAAAHQAAABwAAAAZAAAAFwAAABQAAAAQAAAADAAAAAYAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAQAAAAEAAAABQAAAAYAAAAHAAAABwAAAAgAAAAIAAAACAAAAAgAAAAHAAAABwAAAAYAAAAFAAAABAAAAAQAAAACAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+               </data>
+               <key>hb-working0</key>
+               <data>
+R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5s4x/717hP+cOcb/iBDv/4gQ7/+cOcb/vXuE/+bOMf///wD///8A////AP///wD///8A////AP///wD/zZxj/5Qp1v+AAP//gAD//4AA//+AAP//gAD//4AA//+UKdb/zZxj////AP///wD///8A////AP///wD/zZxj/4QI9/+AAP//gAD//4AA//+IEP//iBD//4AA//+AAP//gAD//4QI9//NnGP///8A////AP///wD/5s4x/5Qp1v+AAP//gAD//4AA///mzv/////////////u3v//qVL//4AA//+AAP//lCnW/+bOMf///wD///8A/717hP+AAP//iBD//+7e//+YMf//qVL//5gx//+hQv//1q3///////+pUv//gAD//4AA//+9e4T///8A////AP+cOcb/gAD//9at////////5s7//4gQ//+AAP//gAD//4AA///Wrf//7t7//4AA//+AAP//nDnG////AP///wD/iBDv/7Fj///////////////////FjP//gAD//4AA///BhP//zZz////////BhP//sWP//4gQ7////wD///8A/4gQ7/+xY///wYT////////NnP//wYT//4AA//+AAP//xYz//////////////////7Fj//+IEO////8A////AP+cOcb/gAD//4AA///u3v//1q3//4AA//+AAP//gAD//4gQ///mzv///////9at//+AAP//nDnG////AP///wD/vXuE/4AA//+AAP//qVL////////Wrf//oUL//6FC//+pUv//mDH//+7e//+IEP//gAD//717hP///wD///8A/+bOMf+UKdb/gAD//4AA//+pUv//7t7/////////////5s7//4AA//+AAP//gAD//5Qp1v/mzjH///8A////AP///wD/zZxj/4QI9/+AAP//gAD//4AA//+AAP//gAD//4AA//+AAP//gAD//4QI9//NnGP///8A////AP///wD///8A////AP/NnGP/lCnW/4AA//+AAP//gAD//4AA//+AAP//gAD//5Qp1v/NnGP///8A////AP///wD///8A////AP///wD///8A/+bOMf+9e4T/nDnG/4gQ7/+IEO//nDnG/717hP/mzjH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AA==
+               </data>
+               <key>hb-working1</key>
+               <data>
+R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5csx/79/hP+fP8b/iRLv/4kS7/+fP8b/v3+E/+XLMf///wD///8A////AP///wD///8A////AP///wD/y5hj/5Uq1v+AAP//gAD//4AA//+AAP//gAD//4AA//+VKtb/y5hj////AP///wD///8A////AP///wD/y5hj/4cO9/+AAP//iBD//6BA//+AAP//iBD//4AA//+AAP//gAD//4cO9//LmGP///8A////AP///wD/5csx/5Uq1v+IEP//v4D///fv///fv///gAD////////v3///qFD//4AA//+AAP//lSrW/+XLMf///wD///8A/79/hP+IEP//79//////////////58///4AA//+gQP//16////////+oUP//gAD//4AA//+/f4T///8A////AP+fP8b/gAD//4gQ///37/////////////+AAP//gAD//4AA///Xr///79///4AA//+AAP//nz/G////AP///wD/iRLv/4AA//+AAP///////7Bg///Pn///gAD//4AA//+AAP//oED///////+AAP//gAD//4kS7////wD///8A/4kS7/+AAP//gAD///////+gQP//gAD//4AA//+AAP//z5///7Bg////////gAD//4AA//+JEu////8A////AP+fP8b/gAD//4AA///v3///16///4AA//+AAP//gAD/////////////9+///4gQ//+AAP//nz/G////AP///wD/v3+E/4AA//+AAP//qFD////////Xr///oED//4AA///nz//////////////v3///iBD//79/hP///wD///8A/+XLMf+VKtb/gAD//4AA//+oUP//79////////+AAP//37////fv//+/gP//iBD//5Uq1v/lyzH///8A////AP///wD/y5hj/4cO9/+AAP//gAD//4AA//+AAP//gAD//6BA//+IEP//gAD//4cO9//LmGP///8A////AP///wD///8A////AP/LmGP/lSrW/4AA//+AAP//gAD//4AA//+AAP//gAD//5Uq1v/LmGP///8A////AP///wD///8A////AP///wD///8A/+XLMf+/f4T/nz/G/4kS7/+JEu//nz/G/79/hP/lyzH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AA==
+               </data>
+               <key>hb-working2</key>
+               <data>
+R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5csx/79/hP+fP8b/iRLv/4kS7/+fP8b/v3+E/+XLMf///wD///8A////AP///wD///8A////AP///wD/y5hj/5Uq1v+AAP//gAD//4AA//+AAP//gAD//4AA//+VKtb/y5hj////AP///wD///8A////AP///wD/y5hj/4cO9/+QIP//9+///9+////fwP//x4///4AA//+AAP//gAD//4cO9//LmGP///8A////AP///wD/5csx/5Uq1v+AAP//gAD//8+f/////////////8+f//+QIP//qFD//4AA//+AAP//lSrW/+XLMf///wD///8A/79/hP+AAP//gAD//6hQ//////////////////+QIP//t2////////+oUP//gAD//4AA//+/f4T///8A////AP+fP8b/gAD//4AA///v3///16///7Bg///fv///gAD//4AA///Xr///79///4AA//+AAP//nz/G////AP///wD/iRLv/4AA//+AAP///////6BA//+AAP//kCD//4AA//+AAP//oED///////+AAP//gAD//4kS7////wD///8A/4kS7/+AAP//gAD///////+gQP//gAD//4AA//+QIP//gAD//6BA////////gAD//4AA//+JEu////8A////AP+fP8b/gAD//4AA///v3///16///4AA//+AAP//37///7Bg///Xr///79///4AA//+AAP//nz/G////AP///wD/v3+E/4AA//+AAP//qFD///////+3b///kCD//////////////////6hQ//+AAP//gAD//79/hP///wD///8A/+XLMf+VKtb/gAD//4AA//+oUP//kCD//8+f/////////////8+f//+AAP//gAD//5Uq1v/lyzH///8A////AP///wD/y5hj/4cO9/+AAP//gAD//4AA///Hj///38D//9+////v3///kCD//4cO9//LmGP///8A////AP///wD///8A////AP/LmGP/lSrW/4AA//+AAP//gAD//4AA//+AAP//gAD//5Uq1v/LmGP///8A////AP///wD///8A////AP///wD///8A/+XLMf+/f4T/nz/G/4kS7/+JEu//nz/G/79/hP/lyzH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AA==
+               </data>
+               <key>hb-working3</key>
+               <data>
+R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5csx/79/hP+fP8b/iRLv/4kS7/+fP8b/v3+E/+XLMf///wD///8A////AP///wD///8A////AP///wD/y5hj/5Uq1v+AAP//gAD//7Bg//+wYP//gAD//4AA//+VKtb/y5hj////AP///wD///8A////AP///wD/y5hj/4cO9/+AAP//gAD//4AA//+/gP///////9ev//+IEP//gAD//4cO9//LmGP///8A////AP///wD/5csx/5Uq1v+AAP//gAD//6hQ///v3///////////////////79///4AA//+AAP//lSrW/+XLMf///wD///8A/79/hP+AAP//gAD//6hQ////////16///8+f////////58///5gw//+AAP//gAD//4AA//+/f4T///8A////AP+fP8b/gAD//4AA///v3///16///4AA//+/gP//x4///4gQ//+oUP//58///4AA//+AAP//nz/G////AP///wD/iRLv/4AA//+AAP///////6BA//+AAP//gAD//4AA//+AAP//oED///////+AAP//gAD//4kS7////wD///8A/4kS7/+AAP//gAD///////+gQP//gAD//4AA//+AAP//gAD//6BA////////gAD//4AA//+JEu////8A////AP+fP8b/gAD//4AA///nz///qFD//4gQ///Hj///v4D//4AA///Xr///79///4AA//+AAP//nz/G////AP///wD/v3+E/4AA//+AAP//gAD//5gw///nz////////8+f///Xr////////6hQ//+AAP//gAD//79/hP///wD///8A/+XLMf+VKtb/gAD//4AA///v3///////////////////79///6hQ//+AAP//gAD//5Uq1v/lyzH///8A////AP///wD/y5hj/4cO9/+AAP//iBD//9ev////////v4D//4AA//+AAP//gAD//4cO9//LmGP///8A////AP///wD///8A////AP/LmGP/lSrW/4AA//+AAP//sGD//7Bg//+AAP//gAD//5Uq1v/LmGP///8A////AP///wD///8A////AP///wD///8A/+XLMf+/f4T/nz/G/4kS7/+JEu//nz/G/79/hP/lyzH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AA==
+               </data>
+               <key>hb-working4</key>
+               <data>
+R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5csx/79/hP+fP8b/iRLv/4kS7/+fP8b/v3+E/+XLMf///wD///8A////AP///wD///8A////AP///wD/y5hj/5Uq1v+AAP//gAD//4AA//+AAP//gAD//4gQ//+VKtb/y5hj////AP///wD///8A////AP///wD/y5hj/4cO9/+AAP//gAD//4AA//+AAP//iBD//4gQ///v3///iBD//4cO9//LmGP///8A////AP///wD/5csx/5Uq1v+AAP//gAD//6hQ///v3//////////////37////////7+A//+AAP//lSrW/+XLMf///wD///8A/79/hP+AAP//gAD//6hQ////////16///5gw//+wYP/////////////37///iBD//4AA//+/f4T///8A////AP+fP8b/gAD//4AA///v3///16///4AA//+AAP//z5/////////nz///37///6hQ//+AAP//nz/G////AP///wD/iRLv/4AA//+AAP///////6BA//+AAP//gAD//4AA//+AAP//gAD//4AA//+AAP//gAD//4kS7////wD///8A/4kS7/+AAP//gAD//4AA//+AAP//gAD//4AA//+AAP//gAD//6BA////////gAD//4AA//+JEu////8A////AP+fP8b/gAD//6BA///fv///58/////////Pn///gAD//4AA///Xr///79///4AA//+AAP//nz/G////AP///wD/v3+E/4AA//+IEP//9+//////////////sGD//6BA///Xr////////6hQ//+AAP//gAD//79/hP///wD///8A/+XLMf+VKtb/gAD//7+A////////9+//////////////79///6hQ//+AAP//gAD//5Uq1v/lyzH///8A////AP///wD/y5hj/4cO9/+IEP//79///4gQ//+AAP//gAD//4AA//+AAP//gAD//4cO9//LmGP///8A////AP///wD///8A////AP/LmGP/lSrW/4gQ//+AAP//gAD//4AA//+AAP//gAD//5Uq1v/LmGP///8A////AP///wD///8A////AP///wD///8A/+XLMf+/f4T/nz/G/4kS7/+JEu//nz/G/79/hP/lyzH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AA==
+               </data>
+               <key>hb-working5</key>
+               <data>
+R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/5csx/79/hP+fP8b/iRLv/4kS7/+fP8b/v3+E/+XLMf///wD///8A////AP///wD///8A////AP///wD/y5hj/5Uq1v+AAP//gAD//4AA//+AAP//gAD//4AA//+VKtb/y5hj////AP///wD///8A////AP///wD/y5hj/4cO9/+AAP//gAD//4AA//+AAP//iBD//4AA//+AAP//gAD//4cO9//LmGP///8A////AP///wD/5csx/5Uq1v+AAP//gAD//6hQ///v3//////////////v3///qFD//4AA//+QIP//lSrW/+XLMf///wD///8A/79/hP+AAP//gAD//6hQ////////16///5gw//+gQP//16/////////Pn///9+///4AA//+/f4T///8A////AP+fP8b/gAD//4AA//+QIP//t2///4AA//+AAP//gAD//7Bg/////////////9+///+AAP//nz/G////AP///wD/iRLv/4AA///Hj///z5///5Ag//+AAP//gAD//5Ag///fv//////////////fwP//gAD//4kS7////wD///8A/4kS7/+AAP//38D/////////////37///5Ag//+AAP//gAD//5Ag///Pn///x4///4AA//+JEu////8A////AP+fP8b/gAD//9+//////////////7Bg//+AAP//gAD//4AA//+3b///kCD//4AA//+AAP//nz/G////AP///wD/v3+E/4AA///37///z5/////////Xr///oED//6BA///Xr////////6hQ//+AAP//gAD//79/hP///wD///8A/+XLMf+VKtb/kCD//4AA//+oUP//79//////////////79///6hQ//+AAP//gAD//5Uq1v/lyzH///8A////AP///wD/y5hj/4cO9/+AAP//gAD//4AA//+AAP//gAD//4AA//+AAP//gAD//4cO9//LmGP///8A////AP///wD///8A////AP/LmGP/lSrW/4AA//+AAP//gAD//4AA//+AAP//gAD//5Uq1v/LmGP///8A////AP///wD///8A////AP///wD///8A/+XLMf+/f4T/nz/G/4kS7/+JEu//nz/G/79/hP/lyzH///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AA==
+               </data>
+       </dict>
+       <key>internal-defaults</key>
+       <dict>
+               <key>Initialization</key>
+               <dict>
+                       <key>anamorphic</key>
+                       <true />
+                       <key>audio_list</key>
+                       <array>
+                       </array>
+                       <key>autoscale</key>
+                       <false />
+                       <key>end_chapter</key>
+                       <integer>100</integer>
+                       <key>folder</key>
+                       <string></string>
+                       <key>preset</key>
+                       <array>
+                               <string>Normal</string>
+                       </array>
+                       <key>preset_selection</key>
+                       <array>
+                               <string>Normal</string>
+                       </array>
+                       <key>preset_type_folder</key>
+                       <false />
+                       <key>preset_type_normal</key>
+                       <true />
+                       <key>scale_height</key>
+                       <integer>0</integer>
+                       <key>scale_width</key>
+                       <integer>0</integer>
+                       <key>start_chapter</key>
+                       <integer>1</integer>
+                       <key>title</key>
+                       <string>none</string>
+                       <key>tweak_PictureDecomb</key>
+                       <string></string>
+                       <key>tweak_PictureDetelecine</key>
+                       <string></string>
+                       <key>volume_label</key>
+                       <string>New Video</string>
+                       <key>vquality_type_bitrate</key>
+                       <false />
+                       <key>vquality_type_constant</key>
+                       <false />
+                       <key>vquality_type_target</key>
+                       <false />
+                       <key>x264_8x8dct</key>
+                       <false />
+                       <key>x264_analyse</key>
+                       <string>some</string>
+                       <key>x264_bframes</key>
+                       <integer>0</integer>
+                       <key>x264_bpyramid</key>
+                       <false />
+                       <key>x264_cabac</key>
+                       <true />
+                       <key>x264_deblock_alpha</key>
+                       <integer>0</integer>
+                       <key>x264_deblock_beta</key>
+                       <integer>0</integer>
+                       <key>x264_direct</key>
+                       <string>spatial</string>
+                       <key>x264_me</key>
+                       <string>hex</string>
+                       <key>x264_merange</key>
+                       <integer>16</integer>
+                       <key>x264_mixed_refs</key>
+                       <false />
+                       <key>x264_no_dct_decimate</key>
+                       <false />
+                       <key>x264_no_fast_pskip</key>
+                       <false />
+                       <key>x264_refs</key>
+                       <integer>1</integer>
+                       <key>x264_subme</key>
+                       <integer>6</integer>
+                       <key>x264_trellis</key>
+                       <integer>0</integer>
+                       <key>x264_weighted_bframes</key>
+                       <false />
+               </dict>
+               <key>Preferences</key>
+               <dict>
+                       <key>EncodeLogLocation</key>
+                       <false />
+                       <key>allow_tweaks</key>
+                       <false />
+                       <key>chapters_in_destination</key>
+                       <false />
+                       <key>default_source</key>
+                       <string>/dev/dvd</string>
+                       <key>destination_dir</key>
+                       <string></string>
+                       <key>hbfd</key>
+                       <false />
+                       <key>hbfd_feature</key>
+                       <false />
+                       <key>nocheckvquality</key>
+                       <false />
+                       <key>noscale</key>
+                       <false />
+                       <key>reduce_hd_preview</key>
+                       <true />
+                       <key>show_presets</key>
+                       <true />
+                       <key>update_skip_version</key>
+                       <integer>0</integer>
+                       <key>use_source_name</key>
+                       <true />
+                       <key>version</key>
+                       <string>0.1</string>
+               </dict>
+               <key>Presets</key>
+               <dict>
+                       <key>AudioList</key>
+                       <array>
+                               <dict>
+                                       <key>AudioBitrate</key>
+                                       <string>192</string>
+                                       <key>AudioEncoder</key>
+                                       <string>ac3</string>
+                                       <key>AudioMixdown</key>
+                                       <string>dpl2</string>
+                                       <key>AudioSamplerate</key>
+                                       <string>source</string>
+                                       <key>AudioTrack</key>
+                                       <integer>1</integer>
+                                       <key>AudioTrackDRCSlider</key>
+                                       <real>1</real>
+                                       <key>AudioTrackDescription</key>
+                                       <string></string>
+                               </dict>
+                       </array>
+                       <key>ChapterMarkers</key>
+                       <true />
+                       <key>Default</key>
+                       <false />
+                       <key>FileFormat</key>
+                       <string>mp4</string>
+                       <key>Folder</key>
+                       <false />
+                       <key>ModDimensions</key>
+                       <true />
+                       <key>Mp4HttpOptimize</key>
+                       <false />
+                       <key>Mp4LargeFile</key>
+                       <false />
+                       <key>Mp4iPodCompatible</key>
+                       <false />
+                       <key>PictureAutoCrop</key>
+                       <true />
+                       <key>PictureBottomCrop</key>
+                       <integer>0</integer>
+                       <key>PictureDeblock</key>
+                       <integer>0</integer>
+                       <key>PictureDecomb</key>
+                       <false />
+                       <key>PictureDeinterlace</key>
+                       <string>none</string>
+                       <key>PictureDenoise</key>
+                       <string>none</string>
+                       <key>PictureDetelecine</key>
+                       <true />
+                       <key>PictureHeight</key>
+                       <integer>0</integer>
+                       <key>PictureKeepRatio</key>
+                       <true />
+                       <key>PictureLeftCrop</key>
+                       <integer>0</integer>
+                       <key>PicturePAR</key>
+                       <integer>2</integer>
+                       <key>PictureRightCrop</key>
+                       <integer>0</integer>
+                       <key>PictureTopCrop</key>
+                       <integer>0</integer>
+                       <key>PictureWidth</key>
+                       <integer>0</integer>
+                       <key>PresetDescription</key>
+                       <string></string>
+                       <key>PresetName</key>
+                       <string>Name Missing</string>
+                       <key>SourceAudioLang</key>
+                       <string>und</string>
+                       <key>Subtitles</key>
+                       <string>none</string>
+                       <key>SubtitlesForced</key>
+                       <true />
+                       <key>Type</key>
+                       <integer>1</integer>
+                       <key>UsesMaxPictureSettings</key>
+                       <false />
+                       <key>UsesPictureFilters</key>
+                       <true />
+                       <key>UsesPictureSettings</key>
+                       <integer>2</integer>
+                       <key>VideoAvgBitrate</key>
+                       <integer>1800</integer>
+                       <key>VideoEncoder</key>
+                       <string>x264</string>
+                       <key>VideoFramerate</key>
+                       <string>source</string>
+                       <key>VideoGrayScale</key>
+                       <false />
+                       <key>VideoQualitySlider</key>
+                       <real>0.59999999999999998</real>
+                       <key>VideoQualityType</key>
+                       <integer>2</integer>
+                       <key>VideoTargetSize</key>
+                       <integer>700</integer>
+                       <key>VideoTurboTwoPass</key>
+                       <false />
+                       <key>VideoTwoPass</key>
+                       <false />
+                       <key>constant_rate_factor</key>
+                       <true />
+                       <key>directqp</key>
+                       <false />
+                       <key>x264Option</key>
+                       <string></string>
+               </dict>
+               <key>XlatPresets</key>
+               <dict>
+                       <key>anamorphic</key>
+                       <true />
+                       <key>autoscale</key>
+                       <false />
+                       <key>vquality_type_bitrate</key>
+                       <false />
+                       <key>vquality_type_constant</key>
+                       <false />
+                       <key>vquality_type_target</key>
+                       <false />
+               </dict>
+       </dict>
+       <key>standard-presets</key>
+       <array>
+               <dict>
+                       <key>ChildrenArray</key>
+                       <array>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>48</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AC3 Passthru</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>AC3 Passthru</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>Auto</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <true />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MP4 file</string>
+                                       <key>Folder</key>
+                                       <false />
+                                       <key>Mp4LargeFile</key>
+                                       <false />
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <false />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>2</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>720</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s universally compatible, full resolution settings for all current Apple devices: iPod, iPhone, AppleTV, and Macs</string>
+                                       <key>PresetName</key>
+                                       <string>Universal</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>2500</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.5899999737739563</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>2</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTwoPass</key>
+                                       <false />
+                                       <key>x264Option</key>
+                                       <string>level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1</string>
+                               </dict>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>48</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <true />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MP4 file</string>
+                                       <key>Mp4iPodCompatible</key>
+                                       <true />
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <true />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>0</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>320</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s low resolution settings for the iPod. Optimized for great playback on the iPod screen, with smaller file size.</string>
+                                       <key>PresetName</key>
+                                       <string>iPod</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <false />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>700</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.64709997177124023</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>1</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTwoPass</key>
+                                       <false />
+                                       <key>x264Option</key>
+                                       <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string>
+                               </dict>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>128</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>48</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <true />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MP4 file</string>
+                                       <key>Mp4iPodCompatible</key>
+                                       <false />
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <true />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>0</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>480</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s settings for the iPhone and iPod Touch.</string>
+                                       <key>PresetName</key>
+                                       <string>iPhone &amp; iPod Touch</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <false />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>960</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.5899999737739563</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>2</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTwoPass</key>
+                                       <false />
+                                       <key>x264Option</key>
+                                       <string>level=30:cabac=0:ref=2:mixed-refs:analyse=all:me=umh:no-fast-pskip=1</string>
+                               </dict>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>48</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AC3 Passthru</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>AC3 Passthru</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>Auto</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <true />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MP4 file</string>
+                                       <key>Folder</key>
+                                       <false />
+                                       <key>Mp4LargeFile</key>
+                                       <true />
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <false />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>2</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>960</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance.</string>
+                                       <key>PresetName</key>
+                                       <string>AppleTV</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>2500</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.5899999737739563</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>2</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTwoPass</key>
+                                       <false />
+                                       <key>x264Option</key>
+                                       <string>level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all</string>
+                               </dict>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>Auto</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <true />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MP4 file</string>
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <false />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>1</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>0</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s high profile settings for use with QuickTime. It can be slow, so use it when the Normal preset doesn&apos;t look good enough.</string>
+                                       <key>PresetName</key>
+                                       <string>QuickTime</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <true />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>1800</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.64709997177124023</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>1</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTurboTwoPass</key>
+                                       <true />
+                                       <key>VideoTwoPass</key>
+                                       <true />
+                                       <key>x264Option</key>
+                                       <string>ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1</string>
+                               </dict>
+                               <dict>
+                                       <key>ChildrenArray</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioList</key>
+                                                       <array>
+                                                               <dict>
+                                                                       <key>AudioBitrate</key>
+                                                                       <string>160</string>
+                                                                       <key>AudioEncoder</key>
+                                                                       <string>AAC (faac)</string>
+                                                                       <key>AudioMixdown</key>
+                                                                       <string>Dolby Pro Logic II</string>
+                                                                       <key>AudioSamplerate</key>
+                                                                       <string>48</string>
+                                                                       <key>AudioTrack</key>
+                                                                       <integer>1</integer>
+                                                                       <key>AudioTrackDRCSlider</key>
+                                                                       <real>1</real>
+                                                                       <key>AudioTrackDescription</key>
+                                                                       <string></string>
+                                                               </dict>
+                                                               <dict>
+                                                                       <key>AudioBitrate</key>
+                                                                       <string>160</string>
+                                                                       <key>AudioEncoder</key>
+                                                                       <string>AC3 Passthru</string>
+                                                                       <key>AudioMixdown</key>
+                                                                       <string>AC3 Passthru</string>
+                                                                       <key>AudioSamplerate</key>
+                                                                       <string>Auto</string>
+                                                                       <key>AudioTrack</key>
+                                                                       <integer>1</integer>
+                                                                       <key>AudioTrackDRCSlider</key>
+                                                                       <real>1</real>
+                                                                       <key>AudioTrackDescription</key>
+                                                                       <string></string>
+                                                               </dict>
+                                                       </array>
+                                                       <key>ChapterMarkers</key>
+                                                       <true />
+                                                       <key>Default</key>
+                                                       <false />
+                                                       <key>FileFormat</key>
+                                                       <string>MP4 file</string>
+                                                       <key>Mp4LargeFile</key>
+                                                       <true />
+                                                       <key>PictureBottomCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureDeblock</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureDeinterlace</key>
+                                                       <string>0</string>
+                                                       <key>PictureDenoise</key>
+                                                       <string>0</string>
+                                                       <key>PictureDetelecine</key>
+                                                       <false />
+                                                       <key>PictureHeight</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureKeepRatio</key>
+                                                       <false />
+                                                       <key>PictureLeftCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PicturePAR</key>
+                                                       <integer>1</integer>
+                                                       <key>PictureRightCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureTopCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureWidth</key>
+                                                       <integer>0</integer>
+                                                       <key>PresetDescription</key>
+                                                       <string>HandBrake&apos;s deprecated settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance. This is the AppleTV preset from HandBrake 0.9.2, and while it is offered as a service to legacy users, it is no longer supported.</string>
+                                                       <key>PresetName</key>
+                                                       <string>AppleTV Legacy</string>
+                                                       <key>Subtitles</key>
+                                                       <string>None</string>
+                                                       <key>Type</key>
+                                                       <integer>0</integer>
+                                                       <key>UsesMaxPictureSettings</key>
+                                                       <true />
+                                                       <key>UsesPictureFilters</key>
+                                                       <true />
+                                                       <key>UsesPictureSettings</key>
+                                                       <integer>1</integer>
+                                                       <key>VideoAvgBitrate</key>
+                                                       <integer>2500</integer>
+                                                       <key>VideoEncoder</key>
+                                                       <string>H.264 (x264)</string>
+                                                       <key>VideoFramerate</key>
+                                                       <string>Same as source</string>
+                                                       <key>VideoGrayScale</key>
+                                                       <false />
+                                                       <key>VideoQualitySlider</key>
+                                                       <real>0.64709997177124023</real>
+                                                       <key>VideoQualityType</key>
+                                                       <integer>1</integer>
+                                                       <key>VideoTargetSize</key>
+                                                       <integer>700</integer>
+                                                       <key>VideoTwoPass</key>
+                                                       <false />
+                                                       <key>x264Option</key>
+                                                       <string>bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:trellis=1:cabac=0</string>
+                                               </dict>
+                                               <dict>
+                                                       <key>AudioList</key>
+                                                       <array>
+                                                               <dict>
+                                                                       <key>AudioBitrate</key>
+                                                                       <string>128</string>
+                                                                       <key>AudioEncoder</key>
+                                                                       <string>AAC (faac)</string>
+                                                                       <key>AudioMixdown</key>
+                                                                       <string>Dolby Pro Logic II</string>
+                                                                       <key>AudioSamplerate</key>
+                                                                       <string>48</string>
+                                                                       <key>AudioTrack</key>
+                                                                       <integer>1</integer>
+                                                                       <key>AudioTrackDRCSlider</key>
+                                                                       <real>1</real>
+                                                                       <key>AudioTrackDescription</key>
+                                                                       <string></string>
+                                                               </dict>
+                                                       </array>
+                                                       <key>ChapterMarkers</key>
+                                                       <true />
+                                                       <key>Default</key>
+                                                       <false />
+                                                       <key>FileFormat</key>
+                                                       <string>MP4 file</string>
+                                                       <key>Mp4iPodCompatible</key>
+                                                       <true />
+                                                       <key>PictureAutoCrop</key>
+                                                       <true />
+                                                       <key>PictureBottomCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureDeblock</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureDeinterlace</key>
+                                                       <string>0</string>
+                                                       <key>PictureDenoise</key>
+                                                       <string>0</string>
+                                                       <key>PictureDetelecine</key>
+                                                       <false />
+                                                       <key>PictureHeight</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureKeepRatio</key>
+                                                       <true />
+                                                       <key>PictureLeftCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PicturePAR</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureRightCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureTopCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureWidth</key>
+                                                       <integer>480</integer>
+                                                       <key>PresetDescription</key>
+                                                       <string>HandBrake&apos;s deprecated settings for the iPhone and iPod Touch. This is the iPhone preset from HandBrake 0.9.2, and while it is offered as a service to legacy users, it is no longer supported.</string>
+                                                       <key>PresetName</key>
+                                                       <string>iPhone Legacy</string>
+                                                       <key>Subtitles</key>
+                                                       <string>None</string>
+                                                       <key>Type</key>
+                                                       <integer>0</integer>
+                                                       <key>UsesMaxPictureSettings</key>
+                                                       <false />
+                                                       <key>UsesPictureFilters</key>
+                                                       <true />
+                                                       <key>UsesPictureSettings</key>
+                                                       <integer>1</integer>
+                                                       <key>VideoAvgBitrate</key>
+                                                       <integer>960</integer>
+                                                       <key>VideoEncoder</key>
+                                                       <string>H.264 (x264)</string>
+                                                       <key>VideoFramerate</key>
+                                                       <string>Same as source</string>
+                                                       <key>VideoGrayScale</key>
+                                                       <false />
+                                                       <key>VideoQualitySlider</key>
+                                                       <real>0.64709997177124023</real>
+                                                       <key>VideoQualityType</key>
+                                                       <integer>1</integer>
+                                                       <key>VideoTargetSize</key>
+                                                       <integer>700</integer>
+                                                       <key>VideoTwoPass</key>
+                                                       <false />
+                                                       <key>x264Option</key>
+                                                       <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1</string>
+                                               </dict>
+                                               <dict>
+                                                       <key>AudioList</key>
+                                                       <array>
+                                                               <dict>
+                                                                       <key>AudioBitrate</key>
+                                                                       <string>160</string>
+                                                                       <key>AudioEncoder</key>
+                                                                       <string>AAC (faac)</string>
+                                                                       <key>AudioMixdown</key>
+                                                                       <string>Dolby Pro Logic II</string>
+                                                                       <key>AudioSamplerate</key>
+                                                                       <string>48</string>
+                                                                       <key>AudioTrack</key>
+                                                                       <integer>1</integer>
+                                                                       <key>AudioTrackDRCSlider</key>
+                                                                       <real>1</real>
+                                                                       <key>AudioTrackDescription</key>
+                                                                       <string></string>
+                                                               </dict>
+                                                       </array>
+                                                       <key>ChapterMarkers</key>
+                                                       <true />
+                                                       <key>Default</key>
+                                                       <false />
+                                                       <key>FileFormat</key>
+                                                       <string>MP4 file</string>
+                                                       <key>Mp4iPodCompatible</key>
+                                                       <true />
+                                                       <key>PictureAutoCrop</key>
+                                                       <true />
+                                                       <key>PictureBottomCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureDeblock</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureDeinterlace</key>
+                                                       <string>0</string>
+                                                       <key>PictureDenoise</key>
+                                                       <string>0</string>
+                                                       <key>PictureDetelecine</key>
+                                                       <false />
+                                                       <key>PictureHeight</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureKeepRatio</key>
+                                                       <true />
+                                                       <key>PictureLeftCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PicturePAR</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureRightCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureTopCrop</key>
+                                                       <integer>0</integer>
+                                                       <key>PictureWidth</key>
+                                                       <integer>640</integer>
+                                                       <key>PresetDescription</key>
+                                                       <string>HandBrake&apos;s high resolution settings for older 5 and 5.5G iPods. Good video quality, great for viewing on a TV using your iPod. This is the iPod High-Rez preset from 0.9.2.</string>
+                                                       <key>PresetName</key>
+                                                       <string>iPod Legacy</string>
+                                                       <key>Subtitles</key>
+                                                       <string>None</string>
+                                                       <key>Type</key>
+                                                       <integer>0</integer>
+                                                       <key>UsesMaxPictureSettings</key>
+                                                       <false />
+                                                       <key>UsesPictureFilters</key>
+                                                       <true />
+                                                       <key>UsesPictureSettings</key>
+                                                       <integer>1</integer>
+                                                       <key>VideoAvgBitrate</key>
+                                                       <integer>1500</integer>
+                                                       <key>VideoEncoder</key>
+                                                       <string>H.264 (x264)</string>
+                                                       <key>VideoFramerate</key>
+                                                       <string>Same as source</string>
+                                                       <key>VideoGrayScale</key>
+                                                       <false />
+                                                       <key>VideoQualitySlider</key>
+                                                       <real>0.64709997177124023</real>
+                                                       <key>VideoQualityType</key>
+                                                       <integer>1</integer>
+                                                       <key>VideoTargetSize</key>
+                                                       <integer>700</integer>
+                                                       <key>VideoTwoPass</key>
+                                                       <false />
+                                                       <key>x264Option</key>
+                                                       <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string>
+                                               </dict>
+                                       </array>
+                                       <key>Folder</key>
+                                       <true />
+                                       <key>PresetName</key>
+                                       <string>Legacy</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                               </dict>
+                       </array>
+                       <key>Folder</key>
+                       <true />
+                       <key>PresetName</key>
+                       <string>Apple</string>
+                       <key>Type</key>
+                       <integer>0</integer>
+               </dict>
+               <dict>
+                       <key>ChildrenArray</key>
+                       <array>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>Auto</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <true />
+                                       <key>Default</key>
+                                       <true />
+                                       <key>FileFormat</key>
+                                       <string>MP4 file</string>
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <false />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>1</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>0</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s normal, default settings.</string>
+                                       <key>PresetName</key>
+                                       <string>Normal</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <true />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>1500</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.64709997177124023</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>1</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTurboTwoPass</key>
+                                       <true />
+                                       <key>VideoTwoPass</key>
+                                       <true />
+                                       <key>x264Option</key>
+                                       <string>ref=2:bframes=2:me=umh</string>
+                               </dict>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>Auto</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <false />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MP4 file</string>
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <true />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>0</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>0</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s traditional, faster, lower-quality settings.</string>
+                                       <key>PresetName</key>
+                                       <string>Classic</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <true />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>1000</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>MPEG-4 (FFmpeg)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.64709997177124023</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>1</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTwoPass</key>
+                                       <false />
+                                       <key>x264Option</key>
+                                       <string></string>
+                               </dict>
+                       </array>
+                       <key>Folder</key>
+                       <true />
+                       <key>PresetName</key>
+                       <string>Basic</string>
+                       <key>Type</key>
+                       <integer>0</integer>
+               </dict>
+               <dict>
+                       <key>ChildrenArray</key>
+                       <array>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>Auto</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <true />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MKV file</string>
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDecomb</key>
+                                       <true />
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <true />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <false />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>1</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>0</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s settings for cartoons, anime, and CGI.</string>
+                                       <key>PresetName</key>
+                                       <string>Animation</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <true />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>1000</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.64709997177124023</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>1</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTurboTwoPass</key>
+                                       <true />
+                                       <key>VideoTwoPass</key>
+                                       <true />
+                                       <key>x264Option</key>
+                                       <string>ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-rd=1,1:subme=9</string>
+                               </dict>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AC3 Passthru</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>AC3 Passthru</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>Auto</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <true />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MKV file</string>
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <false />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>1</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>0</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates.</string>
+                                       <key>PresetName</key>
+                                       <string>Constant Quality Rate</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <true />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>2000</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.60000002384185791</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>2</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTurboTwoPass</key>
+                                       <false />
+                                       <key>VideoTwoPass</key>
+                                       <false />
+                                       <key>x264Option</key>
+                                       <string>ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1</string>
+                               </dict>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AC3 Passthru</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>AC3 Passthru</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>Auto</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <true />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MKV file</string>
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <false />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>1</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>0</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s preset for feature films.</string>
+                                       <key>PresetName</key>
+                                       <string>Film</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <true />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>1800</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.64709997177124023</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>1</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTurboTwoPass</key>
+                                       <true />
+                                       <key>VideoTwoPass</key>
+                                       <true />
+                                       <key>x264Option</key>
+                                       <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1</string>
+                               </dict>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>Auto</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <true />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MKV file</string>
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDecomb</key>
+                                       <true />
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <true />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <false />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>1</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>0</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s settings for video from television.</string>
+                                       <key>PresetName</key>
+                                       <string>Television</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <true />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>1300</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.64709997177124023</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>1</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTurboTwoPass</key>
+                                       <true />
+                                       <key>VideoTwoPass</key>
+                                       <true />
+                                       <key>x264Option</key>
+                                       <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-rd=1,1</string>
+                               </dict>
+                       </array>
+                       <key>Folder</key>
+                       <true />
+                       <key>PresetName</key>
+                       <string>High Profile</string>
+                       <key>Type</key>
+                       <integer>0</integer>
+               </dict>
+               <dict>
+                       <key>ChildrenArray</key>
+                       <array>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>128</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>48</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <true />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MP4 file</string>
+                                       <key>PictureAutoCrop</key>
+                                       <true />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>208</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <true />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>0</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>368</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s settings for the Sony PlayStation Portable.</string>
+                                       <key>PresetName</key>
+                                       <string>PSP</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <false />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>1024</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>MPEG-4 (FFmpeg)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.64709997177124023</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>1</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTwoPass</key>
+                                       <false />
+                                       <key>x264Option</key>
+                                       <string></string>
+                               </dict>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>48</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <false />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MP4 file</string>
+                                       <key>PictureAutoCrop</key>
+                                       <false />
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <false />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>1</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>0</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s settings for the Sony PlayStation 3.</string>
+                                       <key>PresetName</key>
+                                       <string>PS3</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <true />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>2500</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.64709997177124023</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>1</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTwoPass</key>
+                                       <false />
+                                       <key>x264Option</key>
+                                       <string>level=41:me=umh</string>
+                               </dict>
+                               <dict>
+                                       <key>AudioList</key>
+                                       <array>
+                                               <dict>
+                                                       <key>AudioBitrate</key>
+                                                       <string>160</string>
+                                                       <key>AudioEncoder</key>
+                                                       <string>AAC (faac)</string>
+                                                       <key>AudioMixdown</key>
+                                                       <string>Dolby Pro Logic II</string>
+                                                       <key>AudioSamplerate</key>
+                                                       <string>48</string>
+                                                       <key>AudioTrack</key>
+                                                       <integer>1</integer>
+                                                       <key>AudioTrackDRCSlider</key>
+                                                       <real>1</real>
+                                                       <key>AudioTrackDescription</key>
+                                                       <string></string>
+                                               </dict>
+                                       </array>
+                                       <key>ChapterMarkers</key>
+                                       <false />
+                                       <key>Default</key>
+                                       <false />
+                                       <key>FileFormat</key>
+                                       <string>MP4 file</string>
+                                       <key>PictureBottomCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeblock</key>
+                                       <integer>0</integer>
+                                       <key>PictureDeinterlace</key>
+                                       <string>0</string>
+                                       <key>PictureDenoise</key>
+                                       <string>0</string>
+                                       <key>PictureDetelecine</key>
+                                       <false />
+                                       <key>PictureHeight</key>
+                                       <integer>0</integer>
+                                       <key>PictureKeepRatio</key>
+                                       <false />
+                                       <key>PictureLeftCrop</key>
+                                       <integer>0</integer>
+                                       <key>PicturePAR</key>
+                                       <integer>1</integer>
+                                       <key>PictureRightCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureTopCrop</key>
+                                       <integer>0</integer>
+                                       <key>PictureWidth</key>
+                                       <integer>0</integer>
+                                       <key>PresetDescription</key>
+                                       <string>HandBrake&apos;s settings for the Microsoft Xbox 360.</string>
+                                       <key>PresetName</key>
+                                       <string>Xbox 360</string>
+                                       <key>Subtitles</key>
+                                       <string>None</string>
+                                       <key>Type</key>
+                                       <integer>0</integer>
+                                       <key>UsesMaxPictureSettings</key>
+                                       <true />
+                                       <key>UsesPictureFilters</key>
+                                       <true />
+                                       <key>UsesPictureSettings</key>
+                                       <integer>1</integer>
+                                       <key>VideoAvgBitrate</key>
+                                       <integer>2000</integer>
+                                       <key>VideoEncoder</key>
+                                       <string>H.264 (x264)</string>
+                                       <key>VideoFramerate</key>
+                                       <string>Same as source</string>
+                                       <key>VideoGrayScale</key>
+                                       <false />
+                                       <key>VideoQualitySlider</key>
+                                       <real>0.64709997177124023</real>
+                                       <key>VideoQualityType</key>
+                                       <integer>1</integer>
+                                       <key>VideoTargetSize</key>
+                                       <integer>700</integer>
+                                       <key>VideoTwoPass</key>
+                                       <false />
+                                       <key>x264Option</key>
+                                       <string>level=40:ref=2:mixed-refs:bframes=3:weightb:subme=9:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string>
+                               </dict>
+                       </array>
+                       <key>Folder</key>
+                       <true />
+                       <key>PresetName</key>
+                       <string>Gaming Consoles</string>
+                       <key>Type</key>
+                       <integer>0</integer>
+               </dict>
+       </array>
+       <key>widget-deps</key>
+       <dict>
+               <key>AudioEncoder</key>
+               <array>
+                       <string>AudioBitrate</string>
+                       <string>AudioSamplerate</string>
+                       <string>AudioMixdown</string>
+                       <string>AudioTrackDRCSlider</string>
+               </array>
+               <key>ChapterMarkers</key>
+               <array>
+                       <string>chapters_list</string>
+               </array>
+               <key>FileFormat</key>
+               <array>
+                       <string>Mp4LargeFile</string>
+                       <string>Mp4HttpOptimize</string>
+                       <string>Mp4iPodCompatible</string>
+               </array>
+               <key>PictureAutoCrop</key>
+               <array>
+                       <string>PictureTopCrop</string>
+                       <string>PictureBottomCrop</string>
+                       <string>PictureLeftCrop</string>
+                       <string>PictureRightCrop</string>
+               </array>
+               <key>PictureDecomb</key>
+               <array>
+                       <string>PictureDeinterlace</string>
+                       <string>tweak_PictureDeinterlace</string>
+               </array>
+               <key>PictureKeepRatio</key>
+               <array>
+                       <string>scale_height</string>
+               </array>
+               <key>VideoEncoder</key>
+               <array>
+                       <string>x264_tab</string>
+                       <string>x264_tab_label</string>
+                       <string>Mp4iPodCompatible</string>
+                       <string>directqp</string>
+               </array>
+               <key>VideoTwoPass</key>
+               <array>
+                       <string>VideoTurboTwoPass</string>
+               </array>
+               <key>anamorphic</key>
+               <array>
+                       <string>PictureKeepRatio</string>
+                       <string>scale_height</string>
+               </array>
+               <key>autoscale</key>
+               <array>
+                       <string>scale_width</string>
+                       <string>scale_height</string>
+               </array>
+               <key>title</key>
+               <array>
+                       <string>queue_add</string>
+                       <string>queue_add_menu</string>
+                       <string>preview_button</string>
+                       <string>show_preview_menu</string>
+                       <string>preview_frame</string>
+                       <string>picture_label</string>
+                       <string>picture_tab</string>
+                       <string>chapters_label</string>
+                       <string>chapters_tab</string>
+                       <string>title</string>
+                       <string>start_chapter</string>
+                       <string>end_chapter</string>
+               </array>
+               <key>use_source_name</key>
+               <array>
+                       <string>chapters_in_destination</string>
+               </array>
+               <key>vquality_type_bitrate</key>
+               <array>
+                       <string>VideoAvgBitrate</string>
+               </array>
+               <key>vquality_type_constant</key>
+               <array>
+                       <string>VideoQualitySlider</string>
+                       <string>constant_rate_factor</string>
+                       <string>VideoTwoPass</string>
+                       <string>VideoTurboTwoPass</string>
+               </array>
+               <key>vquality_type_target</key>
+               <array>
+                       <string>VideoTargetSize</string>
+               </array>
+               <key>x264_bframes</key>
+               <array>
+                       <string>x264_weighted_bframes</string>
+                       <string>x264_bpyramid</string>
+                       <string>x264_direct</string>
+               </array>
+               <key>x264_cabac</key>
+               <array>
+                       <string>x264_trellis</string>
+               </array>
+               <key>x264_me</key>
+               <array>
+                       <string>x264_merange</string>
+               </array>
+               <key>x264_refs</key>
+               <array>
+                       <string>x264_mixed_refs</string>
+               </array>
+       </dict>
+       <key>widget-reverse-deps</key>
+       <dict>
+               <key>AudioBitrate</key>
+               <array>
+                       <array>
+                               <string>AudioEncoder</string>
+                               <string>ac3</string>
+                               <true />
+                       </array>
+               </array>
+               <key>AudioMixdown</key>
+               <array>
+                       <array>
+                               <string>AudioEncoder</string>
+                               <string>ac3</string>
+                               <true />
+                       </array>
+               </array>
+               <key>AudioSamplerate</key>
+               <array>
+                       <array>
+                               <string>AudioEncoder</string>
+                               <string>ac3</string>
+                               <true />
+                       </array>
+               </array>
+               <key>AudioTrackDRCSlider</key>
+               <array>
+                       <array>
+                               <string>AudioEncoder</string>
+                               <string>ac3</string>
+                               <true />
+                       </array>
+               </array>
+               <key>Mp4HttpOptimize</key>
+               <array>
+                       <array>
+                               <string>FileFormat</string>
+                               <string>mp4|m4v</string>
+                               <false />
+                       </array>
+               </array>
+               <key>Mp4LargeFile</key>
+               <array>
+                       <array>
+                               <string>FileFormat</string>
+                               <string>mp4|m4v</string>
+                               <false />
+                       </array>
+               </array>
+               <key>Mp4iPodCompatible</key>
+               <array>
+                       <array>
+                               <string>FileFormat</string>
+                               <string>mp4|m4v</string>
+                               <false />
+                       </array>
+                       <array>
+                               <string>VideoEncoder</string>
+                               <string>x264</string>
+                               <false />
+                       </array>
+               </array>
+               <key>PictureBottomCrop</key>
+               <array>
+                       <array>
+                               <string>PictureAutoCrop</string>
+                               <string>FALSE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>PictureDeinterlace</key>
+               <array>
+                       <array>
+                               <string>PictureDecomb</string>
+                               <string>TRUE</string>
+                               <true />
+                       </array>
+               </array>
+               <key>PictureKeepRatio</key>
+               <array>
+                       <array>
+                               <string>anamorphic</string>
+                               <string>FALSE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>PictureLeftCrop</key>
+               <array>
+                       <array>
+                               <string>PictureAutoCrop</string>
+                               <string>FALSE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>PictureRightCrop</key>
+               <array>
+                       <array>
+                               <string>PictureAutoCrop</string>
+                               <string>FALSE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>PictureTopCrop</key>
+               <array>
+                       <array>
+                               <string>PictureAutoCrop</string>
+                               <string>FALSE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>VideoAvgBitrate</key>
+               <array>
+                       <array>
+                               <string>vquality_type_bitrate</string>
+                               <string>TRUE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>VideoQualitySlider</key>
+               <array>
+                       <array>
+                               <string>vquality_type_constant</string>
+                               <string>TRUE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>VideoTargetSize</key>
+               <array>
+                       <array>
+                               <string>vquality_type_target</string>
+                               <string>TRUE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>VideoTurboTwoPass</key>
+               <array>
+                       <array>
+                               <string>vquality_type_constant</string>
+                               <string>TRUE</string>
+                               <true />
+                       </array>
+                       <array>
+                               <string>VideoTwoPass</string>
+                               <string>TRUE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>VideoTwoPass</key>
+               <array>
+                       <array>
+                               <string>vquality_type_constant</string>
+                               <string>TRUE</string>
+                               <true />
+                       </array>
+               </array>
+               <key>chapters_in_destination</key>
+               <array>
+                       <array>
+                               <string>use_source_name</string>
+                               <string>TRUE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>chapters_label</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>chapters_list</key>
+               <array>
+                       <array>
+                               <string>ChapterMarkers</string>
+                               <string>TRUE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>chapters_tab</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>constant_rate_factor</key>
+               <array>
+                       <array>
+                               <string>vquality_type_constant</string>
+                               <string>TRUE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>directqp</key>
+               <array>
+                       <array>
+                               <string>VideoEncoder</string>
+                               <string>x264|ffmpeg</string>
+                               <false />
+                       </array>
+               </array>
+               <key>end_chapter</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>picture_label</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>picture_tab</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>preview_button</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>preview_frame</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>queue_add</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>queue_add_menu</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>scale_height</key>
+               <array>
+                       <array>
+                               <string>autoscale</string>
+                               <string>FALSE</string>
+                               <false />
+                       </array>
+                       <array>
+                               <string>anamorphic</string>
+                               <string>FALSE</string>
+                               <false />
+                       </array>
+                       <array>
+                               <string>PictureKeepRatio</string>
+                               <string>FALSE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>scale_width</key>
+               <array>
+                       <array>
+                               <string>autoscale</string>
+                               <string>FALSE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>show_preview_menu</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>start_chapter</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>title</key>
+               <array>
+                       <array>
+                               <string>title</string>
+                               <string>none</string>
+                               <true />
+                       </array>
+               </array>
+               <key>tweak_PictureDeinterlace</key>
+               <array>
+                       <array>
+                               <string>PictureDecomb</string>
+                               <string>TRUE</string>
+                               <true />
+                       </array>
+               </array>
+               <key>x264_bpyramid</key>
+               <array>
+                       <array>
+                               <string>x264_bframes</string>
+                               <string>&lt;2</string>
+                               <true />
+                       </array>
+               </array>
+               <key>x264_direct</key>
+               <array>
+                       <array>
+                               <string>x264_bframes</string>
+                               <string>0</string>
+                               <true />
+                       </array>
+               </array>
+               <key>x264_merange</key>
+               <array>
+                       <array>
+                               <string>x264_me</string>
+                               <string>umh|esa</string>
+                               <false />
+                       </array>
+               </array>
+               <key>x264_mixed_refs</key>
+               <array>
+                       <array>
+                               <string>x264_refs</string>
+                               <string>&lt;2</string>
+                               <true />
+                       </array>
+               </array>
+               <key>x264_tab</key>
+               <array>
+                       <array>
+                               <string>VideoEncoder</string>
+                               <string>x264</string>
+                               <false />
+                       </array>
+               </array>
+               <key>x264_tab_label</key>
+               <array>
+                       <array>
+                               <string>VideoEncoder</string>
+                               <string>x264</string>
+                               <false />
+                       </array>
+               </array>
+               <key>x264_trellis</key>
+               <array>
+                       <array>
+                               <string>x264_cabac</string>
+                               <string>TRUE</string>
+                               <false />
+                       </array>
+               </array>
+               <key>x264_weighted_bframes</key>
+               <array>
+                       <array>
+                               <string>x264_bframes</string>
+                               <string>0</string>
+                               <true />
+                       </array>
+               </array>
+       </dict>
+</dict>
+</plist>
diff --git a/gtk/src/settings.c b/gtk/src/settings.c
new file mode 100644 (file)
index 0000000..0b5c902
--- /dev/null
@@ -0,0 +1,599 @@
+/* -*- 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"
+#include "values.h"
+
+void dump_settings(GValue *settings);
+void ghb_pref_audio_init(signal_user_data_t *ud);
+
+GObject*
+debug_get_object(GtkBuilder* b, const gchar *n)
+{
+       g_message("name %s\n", n);
+       return gtk_builder_get_object(b, n);
+}
+
+GValue*
+ghb_settings_new()
+{
+       return ghb_dict_value_new();
+}
+
+void
+ghb_settings_set_value(
+       GValue *settings, 
+       const gchar *key, 
+       const GValue *value)
+{
+       if (key == NULL || value == NULL)
+               return;
+       ghb_dict_insert(settings, g_strdup(key), ghb_value_dup(value));
+}
+
+void
+ghb_settings_take_value(GValue *settings, const gchar *key, GValue *value)
+{
+       ghb_dict_insert(settings, g_strdup(key), value);
+}
+
+void
+ghb_settings_set_string(
+       GValue *settings, 
+       const gchar *key, 
+       const gchar *sval)
+{
+       GValue *value;
+       value = ghb_string_value_new(sval);
+       ghb_dict_insert(settings, g_strdup(key), value);
+}
+
+void
+ghb_settings_set_double(GValue *settings, const gchar *key, gdouble dval)
+{
+       GValue *value;
+       value = ghb_double_value_new(dval);
+       ghb_dict_insert(settings, g_strdup(key), value);
+}
+
+void
+ghb_settings_set_int64(GValue *settings, const gchar *key, gint64 ival)
+{
+       GValue *value;
+       value = ghb_int64_value_new(ival);
+       ghb_dict_insert(settings, g_strdup(key), value);
+}
+
+void
+ghb_settings_set_int(GValue *settings, const gchar *key, gint ival)
+{
+       GValue *value;
+       value = ghb_int64_value_new((gint64)ival);
+       ghb_dict_insert(settings, g_strdup(key), value);
+}
+
+void
+ghb_settings_set_boolean(GValue *settings, const gchar *key, gboolean bval)
+{
+       GValue *value;
+       value = ghb_boolean_value_new(bval);
+       ghb_dict_insert(settings, g_strdup(key), value);
+}
+
+GValue*
+ghb_settings_get_value(GValue *settings, const gchar *key)
+{
+       GValue *value;
+       value = ghb_dict_lookup(settings, key);
+       if (value == NULL)
+               g_warning("returning null (%s)", key);
+       return value;
+}
+
+gboolean
+ghb_settings_get_boolean(GValue *settings, const gchar *key)
+{
+       const GValue* value;
+       value = ghb_settings_get_value(settings, key);
+       if (value == NULL) return FALSE;
+       return ghb_value_boolean(value);
+}
+
+gint64
+ghb_settings_get_int64(GValue *settings, const gchar *key)
+{
+       const GValue* value;
+       value = ghb_settings_get_value(settings, key);
+       if (value == NULL) return 0;
+       return ghb_value_int64(value);
+}
+
+gint
+ghb_settings_get_int(GValue *settings, const gchar *key)
+{
+       const GValue* value;
+       value = ghb_settings_get_value(settings, key);
+       if (value == NULL) return 0;
+       return ghb_value_int(value);
+}
+
+gdouble
+ghb_settings_get_double(GValue *settings, const gchar *key)
+{
+       const GValue* value;
+       value = ghb_settings_get_value(settings, key);
+       if (value == NULL) return 0;
+       return ghb_value_double(value);
+}
+
+gchar*
+ghb_settings_get_string(GValue *settings, const gchar *key)
+{
+       const GValue* value;
+       value = ghb_settings_get_value(settings, key);
+       if (value == NULL) return g_strdup("");
+       return ghb_value_string(value);
+}
+
+gint
+ghb_settings_combo_int(GValue *settings, const gchar *key)
+{
+       return ghb_lookup_combo_int(key, ghb_settings_get_value(settings, key));
+}
+
+const gchar*
+ghb_settings_combo_option(GValue *settings, const gchar *key)
+{
+       return ghb_lookup_combo_option(key, ghb_settings_get_value(settings, key));
+}
+
+// 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;
+}
+
+GValue*
+ghb_widget_value(GtkWidget *widget)
+{
+       GValue *value = NULL;
+       const gchar *name;
+       GType type;
+       
+       if (widget == NULL)
+       {
+               g_debug("NULL widget\n");
+               return NULL;
+       }
+
+       type = GTK_WIDGET_TYPE(widget);
+       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);
+       if (type == GTK_TYPE_ENTRY)
+       {
+               const gchar *str = gtk_entry_get_text(GTK_ENTRY(widget));
+               value = ghb_string_value_new(str);
+       }
+       else if (type == GTK_TYPE_RADIO_BUTTON)
+       {
+               g_debug("\tradio_button");
+               gboolean bval;
+               bval = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+               value = ghb_boolean_value_new(bval);
+       }
+       else if (type == GTK_TYPE_CHECK_BUTTON)
+       {
+               g_debug("\tcheck_button");
+               gboolean bval;
+               bval = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+               value = ghb_boolean_value_new(bval);
+       }
+       else if (type == GTK_TYPE_TOGGLE_ACTION)
+       {
+               g_debug("\ttoggle action");
+               gboolean bval;
+               bval = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(widget));
+               value = ghb_boolean_value_new(bval);
+       }
+       else if (type == GTK_TYPE_CHECK_MENU_ITEM)
+       {
+               g_debug("\tcheck_menu_item");
+               gboolean bval;
+               bval = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget));
+               value = ghb_boolean_value_new(bval);
+       }
+       else if (type == GTK_TYPE_COMBO_BOX)
+       {
+               g_debug("\tcombo_box");
+               GtkTreeModel *store;
+               GtkTreeIter iter;
+               gchar *shortOpt;
+
+               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, 2, &shortOpt, -1);
+                       value = ghb_string_value_new(shortOpt);
+                       g_free(shortOpt);
+               }
+               else
+               {
+                       value = ghb_string_value_new("");
+               }
+       }
+       else if (type == GTK_TYPE_COMBO_BOX_ENTRY)
+       {
+               GtkTreeModel *store;
+               GtkTreeIter iter;
+               gchar *shortOpt;
+
+               g_debug("\tcombo_box_entry");
+               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, 2, &shortOpt, -1);
+                       value = ghb_string_value_new(shortOpt);
+                       g_free(shortOpt);
+               }
+               else
+               {
+                       const gchar *str;
+                       str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(widget));
+                       if (str == NULL) str = "";
+                       value = ghb_string_value_new(str);
+               }
+       }
+       else if (type == GTK_TYPE_SPIN_BUTTON)
+       {
+               gint ival;
+               ival = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
+               value = ghb_int64_value_new(ival);
+       }
+       else if (type == GTK_TYPE_HSCALE)
+       {
+               gdouble dval;
+               gint digits;
+
+               digits = gtk_scale_get_digits(GTK_SCALE(widget));
+               dval = gtk_range_get_value(GTK_RANGE(widget));
+               if (digits)
+               {
+                       value = ghb_double_value_new(dval);
+               }
+               else
+               {
+                       value = ghb_int_value_new(dval);
+               }
+       }
+       else if (type == GTK_TYPE_TEXT_VIEW)
+       {
+               GtkTextBuffer *buffer;
+               GtkTextIter start, end;
+               gchar *str;
+
+               buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));
+               gtk_text_buffer_get_bounds(buffer, &start, &end);
+               str = gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
+               value = ghb_string_value_new(str);
+               g_free(str);
+       }
+       else if (type == GTK_TYPE_LABEL)
+       {
+               const gchar *str;
+               str = gtk_label_get_text (GTK_LABEL(widget));
+               value = ghb_string_value_new(str);
+       }
+       else
+       {
+               g_debug("Attempt to set unknown widget type: %s\n", name);
+               g_free(value);
+               value = NULL;
+       }
+       return value;
+}
+
+gchar*
+ghb_widget_string(GtkWidget *widget)
+{
+       GValue *value;
+       gchar *sval;
+       
+       value = ghb_widget_value(widget);
+       sval = ghb_value_string(value);
+       ghb_value_free(value);
+       return sval;
+}
+
+gdouble
+ghb_widget_double(GtkWidget *widget)
+{
+       GValue *value;
+       gdouble dval;
+       
+       value = ghb_widget_value(widget);
+       dval = ghb_value_double(value);
+       ghb_value_free(value);
+       return dval;
+}
+
+gint64
+ghb_widget_int64(GtkWidget *widget)
+{
+       GValue *value;
+       gint64 ival;
+       
+       value = ghb_widget_value(widget);
+       ival = ghb_value_int64(value);
+       ghb_value_free(value);
+       return ival;
+}
+
+gint
+ghb_widget_int(GtkWidget *widget)
+{
+       GValue *value;
+       gint ival;
+       
+       value = ghb_widget_value(widget);
+       ival = (gint)ghb_value_int64(value);
+       ghb_value_free(value);
+       return ival;
+}
+
+gint
+ghb_widget_boolean(GtkWidget *widget)
+{
+       GValue *value;
+       gboolean bval;
+       
+       value = ghb_widget_value(widget);
+       bval = ghb_value_boolean(value);
+       ghb_value_free(value);
+       return bval;
+}
+
+void
+ghb_widget_to_setting(GValue *settings, GtkWidget *widget)
+{
+       const gchar *key = NULL;
+       GValue *value;
+       
+       if (widget == NULL) return;
+       g_debug("ghb_widget_to_setting");
+       // Find corresponding setting
+       key = get_setting_key(widget);
+       if (key == NULL) return;
+       value = ghb_widget_value(widget);
+       if (value != NULL)
+       {
+               ghb_settings_take_value(settings, key, value);
+       }
+       else
+       {
+               g_debug("No value found for %s\n", key);
+       }
+}
+
+static void
+update_widget(GtkWidget *widget, const GValue *value)
+{
+       GType type;
+       gchar *str;
+       gint ival;
+       gdouble dval;
+
+       g_debug("update_widget");
+       type = G_VALUE_TYPE(value);
+       if (type == ghb_array_get_type() || type == ghb_dict_get_type())
+               return;
+       if (value == NULL) return;
+       str = ghb_value_string(value);
+       ival = ghb_value_int(value);
+       dval = ghb_value_double(value);
+       type = GTK_OBJECT_TYPE(widget);
+       if (type == GTK_TYPE_ENTRY)
+       {
+               g_debug("entry");
+               gtk_entry_set_text((GtkEntry*)widget, str);
+       }
+       else if (type == GTK_TYPE_RADIO_BUTTON)
+       {
+               g_debug("radio button");
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), ival);
+       }
+       else if (type == GTK_TYPE_CHECK_BUTTON)
+       {
+               g_debug("check button");
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), ival);
+       }
+       else if (type == GTK_TYPE_TOGGLE_ACTION)
+       {
+               g_debug("toggle action");
+               gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(widget), ival);
+       }
+       else if (type == GTK_TYPE_CHECK_MENU_ITEM)
+       {
+               g_debug("check menu item");
+               gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), ival);
+       }
+       else if (type == GTK_TYPE_COMBO_BOX)
+       {
+               GtkTreeModel *store;
+               GtkTreeIter iter;
+               gchar *shortOpt;
+               gint ivalue;
+               gboolean foundit = FALSE;
+
+               g_debug("combo (%s)", str);
+               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, -1);
+                               if (strcmp(shortOpt, str) == 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_tree_model_get_iter_first (store, &iter))
+               {
+                       do
+                       {
+                               gtk_tree_model_get(store, &iter, 3, &ivalue, -1);
+                               if (ivalue == ival)
+                               {
+                                       gtk_combo_box_set_active_iter (
+                                               GTK_COMBO_BOX(widget), &iter);
+                                       foundit = TRUE;
+                                       break;
+                               }
+                       } 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_COMBO_BOX_ENTRY)
+       {
+               GtkTreeModel *store;
+               GtkTreeIter iter;
+               gchar *shortOpt;
+               gint ivalue;
+               gboolean foundit = FALSE;
+
+               g_debug("GTK_COMBO_BOX_ENTRY");
+               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, -1);
+                               if (strcmp(shortOpt, str) == 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_tree_model_get_iter_first (store, &iter))
+               {
+                       do
+                       {
+                               gtk_tree_model_get(store, &iter, 3, &ivalue, -1);
+                               if (ivalue == ival)
+                               {
+                                       gtk_combo_box_set_active_iter (
+                                               GTK_COMBO_BOX(widget), &iter);
+                                       foundit = TRUE;
+                                       break;
+                               }
+                       } while (gtk_tree_model_iter_next (store, &iter));
+               }
+               if (!foundit)
+               {
+                       GtkEntry *entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(widget)));
+                       if (entry)
+                       {
+                               gtk_entry_set_text (entry, str);
+                       }
+               }
+       }
+       else if (type == GTK_TYPE_SPIN_BUTTON)
+       {
+               g_debug("spin (%s)", str);
+               gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), dval);
+       }
+       else if (type == GTK_TYPE_HSCALE)
+       {
+               g_debug("hscale");
+               gtk_range_set_value(GTK_RANGE(widget), dval);
+       }
+       else if (type == GTK_TYPE_TEXT_VIEW)
+       {
+               g_debug("textview (%s)", str);
+               GtkTextBuffer *buffer = gtk_text_view_get_buffer(
+                                                                                               GTK_TEXT_VIEW(widget));
+               gtk_text_buffer_set_text (buffer, str, -1);
+       }
+       else if (type == GTK_TYPE_LABEL)
+       {
+               gtk_label_set_text (GTK_LABEL(widget), str);
+       }
+       else
+       {
+               g_debug("Attempt to set unknown widget type");
+       }
+       g_free(str);
+}
+
+int
+ghb_ui_update(signal_user_data_t *ud, const gchar *name, const GValue *value)
+{
+       GObject *object;
+
+       g_debug("ghb_ui_update() %s", name);
+       if (name == NULL || value == NULL)
+               return 0;
+       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);
+       // 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;
+}
+
diff --git a/gtk/src/settings.h b/gtk/src/settings.h
new file mode 100644 (file)
index 0000000..bc4adc6
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * 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 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_IDLE          = 0x00,
+       GHB_STATE_SCANNING      = 0x02,
+       GHB_STATE_SCANDONE      = 0x04,
+       GHB_STATE_WORKING       = 0x08,
+       GHB_STATE_WORKDONE      = 0x10,
+       GHB_STATE_PAUSED        = 0x20,
+       GHB_STATE_MUXING        = 0x40,
+};
+
+typedef struct
+{
+       gchar *current_dvd_device;
+       gboolean debug;
+       gboolean dont_clear_presets;
+       gboolean cancel_encode;
+       GtkBuilder *builder;
+       GValue *settings;
+       GValue *queue;
+       GValue *current_job;
+       GIOChannel *activity_log;
+       GIOChannel *job_activity_log;
+       gchar *appcast;
+       gint appcast_len;
+} signal_user_data_t;
+
+enum
+{
+       GHB_QUEUE_PENDING,
+       GHB_QUEUE_RUNNING,
+       GHB_QUEUE_CANCELED,
+       GHB_QUEUE_DONE,
+};
+
+GValue* ghb_settings_new(void);
+void ghb_settings_take_value(
+       GValue *settings, const gchar *key, GValue *value);
+void ghb_settings_set_value(
+       GValue *settings, const gchar *key, const GValue *value);
+void ghb_settings_set_string(
+       GValue *settings, const gchar *key, const gchar *sval);
+void ghb_settings_set_double(GValue *settings, const gchar *key, gdouble dval);
+void ghb_settings_set_int64(GValue *settings, const gchar *key, gint64 ival);
+void ghb_settings_set_int(GValue *settings, const gchar *key, gint ival);
+void ghb_settings_set_boolean(
+       GValue *settings, const gchar *key, gboolean bval);
+void ghb_settings_copy(
+       GValue *settings, const gchar *key, const GValue *value);
+GValue* ghb_settings_get_value(GValue *settings, const gchar *key);
+gboolean ghb_settings_get_boolean(GValue *settings, const gchar *key);
+gint64 ghb_settings_get_int64(GValue *settings, const gchar *key);
+gint ghb_settings_get_int(GValue *settings, const gchar *key);
+gdouble ghb_settings_get_double(GValue *settings, const gchar *key);
+gchar* ghb_settings_get_string(GValue *settings, const gchar *key);
+gint ghb_settings_combo_int(GValue *settings, const gchar *key);
+const gchar* ghb_settings_combo_option(GValue *settings, const gchar *key);
+
+GValue* ghb_widget_value(GtkWidget *widget);
+gchar* ghb_widget_string(GtkWidget *widget);
+gdouble ghb_widget_double(GtkWidget *widget);
+gint64 ghb_widget_int64(GtkWidget *widget);
+gint ghb_widget_int(GtkWidget *widget);
+gint ghb_widget_boolean(GtkWidget *widget);
+
+void ghb_widget_to_setting(GValue *settings, GtkWidget *widget);
+int ghb_ui_update(
+       signal_user_data_t *ud, const gchar *name, const GValue *value);
+
+#endif // _SETTINGS_H_
diff --git a/gtk/src/standard_presets.xml b/gtk/src/standard_presets.xml
new file mode 100644 (file)
index 0000000..2e6019d
--- /dev/null
@@ -0,0 +1,1580 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<array>
+       <dict>
+               <key>ChildrenArray</key>
+               <array>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>48</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AC3 Passthru</string>
+                                               <key>AudioMixdown</key>
+                                               <string>AC3 Passthru</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>Auto</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <true />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MP4 file</string>
+                               <key>Folder</key>
+                               <false />
+                               <key>Mp4LargeFile</key>
+                               <false />
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <false />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>2</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>720</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s universally compatible, full resolution settings for all current Apple devices: iPod, iPhone, AppleTV, and Macs</string>
+                               <key>PresetName</key>
+                               <string>Universal</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>2500</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.5899999737739563</real>
+                               <key>VideoQualityType</key>
+                               <integer>2</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTwoPass</key>
+                               <false />
+                               <key>x264Option</key>
+                               <string>level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1</string>
+                       </dict>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>48</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <true />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MP4 file</string>
+                               <key>Mp4iPodCompatible</key>
+                               <true />
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <true />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>0</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>320</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s low resolution settings for the iPod. Optimized for great playback on the iPod screen, with smaller file size.</string>
+                               <key>PresetName</key>
+                               <string>iPod</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <false />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>700</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.64709997177124023</real>
+                               <key>VideoQualityType</key>
+                               <integer>1</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTwoPass</key>
+                               <false />
+                               <key>x264Option</key>
+                               <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string>
+                       </dict>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>128</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>48</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <true />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MP4 file</string>
+                               <key>Mp4iPodCompatible</key>
+                               <false />
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <true />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>0</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>480</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s settings for the iPhone and iPod Touch.</string>
+                               <key>PresetName</key>
+                               <string>iPhone &amp; iPod Touch</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <false />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>960</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.5899999737739563</real>
+                               <key>VideoQualityType</key>
+                               <integer>2</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTwoPass</key>
+                               <false />
+                               <key>x264Option</key>
+                               <string>level=30:cabac=0:ref=2:mixed-refs:analyse=all:me=umh:no-fast-pskip=1</string>
+                       </dict>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>48</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AC3 Passthru</string>
+                                               <key>AudioMixdown</key>
+                                               <string>AC3 Passthru</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>Auto</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <true />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MP4 file</string>
+                               <key>Folder</key>
+                               <false />
+                               <key>Mp4LargeFile</key>
+                               <true />
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <false />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>2</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>960</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance.</string>
+                               <key>PresetName</key>
+                               <string>AppleTV</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>2500</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.5899999737739563</real>
+                               <key>VideoQualityType</key>
+                               <integer>2</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTwoPass</key>
+                               <false />
+                               <key>x264Option</key>
+                               <string>level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all</string>
+                       </dict>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>Auto</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <true />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MP4 file</string>
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <false />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>1</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>0</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s high profile settings for use with QuickTime. It can be slow, so use it when the Normal preset doesn&apos;t look good enough.</string>
+                               <key>PresetName</key>
+                               <string>QuickTime</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <true />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>1800</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.64709997177124023</real>
+                               <key>VideoQualityType</key>
+                               <integer>1</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTurboTwoPass</key>
+                               <true />
+                               <key>VideoTwoPass</key>
+                               <true />
+                               <key>x264Option</key>
+                               <string>ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1</string>
+                       </dict>
+                       <dict>
+                               <key>ChildrenArray</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioList</key>
+                                               <array>
+                                                       <dict>
+                                                               <key>AudioBitrate</key>
+                                                               <string>160</string>
+                                                               <key>AudioEncoder</key>
+                                                               <string>AAC (faac)</string>
+                                                               <key>AudioMixdown</key>
+                                                               <string>Dolby Pro Logic II</string>
+                                                               <key>AudioSamplerate</key>
+                                                               <string>48</string>
+                                                               <key>AudioTrack</key>
+                                                               <integer>1</integer>
+                                                               <key>AudioTrackDRCSlider</key>
+                                                               <real>1</real>
+                                                               <key>AudioTrackDescription</key>
+                                                               <string></string>
+                                                       </dict>
+                                                       <dict>
+                                                               <key>AudioBitrate</key>
+                                                               <string>160</string>
+                                                               <key>AudioEncoder</key>
+                                                               <string>AC3 Passthru</string>
+                                                               <key>AudioMixdown</key>
+                                                               <string>AC3 Passthru</string>
+                                                               <key>AudioSamplerate</key>
+                                                               <string>Auto</string>
+                                                               <key>AudioTrack</key>
+                                                               <integer>1</integer>
+                                                               <key>AudioTrackDRCSlider</key>
+                                                               <real>1</real>
+                                                               <key>AudioTrackDescription</key>
+                                                               <string></string>
+                                                       </dict>
+                                               </array>
+                                               <key>ChapterMarkers</key>
+                                               <true />
+                                               <key>Default</key>
+                                               <false />
+                                               <key>FileFormat</key>
+                                               <string>MP4 file</string>
+                                               <key>Mp4LargeFile</key>
+                                               <true />
+                                               <key>PictureBottomCrop</key>
+                                               <integer>0</integer>
+                                               <key>PictureDeblock</key>
+                                               <integer>0</integer>
+                                               <key>PictureDeinterlace</key>
+                                               <string>0</string>
+                                               <key>PictureDenoise</key>
+                                               <string>0</string>
+                                               <key>PictureDetelecine</key>
+                                               <false />
+                                               <key>PictureHeight</key>
+                                               <integer>0</integer>
+                                               <key>PictureKeepRatio</key>
+                                               <false />
+                                               <key>PictureLeftCrop</key>
+                                               <integer>0</integer>
+                                               <key>PicturePAR</key>
+                                               <integer>1</integer>
+                                               <key>PictureRightCrop</key>
+                                               <integer>0</integer>
+                                               <key>PictureTopCrop</key>
+                                               <integer>0</integer>
+                                               <key>PictureWidth</key>
+                                               <integer>0</integer>
+                                               <key>PresetDescription</key>
+                                               <string>HandBrake&apos;s deprecated settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance. This is the AppleTV preset from HandBrake 0.9.2, and while it is offered as a service to legacy users, it is no longer supported.</string>
+                                               <key>PresetName</key>
+                                               <string>AppleTV Legacy</string>
+                                               <key>Subtitles</key>
+                                               <string>None</string>
+                                               <key>Type</key>
+                                               <integer>0</integer>
+                                               <key>UsesMaxPictureSettings</key>
+                                               <true />
+                                               <key>UsesPictureFilters</key>
+                                               <true />
+                                               <key>UsesPictureSettings</key>
+                                               <integer>1</integer>
+                                               <key>VideoAvgBitrate</key>
+                                               <integer>2500</integer>
+                                               <key>VideoEncoder</key>
+                                               <string>H.264 (x264)</string>
+                                               <key>VideoFramerate</key>
+                                               <string>Same as source</string>
+                                               <key>VideoGrayScale</key>
+                                               <false />
+                                               <key>VideoQualitySlider</key>
+                                               <real>0.64709997177124023</real>
+                                               <key>VideoQualityType</key>
+                                               <integer>1</integer>
+                                               <key>VideoTargetSize</key>
+                                               <integer>700</integer>
+                                               <key>VideoTwoPass</key>
+                                               <false />
+                                               <key>x264Option</key>
+                                               <string>bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:trellis=1:cabac=0</string>
+                                       </dict>
+                                       <dict>
+                                               <key>AudioList</key>
+                                               <array>
+                                                       <dict>
+                                                               <key>AudioBitrate</key>
+                                                               <string>128</string>
+                                                               <key>AudioEncoder</key>
+                                                               <string>AAC (faac)</string>
+                                                               <key>AudioMixdown</key>
+                                                               <string>Dolby Pro Logic II</string>
+                                                               <key>AudioSamplerate</key>
+                                                               <string>48</string>
+                                                               <key>AudioTrack</key>
+                                                               <integer>1</integer>
+                                                               <key>AudioTrackDRCSlider</key>
+                                                               <real>1</real>
+                                                               <key>AudioTrackDescription</key>
+                                                               <string></string>
+                                                       </dict>
+                                               </array>
+                                               <key>ChapterMarkers</key>
+                                               <true />
+                                               <key>Default</key>
+                                               <false />
+                                               <key>FileFormat</key>
+                                               <string>MP4 file</string>
+                                               <key>Mp4iPodCompatible</key>
+                                               <true />
+                                               <key>PictureAutoCrop</key>
+                                               <true />
+                                               <key>PictureBottomCrop</key>
+                                               <integer>0</integer>
+                                               <key>PictureDeblock</key>
+                                               <integer>0</integer>
+                                               <key>PictureDeinterlace</key>
+                                               <string>0</string>
+                                               <key>PictureDenoise</key>
+                                               <string>0</string>
+                                               <key>PictureDetelecine</key>
+                                               <false />
+                                               <key>PictureHeight</key>
+                                               <integer>0</integer>
+                                               <key>PictureKeepRatio</key>
+                                               <true />
+                                               <key>PictureLeftCrop</key>
+                                               <integer>0</integer>
+                                               <key>PicturePAR</key>
+                                               <integer>0</integer>
+                                               <key>PictureRightCrop</key>
+                                               <integer>0</integer>
+                                               <key>PictureTopCrop</key>
+                                               <integer>0</integer>
+                                               <key>PictureWidth</key>
+                                               <integer>480</integer>
+                                               <key>PresetDescription</key>
+                                               <string>HandBrake&apos;s deprecated settings for the iPhone and iPod Touch. This is the iPhone preset from HandBrake 0.9.2, and while it is offered as a service to legacy users, it is no longer supported.</string>
+                                               <key>PresetName</key>
+                                               <string>iPhone Legacy</string>
+                                               <key>Subtitles</key>
+                                               <string>None</string>
+                                               <key>Type</key>
+                                               <integer>0</integer>
+                                               <key>UsesMaxPictureSettings</key>
+                                               <false />
+                                               <key>UsesPictureFilters</key>
+                                               <true />
+                                               <key>UsesPictureSettings</key>
+                                               <integer>1</integer>
+                                               <key>VideoAvgBitrate</key>
+                                               <integer>960</integer>
+                                               <key>VideoEncoder</key>
+                                               <string>H.264 (x264)</string>
+                                               <key>VideoFramerate</key>
+                                               <string>Same as source</string>
+                                               <key>VideoGrayScale</key>
+                                               <false />
+                                               <key>VideoQualitySlider</key>
+                                               <real>0.64709997177124023</real>
+                                               <key>VideoQualityType</key>
+                                               <integer>1</integer>
+                                               <key>VideoTargetSize</key>
+                                               <integer>700</integer>
+                                               <key>VideoTwoPass</key>
+                                               <false />
+                                               <key>x264Option</key>
+                                               <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1</string>
+                                       </dict>
+                                       <dict>
+                                               <key>AudioList</key>
+                                               <array>
+                                                       <dict>
+                                                               <key>AudioBitrate</key>
+                                                               <string>160</string>
+                                                               <key>AudioEncoder</key>
+                                                               <string>AAC (faac)</string>
+                                                               <key>AudioMixdown</key>
+                                                               <string>Dolby Pro Logic II</string>
+                                                               <key>AudioSamplerate</key>
+                                                               <string>48</string>
+                                                               <key>AudioTrack</key>
+                                                               <integer>1</integer>
+                                                               <key>AudioTrackDRCSlider</key>
+                                                               <real>1</real>
+                                                               <key>AudioTrackDescription</key>
+                                                               <string></string>
+                                                       </dict>
+                                               </array>
+                                               <key>ChapterMarkers</key>
+                                               <true />
+                                               <key>Default</key>
+                                               <false />
+                                               <key>FileFormat</key>
+                                               <string>MP4 file</string>
+                                               <key>Mp4iPodCompatible</key>
+                                               <true />
+                                               <key>PictureAutoCrop</key>
+                                               <true />
+                                               <key>PictureBottomCrop</key>
+                                               <integer>0</integer>
+                                               <key>PictureDeblock</key>
+                                               <integer>0</integer>
+                                               <key>PictureDeinterlace</key>
+                                               <string>0</string>
+                                               <key>PictureDenoise</key>
+                                               <string>0</string>
+                                               <key>PictureDetelecine</key>
+                                               <false />
+                                               <key>PictureHeight</key>
+                                               <integer>0</integer>
+                                               <key>PictureKeepRatio</key>
+                                               <true />
+                                               <key>PictureLeftCrop</key>
+                                               <integer>0</integer>
+                                               <key>PicturePAR</key>
+                                               <integer>0</integer>
+                                               <key>PictureRightCrop</key>
+                                               <integer>0</integer>
+                                               <key>PictureTopCrop</key>
+                                               <integer>0</integer>
+                                               <key>PictureWidth</key>
+                                               <integer>640</integer>
+                                               <key>PresetDescription</key>
+                                               <string>HandBrake&apos;s high resolution settings for older 5 and 5.5G iPods. Good video quality, great for viewing on a TV using your iPod. This is the iPod High-Rez preset from 0.9.2.</string>
+                                               <key>PresetName</key>
+                                               <string>iPod Legacy</string>
+                                               <key>Subtitles</key>
+                                               <string>None</string>
+                                               <key>Type</key>
+                                               <integer>0</integer>
+                                               <key>UsesMaxPictureSettings</key>
+                                               <false />
+                                               <key>UsesPictureFilters</key>
+                                               <true />
+                                               <key>UsesPictureSettings</key>
+                                               <integer>1</integer>
+                                               <key>VideoAvgBitrate</key>
+                                               <integer>1500</integer>
+                                               <key>VideoEncoder</key>
+                                               <string>H.264 (x264)</string>
+                                               <key>VideoFramerate</key>
+                                               <string>Same as source</string>
+                                               <key>VideoGrayScale</key>
+                                               <false />
+                                               <key>VideoQualitySlider</key>
+                                               <real>0.64709997177124023</real>
+                                               <key>VideoQualityType</key>
+                                               <integer>1</integer>
+                                               <key>VideoTargetSize</key>
+                                               <integer>700</integer>
+                                               <key>VideoTwoPass</key>
+                                               <false />
+                                               <key>x264Option</key>
+                                               <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string>
+                                       </dict>
+                               </array>
+                               <key>Folder</key>
+                               <true />
+                               <key>PresetName</key>
+                               <string>Legacy</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                       </dict>
+               </array>
+               <key>Folder</key>
+               <true />
+               <key>PresetName</key>
+               <string>Apple</string>
+               <key>Type</key>
+               <integer>0</integer>
+       </dict>
+       <dict>
+               <key>ChildrenArray</key>
+               <array>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>Auto</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <true />
+                               <key>Default</key>
+                               <true />
+                               <key>FileFormat</key>
+                               <string>MP4 file</string>
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <false />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>1</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>0</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s normal, default settings.</string>
+                               <key>PresetName</key>
+                               <string>Normal</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <true />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>1500</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.64709997177124023</real>
+                               <key>VideoQualityType</key>
+                               <integer>1</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTurboTwoPass</key>
+                               <true />
+                               <key>VideoTwoPass</key>
+                               <true />
+                               <key>x264Option</key>
+                               <string>ref=2:bframes=2:me=umh</string>
+                       </dict>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>Auto</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <false />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MP4 file</string>
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <true />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>0</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>0</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s traditional, faster, lower-quality settings.</string>
+                               <key>PresetName</key>
+                               <string>Classic</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <true />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>1000</integer>
+                               <key>VideoEncoder</key>
+                               <string>MPEG-4 (FFmpeg)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.64709997177124023</real>
+                               <key>VideoQualityType</key>
+                               <integer>1</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTwoPass</key>
+                               <false />
+                               <key>x264Option</key>
+                               <string></string>
+                       </dict>
+               </array>
+               <key>Folder</key>
+               <true />
+               <key>PresetName</key>
+               <string>Basic</string>
+               <key>Type</key>
+               <integer>0</integer>
+       </dict>
+       <dict>
+               <key>ChildrenArray</key>
+               <array>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>Auto</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <true />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MKV file</string>
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDecomb</key>
+                               <true />
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <true />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <false />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>1</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>0</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s settings for cartoons, anime, and CGI.</string>
+                               <key>PresetName</key>
+                               <string>Animation</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <true />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>1000</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.64709997177124023</real>
+                               <key>VideoQualityType</key>
+                               <integer>1</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTurboTwoPass</key>
+                               <true />
+                               <key>VideoTwoPass</key>
+                               <true />
+                               <key>x264Option</key>
+                               <string>ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-rd=1,1:subme=9</string>
+                       </dict>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AC3 Passthru</string>
+                                               <key>AudioMixdown</key>
+                                               <string>AC3 Passthru</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>Auto</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <true />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MKV file</string>
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <false />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>1</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>0</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates.</string>
+                               <key>PresetName</key>
+                               <string>Constant Quality Rate</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <true />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>2000</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.60000002384185791</real>
+                               <key>VideoQualityType</key>
+                               <integer>2</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTurboTwoPass</key>
+                               <false />
+                               <key>VideoTwoPass</key>
+                               <false />
+                               <key>x264Option</key>
+                               <string>ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1</string>
+                       </dict>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AC3 Passthru</string>
+                                               <key>AudioMixdown</key>
+                                               <string>AC3 Passthru</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>Auto</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <true />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MKV file</string>
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <false />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>1</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>0</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s preset for feature films.</string>
+                               <key>PresetName</key>
+                               <string>Film</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <true />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>1800</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.64709997177124023</real>
+                               <key>VideoQualityType</key>
+                               <integer>1</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTurboTwoPass</key>
+                               <true />
+                               <key>VideoTwoPass</key>
+                               <true />
+                               <key>x264Option</key>
+                               <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1</string>
+                       </dict>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>Auto</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <true />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MKV file</string>
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDecomb</key>
+                               <true />
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <true />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <false />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>1</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>0</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s settings for video from television.</string>
+                               <key>PresetName</key>
+                               <string>Television</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <true />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>1300</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.64709997177124023</real>
+                               <key>VideoQualityType</key>
+                               <integer>1</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTurboTwoPass</key>
+                               <true />
+                               <key>VideoTwoPass</key>
+                               <true />
+                               <key>x264Option</key>
+                               <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-rd=1,1</string>
+                       </dict>
+               </array>
+               <key>Folder</key>
+               <true />
+               <key>PresetName</key>
+               <string>High Profile</string>
+               <key>Type</key>
+               <integer>0</integer>
+       </dict>
+       <dict>
+               <key>ChildrenArray</key>
+               <array>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>128</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>48</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <true />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MP4 file</string>
+                               <key>PictureAutoCrop</key>
+                               <true />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>208</integer>
+                               <key>PictureKeepRatio</key>
+                               <true />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>0</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>368</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s settings for the Sony PlayStation Portable.</string>
+                               <key>PresetName</key>
+                               <string>PSP</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <false />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>1024</integer>
+                               <key>VideoEncoder</key>
+                               <string>MPEG-4 (FFmpeg)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.64709997177124023</real>
+                               <key>VideoQualityType</key>
+                               <integer>1</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTwoPass</key>
+                               <false />
+                               <key>x264Option</key>
+                               <string></string>
+                       </dict>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>48</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <false />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MP4 file</string>
+                               <key>PictureAutoCrop</key>
+                               <false />
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <false />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>1</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>0</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s settings for the Sony PlayStation 3.</string>
+                               <key>PresetName</key>
+                               <string>PS3</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <true />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>2500</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.64709997177124023</real>
+                               <key>VideoQualityType</key>
+                               <integer>1</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTwoPass</key>
+                               <false />
+                               <key>x264Option</key>
+                               <string>level=41:me=umh</string>
+                       </dict>
+                       <dict>
+                               <key>AudioList</key>
+                               <array>
+                                       <dict>
+                                               <key>AudioBitrate</key>
+                                               <string>160</string>
+                                               <key>AudioEncoder</key>
+                                               <string>AAC (faac)</string>
+                                               <key>AudioMixdown</key>
+                                               <string>Dolby Pro Logic II</string>
+                                               <key>AudioSamplerate</key>
+                                               <string>48</string>
+                                               <key>AudioTrack</key>
+                                               <integer>1</integer>
+                                               <key>AudioTrackDRCSlider</key>
+                                               <real>1</real>
+                                               <key>AudioTrackDescription</key>
+                                               <string></string>
+                                       </dict>
+                               </array>
+                               <key>ChapterMarkers</key>
+                               <false />
+                               <key>Default</key>
+                               <false />
+                               <key>FileFormat</key>
+                               <string>MP4 file</string>
+                               <key>PictureBottomCrop</key>
+                               <integer>0</integer>
+                               <key>PictureDeblock</key>
+                               <integer>0</integer>
+                               <key>PictureDeinterlace</key>
+                               <string>0</string>
+                               <key>PictureDenoise</key>
+                               <string>0</string>
+                               <key>PictureDetelecine</key>
+                               <false />
+                               <key>PictureHeight</key>
+                               <integer>0</integer>
+                               <key>PictureKeepRatio</key>
+                               <false />
+                               <key>PictureLeftCrop</key>
+                               <integer>0</integer>
+                               <key>PicturePAR</key>
+                               <integer>1</integer>
+                               <key>PictureRightCrop</key>
+                               <integer>0</integer>
+                               <key>PictureTopCrop</key>
+                               <integer>0</integer>
+                               <key>PictureWidth</key>
+                               <integer>0</integer>
+                               <key>PresetDescription</key>
+                               <string>HandBrake&apos;s settings for the Microsoft Xbox 360.</string>
+                               <key>PresetName</key>
+                               <string>Xbox 360</string>
+                               <key>Subtitles</key>
+                               <string>None</string>
+                               <key>Type</key>
+                               <integer>0</integer>
+                               <key>UsesMaxPictureSettings</key>
+                               <true />
+                               <key>UsesPictureFilters</key>
+                               <true />
+                               <key>UsesPictureSettings</key>
+                               <integer>1</integer>
+                               <key>VideoAvgBitrate</key>
+                               <integer>2000</integer>
+                               <key>VideoEncoder</key>
+                               <string>H.264 (x264)</string>
+                               <key>VideoFramerate</key>
+                               <string>Same as source</string>
+                               <key>VideoGrayScale</key>
+                               <false />
+                               <key>VideoQualitySlider</key>
+                               <real>0.64709997177124023</real>
+                               <key>VideoQualityType</key>
+                               <integer>1</integer>
+                               <key>VideoTargetSize</key>
+                               <integer>700</integer>
+                               <key>VideoTwoPass</key>
+                               <false />
+                               <key>x264Option</key>
+                               <string>level=40:ref=2:mixed-refs:bframes=3:weightb:subme=9:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string>
+                       </dict>
+               </array>
+               <key>Folder</key>
+               <true />
+               <key>PresetName</key>
+               <string>Gaming Consoles</string>
+               <key>Type</key>
+               <integer>0</integer>
+       </dict>
+</array>
+</plist>
diff --git a/gtk/src/values.c b/gtk/src/values.c
new file mode 100644 (file)
index 0000000..94b417f
--- /dev/null
@@ -0,0 +1,733 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * presets.c
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ * 
+ * presets.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 <glib.h>
+#include <glib-object.h>
+#include <string.h>
+#include "values.h"
+
+static void dict_delete_key(gpointer data);
+static void dict_delete_value(gpointer data);
+
+GValue*
+ghb_value_new(GType gtype)
+{
+       GValue *gval = g_malloc0(sizeof(GValue));
+       g_value_init(gval, gtype);
+       return gval;
+}
+
+void
+ghb_value_free(GValue *gval)
+{
+       if (gval == NULL) return;
+       g_value_unset(gval);
+       g_free(gval);
+}
+
+GValue*
+ghb_value_dup(const GValue *val)
+{
+       if (val == NULL) return NULL;
+       GValue *copy = ghb_value_new(G_VALUE_TYPE(val));
+       g_value_copy(val, copy);
+       return copy;
+}
+
+void
+debug_show_type(GType tp)
+{
+       const gchar *str = "unknown";
+       if (tp == G_TYPE_STRING)
+       {
+               str ="string";
+       }
+       else if (tp == G_TYPE_INT)
+       {
+               str ="int";
+       }
+       else if (tp == G_TYPE_INT64)
+       {
+               str ="int64";
+       }
+       else if (tp == G_TYPE_DOUBLE)
+       {
+               str ="double";
+       }
+       else if (tp == G_TYPE_BOOLEAN)
+       {
+               str ="bool";
+       }
+       else if (tp == ghb_array_get_type())
+       {
+               str ="array";
+       }
+       else if (tp == ghb_dict_get_type())
+       {
+               str ="dict";
+       }
+       g_debug("%s", str);
+}
+
+gint
+ghb_value_int(const GValue *val)
+{
+       gint result;
+
+       if (val == NULL) return 0;
+       GValue xform = {0,};
+       if (G_VALUE_TYPE(val) != G_TYPE_INT)
+       {
+               g_value_init(&xform, G_TYPE_INT);
+               if (!g_value_transform(val, &xform))
+               {
+                       debug_show_type(G_VALUE_TYPE(val));
+                       g_warning("int can't transform");
+                       return 0;
+               }
+               result = g_value_get_int(&xform);
+               g_value_unset(&xform);
+       }
+       else
+       {
+               result = g_value_get_int(val);
+       }
+       return result;
+}
+
+gint64
+ghb_value_int64(const GValue *val)
+{
+       gint64 result;
+
+       if (val == NULL) return 0;
+       GValue xform = {0,};
+       if (G_VALUE_TYPE(val) != G_TYPE_INT64)
+       {
+               g_value_init(&xform, G_TYPE_INT64);
+               if (!g_value_transform(val, &xform))
+               {
+                       debug_show_type(G_VALUE_TYPE(val));
+                       g_warning("int64 can't transform");
+                       return 0;
+               }
+               result = g_value_get_int64(&xform);
+               g_value_unset(&xform);
+       }
+       else
+       {
+               result = g_value_get_int64(val);
+       }
+       return result;
+}
+
+gdouble
+ghb_value_double(const GValue *val)
+{
+       gdouble result;
+
+       if (val == NULL) return 0;
+       GValue xform = {0,};
+       if (G_VALUE_TYPE(val) != G_TYPE_DOUBLE)
+       {
+               g_value_init(&xform, G_TYPE_DOUBLE);
+               if (!g_value_transform(val, &xform))
+               {
+                       debug_show_type(G_VALUE_TYPE(val));
+                       g_warning("double can't transform");
+                       return 0;
+               }
+               result = g_value_get_double(&xform);
+               g_value_unset(&xform);
+       }
+       else
+       {
+               result = g_value_get_double(val);
+       }
+       return result;
+}
+
+gchar*
+ghb_value_string(const GValue *val)
+{
+       gchar *result;
+
+       if (val == NULL) return 0;
+       GValue xform = {0,};
+       if (G_VALUE_TYPE(val) != G_TYPE_STRING)
+       {
+               g_value_init(&xform, G_TYPE_STRING);
+               if (!g_value_transform(val, &xform))
+               {
+                       debug_show_type(G_VALUE_TYPE(val));
+                       g_warning("string can't transform");
+                       return NULL;
+               }
+               result = g_strdup(g_value_get_string(&xform));
+               g_value_unset(&xform);
+       }
+       else
+       {
+               result = g_strdup(g_value_get_string(val));
+       }
+       return result;
+}
+
+gboolean
+ghb_value_boolean(const GValue *val)
+{
+       gboolean result;
+
+       if (val == NULL) return FALSE;
+       GValue xform = {0,};
+       if (G_VALUE_TYPE(val) != G_TYPE_BOOLEAN)
+       {
+               g_value_init(&xform, G_TYPE_BOOLEAN);
+               if (!g_value_transform(val, &xform))
+               {
+                       debug_show_type(G_VALUE_TYPE(val));
+                       g_warning("boolean can't transform");
+                       return FALSE;
+               }
+               result = g_value_get_boolean(&xform);
+               g_value_unset(&xform);
+       }
+       else
+       {
+               result = g_value_get_boolean(val);
+       }
+       return result;
+}
+
+gint
+ghb_value_cmp(const GValue *vala, const GValue *valb)
+{
+       GType typa;
+       GType typb;
+
+       typa = G_VALUE_TYPE(vala);
+       typb = G_VALUE_TYPE(valb);
+       if (typa != typb)
+       {
+               return 1;
+       }
+       
+       if (typa == G_TYPE_STRING)
+       {
+               char *stra, *strb;
+               gint res;
+               stra = ghb_value_string(vala);
+               strb = ghb_value_string(valb);
+               if (stra == NULL && strb == NULL)
+                       return 0;
+               if (stra == NULL)
+               {
+                       g_free(strb);
+                       return -1;
+               }
+               if (strb == NULL)
+               {
+                       g_free(stra);
+                       return 1;
+               }
+               res =  strcmp(stra, strb);
+               g_free(stra);
+               g_free(strb);
+               return res;
+       }
+       else if (typa == G_TYPE_INT64 || typa == G_TYPE_INT || 
+                       typa == G_TYPE_BOOLEAN)
+       {
+               return ghb_value_int64(vala) - ghb_value_int64(valb);
+       }
+       else if (typa == G_TYPE_DOUBLE || typa == G_TYPE_FLOAT)
+       {
+               return ghb_value_double(vala) - ghb_value_double(valb);
+       }
+       else if (typa == ghb_array_get_type())
+       {
+               // Cheating here.  Just assume they are different.
+               // Maybe later I'll recurse through these
+               return 1;
+       }
+       else if (typa == ghb_dict_get_type())
+       {
+               // Cheating here.  Just assume they are different.
+               // Maybe later I'll recurse through these
+               return 1;
+       }
+       else
+       {
+               g_warning("ghb_value_cmp: unrecognized type");
+               return 1;
+       }
+       return 0;
+}
+
+GValue*
+ghb_string_value(const gchar *str)
+{
+       static GValue gval = {0,};
+       if (!G_IS_VALUE(&gval))
+               g_value_init(&gval, G_TYPE_STRING);
+       g_value_set_string(&gval, str);
+       return &gval;
+}
+
+GValue*
+ghb_int64_value(gint64 ival)
+{
+       static GValue gval = {0,};
+       if (!G_IS_VALUE(&gval))
+               g_value_init(&gval, G_TYPE_INT64);
+       g_value_set_int64(&gval, ival);
+       return &gval;
+}
+
+GValue*
+ghb_int_value(gint ival)
+{
+       static GValue gval = {0,};
+       if (!G_IS_VALUE(&gval))
+               g_value_init(&gval, G_TYPE_INT64);
+       g_value_set_int64(&gval, (gint64)ival);
+       return &gval;
+}
+
+GValue*
+ghb_double_value(gdouble dval)
+{
+       static GValue gval = {0,};
+       if (!G_IS_VALUE(&gval))
+               g_value_init(&gval, G_TYPE_DOUBLE);
+       g_value_set_double(&gval, dval);
+       return &gval;
+}
+
+GValue*
+ghb_boolean_value(gboolean bval)
+{
+       static GValue gval = {0,};
+       if (!G_IS_VALUE(&gval))
+               g_value_init(&gval, G_TYPE_BOOLEAN);
+       g_value_set_boolean(&gval, bval);
+       return &gval;
+}
+
+GValue*
+ghb_string_value_new(const gchar *str)
+{
+       if (str == NULL) str = "";
+       GValue *gval = ghb_value_new(G_TYPE_STRING);
+       g_value_set_string(gval, str);
+       return gval;
+}
+
+GValue*
+ghb_int64_value_new(gint64 ival)
+{
+       GValue *gval = ghb_value_new(G_TYPE_INT64);
+       g_value_set_int64(gval, ival);
+       return gval;
+}
+
+GValue*
+ghb_int_value_new(gint ival)
+{
+       GValue *gval = ghb_value_new(G_TYPE_INT64);
+       g_value_set_int64(gval, ival);
+       return gval;
+}
+
+GValue*
+ghb_double_value_new(gdouble dval)
+{
+       GValue *gval = ghb_value_new(G_TYPE_DOUBLE);
+       g_value_set_double(gval, dval);
+       return gval;
+}
+
+GValue*
+ghb_boolean_value_new(gboolean bval)
+{
+       GValue *gval = ghb_value_new(G_TYPE_BOOLEAN);
+       g_value_set_boolean(gval, bval);
+       return gval;
+}
+
+GValue*
+ghb_dict_value_new()
+{
+       GHashTable *dict;
+       GValue *gval = ghb_value_new(ghb_dict_get_type());
+       dict = g_hash_table_new_full(g_str_hash, g_str_equal,
+                                                               dict_delete_key, dict_delete_value);
+       g_value_take_boxed(gval, dict);
+       return gval;
+}
+
+GValue*
+ghb_array_value_new(guint size)
+{
+       GValue *gval = ghb_value_new(ghb_array_get_type());
+       GArray *array;
+
+       array = g_array_sized_new(FALSE, FALSE, sizeof(GValue*), size);
+       g_value_take_boxed(gval, array);
+       return gval;
+}
+
+void
+ghb_array_value_reset(GValue *gval, guint size)
+{
+       GArray *array;
+       g_value_reset(gval);
+       array = g_array_sized_new(FALSE, FALSE, sizeof(GValue*), size);
+       g_value_take_boxed(gval, array);
+}
+
+GValue* 
+ghb_date_value_new(GDate *date)
+{
+       GValue *gval = ghb_value_new(g_date_get_type());
+       g_value_set_boxed(gval, date);
+       return gval;
+}
+
+GValue* 
+ghb_rawdata_value_new(ghb_rawdata_t *data)
+{
+       GValue *gval = ghb_value_new(ghb_rawdata_get_type());
+       g_value_take_boxed(gval, data);
+       return gval;
+}
+
+static gpointer
+rawdata_copy(gpointer boxed)
+{
+       const ghb_rawdata_t *data = (const ghb_rawdata_t*)boxed;
+       ghb_rawdata_t *copy = g_malloc(sizeof(ghb_rawdata_t));
+       copy->size = data->size;
+       if (data->data)
+       {
+               copy->data = g_malloc(data->size);
+               memcpy(copy->data, data->data, data->size);
+       }
+       else
+       {
+               copy->data = NULL;
+               copy->size = 0;
+       }
+       return copy;
+}
+
+static void
+rawdata_free(gpointer boxed)
+{
+       ghb_rawdata_t *data = (ghb_rawdata_t*)boxed;
+       if (data->data) g_free(data->data);
+       g_free(data);
+}
+
+
+GType
+ghb_rawdata_get_type(void)
+{
+       static GType type_id = 0;
+       if (!type_id)
+               type_id = g_boxed_type_register_static(g_intern_static_string("GHBData"),
+                       (GBoxedCopyFunc) rawdata_copy,
+                       (GBoxedFreeFunc) rawdata_free);
+       return type_id;
+}
+
+static void
+dict_delete_key(gpointer data)
+{
+       if (data == NULL)
+       {
+               g_warning("dict frees null key");
+               return;
+       }
+       g_free(data);
+}
+
+static void
+dict_delete_value(gpointer data)
+{
+       GValue *gval = (GValue*)data;
+       if (gval == NULL)
+       {
+               g_warning("dict frees null value");
+               return;
+       }
+       ghb_value_free(gval);
+}
+
+static gpointer
+dict_copy(gpointer boxed)
+{
+       GHashTable *dict = (GHashTable*)boxed;
+       GHashTable *copy;
+       GHashTableIter iter;
+       gchar *key;
+       GValue *gval;
+
+       copy = g_hash_table_new_full(g_str_hash, g_str_equal,
+                                                               dict_delete_key, dict_delete_value);
+
+       g_hash_table_iter_init(&iter, dict);
+       // middle (void*) cast prevents gcc warning "defreferencing type-punned
+       // pointer will break strict-aliasing rules"
+       while (g_hash_table_iter_next(
+                       &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&gval))
+       {
+               g_hash_table_insert(copy, g_strdup(key), ghb_value_dup(gval));
+       }
+       return copy;
+}
+
+static void
+dict_free(gpointer boxed)
+{
+       GHashTable *dict = (GHashTable*)boxed;
+       g_hash_table_destroy(dict);
+}
+
+
+GType
+ghb_dict_get_type(void)
+{
+       static GType type_id = 0;
+       if (!type_id)
+               type_id = g_boxed_type_register_static(
+                                               g_intern_static_string("GHBDict"),
+                                               (GBoxedCopyFunc) dict_copy,
+                                               (GBoxedFreeFunc) dict_free);
+       return type_id;
+}
+
+void
+ghb_dict_insert(GValue *gval, gchar *key, GValue *val)
+{
+       GHashTable *dict = g_value_get_boxed(gval);
+       g_hash_table_insert(dict, key, val);
+}
+
+void
+ghb_dict_iter_init(GHashTableIter *iter, GValue *gval)
+{
+       GHashTable *dict = g_value_get_boxed(gval);
+       g_hash_table_iter_init(iter, dict);
+}
+
+GValue*
+ghb_dict_lookup(GValue *gval, const gchar *key)
+{
+       GHashTable *dict = g_value_get_boxed(gval);
+       return g_hash_table_lookup(dict, key);
+}
+
+gboolean
+ghb_dict_remove(GValue *gval, const gchar *key)
+{
+       GHashTable *dict = g_value_get_boxed(gval);
+       return g_hash_table_remove(dict, key);
+}
+
+static gpointer
+array_copy(gpointer boxed)
+{
+       const GArray *array = (const GArray*)boxed;
+       GArray *copy = g_array_new(FALSE, FALSE, sizeof(GValue*));
+
+       GValue *gval, *gval_copy;
+       gint ii;
+
+       for (ii = 0; ii < array->len; ii++)
+       {
+               gval = g_array_index(array, GValue*, ii);
+               if (gval)
+               {
+                       gval_copy = ghb_value_dup(gval);
+                       g_array_append_val(copy, gval_copy);
+               }
+       }
+       return copy;
+}
+
+static void
+array_free(gpointer boxed)
+{
+       GArray *array = (GArray*)boxed;
+       GValue *gval;
+       gint ii;
+
+       for (ii = 0; ii < array->len; ii++)
+       {
+               gval = g_array_index(array, GValue*, ii);
+               if (gval)
+               {
+                       ghb_value_free(gval);
+               }
+       }
+       g_array_free(array, TRUE);
+}
+
+
+GType
+ghb_array_get_type(void)
+{
+       static GType type_id = 0;
+       if (!type_id)
+               type_id = g_boxed_type_register_static(
+                                               g_intern_static_string("GHBArray"),
+                                               (GBoxedCopyFunc) array_copy,
+                                               (GBoxedFreeFunc) array_free);
+       return type_id;
+}
+
+GValue*
+ghb_array_get_nth(const GValue *gval, gint ii)
+{
+       GArray *arr = g_value_get_boxed(gval);
+       return g_array_index(arr, GValue*, ii);
+}
+
+void
+ghb_array_insert(GValue *gval, guint ii, GValue *val)
+{
+       GArray *arr = g_value_get_boxed(gval);
+       // A little nastyness here.  The array pointer
+       // can change when the array changes size.  So
+       // I must re-box it in the GValue each time.
+       arr = g_array_insert_val(arr, ii, val);
+       memset(gval, 0, sizeof(GValue));
+       g_value_init(gval, ghb_array_get_type());
+       g_value_take_boxed(gval, arr);
+}
+
+void
+ghb_array_append(GValue *gval, GValue *val)
+{
+       GArray *arr = g_value_get_boxed(gval);
+       // A little nastyness here.  The array pointer
+       // can change when the array changes size.  So
+       // I must re-box it in the GValue each time.
+       arr = g_array_append_val(arr, val);
+       memset(gval, 0, sizeof(GValue));
+       g_value_init(gval, ghb_array_get_type());
+       g_value_take_boxed(gval, arr);
+}
+
+void
+ghb_array_remove(GValue *gval, guint ii)
+{
+       GArray *arr = g_value_get_boxed(gval);
+       // A little nastyness here.  The array pointer
+       // can change when the array changes size.  So
+       // I must re-box it in the GValue each time.
+       arr = g_array_remove_index(arr, ii);
+       memset(gval, 0, sizeof(GValue));
+       g_value_init(gval, ghb_array_get_type());
+       g_value_take_boxed(gval, arr);
+}
+
+void
+ghb_array_replace(GValue *gval, guint ii, GValue *val)
+{
+       GArray *arr = g_value_get_boxed(gval);
+       // A little nastyness here.  The array pointer
+       // can change when the array changes size.  So
+       // I must re-box it in the GValue each time.
+       if (ii >= arr->len) return;
+       ghb_value_free(((GValue**)arr->data)[ii]);
+       ((GValue**)arr->data)[ii] = val;
+}
+
+void
+ghb_array_copy(GValue *arr1, GValue *arr2, gint count)
+{
+       gint len, ii;
+
+       // empty the first array if it is not already empty
+       len = ghb_array_len(arr1);
+       for (ii = 0; ii < len; ii++)
+               ghb_array_remove(arr1, 0);
+
+       len = ghb_array_len(arr2);
+       count = MIN(count, len);
+       for (ii = 0; ii < count; ii++)
+               ghb_array_append(arr1, ghb_value_dup(ghb_array_get_nth(arr2, ii)));
+}
+
+gint
+ghb_array_len(const GValue *gval)
+{
+       if (gval == NULL) return 0;
+       GArray *arr = g_value_get_boxed(gval);
+       return arr->len;
+}
+
+static void
+xform_string_int(const GValue *sval, GValue *ival)
+{
+       gchar *end;
+
+       const gchar *str = g_value_get_string(sval);
+       gint val = g_strtod(str, &end);
+       if (*end)
+               val = (guint)(~0)>>1;
+       g_value_set_int(ival, val);
+}
+
+static void
+xform_string_int64(const GValue *sval, GValue *ival)
+{
+       gchar *end;
+       const gchar *str = g_value_get_string(sval);
+       gint64 val = g_strtod(str, &end);
+       if (*end)
+               val = (guint64)(~0L)>>1;
+       g_value_set_int64(ival, val);
+}
+
+static void
+xform_string_double(const GValue *sval, GValue *dval)
+{
+       const gchar *str = g_value_get_string(sval);
+       double val = g_strtod(str, NULL);
+       g_value_set_double(dval, val);
+}
+
+static void
+xform_boolean_double(const GValue *bval, GValue *dval)
+{
+       gboolean b = g_value_get_boolean(bval);
+       double val = b;
+       g_value_set_double(dval, val);
+}
+
+void
+ghb_register_transforms()
+{
+       g_value_register_transform_func(G_TYPE_STRING, G_TYPE_INT64, 
+                                                               xform_string_int64);
+       g_value_register_transform_func(G_TYPE_STRING, G_TYPE_INT, 
+                                                               xform_string_int);
+       g_value_register_transform_func(G_TYPE_STRING, G_TYPE_DOUBLE, 
+                                                               xform_string_double);
+       g_value_register_transform_func(G_TYPE_BOOLEAN, G_TYPE_DOUBLE, 
+                                                               xform_boolean_double);
+}
diff --git a/gtk/src/values.h b/gtk/src/values.h
new file mode 100644 (file)
index 0000000..4000ad6
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * 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_VALUES_H_)
+#define _GHB_VALUES_H_
+
+#include <glib.h>
+#include <glib-object.h>
+
+typedef struct
+{
+       guchar *data;
+       gsize size;
+} ghb_rawdata_t;
+
+GType ghb_rawdata_get_type(void);
+
+GType ghb_array_get_type(void);
+GType ghb_dict_get_type(void);
+GValue* ghb_array_get_nth(const GValue *array, gint ii);
+void ghb_array_insert(GValue *gval, guint ii, GValue *val);
+void ghb_array_replace(GValue *gval, guint ii, GValue *val);
+void ghb_array_append(GValue *gval, GValue *val);
+void ghb_array_remove(GValue *gval, guint ii);
+gint ghb_array_len(const GValue *gval);
+void ghb_array_copy(GValue *arr1, GValue *arr2, gint count);
+
+void ghb_value_free(GValue *gval);
+GValue* ghb_value_new(GType gtype);
+GValue* ghb_value_dup(const GValue *val);
+gint ghb_value_int(const GValue *val);
+gint64 ghb_value_int64(const GValue *val);
+gdouble ghb_value_double(const GValue *val);
+gchar* ghb_value_string(const GValue *val);
+gboolean ghb_value_boolean(const GValue *val);
+
+GValue* ghb_string_value(const gchar *str);
+GValue* ghb_int64_value(gint64 ival);
+GValue* ghb_int_value(gint ival);
+GValue* ghb_double_value(gdouble dval);
+GValue* ghb_boolean_value(gboolean bval);
+
+gint ghb_value_cmp(const GValue *vala, const GValue *valb);
+GValue* ghb_string_value_new(const gchar *str);
+GValue* ghb_int64_value_new(gint64 ival);
+GValue* ghb_int_value_new(gint ival);
+GValue* ghb_double_value_new(gdouble dval);
+GValue* ghb_boolean_value_new(gboolean bval);
+GValue* ghb_dict_value_new(void);
+GValue* ghb_array_value_new(guint size);
+void ghb_array_value_reset(GValue *gval, guint size);
+
+GValue* ghb_date_value_new(GDate *date);
+GValue* ghb_rawdata_value_new(ghb_rawdata_t *data);
+
+void ghb_dict_insert(GValue *gval, gchar *key, GValue *val);
+void ghb_dict_iter_init(GHashTableIter *iter, GValue *gval);
+GValue* ghb_dict_lookup(GValue *gval, const gchar *key);
+gboolean ghb_dict_remove(GValue *gval, const gchar *key);
+void ghb_register_transforms(void);
+
+
+#endif // _GHB_VALUES_H_
diff --git a/gtk/src/widget_deps b/gtk/src/widget_deps
new file mode 100644 (file)
index 0000000..eb9ef27
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>AudioEncoder</key>
+       <array>
+               <string>AudioBitrate</string>
+               <string>AudioSamplerate</string>
+               <string>AudioMixdown</string>
+               <string>AudioTrackDRCSlider</string>
+       </array>
+       <key>ChapterMarkers</key>
+       <array>
+               <string>chapters_list</string>
+       </array>
+       <key>FileFormat</key>
+       <array>
+               <string>Mp4LargeFile</string>
+               <string>Mp4HttpOptimize</string>
+               <string>Mp4iPodCompatible</string>
+       </array>
+       <key>PictureAutoCrop</key>
+       <array>
+               <string>PictureTopCrop</string>
+               <string>PictureBottomCrop</string>
+               <string>PictureLeftCrop</string>
+               <string>PictureRightCrop</string>
+       </array>
+       <key>PictureDecomb</key>
+       <array>
+               <string>PictureDeinterlace</string>
+               <string>tweak_PictureDeinterlace</string>
+       </array>
+       <key>PictureKeepRatio</key>
+       <array>
+               <string>scale_height</string>
+       </array>
+       <key>VideoEncoder</key>
+       <array>
+               <string>x264_tab</string>
+               <string>x264_tab_label</string>
+               <string>Mp4iPodCompatible</string>
+               <string>directqp</string>
+       </array>
+       <key>VideoTwoPass</key>
+       <array>
+               <string>VideoTurboTwoPass</string>
+       </array>
+       <key>anamorphic</key>
+       <array>
+               <string>PictureKeepRatio</string>
+               <string>scale_height</string>
+       </array>
+       <key>autoscale</key>
+       <array>
+               <string>scale_width</string>
+               <string>scale_height</string>
+       </array>
+       <key>title</key>
+       <array>
+               <string>queue_add</string>
+               <string>queue_add_menu</string>
+               <string>preview_button</string>
+               <string>show_preview_menu</string>
+               <string>preview_frame</string>
+               <string>picture_label</string>
+               <string>picture_tab</string>
+               <string>chapters_label</string>
+               <string>chapters_tab</string>
+               <string>title</string>
+               <string>start_chapter</string>
+               <string>end_chapter</string>
+       </array>
+       <key>use_source_name</key>
+       <array>
+               <string>chapters_in_destination</string>
+       </array>
+       <key>vquality_type_bitrate</key>
+       <array>
+               <string>VideoAvgBitrate</string>
+       </array>
+       <key>vquality_type_constant</key>
+       <array>
+               <string>VideoQualitySlider</string>
+               <string>constant_rate_factor</string>
+               <string>VideoTwoPass</string>
+               <string>VideoTurboTwoPass</string>
+       </array>
+       <key>vquality_type_target</key>
+       <array>
+               <string>VideoTargetSize</string>
+       </array>
+       <key>x264_bframes</key>
+       <array>
+               <string>x264_weighted_bframes</string>
+               <string>x264_bpyramid</string>
+               <string>x264_direct</string>
+       </array>
+       <key>x264_cabac</key>
+       <array>
+               <string>x264_trellis</string>
+       </array>
+       <key>x264_me</key>
+       <array>
+               <string>x264_merange</string>
+       </array>
+       <key>x264_refs</key>
+       <array>
+               <string>x264_mixed_refs</string>
+       </array>
+</dict>
+</plist>
diff --git a/gtk/src/widget_reverse_deps b/gtk/src/widget_reverse_deps
new file mode 100644 (file)
index 0000000..fa9c804
--- /dev/null
@@ -0,0 +1,386 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>AudioBitrate</key>
+       <array>
+               <array>
+                       <string>AudioEncoder</string>
+                       <string>ac3</string>
+                       <true />
+               </array>
+       </array>
+       <key>AudioMixdown</key>
+       <array>
+               <array>
+                       <string>AudioEncoder</string>
+                       <string>ac3</string>
+                       <true />
+               </array>
+       </array>
+       <key>AudioSamplerate</key>
+       <array>
+               <array>
+                       <string>AudioEncoder</string>
+                       <string>ac3</string>
+                       <true />
+               </array>
+       </array>
+       <key>AudioTrackDRCSlider</key>
+       <array>
+               <array>
+                       <string>AudioEncoder</string>
+                       <string>ac3</string>
+                       <true />
+               </array>
+       </array>
+       <key>Mp4HttpOptimize</key>
+       <array>
+               <array>
+                       <string>FileFormat</string>
+                       <string>mp4|m4v</string>
+                       <false />
+               </array>
+       </array>
+       <key>Mp4LargeFile</key>
+       <array>
+               <array>
+                       <string>FileFormat</string>
+                       <string>mp4|m4v</string>
+                       <false />
+               </array>
+       </array>
+       <key>Mp4iPodCompatible</key>
+       <array>
+               <array>
+                       <string>FileFormat</string>
+                       <string>mp4|m4v</string>
+                       <false />
+               </array>
+               <array>
+                       <string>VideoEncoder</string>
+                       <string>x264</string>
+                       <false />
+               </array>
+       </array>
+       <key>PictureBottomCrop</key>
+       <array>
+               <array>
+                       <string>PictureAutoCrop</string>
+                       <string>FALSE</string>
+                       <false />
+               </array>
+       </array>
+       <key>PictureDeinterlace</key>
+       <array>
+               <array>
+                       <string>PictureDecomb</string>
+                       <string>TRUE</string>
+                       <true />
+               </array>
+       </array>
+       <key>PictureKeepRatio</key>
+       <array>
+               <array>
+                       <string>anamorphic</string>
+                       <string>FALSE</string>
+                       <false />
+               </array>
+       </array>
+       <key>PictureLeftCrop</key>
+       <array>
+               <array>
+                       <string>PictureAutoCrop</string>
+                       <string>FALSE</string>
+                       <false />
+               </array>
+       </array>
+       <key>PictureRightCrop</key>
+       <array>
+               <array>
+                       <string>PictureAutoCrop</string>
+                       <string>FALSE</string>
+                       <false />
+               </array>
+       </array>
+       <key>PictureTopCrop</key>
+       <array>
+               <array>
+                       <string>PictureAutoCrop</string>
+                       <string>FALSE</string>
+                       <false />
+               </array>
+       </array>
+       <key>VideoAvgBitrate</key>
+       <array>
+               <array>
+                       <string>vquality_type_bitrate</string>
+                       <string>TRUE</string>
+                       <false />
+               </array>
+       </array>
+       <key>VideoQualitySlider</key>
+       <array>
+               <array>
+                       <string>vquality_type_constant</string>
+                       <string>TRUE</string>
+                       <false />
+               </array>
+       </array>
+       <key>VideoTargetSize</key>
+       <array>
+               <array>
+                       <string>vquality_type_target</string>
+                       <string>TRUE</string>
+                       <false />
+               </array>
+       </array>
+       <key>VideoTurboTwoPass</key>
+       <array>
+               <array>
+                       <string>vquality_type_constant</string>
+                       <string>TRUE</string>
+                       <true />
+               </array>
+               <array>
+                       <string>VideoTwoPass</string>
+                       <string>TRUE</string>
+                       <false />
+               </array>
+       </array>
+       <key>VideoTwoPass</key>
+       <array>
+               <array>
+                       <string>vquality_type_constant</string>
+                       <string>TRUE</string>
+                       <true />
+               </array>
+       </array>
+       <key>chapters_in_destination</key>
+       <array>
+               <array>
+                       <string>use_source_name</string>
+                       <string>TRUE</string>
+                       <false />
+               </array>
+       </array>
+       <key>chapters_label</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>chapters_list</key>
+       <array>
+               <array>
+                       <string>ChapterMarkers</string>
+                       <string>TRUE</string>
+                       <false />
+               </array>
+       </array>
+       <key>chapters_tab</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>constant_rate_factor</key>
+       <array>
+               <array>
+                       <string>vquality_type_constant</string>
+                       <string>TRUE</string>
+                       <false />
+               </array>
+       </array>
+       <key>directqp</key>
+       <array>
+               <array>
+                       <string>VideoEncoder</string>
+                       <string>x264|ffmpeg</string>
+                       <false />
+               </array>
+       </array>
+       <key>end_chapter</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>picture_label</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>picture_tab</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>preview_button</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>preview_frame</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>queue_add</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>queue_add_menu</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>scale_height</key>
+       <array>
+               <array>
+                       <string>autoscale</string>
+                       <string>FALSE</string>
+                       <false />
+               </array>
+               <array>
+                       <string>anamorphic</string>
+                       <string>FALSE</string>
+                       <false />
+               </array>
+               <array>
+                       <string>PictureKeepRatio</string>
+                       <string>FALSE</string>
+                       <false />
+               </array>
+       </array>
+       <key>scale_width</key>
+       <array>
+               <array>
+                       <string>autoscale</string>
+                       <string>FALSE</string>
+                       <false />
+               </array>
+       </array>
+       <key>show_preview_menu</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>start_chapter</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>title</key>
+       <array>
+               <array>
+                       <string>title</string>
+                       <string>none</string>
+                       <true />
+               </array>
+       </array>
+       <key>tweak_PictureDeinterlace</key>
+       <array>
+               <array>
+                       <string>PictureDecomb</string>
+                       <string>TRUE</string>
+                       <true />
+               </array>
+       </array>
+       <key>x264_bpyramid</key>
+       <array>
+               <array>
+                       <string>x264_bframes</string>
+                       <string>&lt;2</string>
+                       <true />
+               </array>
+       </array>
+       <key>x264_direct</key>
+       <array>
+               <array>
+                       <string>x264_bframes</string>
+                       <string>0</string>
+                       <true />
+               </array>
+       </array>
+       <key>x264_merange</key>
+       <array>
+               <array>
+                       <string>x264_me</string>
+                       <string>umh|esa</string>
+                       <false />
+               </array>
+       </array>
+       <key>x264_mixed_refs</key>
+       <array>
+               <array>
+                       <string>x264_refs</string>
+                       <string>&lt;2</string>
+                       <true />
+               </array>
+       </array>
+       <key>x264_tab</key>
+       <array>
+               <array>
+                       <string>VideoEncoder</string>
+                       <string>x264</string>
+                       <false />
+               </array>
+       </array>
+       <key>x264_tab_label</key>
+       <array>
+               <array>
+                       <string>VideoEncoder</string>
+                       <string>x264</string>
+                       <false />
+               </array>
+       </array>
+       <key>x264_trellis</key>
+       <array>
+               <array>
+                       <string>x264_cabac</string>
+                       <string>TRUE</string>
+                       <false />
+               </array>
+       </array>
+       <key>x264_weighted_bframes</key>
+       <array>
+               <array>
+                       <string>x264_bframes</string>
+                       <string>0</string>
+                       <true />
+               </array>
+       </array>
+</dict>
+</plist>
diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c
new file mode 100644 (file)
index 0000000..154defb
--- /dev/null
@@ -0,0 +1,608 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * x264handler.c
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ * 
+ * x264handler.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 <gtk/gtk.h>
+#include <string.h>
+#include "settings.h"
+#include "values.h"
+#include "callbacks.h"
+#include "presets.h"
+#include "x264handler.h"
+
+static void x264_opt_update(signal_user_data_t *ud, GtkWidget *widget);
+static gchar* sanitize_x264opts(signal_user_data_t *ud, const gchar *options);
+
+// Flag needed to prevent x264 options processing from chasing its tail
+static gboolean ignore_options_update = FALSE;
+
+void
+x264_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       ghb_widget_to_setting(ud->settings, widget);
+       if (!ignore_options_update)
+       {
+               ignore_options_update = TRUE;
+               x264_opt_update(ud, widget);
+               ignore_options_update = FALSE;
+       }
+       ghb_check_dependency(ud, widget);
+       ghb_clear_presets_selection(ud);
+}
+
+void
+x264_entry_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+       g_debug("x264_entry_changed_cb ()");
+       if (!ignore_options_update)
+       {
+               GtkWidget *textview;
+               gchar *options;
+
+               textview = GTK_WIDGET(GHB_WIDGET(ud->builder, "x264Option"));
+               ghb_widget_to_setting(ud->settings, textview);
+               options = ghb_settings_get_string(ud->settings, "x264Option");
+               ignore_options_update = TRUE;
+               ghb_x264_parse_options(ud, options);
+               if (!GTK_WIDGET_HAS_FOCUS(textview))
+               {
+                       gchar *sopts;
+
+                       sopts = sanitize_x264opts(ud, options);
+                       ghb_ui_update(ud, "x264Option", ghb_string_value(sopts));
+                       ghb_x264_parse_options(ud, sopts);
+                       g_free(sopts);
+               }
+               g_free(options);
+               ignore_options_update = FALSE;
+       }
+}
+
+gboolean
+x264_focus_out_cb(GtkWidget *widget, GdkEventFocus *event, 
+       signal_user_data_t *ud)
+{
+       gchar *options, *sopts;
+
+       ghb_widget_to_setting(ud->settings, widget);
+       options = ghb_settings_get_string(ud->settings, "x264Option");
+       sopts = sanitize_x264opts(ud, options);
+       ignore_options_update = TRUE;
+       if (sopts != NULL)
+       {
+               ghb_ui_update(ud, "x264Option", ghb_string_value(sopts));
+               ghb_x264_parse_options(ud, sopts);
+       }
+       g_free(options);
+       g_free(sopts);
+       ignore_options_update = FALSE;
+       return FALSE;
+}
+
+enum
+{
+       X264_OPT_DEBLOCK,
+       X264_OPT_INT,
+       X264_OPT_COMBO,
+       X264_OPT_BOOL,
+};
+
+struct x264_opt_map_s
+{
+       gchar **opt_syns;
+       gchar *name;
+       gchar *def_val;
+       gint type;
+       gboolean found;
+};
+
+static gchar *x264_ref_syns[] = {"ref", "frameref", NULL};
+static gchar *x264_mixed_syns[] = {"mixed-refs", "mixed_refs", NULL};
+static gchar *x264_bframes_syns[] = {"bframes", NULL};
+static gchar *x264_direct_syns[] = 
+       {"direct", "direct-pred", "direct_pred", NULL};
+static gchar *x264_weightb_syns[] = {"weightb", "weight-b", "weight_b", NULL};
+static gchar *x264_bpyramid_syns[] = {"b-pyramid", "b_pyramid", NULL};
+static gchar *x264_me_syns[] = {"me", NULL};
+static gchar *x264_merange_syns[] = {"merange", "me-range", "me_range", NULL};
+static gchar *x264_subme_syns[] = {"subme", "subq", NULL};
+static gchar *x264_analyse_syns[] = {"analyse", "partitions", NULL};
+static gchar *x264_8x8dct_syns[] = {"8x8dct", NULL};
+static gchar *x264_deblock_syns[] = {"deblock", "filter", NULL};
+static gchar *x264_trellis_syns[] = {"trellis", NULL};
+static gchar *x264_pskip_syns[] = {"no-fast-pskip", "no_fast_pskip", NULL};
+static gchar *x264_decimate_syns[] = 
+       {"no-dct-decimate", "no_dct_decimate", NULL};
+static gchar *x264_cabac_syns[] = {"cabac", NULL};
+
+static gint
+find_syn_match(const gchar *opt, gchar **syns)
+{
+       gint ii;
+       for (ii = 0; syns[ii] != NULL; ii++)
+       {
+               if (strcmp(opt, syns[ii]) == 0)
+                       return ii;
+       }
+       return -1;
+}
+
+struct x264_opt_map_s x264_opt_map[] =
+{
+       {x264_ref_syns, "x264_refs", "1", X264_OPT_INT},
+       {x264_mixed_syns, "x264_mixed_refs", "0", X264_OPT_BOOL},
+       {x264_bframes_syns, "x264_bframes", "0", X264_OPT_INT},
+       {x264_direct_syns, "x264_direct", "spatial", X264_OPT_COMBO},
+       {x264_weightb_syns, "x264_weighted_bframes", "0", X264_OPT_BOOL},
+       {x264_bpyramid_syns, "x264_bpyramid", "0", X264_OPT_BOOL},
+       {x264_me_syns, "x264_me", "hex", X264_OPT_COMBO},
+       {x264_merange_syns, "x264_merange", "16", X264_OPT_INT},
+       {x264_subme_syns, "x264_subme", "6", X264_OPT_COMBO},
+       {x264_analyse_syns, "x264_analyse", "some", X264_OPT_COMBO},
+       {x264_8x8dct_syns, "x264_8x8dct", "0", X264_OPT_BOOL},
+       {x264_deblock_syns, "x264_deblock_alpha", "0,0", X264_OPT_DEBLOCK},
+       {x264_deblock_syns, "x264_deblock_beta", "0,0", X264_OPT_DEBLOCK},
+       {x264_trellis_syns, "x264_trellis", "0", X264_OPT_COMBO},
+       {x264_pskip_syns, "x264_no_fast_pskip", "0", X264_OPT_BOOL},
+       {x264_decimate_syns, "x264_no_dct_decimate", "0", X264_OPT_BOOL},
+       {x264_cabac_syns, "x264_cabac", "1", X264_OPT_BOOL},
+};
+#define X264_OPT_MAP_SIZE (sizeof(x264_opt_map)/sizeof(struct x264_opt_map_s))
+
+static const gchar*
+x264_opt_get_default(const gchar *opt)
+{
+       gint jj;
+       for (jj = 0; jj < X264_OPT_MAP_SIZE; jj++)
+       {
+               if (find_syn_match(opt, x264_opt_map[jj].opt_syns) >= 0)
+               {
+                       return x264_opt_map[jj].def_val;
+               }
+       }
+       return "";
+}
+
+static void
+x264_update_int(signal_user_data_t *ud, const gchar *name, const gchar *val)
+{
+       gint ival;
+
+       if (val == NULL) return;
+       ival = g_strtod (val, NULL);
+       ghb_ui_update(ud, name, ghb_int64_value(ival));
+}
+
+static gchar *true_str[] =
+{
+       "true",
+       "yes",
+       "1",
+       NULL
+};
+
+static gboolean 
+str_is_true(const gchar *str)
+{
+       gint ii;
+       for (ii = 0; true_str[ii]; ii++)
+       {
+               if (g_ascii_strcasecmp(str, true_str[ii]) == 0)
+                       return TRUE;
+       }
+       return FALSE;
+}
+
+static void
+x264_update_bool(signal_user_data_t *ud, const gchar *name, const gchar *val)
+{
+       if (val == NULL)
+               ghb_ui_update(ud, name, ghb_boolean_value(1));
+       else
+               ghb_ui_update(ud, name, ghb_boolean_value(str_is_true(val)));
+}
+
+static void
+x264_update_combo(signal_user_data_t *ud, const gchar *name, const gchar *val)
+{
+       GtkTreeModel *store;
+       GtkTreeIter iter;
+       gchar *shortOpt;
+       gint ivalue;
+       gboolean foundit = FALSE;
+       GtkWidget *widget;
+
+       if (val == NULL) return;
+       widget = GHB_WIDGET(ud->builder, name);
+       if (widget == NULL)
+       {
+               g_debug("Failed to find widget for key: %s\n", name);
+               return;
+       }
+       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 (strcmp(shortOpt, val) == 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)
+       {
+               if (gtk_tree_model_get_iter_first (store, &iter))
+               {
+                       do
+                       {
+                               gtk_tree_model_get(store, &iter, 2, &shortOpt, 3, &ivalue, -1);
+                               if (strcmp(shortOpt, "custom") == 0)
+                               {
+                                       gtk_list_store_set(GTK_LIST_STORE(store), &iter, 4, val, -1);
+                                       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));
+               }
+       }
+       // 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, widget);
+}
+
+static void
+x264_update_deblock(signal_user_data_t *ud, const gchar *xval)
+{
+       gdouble avalue, bvalue;
+       gchar *end;
+       gchar *val;
+       gchar *bval = NULL;
+
+       if (xval == NULL) return;
+       val = g_strdup(xval);
+       bvalue = avalue = 0;
+       if (val != NULL) 
+       {
+               gchar *pos = strchr(val, ',');
+               if (pos != NULL)
+               {
+                       bval = pos + 1;
+                       *pos = 0;
+               }
+               avalue = g_strtod (val, &end);
+               if (bval != NULL)
+               {
+                       bvalue = g_strtod (bval, &end);
+               }
+       }
+       g_free(val);
+       ghb_ui_update(ud, "x264_deblock_alpha", ghb_int64_value(avalue));
+       ghb_ui_update(ud, "x264_deblock_beta", ghb_int64_value(bvalue));
+}
+
+void
+ghb_x264_parse_options(signal_user_data_t *ud, const gchar *options)
+{
+       gchar **split = g_strsplit(options, ":", -1);
+       if (split == NULL) return;
+
+       gint ii;
+       gint jj;
+
+       for (jj = 0; jj < X264_OPT_MAP_SIZE; jj++)
+               x264_opt_map[jj].found = FALSE;
+
+       for (ii = 0; split[ii] != NULL; ii++)
+       {
+               gchar *val = NULL;
+               gchar *pos = strchr(split[ii], '=');
+               if (pos != NULL)
+               {
+                       val = pos + 1;
+                       *pos = 0;
+               }
+               for (jj = 0; jj < X264_OPT_MAP_SIZE; jj++)
+               {
+                       if (find_syn_match(split[ii], x264_opt_map[jj].opt_syns) >= 0)
+                       {
+                               x264_opt_map[jj].found = TRUE;
+                               switch(x264_opt_map[jj].type)
+                               {
+                               case X264_OPT_INT:
+                                       x264_update_int(ud, x264_opt_map[jj].name, val);
+                                       break;
+                               case X264_OPT_BOOL:
+                                       x264_update_bool(ud, x264_opt_map[jj].name, val);
+                                       break;
+                               case X264_OPT_COMBO:
+                                       x264_update_combo(ud, x264_opt_map[jj].name, val);
+                                       break;
+                               case X264_OPT_DEBLOCK:
+                                       // dirty little hack.  mark deblock_beta found as well
+                                       x264_opt_map[jj+1].found = TRUE;
+                                       x264_update_deblock(ud, val);
+                                       break;
+                               }
+                               break;
+                       }
+               }
+       }
+       // For any options not found in the option string, set ui to
+       // default values
+       for (jj = 0; jj < X264_OPT_MAP_SIZE; jj++)
+       {
+               if (!x264_opt_map[jj].found)
+               {
+                       gchar *val = strdup(x264_opt_map[jj].def_val);
+                       switch(x264_opt_map[jj].type)
+                       {
+                       case X264_OPT_INT:
+                               x264_update_int(ud, x264_opt_map[jj].name, val);
+                               break;
+                       case X264_OPT_BOOL:
+                               x264_update_bool(ud, x264_opt_map[jj].name, val);
+                               break;
+                       case X264_OPT_COMBO:
+                               x264_update_combo(ud, x264_opt_map[jj].name, val);
+                               break;
+                       case X264_OPT_DEBLOCK:
+                               x264_update_deblock(ud, val);
+                               break;
+                       }
+                       x264_opt_map[jj].found = TRUE;
+                       g_free(val);
+               }
+       }
+       g_strfreev(split);
+}
+
+gchar*
+get_deblock_val(signal_user_data_t *ud)
+{
+       gchar *alpha, *beta;
+       gchar *result;
+       alpha = ghb_settings_get_string(ud->settings, "x264_deblock_alpha");
+       beta = ghb_settings_get_string(ud->settings, "x264_deblock_beta");
+       result = g_strdup_printf("%s,%s", alpha, beta);
+       g_free(alpha);
+       g_free(beta);
+       return result;
+}
+
+static void
+x264_opt_update(signal_user_data_t *ud, GtkWidget *widget)
+{
+       gint jj;
+       const gchar *name = gtk_widget_get_name(widget);
+       gchar **opt_syns = NULL;
+       const gchar *def_val = NULL;
+       gint type;
+
+       for (jj = 0; jj < X264_OPT_MAP_SIZE; jj++)
+       {
+               if (strcmp(name, x264_opt_map[jj].name) == 0)
+               {
+                       // found the options that needs updating
+                       opt_syns = x264_opt_map[jj].opt_syns;
+                       def_val = x264_opt_map[jj].def_val;
+                       type = x264_opt_map[jj].type;
+                       break;
+               }
+       }
+       if (opt_syns != NULL)
+       {
+               GString *x264opts = g_string_new("");
+               gchar *options;
+               gchar **split = NULL;
+               gint ii;
+               gboolean foundit = FALSE;
+
+               options = ghb_settings_get_string(ud->settings, "x264Option");
+               if (options)
+               {
+                       split = g_strsplit(options, ":", -1);
+                       g_free(options);
+               }
+               for (ii = 0; split && split[ii] != NULL; ii++)
+               {
+                       gint syn;
+                       gchar *val = NULL;
+                       gchar *pos = strchr(split[ii], '=');
+                       if (pos != NULL)
+                       {
+                               val = pos + 1;
+                               *pos = 0;
+                       }
+                       syn = find_syn_match(split[ii], opt_syns);
+                       if (syn >= 0)
+                       { // Updating this option
+                               gchar *val;
+                               foundit = TRUE;
+                               if (type == X264_OPT_DEBLOCK)
+                                       val = get_deblock_val(ud);
+                               else
+                               {
+                                       GValue *gval;
+                                       gval = ghb_widget_value(widget);
+                                       if (G_VALUE_TYPE(gval) == G_TYPE_BOOLEAN)
+                                       {
+                                               if (ghb_value_boolean(gval))
+                                                       val = g_strdup("1");
+                                               else
+                                                       val = g_strdup("0");
+                                       }
+                                       else
+                                       {
+                                               val = ghb_widget_string(widget);
+                                       }
+                                       ghb_value_free(gval);
+                               }
+                               if (strcmp(def_val, val) != 0)
+                               {
+                                       g_string_append_printf(x264opts, "%s=%s:", opt_syns[syn], val);
+                               }
+                               g_free(val);
+                       }
+                       else if (val != NULL)
+                               g_string_append_printf(x264opts, "%s=%s:", split[ii], val);
+                       else
+                               g_string_append_printf(x264opts, "%s:", split[ii]);
+
+               }
+               if (split) g_strfreev(split);
+               if (!foundit)
+               {
+                       gchar *val;
+                       if (type == X264_OPT_DEBLOCK)
+                               val = get_deblock_val(ud);
+                       else
+                       {
+                               GValue *gval;
+                               gval = ghb_widget_value(widget);
+                               if (G_VALUE_TYPE(gval) == G_TYPE_BOOLEAN)
+                               {
+                                       if (ghb_value_boolean(gval))
+                                               val = g_strdup("1");
+                                       else
+                                               val = g_strdup("0");
+                               }
+                               else
+                               {
+                                       val = ghb_widget_string(widget);
+                               }
+                               ghb_value_free(gval);
+                       }
+                       if (strcmp(def_val, val) != 0)
+                       {
+                               g_string_append_printf(x264opts, "%s=%s:", opt_syns[0], val);
+                       }
+                       g_free(val);
+               }
+               // Update the options value
+               // strip the trailing ":"
+               gchar *result;
+               gint len;
+               result = g_string_free(x264opts, FALSE);
+               len = strlen(result);
+               if (len > 0) result[len - 1] = 0;
+               gchar *sopts;
+               sopts = sanitize_x264opts(ud, result);
+               ghb_ui_update(ud, "x264Option", ghb_string_value(sopts));
+               ghb_x264_parse_options(ud, sopts);
+               g_free(sopts);
+               g_free(result);
+       }
+}
+
+static void
+x264_remove_opt(gchar **opts, gchar **opt_syns)
+{
+       gint ii;
+       for (ii = 0; opts[ii] != NULL; ii++)
+       {
+               gchar *opt;
+               opt = g_strdup(opts[ii]);
+               gchar *pos = strchr(opt, '=');
+               if (pos != NULL)
+               {
+                       *pos = 0;
+               }
+               if (find_syn_match(opt, opt_syns) >= 0)
+               {
+                       // Mark as deleted
+                       opts[ii][0] = 0;
+               }
+               g_free(opt);
+       }
+}
+
+// Construct the x264 options string
+// The result is allocated, so someone must free it at some point.
+static gchar*
+sanitize_x264opts(signal_user_data_t *ud, const gchar *options)
+{
+       GString *x264opts = g_string_new("");
+       gchar **split = g_strsplit(options, ":", -1);
+
+       // Remove entries that match the defaults
+       gint ii;
+       for (ii = 0; split[ii] != NULL; ii++)
+       {
+               gchar *val = NULL;
+               gchar *opt = g_strdup(split[ii]);
+               gchar *pos = strchr(opt, '=');
+               if (pos != NULL)
+               {
+                       val = pos + 1;
+                       *pos = 0;
+               }
+               else
+               {
+                       val = "1";
+               }
+               const gchar *def_val = x264_opt_get_default(opt);
+               if (strcmp(val, def_val) == 0)
+               {
+                       // Matches the default, so remove it
+                       split[ii][0] = 0;
+               }
+               g_free(opt);
+       }
+       gint refs = ghb_settings_get_int(ud->settings, "x264_refs");
+       if (refs <= 1)
+       {
+               x264_remove_opt(split, x264_mixed_syns);
+       }
+       gint bframes = ghb_settings_get_int(ud->settings, "x264_bframes");
+       if (bframes == 0)
+       {
+               x264_remove_opt(split, x264_weightb_syns);
+               x264_remove_opt(split, x264_direct_syns);
+       }
+       if (bframes <= 1)
+       {
+               x264_remove_opt(split, x264_bpyramid_syns);
+       }
+       gchar *me = ghb_settings_get_string(ud->settings, "x264_me");
+       if (!(strcmp(me, "umh") == 0 || strcmp(me, "esa") == 0))
+       {
+               x264_remove_opt(split, x264_merange_syns);
+       }
+       g_free(me);
+       if (!ghb_settings_get_boolean(ud->settings, "x264_cabac"))
+       {
+               x264_remove_opt(split, x264_trellis_syns);
+       }
+       for (ii = 0; split[ii] != NULL; ii++)
+       {
+               if (split[ii][0] != 0)
+                       g_string_append_printf(x264opts, "%s:", split[ii]);
+       }
+       g_strfreev(split);
+       // 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;
+}
+
diff --git a/gtk/src/x264handler.h b/gtk/src/x264handler.h
new file mode 100644 (file)
index 0000000..89e906a
--- /dev/null
@@ -0,0 +1,32 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * x264handler.h
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ * 
+ * x264handler.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(_X264HANDLER_H_)
+#define _X264HANDLER_H_
+
+#include "settings.h"
+
+void ghb_x264_parse_options(signal_user_data_t *ud, const gchar *options);
+
+#endif // _X264HANDLER_H_
diff --git a/gtk/todo b/gtk/todo
new file mode 100644 (file)
index 0000000..5448bdf
--- /dev/null
+++ b/gtk/todo
@@ -0,0 +1,63 @@
+X - how title of dvd in source part of display
+X - if nothing in the queue and run pressed, add to queue and run.
+X - allow ac3 passthru only for ac3 sources
+X - figure out updater stuff (there really isn't any)
+X - reset progress bar before starting scan of new dvd
+X - selecting preset, change setting, select preset again -- reset setting
+X - grey out audio + button when no audio present
+X - also grey out all audio controls
+X - when adding to queue, check if file name exits in queue or filesystem
+X - add preferences for source, destination, use source label as dest file
+X - populate bitrate field with calculated value when target size is selected.
+X - do preset descriptions get save to file correctly if they are multiline?
+X - x264 string
+    bframes < 2 disable pyramid
+    cabac == 0 disable trellis
+    subme < 6 disable brdo
+    bframes < 1 disable brdo
+    analyse none disable direct
+    refs < 2 disable mixed
+X - put preferences defalt values into internal_defaults file
+X - theora not allowed in mp4 files.
+X - mp4 faac and ac3
+X - avi lame and ac3
+X - ogm vorbis and lame (not ac3?)
+X - when vfr selected, force framerate conbo to same as source
+X - chapters - after edit, <CR> should start editing next chapter name
+X - add decomb option to picture cleanup
+X - add option to use same sample rate as source
+X - when a title is changed. update the subtitle selection; solved by 
+    listing all languages when there is no disc and refreshing from
+    preset when a title is selected.
+X - detelecine is implied when vfr is enabled.  make sure it gets set and 
+    gray it if vfr enabled
+X - add about menu
+X - mixdowns need to be adjusted depending on source.  you can't mix 
+    to 5.1 if the
+    source is less than 5.1
+X - framerate "same as source" needs to set job->cfr true
+X - when source is not AC3 and a preset with AC3 + second audio chosen. 
+    don't add the ac3 audio.
+X - create pref option to trim cropping instead of scale in order to 
+    meet alignment constraints
+X - when a setting is chosen for the user due to verification checks, update 
+    the setting so that the change is visible to the user.
+X - make selected audio red if not same as combo's. instead, I eliminated
+    the "update" button.  The currently selected item in the list
+    now updates as you change the combo boxes.  Add creates a new entry
+    in the list with the current settings. i.e. you start with a duplicate
+    of the current selection.
+X - submitted patch - ffmpeg loose ana trunc patch
+X - clean up hb.XXXXX turds in /tmp.  it seems many linux distros don't clean
+    /tmp so this shite piles up.
+X - add detailed help. added link to HandBrake Guide
+X - add preferences dialog to give access to some settings
+X - force m4v when ac3+mp4
+X - prevent optimized mp4s from having ac3
+? - prevent optimized mp4s from having chapters
+X - move vfr to video tab?
+P - submitted patch - job cancel patch
+P - submitted patch - preview corruption padding patch
+preview using vlc?
+add ability to delete builtin presets and restore them
+add ability to drag-n-drop presets to reorder them
diff --git a/jam b/jam
new file mode 100755 (executable)
index 0000000..12884f5
Binary files /dev/null and b/jam differ
diff --git a/libhb/Jamfile b/libhb/Jamfile
new file mode 100644 (file)
index 0000000..51158b9
--- /dev/null
@@ -0,0 +1,40 @@
+# $Id: Jamfile,v 1.34 2005/10/15 18:05:03 titer Exp $
+#
+# This file is part of the HandBrake source code.
+# Homepage: <http://handbrake.fr/>.
+# It may be used under the terms of the GNU General Public License.
+
+SubDir TOP libhb : hbversion.h ;
+
+LIBHB_SRC =
+common.c hb.c ports.c scan.c work.c decmpeg2.c encavcodec.c update.c
+demuxmpeg.c fifo.c render.c reader.c muxcommon.c muxmp4.c sync.c stream.c
+decsub.c deca52.c decdca.c encfaac.c declpcm.c encx264.c decavcodec.c encxvid.c
+muxavi.c enclame.c muxogm.c encvorbis.c dvd.c muxmkv.c deblock.c deinterlace.c 
+denoise.c detelecine.c decomb.c lang.c enctheora.c ;
+
+Library libhb : $(LIBHB_SRC) ;
+
+ObjectCcFlags $(LIBHB_SRC) : -I$(TOP)/contrib/include ;
+ObjectDefines $(LIBHB_SRC) : __LIBHB__ ;
+ObjectC++Flags $(LIBHB_SRC) : -I$(TOP)/contrib/include ;
+
+# turn the version number, etc., into an include file for cretinous build
+# systems (XCode) that can't run shell commands
+rule HBVersion
+{
+    Clean clean : $(TOP)/libhb/$(1) ;
+}
+actions HBVersion
+{
+    echo "#ifndef HB_BUILD" > $(TOP)/libhb/$(1)
+    echo "#define HB_BUILD $(HB_BUILD)" >> $(TOP)/libhb/$(1)
+    echo "#endif" >> $(TOP)/libhb/$(1)
+    echo "#ifndef HB_VERSION" >> $(TOP)/libhb/$(1)
+    echo "#define HB_VERSION \"$(HB_VERSION)\"" >> $(TOP)/libhb/$(1)
+    echo "#endif" >> $(TOP)/libhb/$(1)
+    echo "#ifndef HB_APPCAST_URL" >> $(TOP)/libhb/$(1)
+    echo "#define APPCAST_URL \"$(APPCAST_URL)\"" >> $(TOP)/libhb/$(1)
+    echo "#endif" >> $(TOP)/libhb/$(1)
+}
+HBVersion hbversion.h ;
diff --git a/libhb/Makefile b/libhb/Makefile
new file mode 100644 (file)
index 0000000..858d5b1
--- /dev/null
@@ -0,0 +1,100 @@
+include ../Makefile.config
+
+SYSTEM = $(shell uname -s)
+
+ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT)
+       SYSDEF=-DSYS_CYGWIN
+endif
+
+ifeq ($(SYSTEM),FreeBSD)
+       SYSDEF = -DSYS_FREEBSD
+       LDFLAGS += -pthread -lm
+endif
+       
+ifeq ($(SYSTEM),NetBSD)
+       SYSDEF = -DSYS_NETBSD
+       LDFLAGS += -lpthread -lm
+endif
+       
+ifeq ($(SYSTEM),Linux)
+       SYSDEF = -DSYS_LINUX $(HB_DEFPPC) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+       LDFLAGS += -lpthread -lm -ldl
+endif
+
+SRCS = common.c hb.c ports.c scan.c work.c decmpeg2.c encavcodec.c enctheora.c \
+          update.c demuxmpeg.c fifo.c render.c reader.c muxcommon.c stream.c \
+          muxmp4.c sync.c decsub.c deca52.c decdca.c encfaac.c declpcm.c encx264.c \
+          decavcodec.c encxvid.c muxmkv.c muxavi.c enclame.c muxogm.c encvorbis.c \
+          dvd.c deblock.c deinterlace.c denoise.c detelecine.c decomb.c lang.c
+OTMP = $(SRCS:%.c=%.o) 
+OBJS = $(OTMP:%.cpp=%.o)
+
+CONTRIBS = ../contrib/lib/liba52.a ../contrib/lib/libavformat.a \
+                  ../contrib/lib/libavcodec.a ../contrib/lib/libavutil.a \
+                  ../contrib/lib/libdca.a ../contrib/lib/libdvdread.a  \
+                  ../contrib/lib/libfaac.a ../contrib/lib/libmp3lame.a \
+                  ../contrib/lib/libmpeg2.a ../contrib/lib/libmpeg2convert.a \
+                  ../contrib/lib/libvorbis.a ../contrib/lib/libvorbisenc.a \
+                  ../contrib/lib/libvorbisfile.a ../contrib/lib/libogg.a \
+                  ../contrib/lib/libsamplerate.a ../contrib/lib/libx264.a \
+                  ../contrib/lib/libxvidcore.a  ../contrib/lib/libmp4v2.a \
+                  ../contrib/lib/libmkv.a ../contrib/lib/libswscale.a \
+                  ../contrib/lib/libtheora.a ../contrib/lib/libfaad.a
+                  
+ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT)
+       CONTRIBS += ../contrib/lib/libz.a ../contrib/lib/libbz2.a
+endif
+
+CFLAGS += -I../contrib/include -D__LIBHB__ -DUSE_PTHREAD $(SYSDEF) -Wall -g -O3 -funroll-loops
+
+CXXFLAGS += -I../contrib/include -D__LIBHB__ -DUSE_PTHREAD $(SYSDEF)
+
+ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT)
+all: libhb.a libhb.dll
+else
+all: libhb.a
+
+endif
+
+libhb.a: $(OBJS)
+       @echo "Library $@"
+       @ar ru $@ $(OBJS)
+       @ranlib $@
+
+libhb.so: $(OBJS)
+       @echo "Shared library $@"
+       @g++ -o $@ $(OBJS) $(CONTRIBS) -shared $(CFLAGS)  || \
+       ( echo "Compile line for $@ was:"; echo $$CMD; false )
+
+libhb.dll: $(OBJS)
+       @echo "Shared library $@"
+       @g++ -o $@ $(OBJS) $(CONTRIBS) -shared $(CFLAGS)  || \
+       ( echo "Compile line for $@ was:"; echo $$CMD; false )
+
+%.o: %.c
+       @echo "Cc $@"
+       echo $(CC) $(CFLAGS)
+       @CMD="$(CC) $(CFLAGS) -o $@ -c $<"; $$CMD || \
+         ( echo "Compile line for $@ was:"; echo $$CMD; false )
+
+%.o: %.cpp
+       @echo "Cc $@"
+       @CMD="$(CC) $(CFLAGS) -o $@ -c $<"; $$CMD || \
+       ( echo "Compile line for $@ was:"; echo $$CMD; false )
+
+       
+clean:
+       @echo "Clean libhb.a"
+       @$(RM) libhb.*
+       @echo "Clean libhb.so"
+       @$(RM) libhb.so
+       @echo "Clean $(OBJS)"
+       @$(RM) $(OBJS)
+
+.depend: $(SRCS)
+       @echo "Checking dependencies..."
+       @$(RM) .depend
+       @$(foreach SRC, $(SRCS), $(CC) -MM $(SRC) $(CFLAGS) >> .depend;)
+       
+-include .depend
+
diff --git a/libhb/common.c b/libhb/common.c
new file mode 100644 (file)
index 0000000..7d26905
--- /dev/null
@@ -0,0 +1,806 @@
+/* $Id: common.c,v 1.15 2005/03/17 19:22:47 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include <stdarg.h>
+#include <time.h>
+#include <sys/time.h>
+
+#include "common.h"
+
+/**********************************************************************
+ * Global variables
+ *********************************************************************/
+hb_rate_t hb_video_rates[] =
+{ { "5",  5400000 }, { "10",     2700000 }, { "12", 2250000 },
+  { "15", 1800000 }, { "23.976", 1126125 }, { "24", 1125000 },
+  { "25", 1080000 }, { "29.97",  900900  } };
+int hb_video_rates_count = sizeof( hb_video_rates ) /
+                           sizeof( hb_rate_t );
+
+hb_rate_t hb_audio_rates[] =
+{ { "22.05", 22050 }, { "24", 24000 }, { "32", 32000 },
+  { "44.1",  44100 }, { "48", 48000 } };
+int hb_audio_rates_count   = sizeof( hb_audio_rates ) /
+                             sizeof( hb_rate_t );
+int hb_audio_rates_default = 3; /* 44100 Hz */
+
+hb_rate_t hb_audio_bitrates[] =
+{ {  "32",  32 }, {  "40",  40 }, {  "48",  48 }, {  "56",  56 },
+  {  "64",  64 }, {  "80",  80 }, {  "96",  96 }, { "112", 112 },
+  { "128", 128 }, { "160", 160 }, { "192", 192 }, { "224", 224 },
+  { "256", 256 }, { "320", 320 }, { "384", 384 } };
+int hb_audio_bitrates_count = sizeof( hb_audio_bitrates ) /
+                              sizeof( hb_rate_t );
+int hb_audio_bitrates_default = 8; /* 128 kbps */
+
+static hb_error_handler_t *error_handler = NULL;
+
+hb_mixdown_t hb_audio_mixdowns[] =
+{ { "Mono",               "HB_AMIXDOWN_MONO",      "mono",   HB_AMIXDOWN_MONO      },
+  { "Stereo",             "HB_AMIXDOWN_STEREO",    "stereo", HB_AMIXDOWN_STEREO    },
+  { "Dolby Surround",     "HB_AMIXDOWN_DOLBY",     "dpl1",   HB_AMIXDOWN_DOLBY     },
+  { "Dolby Pro Logic II", "HB_AMIXDOWN_DOLBYPLII", "dpl2",   HB_AMIXDOWN_DOLBYPLII },
+  { "6-channel discrete", "HB_AMIXDOWN_6CH",       "6ch",    HB_AMIXDOWN_6CH       }
+};
+int hb_audio_mixdowns_count = sizeof( hb_audio_mixdowns ) /
+                              sizeof( hb_mixdown_t );
+
+int hb_mixdown_get_mixdown_from_short_name( const char * short_name )
+{
+    int i;
+    for (i = 0; i < hb_audio_mixdowns_count; i++)
+    {
+        if (strcmp(hb_audio_mixdowns[i].short_name, short_name) == 0)
+        {
+            return hb_audio_mixdowns[i].amixdown;
+        }
+    }
+    return 0;
+}
+
+const char * hb_mixdown_get_short_name_from_mixdown( int amixdown )
+{
+    int i;
+    for (i = 0; i < hb_audio_mixdowns_count; i++)
+    {
+        if (hb_audio_mixdowns[i].amixdown == amixdown)
+        {
+            return hb_audio_mixdowns[i].short_name;
+        }
+    }
+    return "";
+}
+
+/**********************************************************************
+ * hb_reduce
+ **********************************************************************
+ * Given a numerator (num) and a denominator (den), reduce them to an
+ * equivalent fraction and store the result in x and y.
+ *********************************************************************/
+void hb_reduce( int *x, int *y, int num, int den )
+{
+    // find the greatest common divisor of num & den by Euclid's algorithm
+    int n = num, d = den;
+    while ( d )
+    {
+        int t = d;
+        d = n % d;
+        n = t;
+    }
+
+    // at this point n is the gcd. if it's non-zero remove it from num
+    // and den. Otherwise just return the original values.
+    if ( n )
+    {
+        *x = num / n;
+        *y = den / n;
+    }
+    else
+    {
+        *x = num;
+        *y = den;
+    }
+}
+
+/**********************************************************************
+ * hb_fix_aspect
+ **********************************************************************
+ * Given the output width (if HB_KEEP_WIDTH) or height
+ * (HB_KEEP_HEIGHT) and the current crop values, calculates the
+ * correct height or width in order to respect the DVD aspect ratio
+ *********************************************************************/
+void hb_fix_aspect( hb_job_t * job, int keep )
+{
+    hb_title_t * title = job->title;
+    int          i;
+
+    /* don't do anything unless the title has complete size info */
+    if ( title->height == 0 || title->width == 0 || title->aspect == 0 )
+    {
+        hb_log( "hb_fix_aspect: incomplete info for title %d: "
+                "height = %d, width = %d, aspect = %d",
+                title->height, title->width, title->aspect );
+        return;
+    }
+
+    /* Sanity checks:
+       Widths and heights must be multiples of 16 and greater than or
+       equal to 16
+       Crop values must be multiples of 2, greater than or equal to 0
+       and less than half of the dimension */
+    job->width   = MULTIPLE_16( job->width );
+    job->height  = MULTIPLE_16( job->height );
+    job->width   = MAX( 16, job->width );
+    job->height  = MAX( 16, job->height );
+    for( i = 0; i < 4; i++ )
+    {
+        job->crop[i] = EVEN( job->crop[i] );
+        job->crop[i] = MAX( 0, job->crop[i] );
+        if( i < 2 )
+        {
+            /* Top, bottom */
+            job->crop[i] = MIN( job->crop[i], ( title->height / 2 ) - 2 );
+        }
+        else
+        {
+            /* Left, right */
+            job->crop[i] = MIN( job->crop[i], ( title->width / 2 ) - 2 );
+        }
+    }
+
+    double par = (double)title->width / ( (double)title->height * title->aspect );
+    double cropped_sar = (double)( title->height - job->crop[0] - job->crop[1] ) /
+                         (double)(title->width - job->crop[2] - job->crop[3] );
+    double ar = par * cropped_sar;
+    if( keep == HB_KEEP_WIDTH )
+    {
+        job->height = MULTIPLE_16( (uint64_t)( (double)job->width * ar ) );
+        job->height = MAX( 16, job->height );
+    }
+    else
+    {
+        job->width = MULTIPLE_16( (uint64_t)( (double)job->height / ar ) );
+        job->width = MAX( 16, job->width );
+    }
+}
+
+/**********************************************************************
+ * hb_calc_bitrate
+ **********************************************************************
+ * size: in megabytes
+ *********************************************************************/
+int hb_calc_bitrate( hb_job_t * job, int size )
+{
+    int64_t avail = (int64_t) size * 1024 * 1024;
+    int64_t length;
+    int     overhead;
+    int     samples_per_frame;
+    int     i;
+
+    hb_title_t   * title = job->title;
+    hb_chapter_t * chapter;
+    hb_audio_t   * audio;
+
+    /* How many overhead bytes are used for each frame
+       (quite guessed) */
+    switch( job->mux )
+    {
+       case HB_MUX_MP4:
+       case HB_MUX_PSP:
+               case HB_MUX_IPOD:
+               case HB_MUX_MKV:
+            overhead = 6;
+            break;
+        case HB_MUX_AVI:
+            overhead = 24;
+            break;
+        case HB_MUX_OGM:
+            overhead = 6;
+            break;
+        default:
+            return 0;
+    }
+
+    /* Get the duration in seconds */
+    length = 0;
+    for( i = job->chapter_start; i <= job->chapter_end; i++ )
+    {
+        chapter = hb_list_item( title->list_chapter, i - 1 );
+        length += chapter->duration;
+    }
+    length += 135000;
+    length /= 90000;
+
+    /* Video overhead */
+    avail -= length * job->vrate * overhead / job->vrate_base;
+
+    for( i = 0; i < hb_list_count(job->list_audio); i++ )
+    {
+        /* Audio data */
+        int abitrate;
+        audio = hb_list_item( job->list_audio, i);
+
+        /* How many audio samples we put in each frame */
+        switch( audio->config.out.codec )
+        {
+            case HB_ACODEC_FAAC:
+            case HB_ACODEC_VORBIS:
+                samples_per_frame = 1024;
+                break;
+            case HB_ACODEC_LAME:
+                samples_per_frame = 1152;
+                break;
+            case HB_ACODEC_AC3:
+                samples_per_frame = 1536;
+                break;
+            default:
+                return 0;
+        }
+
+        if( audio->config.out.codec == HB_ACODEC_AC3 ||
+            audio->config.out.codec == HB_ACODEC_DCA)
+        {
+            /*
+             * For pass through we take the bitrate from the input audio
+             * bitrate as we are simply passing it through.
+             */
+            abitrate = audio->config.in.bitrate / 8;
+        }
+        else
+        {
+            /*
+             * Where we are transcoding the audio we use the destination
+             * bitrate.
+             */
+            abitrate = audio->config.out.bitrate * 1000 / 8;
+        }
+        avail -= length * abitrate;
+
+        /* Audio overhead */
+        avail -= length * audio->config.out.samplerate * overhead / samples_per_frame;
+    }
+
+    if( avail < 0 )
+    {
+        return 0;
+    }
+
+    return ( avail / ( 125 * length ) );
+}
+
+/**********************************************************************
+ * hb_list implementation
+ **********************************************************************
+ * Basic and slow, but enough for what we need
+ *********************************************************************/
+
+#define HB_LIST_DEFAULT_SIZE 20
+
+struct hb_list_s
+{
+    /* Pointers to items in the list */
+    void ** items;
+
+    /* How many (void *) allocated in 'items' */
+    int     items_alloc;
+
+    /* How many valid pointers in 'items' */
+    int     items_count;
+};
+
+/**********************************************************************
+ * hb_list_init
+ **********************************************************************
+ * Allocates an empty list ready for HB_LIST_DEFAULT_SIZE items
+ *********************************************************************/
+hb_list_t * hb_list_init()
+{
+    hb_list_t * l;
+
+    l              = calloc( sizeof( hb_list_t ), 1 );
+    l->items       = calloc( HB_LIST_DEFAULT_SIZE * sizeof( void * ), 1 );
+    l->items_alloc = HB_LIST_DEFAULT_SIZE;
+
+    return l;
+}
+
+/**********************************************************************
+ * hb_list_count
+ **********************************************************************
+ * Returns the number of items currently in the list
+ *********************************************************************/
+int hb_list_count( hb_list_t * l )
+{
+    return l->items_count;
+}
+
+/**********************************************************************
+ * hb_list_add
+ **********************************************************************
+ * Adds an item at the end of the list, making it bigger if necessary.
+ * Can safely be called with a NULL pointer to add, it will be ignored.
+ *********************************************************************/
+void hb_list_add( hb_list_t * l, void * p )
+{
+    if( !p )
+    {
+        return;
+    }
+
+    if( l->items_count == l->items_alloc )
+    {
+        /* We need a bigger boat */
+        l->items_alloc += HB_LIST_DEFAULT_SIZE;
+        l->items        = realloc( l->items,
+                                   l->items_alloc * sizeof( void * ) );
+    }
+
+    l->items[l->items_count] = p;
+    (l->items_count)++;
+}
+
+/**********************************************************************
+ * hb_list_rem
+ **********************************************************************
+ * Remove an item from the list. Bad things will happen if called
+ * with a NULL pointer or if the item is not in the list.
+ *********************************************************************/
+void hb_list_rem( hb_list_t * l, void * p )
+{
+    int i;
+
+    /* Find the item in the list */
+    for( i = 0; i < l->items_count; i++ )
+    {
+        if( l->items[i] == p )
+        {
+            break;
+        }
+    }
+
+    /* Shift all items after it sizeof( void * ) bytes earlier */
+    memmove( &l->items[i], &l->items[i+1],
+             ( l->items_count - i - 1 ) * sizeof( void * ) );
+
+    (l->items_count)--;
+}
+
+/**********************************************************************
+ * hb_list_item
+ **********************************************************************
+ * Returns item at position i, or NULL if there are not that many
+ * items in the list
+ *********************************************************************/
+void * hb_list_item( hb_list_t * l, int i )
+{
+    if( i < 0 || i >= l->items_count )
+    {
+        return NULL;
+    }
+
+    return l->items[i];
+}
+
+/**********************************************************************
+ * hb_list_bytes
+ **********************************************************************
+ * Assuming all items are of type hb_buffer_t, returns the total
+ * number of bytes in the list
+ *********************************************************************/
+int hb_list_bytes( hb_list_t * l )
+{
+    hb_buffer_t * buf;
+    int           ret;
+    int           i;
+
+    ret = 0;
+    for( i = 0; i < hb_list_count( l ); i++ )
+    {
+        buf  = hb_list_item( l, i );
+        ret += buf->size - buf->cur;
+    }
+
+    return ret;
+}
+
+/**********************************************************************
+ * hb_list_seebytes
+ **********************************************************************
+ * Assuming all items are of type hb_buffer_t, copy <size> bytes from
+ * the list to <dst>, keeping the list unmodified.
+ *********************************************************************/
+void hb_list_seebytes( hb_list_t * l, uint8_t * dst, int size )
+{
+    hb_buffer_t * buf;
+    int           copied;
+    int           copying;
+    int           i;
+
+    for( i = 0, copied = 0; copied < size; i++ )
+    {
+        buf     = hb_list_item( l, i );
+        copying = MIN( buf->size - buf->cur, size - copied );
+        memcpy( &dst[copied], &buf->data[buf->cur], copying );
+        copied += copying;
+    }
+}
+
+/**********************************************************************
+ * hb_list_getbytes
+ **********************************************************************
+ * Assuming all items are of type hb_buffer_t, copy <size> bytes from
+ * the list to <dst>. What's copied is removed from the list.
+ * The variable pointed by <pts> is set to the PTS of the buffer the
+ * first byte has been got from.
+ * The variable pointed by <pos> is set to the position of that byte
+ * in that buffer.
+ *********************************************************************/
+void hb_list_getbytes( hb_list_t * l, uint8_t * dst, int size,
+                       uint64_t * pts, uint64_t * pos )
+{
+    hb_buffer_t * buf;
+    int           copied;
+    int           copying;
+    uint8_t       has_pts;
+
+    /* So we won't have to deal with NULL pointers */
+     uint64_t dummy1, dummy2;
+
+    if( !pts ) pts = &dummy1;
+    if( !pos ) pos = &dummy2;
+
+    for( copied = 0, has_pts = 0; copied < size;  )
+    {
+        buf     = hb_list_item( l, 0 );
+        copying = MIN( buf->size - buf->cur, size - copied );
+        memcpy( &dst[copied], &buf->data[buf->cur], copying );
+
+        if( !has_pts )
+        {
+            *pts    = buf->start;
+            *pos    = buf->cur;
+            has_pts = 1;
+        }
+
+        buf->cur += copying;
+        if( buf->cur >= buf->size )
+        {
+            hb_list_rem( l, buf );
+            hb_buffer_close( &buf );
+        }
+
+        copied += copying;
+    }
+}
+
+/**********************************************************************
+ * hb_list_empty
+ **********************************************************************
+ * Assuming all items are of type hb_buffer_t, close them all and
+ * close the list.
+ *********************************************************************/
+void hb_list_empty( hb_list_t ** _l )
+{
+    hb_list_t * l = *_l;
+    hb_buffer_t * b;
+
+    while( ( b = hb_list_item( l, 0 ) ) )
+    {
+        hb_list_rem( l, b );
+        hb_buffer_close( &b );
+    }
+
+    hb_list_close( _l );
+}
+
+/**********************************************************************
+ * hb_list_close
+ **********************************************************************
+ * Free memory allocated by hb_list_init. Does NOT free contents of
+ * items still in the list.
+ *********************************************************************/
+void hb_list_close( hb_list_t ** _l )
+{
+    hb_list_t * l = *_l;
+
+    free( l->items );
+    free( l );
+
+    *_l = NULL;
+}
+
+/**********************************************************************
+ * hb_log
+ **********************************************************************
+ * If verbose mode is one, print message with timestamp. Messages
+ * longer than 180 characters are stripped ;p
+ *********************************************************************/
+void hb_log( char * log, ... )
+{
+    char        string[362]; /* 360 chars + \n + \0 */
+    time_t      _now;
+    struct tm * now;
+    va_list     args;
+
+    if( !getenv( "HB_DEBUG" ) )
+    {
+        /* We don't want to print it */
+        return;
+    }
+
+    /* Get the time */
+    _now = time( NULL );
+    now  = localtime( &_now );
+    sprintf( string, "[%02d:%02d:%02d] ",
+             now->tm_hour, now->tm_min, now->tm_sec );
+
+    /* Convert the message to a string */
+    va_start( args, log );
+    vsnprintf( string + 11, 349, log, args );
+    va_end( args );
+
+    /* Add the end of line */
+    strcat( string, "\n" );
+
+    /* Print it */
+    fprintf( stderr, "%s", string );
+}
+
+int global_verbosity_level; //Necessary for hb_deep_log
+/**********************************************************************
+ * hb_deep_log
+ **********************************************************************
+ * If verbose mode is >= level, print message with timestamp. Messages
+ * longer than 360 characters are stripped ;p
+ *********************************************************************/
+void hb_deep_log( hb_debug_level_t level, char * log, ... )
+{
+    char        string[362]; /* 360 chars + \n + \0 */
+    time_t      _now;
+    struct tm * now;
+    va_list     args;
+
+    if( global_verbosity_level < level )
+    {
+        /* Hiding message */
+        return;
+    }
+
+    /* Get the time */
+    _now = time( NULL );
+    now  = localtime( &_now );
+    sprintf( string, "[%02d:%02d:%02d] ",
+             now->tm_hour, now->tm_min, now->tm_sec );
+
+    /* Convert the message to a string */
+    va_start( args, log );
+    vsnprintf( string + 11, 349, log, args );
+    va_end( args );
+
+    /* Add the end of line */
+    strcat( string, "\n" );
+
+    /* Print it */
+    fprintf( stderr, "%s", string );
+}
+
+/**********************************************************************
+ * hb_error
+ **********************************************************************
+ * Using whatever output is available display this error.
+ *********************************************************************/
+void hb_error( char * log, ... )
+{
+    char        string[181]; /* 180 chars + \0 */
+    va_list     args;
+
+    /* Convert the message to a string */
+    va_start( args, log );
+    vsnprintf( string, 180, log, args );
+    va_end( args );
+
+    /*
+     * Got the error in a single string, send it off to be dispatched.
+     */
+    if( error_handler )
+    {
+        error_handler( string );
+    } else {
+        hb_log( string );
+    }
+}
+
+void hb_register_error_handler( hb_error_handler_t * handler )
+{
+    error_handler = handler;
+}
+
+/**********************************************************************
+ * hb_title_init
+ **********************************************************************
+ *
+ *********************************************************************/
+hb_title_t * hb_title_init( char * dvd, int index )
+{
+    hb_title_t * t;
+
+    t = calloc( sizeof( hb_title_t ), 1 );
+
+    t->index         = index;
+    t->list_audio    = hb_list_init();
+    t->list_chapter  = hb_list_init();
+    t->list_subtitle = hb_list_init();
+    strcat( t->dvd, dvd );
+    // default to decoding mpeg2
+    t->video_id      = 0xE0;
+    t->video_codec   = WORK_DECMPEG2;
+
+    return t;
+}
+
+/**********************************************************************
+ * hb_title_close
+ **********************************************************************
+ *
+ *********************************************************************/
+void hb_title_close( hb_title_t ** _t )
+{
+    hb_title_t * t = *_t;
+    hb_audio_t * audio;
+    hb_chapter_t * chapter;
+    hb_subtitle_t * subtitle;
+
+    while( ( audio = hb_list_item( t->list_audio, 0 ) ) )
+    {
+        hb_list_rem( t->list_audio, audio );
+        free( audio );
+    }
+    hb_list_close( &t->list_audio );
+
+    while( ( chapter = hb_list_item( t->list_chapter, 0 ) ) )
+    {
+        hb_list_rem( t->list_chapter, chapter );
+        free( chapter );
+    }
+    hb_list_close( &t->list_chapter );
+
+    while( ( subtitle = hb_list_item( t->list_subtitle, 0 ) ) )
+    {
+        hb_list_rem( t->list_subtitle, subtitle );
+        free( subtitle );
+    }
+    hb_list_close( &t->list_subtitle );
+
+    free( t );
+    *_t = NULL;
+}
+
+/**********************************************************************
+ * hb_filter_close
+ **********************************************************************
+ *
+ *********************************************************************/
+void hb_filter_close( hb_filter_object_t ** _f )
+{
+    hb_filter_object_t * f = *_f;
+
+    f->close( f->private_data );
+
+    if( f->name )
+        free( f->name );
+    if( f->settings )
+        free( f->settings );
+
+    free( f );
+    *_f = NULL;
+}
+
+/**********************************************************************
+ * hb_audio_copy
+ **********************************************************************
+ *
+ *********************************************************************/
+hb_audio_t *hb_audio_copy(const hb_audio_t *src)
+{
+    hb_audio_t *audio = NULL;
+
+    if( src )
+    {
+        audio = calloc(1, sizeof(*audio));
+        memcpy(audio, src, sizeof(*audio));
+    }
+    return audio;
+}
+
+/**********************************************************************
+ * hb_audio_new
+ **********************************************************************
+ *
+ *********************************************************************/
+void hb_audio_config_init(hb_audio_config_t * audiocfg)
+{
+    /* Set read only paramaters to invalid values */
+    audiocfg->in.codec = 0xDEADBEEF;
+    audiocfg->in.bitrate = -1;
+    audiocfg->in.samplerate = -1;
+    audiocfg->in.channel_layout = 0;
+    audiocfg->in.version = 0;
+    audiocfg->in.mode = 0;
+    audiocfg->flags.ac3 = 0;
+    audiocfg->lang.description[0] = 0;
+    audiocfg->lang.simple[0] = 0;
+    audiocfg->lang.iso639_2[0] = 0;
+
+    /* Initalize some sensable defaults */
+    audiocfg->in.track = audiocfg->out.track = 0;
+    audiocfg->out.codec = HB_ACODEC_FAAC;
+    audiocfg->out.bitrate = 128;
+    audiocfg->out.samplerate = 44100;
+    audiocfg->out.mixdown = HB_AMIXDOWN_DOLBYPLII;
+    audiocfg->out.dynamic_range_compression = 0;
+    audiocfg->out.name = NULL;
+}
+
+/**********************************************************************
+ * hb_audio_add
+ **********************************************************************
+ *
+ *********************************************************************/
+int hb_audio_add(const hb_job_t * job, const hb_audio_config_t * audiocfg)
+{
+    hb_title_t *title = job->title;
+    hb_audio_t *audio;
+
+    audio = hb_audio_copy( hb_list_item( title->list_audio, audiocfg->in.track ) );
+    if( audio == NULL )
+    {
+        /* We fail! */
+        return 0;
+    }
+
+    if( (audiocfg->in.bitrate != -1) && (audiocfg->in.codec != 0xDEADBEEF) )
+    {
+        /* This most likely means the client didn't call hb_audio_config_init
+         * so bail.
+         */
+        return 0;
+    }
+
+    /* Really shouldn't ignore the passed out track, but there is currently no
+     * way to handle duplicates or out-of-order track numbers.
+     */
+    audio->config.out.track = hb_list_count(job->list_audio) + 1;
+    audio->config.out.codec = audiocfg->out.codec;
+    if( audiocfg->out.codec == audio->config.in.codec )
+    {
+        /* Pass-through, copy from input. */
+        audio->config.out.samplerate = audio->config.in.samplerate;
+        audio->config.out.bitrate = audio->config.in.bitrate;
+        audio->config.out.dynamic_range_compression = 0;
+        audio->config.out.mixdown = 0;
+    }
+    else
+    {
+        /* Non pass-through, use what is given. */
+        audio->config.out.samplerate = audiocfg->out.samplerate;
+        audio->config.out.bitrate = audiocfg->out.bitrate;
+        audio->config.out.dynamic_range_compression = audiocfg->out.dynamic_range_compression;
+        audio->config.out.mixdown = audiocfg->out.mixdown;
+    }
+
+    hb_list_add(job->list_audio, audio);
+    return 1;
+}
+
+hb_audio_config_t * hb_list_audio_config_item(hb_list_t * list, int i)
+{
+    hb_audio_t *audio = NULL;
+
+    if( (audio = hb_list_item(list, i)) )
+        return &(audio->config);
+
+    return NULL;
+}
diff --git a/libhb/common.h b/libhb/common.h
new file mode 100644 (file)
index 0000000..44706af
--- /dev/null
@@ -0,0 +1,658 @@
+/* $Id: common.h,v 1.51 2005/11/04 13:09:40 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#ifndef HB_COMMON_H
+#define HB_COMMON_H
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <unistd.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+
+#ifndef MIN
+#define MIN( a, b ) ( (a) > (b) ? (b) : (a) )
+#endif
+#ifndef MAX
+#define MAX( a, b ) ( (a) > (b) ? (a) : (b) )
+#endif
+
+#define EVEN( a )        ( (a) + ( (a) & 1 ) )
+#define MULTIPLE_16( a ) ( 16 * ( ( (a) + 8 ) / 16 ) )
+#define MULTIPLE_MOD( a, b ) ( b * ( ( (a) + (b / 2) - 1) / b ) )
+
+#define HB_DVD_READ_BUFFER_SIZE 2048
+
+typedef struct hb_handle_s hb_handle_t;
+typedef struct hb_list_s hb_list_t;
+typedef struct hb_rate_s hb_rate_t;
+typedef struct hb_mixdown_s hb_mixdown_t;
+typedef struct hb_job_s  hb_job_t;
+typedef struct hb_title_s hb_title_t;
+typedef struct hb_chapter_s hb_chapter_t;
+typedef struct hb_audio_s hb_audio_t;
+typedef struct hb_audio_config_s hb_audio_config_t;
+typedef struct hb_subtitle_s hb_subtitle_t;
+typedef struct hb_state_s hb_state_t;
+typedef union  hb_esconfig_u     hb_esconfig_t;
+typedef struct hb_work_private_s hb_work_private_t;
+typedef struct hb_work_object_s  hb_work_object_t;
+typedef struct hb_filter_private_s hb_filter_private_t;
+typedef struct hb_filter_object_s  hb_filter_object_t;
+typedef struct hb_buffer_s hb_buffer_t;
+typedef struct hb_fifo_s hb_fifo_t;
+typedef struct hb_lock_s hb_lock_t;
+
+#include "ports.h"
+#ifdef __LIBHB__
+#include "internal.h"
+#define PRIVATE
+#else
+#define PRIVATE const
+#endif
+
+hb_list_t * hb_list_init();
+int         hb_list_count( hb_list_t * );
+void        hb_list_add( hb_list_t *, void * );
+void        hb_list_rem( hb_list_t *, void * );
+void      * hb_list_item( hb_list_t *, int );
+void        hb_list_close( hb_list_t ** );
+
+void hb_reduce( int *x, int *y, int num, int den );
+
+#define HB_KEEP_WIDTH  0
+#define HB_KEEP_HEIGHT 1
+void hb_fix_aspect( hb_job_t * job, int keep );
+
+int hb_calc_bitrate( hb_job_t *, int size );
+
+hb_audio_t *hb_audio_copy(const hb_audio_t *src);
+void hb_audio_config_init(hb_audio_config_t * audiocfg);
+int hb_audio_add(const hb_job_t * job, const hb_audio_config_t * audiocfg);
+hb_audio_config_t * hb_list_audio_config_item(hb_list_t * list, int i);
+
+struct hb_rate_s
+{
+    char * string;
+    int    rate;
+};
+
+struct hb_mixdown_s
+{
+    char * human_readable_name;
+    char * internal_name;
+    char * short_name;
+    int    amixdown;
+};
+
+#define HB_VIDEO_RATE_BASE   27000000
+
+extern hb_rate_t    hb_video_rates[];
+extern int          hb_video_rates_count;
+extern hb_rate_t    hb_audio_rates[];
+extern int          hb_audio_rates_count;
+extern int          hb_audio_rates_default;
+extern hb_rate_t    hb_audio_bitrates[];
+extern int          hb_audio_bitrates_count;
+extern int          hb_audio_bitrates_default;
+extern hb_mixdown_t hb_audio_mixdowns[];
+extern int          hb_audio_mixdowns_count;
+int hb_mixdown_get_mixdown_from_short_name( const char * short_name );
+const char * hb_mixdown_get_short_name_from_mixdown( int amixdown );
+
+/******************************************************************************
+ * hb_job_t: settings to be filled by the UI
+ *****************************************************************************/
+struct hb_job_s
+{
+    /* ID assigned by UI so it can groups job passes together */
+    int             sequence_id;
+
+    /* Pointer to the title to be ripped */
+    hb_title_t    * title;
+
+    /* Chapter selection */
+    int             chapter_start;
+    int             chapter_end;
+
+       /* Include chapter marker track in mp4? */
+    int             chapter_markers;
+
+    /* Picture settings:
+         crop:                must be multiples of 2 (top/bottom/left/right)
+         deinterlace:         0 or 1
+         width:               must be a multiple of 16
+         height:              must be a multiple of 16
+         keep_ratio:          used by UIs
+         grayscale:           black and white encoding
+         pixel_ratio:         store pixel aspect ratio in the video
+         pixel_aspect_width:  numerator for pixel aspect ratio
+         pixel_aspect_height: denominator for pixel aspect ratio
+         modulus:             set a number besides 16 for dimensions to be multiples of
+         maxWidth:            keep width below this
+         maxHeight:           keep height below this */
+    int             crop[4];
+    int             deinterlace;
+    hb_list_t     * filters;
+    int             width;
+    int             height;
+    int             keep_ratio;
+    int             grayscale;
+    int             pixel_ratio;
+    int             pixel_aspect_width;
+    int             pixel_aspect_height;
+    int             modulus;
+    int             maxWidth;
+    int             maxHeight;
+
+    /* Video settings:
+         vcodec:            output codec
+         vquality:          output quality (0.0..1.0)
+                            if < 0.0 or > 1.0, bitrate is used instead,
+                            except with x264, to use its real QP/RF scale
+         vbitrate:          output bitrate (kbps)
+         vrate, vrate_base: output framerate is vrate / vrate_base
+         vfr:               boolean for variable frame rate detelecine
+         cfr:               boolean to use constant frame rates instead of
+                            passing through the source's frame durations.
+         pass:              0, 1 or 2 (or -1 for scan)
+         h264_level:        vestigial boolean to decide if we're encoding for iPod
+         crf:               boolean for whether to use constant rate factor with x264
+         x264opts:          string of extra x264 options
+         areBframes:        boolean to note if b-frames are included in x264opts */
+#define HB_VCODEC_MASK   0x0000FF
+#define HB_VCODEC_FFMPEG 0x000001
+#define HB_VCODEC_XVID   0x000002
+#define HB_VCODEC_X264   0x000004
+#define HB_VCODEC_THEORA 0x000008
+
+    int             vcodec;
+    float           vquality;
+    int             vbitrate;
+    int             vrate;
+    int             vrate_base;
+    int             vfr;
+    int             cfr;
+    int             pass;
+    int             h264_13;
+    int             h264_level;
+    int             crf;
+    char            *x264opts;
+    int             areBframes;
+    int             color_matrix;
+
+    /* List of audio settings. */
+    hb_list_t     * list_audio;
+
+    /* Subtitle settings:
+         subtitle: index in hb_title_t's subtitles list, starting
+         from 0. -1 means no subtitle */
+    int             subtitle;
+    int             subtitleSmartAdjust;
+
+    /* Muxer settings
+         mux:  output file format
+         file: file path */
+#define HB_MUX_MASK 0xFF0000
+#define HB_MUX_MP4  0x010000
+#define HB_MUX_PSP  0x020000
+#define HB_MUX_AVI  0x040000
+#define HB_MUX_OGM  0x080000
+#define HB_MUX_IPOD 0x100000
+#define HB_MUX_MKV  0x200000
+
+    int             mux;
+    const char          * file;
+
+    /* Allow MP4 files > 4 gigs */
+    int             largeFileSize;
+    int             mp4_optimize;
+    int             ipod_atom;
+
+    int indepth_scan;
+    hb_subtitle_t ** select_subtitle;
+    int subtitle_force;
+    char * native_language;
+
+    int64_t         pts_to_stop;        // declare eof when we pass this pts in
+                                        //  the time-linearized input stream
+    int             start_at_preview;   // if non-zero, encoding will start
+                                        //  at the position of preview n (1-10)
+    uint32_t        frames_to_skip;     // decode but discard this many frames
+                                        //  initially (for frame accurate positioning
+                                        //  to non-I frames).
+
+#ifdef __LIBHB__
+    /* Internal data */
+    hb_handle_t   * h;
+    hb_lock_t     * pause;
+    volatile int  * die;
+    volatile int    done;
+
+    hb_fifo_t     * fifo_mpeg2;   /* MPEG-2 video ES */
+    hb_fifo_t     * fifo_raw;     /* Raw pictures */
+    hb_fifo_t     * fifo_sync;    /* Raw pictures, framerate corrected */
+    hb_fifo_t     * fifo_render;  /* Raw pictures, scaled */
+    hb_fifo_t     * fifo_mpeg4;   /* MPEG-4 video ES */
+
+    hb_thread_t   * reader;
+    hb_thread_t   * muxer;
+
+    hb_list_t     * list_work;
+
+    hb_esconfig_t config;
+
+    hb_mux_data_t * mux_data;
+#endif
+};
+
+/* Audio starts here */
+/* Audio Codecs */
+#define HB_ACODEC_MASK   0x00FF00
+#define HB_ACODEC_FAAC   0x000100
+#define HB_ACODEC_LAME   0x000200
+#define HB_ACODEC_VORBIS 0x000400
+#define HB_ACODEC_AC3    0x000800
+#define HB_ACODEC_MPGA   0x001000
+#define HB_ACODEC_LPCM   0x002000
+#define HB_ACODEC_DCA    0x004000
+#define HB_ACODEC_FFMPEG 0x008000
+
+/* Audio Mixdown */
+/* define some masks, used to extract the various information from the HB_AMIXDOWN_XXXX values */
+#define HB_AMIXDOWN_DCA_FORMAT_MASK             0x00FFF000
+#define HB_AMIXDOWN_A52_FORMAT_MASK             0x00000FF0
+#define HB_AMIXDOWN_DISCRETE_CHANNEL_COUNT_MASK 0x0000000F
+/* define the HB_AMIXDOWN_XXXX values */
+#define HB_AMIXDOWN_MONO                        0x01000001
+// DCA_FORMAT of DCA_MONO                  = 0    = 0x000
+// A52_FORMAT of A52_MONO                  = 1    = 0x01
+// discrete channel count of 1
+#define HB_AMIXDOWN_STEREO                      0x02002022
+// DCA_FORMAT of DCA_STEREO                = 2    = 0x002
+// A52_FORMAT of A52_STEREO                = 2    = 0x02
+// discrete channel count of 2
+#define HB_AMIXDOWN_DOLBY                       0x042070A2
+// DCA_FORMAT of DCA_3F1R | DCA_OUT_DPLI   = 519  = 0x207
+// A52_FORMAT of A52_DOLBY                 = 10   = 0x0A
+// discrete channel count of 2
+#define HB_AMIXDOWN_DOLBYPLII                   0x084094A2
+// DCA_FORMAT of DCA_3F2R | DCA_OUT_DPLII  = 1033 = 0x409
+// A52_FORMAT of A52_DOLBY | A52_USE_DPLII = 74   = 0x4A
+// discrete channel count of 2
+#define HB_AMIXDOWN_6CH                         0x10089176
+// DCA_FORMAT of DCA_3F2R | DCA_LFE        = 137  = 0x089
+// A52_FORMAT of A52_3F2R | A52_LFE        = 23   = 0x17
+// discrete channel count of 6
+/* define some macros to extract the various information from the HB_AMIXDOWN_XXXX values */
+#define HB_AMIXDOWN_GET_DCA_FORMAT( a ) ( ( a & HB_AMIXDOWN_DCA_FORMAT_MASK ) >> 12 )
+#define HB_AMIXDOWN_GET_A52_FORMAT( a ) ( ( a & HB_AMIXDOWN_A52_FORMAT_MASK ) >> 4 )
+#define HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT( a ) ( ( a & HB_AMIXDOWN_DISCRETE_CHANNEL_COUNT_MASK ) )
+
+/* Input Channel Layout */
+/* define some masks, used to extract the various information from the HB_AMIXDOWN_XXXX values */
+#define HB_INPUT_CH_LAYOUT_DISCRETE_FRONT_MASK  0x00F0000
+#define HB_INPUT_CH_LAYOUT_DISCRETE_REAR_MASK   0x000F000
+#define HB_INPUT_CH_LAYOUT_DISCRETE_LFE_MASK    0x0000F00
+#define HB_INPUT_CH_LAYOUT_DISCRETE_NO_LFE_MASK 0xFFFF0FF
+#define HB_INPUT_CH_LAYOUT_ENCODED_FRONT_MASK   0x00000F0
+#define HB_INPUT_CH_LAYOUT_ENCODED_REAR_MASK    0x000000F
+/* define the input channel layouts used to describe the channel layout of this audio */
+#define HB_INPUT_CH_LAYOUT_MONO    0x0110010
+#define HB_INPUT_CH_LAYOUT_STEREO  0x0220020
+#define HB_INPUT_CH_LAYOUT_DOLBY   0x0320031
+#define HB_INPUT_CH_LAYOUT_3F      0x0430030
+#define HB_INPUT_CH_LAYOUT_2F1R    0x0521021
+#define HB_INPUT_CH_LAYOUT_3F1R    0x0631031
+#define HB_INPUT_CH_LAYOUT_2F2R    0x0722022
+#define HB_INPUT_CH_LAYOUT_3F2R    0x0832032
+#define HB_INPUT_CH_LAYOUT_4F2R    0x0942042
+#define HB_INPUT_CH_LAYOUT_HAS_LFE 0x0000100
+/* define some macros to extract the various information from the HB_AMIXDOWN_XXXX values */
+#define HB_INPUT_CH_LAYOUT_GET_DISCRETE_FRONT_COUNT( a ) ( ( a & HB_INPUT_CH_LAYOUT_DISCRETE_FRONT_MASK ) >> 16 )
+#define HB_INPUT_CH_LAYOUT_GET_DISCRETE_REAR_COUNT( a )  ( ( a & HB_INPUT_CH_LAYOUT_DISCRETE_REAR_MASK ) >> 12 )
+#define HB_INPUT_CH_LAYOUT_GET_DISCRETE_LFE_COUNT( a )   ( ( a & HB_INPUT_CH_LAYOUT_DISCRETE_LFE_MASK ) >> 8 )
+#define HB_INPUT_CH_LAYOUT_GET_DISCRETE_COUNT( a ) ( ( ( a & HB_INPUT_CH_LAYOUT_DISCRETE_FRONT_MASK ) >> 16 ) + ( ( a & HB_INPUT_CH_LAYOUT_DISCRETE_REAR_MASK ) >> 12 ) + ( ( a & HB_INPUT_CH_LAYOUT_DISCRETE_LFE_MASK ) >> 8 ) )
+#define HB_INPUT_CH_LAYOUT_GET_ENCODED_FRONT_COUNT( a )   ( ( a & HB_INPUT_CH_LAYOUT_ENCODED_FRONT_MASK ) >> 4 )
+#define HB_INPUT_CH_LAYOUT_GET_ENCODED_REAR_COUNT( a )   ( ( a & HB_INPUT_CH_LAYOUT_ENCODED_REAR_MASK ) )
+
+struct hb_audio_config_s
+{
+    /* Output */
+    struct
+    {
+            int track;      /* Output track number */
+            uint32_t codec;  /* Output audio codec.
+                                 * HB_ACODEC_AC3 means pass-through, then bitrate and samplerate
+                                 * are ignored.
+                                 */
+            int samplerate; /* Output sample rate (Hz) */
+            int bitrate;    /* Output bitrate (kbps) */
+            int mixdown;    /* The mixdown format to be used for this audio track (see HB_AMIXDOWN_*) */
+            double dynamic_range_compression; /* Amount of DRC that gets applied to this track */
+            char * name;    /* Output track name */
+    } out;
+
+    /* Input */
+    struct
+    {
+        int track;                /* Input track number */
+        PRIVATE uint32_t codec;   /* Input audio codec */
+        PRIVATE uint32_t codec_param; /* per-codec config info */
+        PRIVATE uint32_t version; /* Bitsream version */
+        PRIVATE uint32_t mode;    /* Bitstream mode, codec dependent encoding */
+        PRIVATE int samplerate; /* Input sample rate (Hz) */
+        PRIVATE int bitrate;    /* Input bitrate (kbps) */
+        PRIVATE int channel_layout;
+        /* channel_layout is the channel layout of this audio this is used to
+        * provide a common way of describing the source audio
+        */
+    } in;
+
+    /* Misc. */
+    union
+    {
+        PRIVATE int ac3;    /* flags.ac3 is only set when the source audio format is HB_ACODEC_AC3 */
+        PRIVATE int dca;    /* flags.dca is only set when the source audio format is HB_ACODEC_DCA */
+    } flags;
+#define AUDIO_F_DOLBY (1 << 31)  /* set if source uses Dolby Surround */
+
+    struct
+    {
+        PRIVATE char description[1024];
+        PRIVATE char simple[1024];
+        PRIVATE char iso639_2[4];
+        PRIVATE uint8_t type; /* normal, visually impared, directors */
+    } lang;
+};
+
+#ifdef __LIBHB__
+struct hb_audio_s
+{
+    int id;
+
+    hb_audio_config_t config;
+
+    struct {
+        hb_fifo_t * fifo_in;   /* AC3/MPEG/LPCM ES */
+        hb_fifo_t * fifo_raw;  /* Raw audio */
+        hb_fifo_t * fifo_sync; /* Resampled, synced raw audio */
+        hb_fifo_t * fifo_out;  /* MP3/AAC/Vorbis ES */
+
+        hb_esconfig_t config;
+        hb_mux_data_t * mux_data;
+    } priv;
+};
+#endif
+
+struct hb_chapter_s
+{
+    int      index;
+    int      cell_start;
+    int      cell_end;
+    int      block_start;
+    int      block_end;
+    int      block_count;
+
+    /* Visual-friendly duration */
+    int      hours;
+    int      minutes;
+    int      seconds;
+
+    /* Exact duration (in 1/90000s) */
+    uint64_t duration;
+
+    /* Optional chapter title */
+    char     title[1024];
+};
+
+struct hb_subtitle_s
+{
+    int  id;
+    char lang[1024];
+    char iso639_2[4];
+    uint8_t type; /* Closed Caption, Childrens, Directors etc */
+
+    int hits;     /* How many hits/occurrences of this subtitle */
+    int forced_hits; /* How many forced hits in this subtitle */
+
+#ifdef __LIBHB__
+    /* Internal data */
+    hb_fifo_t * fifo_in;  /* SPU ES */
+    hb_fifo_t * fifo_raw; /* Decodec SPU */
+#endif
+};
+
+struct hb_title_s
+{
+    char        dvd[1024];
+    char        name[1024];
+    int         index;
+    int         vts;
+    int         ttn;
+    int         cell_start;
+    int         cell_end;
+    int         block_start;
+    int         block_end;
+    int         block_count;
+
+    /* Visual-friendly duration */
+    int         hours;
+    int         minutes;
+    int         seconds;
+
+    /* Exact duration (in 1/90000s) */
+    uint64_t    duration;
+
+    double      aspect;             // aspect ratio for the title's video
+    double      container_aspect;   // aspect ratio from container (0 if none)
+    int         width;
+    int         height;
+    int         pixel_aspect_width;
+    int         pixel_aspect_height;
+    int         rate;
+    int         rate_base;
+    int         crop[4];
+    enum { HB_MPEG2_DEMUXER = 0, HB_NULL_DEMUXER } demuxer;
+    int         detected_interlacing;
+    int         video_id;               /* demuxer stream id for video */
+    int         video_codec;            /* worker object id of video codec */
+    int         video_codec_param;      /* codec specific config */
+    int         flaky_clock;            /* can lose reference clock */
+                                        /* (for over-the-air transport streams) */
+    const char  *video_codec_name;
+    int         video_bitrate;
+    const char  *container_name;
+    int         data_rate;
+
+    uint32_t    palette[16];
+
+    hb_list_t * list_chapter;
+    hb_list_t * list_audio;
+    hb_list_t * list_subtitle;
+
+    /* Job template for this title */
+    hb_job_t  * job;
+};
+
+
+struct hb_state_s
+{
+#define HB_STATE_IDLE     1
+#define HB_STATE_SCANNING 2
+#define HB_STATE_SCANDONE 4
+#define HB_STATE_WORKING  8
+#define HB_STATE_PAUSED   16
+#define HB_STATE_WORKDONE 32
+#define HB_STATE_MUXING   64
+    int state;
+
+    union
+    {
+        struct
+        {
+            /* HB_STATE_SCANNING */
+            int title_cur;
+            int title_count;
+        } scanning;
+
+        struct
+        {
+            /* HB_STATE_WORKING */
+            float progress;
+            int   job_cur;
+            int   job_count;
+            float rate_cur;
+            float rate_avg;
+            int   hours;
+            int   minutes;
+            int   seconds;
+            int   sequence_id;
+        } working;
+
+        struct
+        {
+            /* HB_STATE_WORKDONE */
+#define HB_ERROR_NONE     0
+#define HB_ERROR_CANCELED 1
+#define HB_ERROR_UNKNOWN  2
+            int error;
+        } workdone;
+
+        struct
+        {
+            /* HB_STATE_MUXING */
+            float progress;
+        } muxing;
+    } param;
+};
+
+typedef struct hb_work_info_s
+{
+    const char *name;
+    int     profile;
+    int     level;
+    int     bitrate;
+    int     rate;
+    int     rate_base;
+    int     flags;
+    int     version;
+    int     mode;
+    union {
+        struct {    // info only valid for video decoders
+            int     width;
+            int     height;
+            int     pixel_aspect_width;
+            int     pixel_aspect_height;
+            double  aspect;
+        };
+        struct {    // info only valid for audio decoders
+            int     channel_layout;
+        };
+    };
+} hb_work_info_t;
+
+struct hb_work_object_s
+{
+    int                 id;
+    char              * name;
+
+#ifdef __LIBHB__
+    int              (* init)  ( hb_work_object_t *, hb_job_t * );
+    int              (* work)  ( hb_work_object_t *, hb_buffer_t **,
+                                 hb_buffer_t ** );
+    void             (* close) ( hb_work_object_t * );
+    /* the info entry point is used by scan to get bitstream information
+     * during a decode (i.e., it should only be called after at least one
+     * call to the 'work' entry point). currently it's only called for
+     * video streams & can be null for other work objects. */
+    int              (* info)  ( hb_work_object_t *, hb_work_info_t * );
+    /* the bitstream info entry point is used by scan to get bitstream
+     * information from a buffer. it doesn't have to be called during a
+     * decode (it can be called even if init & work haven't been).
+     * currently it's only called for audio streams & can be null for
+     * other work objects. */
+    int              (* bsinfo)  ( hb_work_object_t *, const hb_buffer_t *, 
+                                   hb_work_info_t * );
+
+    hb_fifo_t         * fifo_in;
+    hb_fifo_t         * fifo_out;
+    hb_esconfig_t     * config;
+
+    /* Pointer hb_audio_t so we have access to the info in the audio worker threads. */
+    hb_audio_t *audio;
+
+    hb_work_private_t * private_data;
+
+    hb_thread_t       * thread;
+    volatile int      * done;
+    int                 status;
+    int                 codec_param;
+
+    hb_work_object_t  * next;
+       int                               thread_sleep_interval;
+#endif
+};
+
+extern hb_work_object_t hb_sync;
+extern hb_work_object_t hb_decmpeg2;
+extern hb_work_object_t hb_decsub;
+extern hb_work_object_t hb_render;
+extern hb_work_object_t hb_encavcodec;
+extern hb_work_object_t hb_encxvid;
+extern hb_work_object_t hb_encx264;
+extern hb_work_object_t hb_enctheora;
+extern hb_work_object_t hb_deca52;
+extern hb_work_object_t hb_decdca;
+extern hb_work_object_t hb_decavcodec;
+extern hb_work_object_t hb_decavcodecv;
+extern hb_work_object_t hb_decavcodecvi;
+extern hb_work_object_t hb_decavcodecai;
+extern hb_work_object_t hb_declpcm;
+extern hb_work_object_t hb_encfaac;
+extern hb_work_object_t hb_enclame;
+extern hb_work_object_t hb_encvorbis;
+
+#define FILTER_OK      0
+#define FILTER_DELAY   1
+#define FILTER_FAILED  2
+#define FILTER_DROP    3
+
+struct hb_filter_object_s
+{
+    int                     id;
+    char                  * name;
+    char                  * settings;
+
+#ifdef __LIBHB__
+    hb_filter_private_t* (* init)  ( int, int, int, char * );
+
+    int                  (* work)  ( const hb_buffer_t *, hb_buffer_t **,
+                                     int, int, int, hb_filter_private_t * );
+
+    void                 (* close) ( hb_filter_private_t * );
+
+    hb_filter_private_t   * private_data;
+    //hb_buffer_t           * buffer;
+#endif
+};
+
+extern hb_filter_object_t hb_filter_detelecine;
+extern hb_filter_object_t hb_filter_deinterlace;
+extern hb_filter_object_t hb_filter_deblock;
+extern hb_filter_object_t hb_filter_denoise;
+extern hb_filter_object_t hb_filter_decomb;
+
+typedef void hb_error_handler_t( const char *errmsg );
+
+extern void hb_register_error_handler( hb_error_handler_t * handler );
+
+#endif
diff --git a/libhb/deblock.c b/libhb/deblock.c
new file mode 100644 (file)
index 0000000..f549fbb
--- /dev/null
@@ -0,0 +1,490 @@
+/*
+ Copyright (C) 2005 Michael Niedermayer <michaelni@gmx.at>
+
+ 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 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 St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#include "hb.h"
+#include "libavcodec/avcodec.h"
+#include "mpeg2dec/mpeg2.h"
+
+#define PP7_QP_DEFAULT    5
+#define PP7_MODE_DEFAULT  2
+
+#define XMIN(a,b) ((a) < (b) ? (a) : (b))
+#define XMAX(a,b) ((a) > (b) ? (a) : (b))
+
+typedef short DCTELEM;
+
+//===========================================================================//
+static const uint8_t  __attribute__((aligned(8))) pp7_dither[8][8] =
+{
+    {  0,  48,  12,  60,   3,  51,  15,  63, },
+    { 32,  16,  44,  28,  35,  19,  47,  31, },
+    {  8,  56,   4,  52,  11,  59,   7,  55, },
+    { 40,  24,  36,  20,  43,  27,  39,  23, },
+    {  2,  50,  14,  62,   1,  49,  13,  61, },
+    { 34,  18,  46,  30,  33,  17,  45,  29, },
+    { 10,  58,   6,  54,   9,  57,   5,  53, },
+    { 42,  26,  38,  22,  41,  25,  37,  21, },
+};
+
+struct hb_filter_private_s
+{
+    int           pix_fmt;
+    int           width[3];
+    int           height[3];
+
+    int           pp7_qp;
+    int           pp7_mode;
+    int           pp7_mpeg2;
+    int           pp7_temp_stride;
+    uint8_t     * pp7_src;
+
+    AVPicture     pic_in;
+    AVPicture     pic_out;
+    hb_buffer_t * buf_out;
+};
+
+hb_filter_private_t * hb_deblock_init( int pix_fmt,
+                                       int width,
+                                       int height,
+                                       char * settings );
+
+int hb_deblock_work( const hb_buffer_t * buf_in,
+                     hb_buffer_t ** buf_out,
+                     int pix_fmt,
+                     int width,
+                     int height,
+                     hb_filter_private_t * pv );
+
+void hb_deblock_close( hb_filter_private_t * pv );
+
+hb_filter_object_t hb_filter_deblock =
+{
+    FILTER_DEBLOCK,
+    "Deblock (pp7)",
+    NULL,
+    hb_deblock_init,
+    hb_deblock_work,
+    hb_deblock_close,
+};
+
+static inline void pp7_dct_a( DCTELEM * dst, uint8_t * src, int stride )
+{
+    int i;
+
+    for( i = 0; i < 4; i++ )
+    {
+        int s0 =  src[0*stride] + src[6*stride];
+        int s1 =  src[1*stride] + src[5*stride];
+        int s2 =  src[2*stride] + src[4*stride];
+        int s3 =  src[3*stride];
+        int s  =  s3+s3;
+
+        s3 = s  - s0;
+        s0 = s  + s0;
+        s  = s2 + s1;
+        s2 = s2 - s1;
+
+        dst[0] =   s0 + s;
+        dst[2] =   s0 - s;
+        dst[1] = 2*s3 + s2;
+        dst[3] =   s3 - s2*2;
+
+        src++;
+        dst += 4;
+    }
+}
+
+static void pp7_dct_b( DCTELEM * dst, DCTELEM * src )
+{
+    int i;
+
+    for( i = 0; i < 4; i++ )
+    {
+        int s0 = src[0*4] + src[6*4];
+        int s1 = src[1*4] + src[5*4];
+        int s2 = src[2*4] + src[4*4];
+        int s3 = src[3*4];
+        int s  = s3+s3;
+
+        s3 = s  - s0;
+        s0 = s  + s0;
+        s  = s2 + s1;
+        s2 = s2 - s1;
+
+        dst[0*4] =   s0 + s;
+        dst[2*4] =   s0 - s;
+        dst[1*4] = 2*s3 + s2;
+        dst[3*4] =   s3 - s2*2;
+
+        src++;
+        dst++;
+    }
+}
+
+#define N   (1<<16)
+#define N0  4
+#define N1  5
+#define N2  10
+#define SN0 2
+#define SN1 2.2360679775
+#define SN2 3.16227766017
+
+static const int pp7_factor[16] =
+{
+    N/(N0*N0), N/(N0*N1), N/(N0*N0),N/(N0*N2),
+    N/(N1*N0), N/(N1*N1), N/(N1*N0),N/(N1*N2),
+    N/(N0*N0), N/(N0*N1), N/(N0*N0),N/(N0*N2),
+    N/(N2*N0), N/(N2*N1), N/(N2*N0),N/(N2*N2),
+};
+
+static int pp7_threshold[99][16];
+
+static void pp7_init_threshold( void )
+{
+    int qp, i;
+    int bias = 0;
+
+    for( qp = 0; qp < 99; qp++ )
+    {
+        for( i = 0; i < 16; i++ )
+        {
+            pp7_threshold[qp][i] =
+                ((i&1)?SN2:SN0) * ((i&4)?SN2:SN0) *
+                 XMAX(1,qp) * (1<<2) - 1 - bias;
+        }
+    }
+}
+
+static int pp7_hard_threshold( DCTELEM * src, int qp )
+{
+    int i;
+    int a;
+
+    a = src[0] * pp7_factor[0];
+    for( i = 1; i < 16; i++ )
+    {
+        unsigned int threshold1 = pp7_threshold[qp][i];
+        unsigned int threshold2 = (threshold1<<1);
+        int level= src[i];
+        if( ((unsigned)(level+threshold1)) > threshold2 )
+        {
+            a += level * pp7_factor[i];
+        }
+    }
+    return (a + (1<<11)) >> 12;
+}
+
+static int pp7_medium_threshold( DCTELEM * src, int qp )
+{
+    int i;
+    int a;
+
+    a = src[0] * pp7_factor[0];
+    for( i = 1; i < 16; i++ )
+    {
+        unsigned int threshold1 = pp7_threshold[qp][i];
+        unsigned int threshold2 = (threshold1<<1);
+        int level= src[i];
+        if( ((unsigned)(level+threshold1)) > threshold2 )
+        {
+            if( ((unsigned)(level+2*threshold1)) > 2*threshold2 )
+            {
+                a += level * pp7_factor[i];
+            }
+            else
+            {
+                if( level>0 )
+                {
+                    a += 2*(level - (int)threshold1) * pp7_factor[i];
+                }
+                else
+                {
+                    a += 2*(level + (int)threshold1) * pp7_factor[i];
+                }
+            }
+        }
+    }
+    return (a + (1<<11)) >> 12;
+}
+
+static int pp7_soft_threshold( DCTELEM * src, int qp )
+{
+    int i;
+    int a;
+
+    a = src[0] * pp7_factor[0];
+    for( i = 1; i < 16; i++ )
+    {
+        unsigned int threshold1 = pp7_threshold[qp][i];
+        unsigned int threshold2 = (threshold1<<1);
+        int level= src[i];
+        if( ((unsigned)(level+threshold1))>threshold2 )
+        {
+            if( level>0 )
+            {
+                a += (level - (int)threshold1) * pp7_factor[i];
+            }
+            else
+            {
+                a += (level + (int)threshold1) * pp7_factor[i];
+            }
+        }
+    }
+    return (a + (1<<11)) >> 12;
+}
+
+static int ( * pp7_requantize )( DCTELEM * src, int qp ) = pp7_hard_threshold;
+
+static void pp7_filter( hb_filter_private_t * pv,
+                        uint8_t * dst,
+                        uint8_t * src,
+                        int width,
+                        int height,
+                        uint8_t * qp_store,
+                        int qp_stride,
+                        int is_luma)
+{
+    int x, y;
+
+    const int  stride = is_luma ? pv->pp7_temp_stride : ((width+16+15)&(~15));
+    uint8_t  * p_src  = pv->pp7_src + 8*stride;
+    DCTELEM  * block  = (DCTELEM *)(pv->pp7_src);
+    DCTELEM  * temp   = (DCTELEM *)(pv->pp7_src + 32);
+
+    if( !src || !dst )
+    {
+        return;
+    }
+
+    for( y = 0; y < height; y++ )
+    {
+        int index = 8 + 8*stride + y*stride;
+        memcpy( p_src + index, src + y*width, width );
+
+        for( x = 0; x < 8; x++ )
+        {
+            p_src[index         - x - 1] = p_src[index +         x    ];
+            p_src[index + width + x    ] = p_src[index + width - x - 1];
+        }
+    }
+
+    for( y = 0; y < 8; y++ )
+    {
+        memcpy( p_src + (     7-y)*stride,
+                p_src + (     y+8)*stride, stride );
+        memcpy( p_src + (height+8+y)*stride,
+                p_src + (height-y+7)*stride, stride );
+    }
+
+    for( y = 0; y < height; y++ )
+    {
+        for( x = -8; x < 0; x += 4 )
+        {
+            const int index = x + y*stride + (8-3)*(1+stride) + 8;
+            uint8_t * src   = p_src + index;
+            DCTELEM * tp    = temp+4*x;
+
+            pp7_dct_a( tp+4*8, src, stride );
+        }
+
+        for( x = 0; x < width; )
+        {
+            const int qps = 3 + is_luma;
+            int end = XMIN(x+8, width);
+
+            int qp;
+            if( pv->pp7_qp )
+            {
+                qp = pv->pp7_qp;
+            }
+            else
+            {
+                qp = qp_store[ (XMIN(x, width-1)>>qps) +
+                               (XMIN(y, height-1)>>qps) * qp_stride ];
+
+                if( pv->pp7_mpeg2 )
+                {
+                    qp >>= 1;
+                }
+            }
+
+            for( ; x < end; x++ )
+            {
+                const int index = x + y*stride + (8-3)*(1+stride) + 8;
+                uint8_t * src   = p_src + index;
+                DCTELEM * tp    = temp+4*x;
+                int v;
+
+                if( (x&3) == 0 )
+                {
+                    pp7_dct_a( tp+4*8, src, stride );
+                }
+
+                pp7_dct_b( block, tp );
+
+                v = pp7_requantize( block, qp );
+                v = (v + pp7_dither[y&7][x&7]) >> 6;
+                if( (unsigned)v > 255 )
+                {
+                    v = (-v) >> 31;
+                }
+                dst[x + y*width] = v;
+            }
+        }
+    }
+}
+
+hb_filter_private_t * hb_deblock_init( int pix_fmt,
+                                       int width,
+                                       int height,
+                                       char * settings )
+{
+    if( pix_fmt != PIX_FMT_YUV420P )
+    {
+        return 0;
+    }
+
+    hb_filter_private_t * pv = malloc( sizeof(struct hb_filter_private_s) );
+
+    pv->pix_fmt = pix_fmt;
+
+    pv->width[0] = width;
+    pv->height[0] = height;
+
+    pv->width[1] = pv->width[2] = width >> 1;
+    pv->height[1] = pv->height[2] = height >> 1;
+
+
+    pv->pp7_qp    = PP7_QP_DEFAULT;
+    pv->pp7_mode  = PP7_MODE_DEFAULT;
+    pv->pp7_mpeg2 = 1; /*mpi->qscale_type;*/
+
+    if( settings )
+    {
+        sscanf( settings, "%d:%d", &pv->pp7_qp, &pv->pp7_mode );
+    }
+
+    if( pv->pp7_qp < 0 )
+    {
+        pv->pp7_qp = 0;
+    }
+
+    pp7_init_threshold();
+
+    switch( pv->pp7_mode )
+    {
+        case 0:
+            pp7_requantize = pp7_hard_threshold;
+            break;
+        case 1:
+            pp7_requantize = pp7_soft_threshold;
+            break;
+        case 2:
+            pp7_requantize = pp7_medium_threshold;
+            break;
+    }
+
+    int h = (height+16+15)&(~15);
+
+    pv->pp7_temp_stride = (width+16+15)&(~15);
+
+    pv->pp7_src = (uint8_t*)malloc( pv->pp7_temp_stride*(h+8)*sizeof(uint8_t) );
+
+    pv->buf_out = hb_video_buffer_init( width, height );
+
+    return pv;
+}
+
+void hb_deblock_close( hb_filter_private_t * pv )
+{
+    if( !pv )
+    {
+        return;
+    }
+
+    if( pv->buf_out )
+    {
+        hb_buffer_close( &pv->buf_out );
+    }
+
+    free( pv );
+}
+
+int hb_deblock_work( const hb_buffer_t * buf_in,
+                     hb_buffer_t ** buf_out,
+                     int pix_fmt,
+                     int width,
+                     int height,
+                     hb_filter_private_t * pv )
+{
+    if( !pv ||
+        pix_fmt != pv->pix_fmt ||
+        width != pv->width[0] ||
+        height != pv->height[0] )
+    {
+        return FILTER_FAILED;
+    }
+
+    avpicture_fill( &pv->pic_in, buf_in->data,
+                    pix_fmt, width, height );
+
+    avpicture_fill( &pv->pic_out, pv->buf_out->data,
+                    pix_fmt, width, height );
+
+    if( /*TODO: mpi->qscale ||*/ pv->pp7_qp )
+    {
+        pp7_filter( pv,
+                pv->pic_out.data[0],
+                pv->pic_in.data[0],
+                pv->width[0],
+                pv->height[0],
+                NULL, /* TODO: mpi->qscale*/
+                0,    /* TODO: mpi->qstride*/
+                1 );
+
+        pp7_filter( pv,
+                pv->pic_out.data[1],
+                pv->pic_in.data[1],
+                pv->width[1],
+                pv->height[1],
+                NULL, /* TODO: mpi->qscale*/
+                0,    /* TODO: mpi->qstride*/
+                0 );
+
+        pp7_filter( pv,
+                pv->pic_out.data[2],
+                pv->pic_in.data[2],
+                pv->width[2],
+                pv->height[2],
+                NULL, /* TODO: mpi->qscale*/
+                0,    /* TODO: mpi->qstride*/
+                0 );
+    }
+    else
+    {
+        memcpy( pv->buf_out->data, buf_in->data, buf_in->size );
+    }
+
+    hb_buffer_copy_settings( pv->buf_out, buf_in );
+
+    *buf_out = pv->buf_out;
+
+    return FILTER_OK;
+}
+
+
diff --git a/libhb/deca52.c b/libhb/deca52.c
new file mode 100644 (file)
index 0000000..5559024
--- /dev/null
@@ -0,0 +1,393 @@
+/* $Id: deca52.c,v 1.14 2005/03/03 17:21:57 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+#include "a52dec/a52.h"
+
+struct hb_work_private_s
+{
+    hb_job_t    * job;
+
+    /* liba52 handle */
+    a52_state_t * state;
+
+    int           flags_in;
+    int           flags_out;
+    int           rate;
+    int           bitrate;
+    float         level;
+    float         dynamic_range_compression;
+
+    int           error;
+    int           sync;
+    int           size;
+
+    int64_t       next_expected_pts;
+
+    int64_t       sequence;
+
+    uint8_t       frame[3840];
+
+    hb_list_t   * list;
+
+       int           out_discrete_channels;
+
+};
+
+static int  deca52Init( hb_work_object_t *, hb_job_t * );
+static int  deca52Work( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+static void deca52Close( hb_work_object_t * );
+static int deca52BSInfo( hb_work_object_t * , const hb_buffer_t *,
+                         hb_work_info_t * );
+
+hb_work_object_t hb_deca52 =
+{
+    WORK_DECA52,
+    "AC3 decoder",
+    deca52Init,
+    deca52Work,
+    deca52Close,
+    0,
+    deca52BSInfo
+};
+
+/***********************************************************************
+ * Local prototypes
+ **********************************************************************/
+static hb_buffer_t * Decode( hb_work_object_t * w );
+
+/***********************************************************************
+ * dynrng_call
+ ***********************************************************************
+ * Boosts soft audio -- taken from gbooker's work in A52Decoder, comment and all..
+ * Two cases
+ * 1) The user requested a compression of 1 or less, return the typical power rule
+ * 2) The user requested a compression of more than 1 (decompression):
+ *    If the stream's requested compression is less than 1.0 (loud sound), return the normal compression
+ *    If the stream's requested compression is more than 1.0 (soft sound), use power rule (which will make
+ *   it louder in this case).
+ *
+ **********************************************************************/
+static sample_t dynrng_call (sample_t c, void *data)
+{
+        float *level = (float *)data;
+        float levelToUse = (float)*level;
+        if(c > 1.0 || levelToUse <= 1.0)
+        {
+            return powf(c, levelToUse);
+        }
+        else
+                return c;
+}
+
+/***********************************************************************
+ * hb_work_deca52_init
+ ***********************************************************************
+ * Allocate the work object, initialize liba52
+ **********************************************************************/
+static int deca52Init( hb_work_object_t * w, hb_job_t * job )
+{
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    hb_audio_t * audio = w->audio;
+    w->private_data = pv;
+
+    pv->job   = job;
+
+    pv->list      = hb_list_init();
+    pv->state     = a52_init( 0 );
+
+       /* Decide what format we want out of a52dec
+       work.c has already done some of this deduction for us in do_job() */
+
+       pv->flags_out = HB_AMIXDOWN_GET_A52_FORMAT(audio->config.out.mixdown);
+
+       /* pass the number of channels used into the private work data */
+       /* will only be actually used if we're not doing AC3 passthru */
+    pv->out_discrete_channels = HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->config.out.mixdown);
+
+    pv->level     = 32768.0;
+    pv->dynamic_range_compression = audio->config.out.dynamic_range_compression;
+
+    pv->next_expected_pts = 0;
+    pv->sequence = 0;
+
+    return 0;
+}
+
+/***********************************************************************
+ * Close
+ ***********************************************************************
+ * Free memory
+ **********************************************************************/
+static void deca52Close( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    a52_free( pv->state );
+    hb_list_empty( &pv->list );
+    free( pv );
+    w->private_data = NULL;
+}
+
+/***********************************************************************
+ * Work
+ ***********************************************************************
+ * Add the given buffer to the data we already have, and decode as much
+ * as we can
+ **********************************************************************/
+static int deca52Work( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * buf;
+
+    if ( (*buf_in)->size <= 0 )
+    {
+        /* EOF on input stream - send it downstream & say that we're done */
+        *buf_out = *buf_in;
+        *buf_in = NULL;
+        return HB_WORK_DONE;
+    }
+
+    pv->sequence = (*buf_in)->sequence;
+
+    hb_list_add( pv->list, *buf_in );
+    *buf_in = NULL;
+
+    /* If we got more than a frame, chain raw buffers */
+    *buf_out = buf = Decode( w );
+    while( buf )
+    {
+        buf->sequence = pv->sequence;
+        buf->next = Decode( w );
+        buf       = buf->next;
+    }
+
+    return HB_WORK_OK;
+}
+
+/***********************************************************************
+ * Decode
+ ***********************************************************************
+ *
+ **********************************************************************/
+static hb_buffer_t * Decode( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * buf;
+    hb_audio_t  * audio = w->audio;
+    int           i, j, k;
+    uint64_t      pts, pos;
+
+    /* Get a frame header if don't have one yet */
+    if( !pv->sync )
+    {
+        while( hb_list_bytes( pv->list ) >= 7 )
+        {
+            /* We have 7 bytes, check if this is a correct header */
+            hb_list_seebytes( pv->list, pv->frame, 7 );
+            pv->size = a52_syncinfo( pv->frame, &pv->flags_in, &pv->rate,
+                                    &pv->bitrate );
+            if( pv->size )
+            {
+                /* It is. W00t. */
+                if( pv->error )
+                {
+                    hb_log( "a52_syncinfo ok" );
+                }
+                pv->error = 0;
+                pv->sync  = 1;
+                break;
+            }
+
+            /* It is not */
+            if( !pv->error )
+            {
+                hb_log( "a52_syncinfo failed" );
+                pv->error = 1;
+            }
+
+            /* Try one byte later */
+            hb_list_getbytes( pv->list, pv->frame, 1, NULL, NULL );
+        }
+    }
+
+    if( !pv->sync ||
+        hb_list_bytes( pv->list ) < pv->size )
+    {
+        /* Need more data */
+        return NULL;
+    }
+
+    /* Get the whole frame */
+    hb_list_getbytes( pv->list, pv->frame, pv->size, &pts, &pos );
+    if (pts == -1)
+    {
+        pts = pv->next_expected_pts;
+    }
+
+    /* AC3 passthrough: don't decode the AC3 frame */
+    if( audio->config.out.codec == HB_ACODEC_AC3 )
+    {
+        buf = hb_buffer_init( pv->size );
+        memcpy( buf->data, pv->frame, pv->size );
+        buf->start = pts + ( pos / pv->size ) * 6 * 256 * 90000 / pv->rate;
+        buf->stop  = buf->start + 6 * 256 * 90000 / pv->rate;
+        pv->next_expected_pts = buf->stop;
+        pv->sync = 0;
+        return buf;
+    }
+
+    /* Feed liba52 */
+    a52_frame( pv->state, pv->frame, &pv->flags_out, &pv->level, 0 );
+
+    if ( pv->dynamic_range_compression > 1.0 )
+    {
+        a52_dynrng( pv->state, dynrng_call, &pv->dynamic_range_compression);
+    }
+
+    /* 6 blocks per frame, 256 samples per block, channelsused channels */
+    buf        = hb_buffer_init( 6 * 256 * pv->out_discrete_channels * sizeof( float ) );
+    buf->start = pts + ( pos / pv->size ) * 6 * 256 * 90000 / pv->rate;
+    buf->stop  = buf->start + 6 * 256 * 90000 / pv->rate;
+
+    /*
+       * To track AC3 PTS add this back in again.
+        *hb_log("AC3: pts is %lld, buf->start %lld buf->stop %lld", pts, buf->start, buf->stop);
+        */
+
+    pv->next_expected_pts = buf->stop;
+
+    for( i = 0; i < 6; i++ )
+    {
+        sample_t * samples_in;
+        float    * samples_out;
+
+        a52_block( pv->state );
+        samples_in  = a52_samples( pv->state );
+        samples_out = ((float *) buf->data) + 256 * pv->out_discrete_channels * i;
+
+        /* Interleave */
+        for( j = 0; j < 256; j++ )
+        {
+                       for ( k = 0; k < pv->out_discrete_channels; k++ )
+                       {
+                               samples_out[(pv->out_discrete_channels*j)+k]   = samples_in[(256*k)+j];
+                       }
+        }
+
+    }
+
+    pv->sync = 0;
+    return buf;
+}
+
+static int deca52BSInfo( hb_work_object_t *w, const hb_buffer_t *b,
+                         hb_work_info_t *info )
+{
+    int i;
+    int rate = 0, bitrate = 0, flags = 0;
+    int old_rate = 0, old_bitrate = 0;
+    uint8_t raw;
+
+    memset( info, 0, sizeof(*info) );
+
+    /* since AC3 frames don't line up with MPEG ES frames scan the
+     * entire frame for an AC3 sync pattern.  */
+    for ( i = 0; i < b->size - 7; ++i )
+    {
+        if( a52_syncinfo( &b->data[i], &flags, &rate, &bitrate ) != 0 )
+        {
+            /*
+             * Got sync apparently, save these values and check that they
+             * also match when we get sync again.
+             */
+            if( old_rate ) 
+            {
+                if( rate == old_rate && bitrate == old_bitrate )
+                {
+                    break;
+                } 
+            } 
+            
+            old_rate = rate;
+            old_bitrate = bitrate;
+            raw = b->data[i+5];
+        }
+    }
+    if ( rate == 0 || bitrate == 0 )
+    {
+        /* didn't find AC3 sync */
+        return 0;
+    }
+
+    /*
+     * bsid | bsmod | acmod | cmixlev | surmixlev | dsurmod | lfeon | dialnorm | compre
+     *    5       3       3         2           2         2       1          5        1
+     * [    byte1  ][         byte2                    ][   byte3                     ]
+     */
+
+
+    info->name = "AC-3";
+    info->rate = rate;
+    info->rate_base = 1;
+    info->bitrate = bitrate;
+    info->flags = flags;
+    info->version = raw >> 3;    /* bsid is the first 5 bits */
+    info->mode = raw & 0x7;      /* bsmod is the following 3 bits */
+
+    if ( (flags & A52_CHANNEL_MASK) == A52_DOLBY )
+    {
+        info->flags |= AUDIO_F_DOLBY;
+    }
+
+    switch( flags & A52_CHANNEL_MASK )
+    {
+        /* mono sources */
+        case A52_MONO:
+        case A52_CHANNEL1:
+        case A52_CHANNEL2:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_MONO;
+            break;
+        /* stereo input */
+        case A52_CHANNEL:
+        case A52_STEREO:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_STEREO;
+            break;
+        /* dolby (DPL1 aka Dolby Surround = 4.0 matrix-encoded) input */
+        case A52_DOLBY:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_DOLBY;
+            break;
+        /* 3F/2R input */
+        case A52_3F2R:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_3F2R;
+            break;
+        /* 3F/1R input */
+        case A52_3F1R:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_3F1R;
+            break;
+        /* other inputs */
+        case A52_3F:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_3F;
+            break;
+        case A52_2F1R:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_2F1R;
+            break;
+        case A52_2F2R:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_2F2R;
+            break;
+        /* unknown */
+        default:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_STEREO;
+    }
+
+    if (flags & A52_LFE)
+    {
+        info->channel_layout |= HB_INPUT_CH_LAYOUT_HAS_LFE;
+    }
+
+    return 1;
+}
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
new file mode 100644 (file)
index 0000000..81ea499
--- /dev/null
@@ -0,0 +1,1066 @@
+/* $Id: decavcodec.c,v 1.6 2005/03/06 04:08:54 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+/* This module is Handbrake's interface to the ffmpeg decoder library
+   (libavcodec & small parts of libavformat). It contains four Handbrake
+   "work objects":
+
+    decavcodec  connects HB to an ffmpeg audio decoder
+    decavcodecv connects HB to an ffmpeg video decoder
+
+        (Two different routines are needed because the ffmpeg library
+        has different decoder calling conventions for audio & video.
+        The audio decoder should have had its name changed to "decavcodeca"
+        but I got lazy.) These work objects are self-contained & follow all
+        of HB's conventions for a decoder module. They can be used like
+        any other HB decoder (deca52, decmpeg2, etc.).
+
+    decavcodecai "internal" (incestuous?) version of decavcodec
+    decavcodecvi "internal" (incestuous?) version of decavcodecv
+
+        These routine are functionally equivalent to the routines above but
+        can only be used by the ffmpeg-based stream reader in libhb/stream.c.
+        The reason they exist is because the ffmpeg library leaves some of
+        the information needed by the decoder in the AVStream (the data
+        structure used by the stream reader) and we need to retrieve it
+        to successfully decode frames. But in HB the reader and decoder
+        modules are in completely separate threads and nothing goes between
+        them but hb_buffers containing frames to be decoded. I.e., there's
+        no easy way for the ffmpeg stream reader to pass a pointer to its
+        AVStream over to the ffmpeg video or audio decoder. So the *i work
+        objects use a private back door to the stream reader to get access
+        to the AVStream (routines hb_ffmpeg_avstream and hb_ffmpeg_context)
+        and the codec_param passed to these work objects is the key to this
+        back door (it's basically an index that allows the correct AVStream
+        to be retrieved).
+
+    The normal & *i objects share a lot of code (the basic frame decoding
+    and bitstream info code is factored out into subroutines that can be
+    called by either) but the top level routines of the *i objects
+    (decavcodecviWork, decavcodecviInfo, etc.) are different because:
+     1) they *have* to use the AVCodecContext that's contained in the
+        reader's AVStream rather than just allocating & using their own,
+     2) the Info routines have access to stuff kept in the AVStream in addition
+        to stuff kept in the AVCodecContext. This shouldn't be necessary but
+        crucial information like video frame rate that should be in the
+        AVCodecContext is either missing or wrong in the version of ffmpeg
+        we're currently using.
+
+    A consequence of the above is that the non-i work objects *can't* use
+    information from the AVStream because there isn't one - they get their
+    data from either the dvd reader or the mpeg reader, not the ffmpeg stream
+    reader. That means that they have to make up for deficiencies in the
+    AVCodecContext info by using stuff kept in the HB "title" struct. It
+    also means that ffmpeg codecs that randomly scatter state needed by
+    the decoder across both the AVCodecContext & the AVStream (e.g., the
+    VC1 decoder) can't easily be used by the HB mpeg stream reader.
+ */
+
+#include "hb.h"
+
+#include "libavcodec/avcodec.h"
+#include "libavformat/avformat.h"
+#include "libswscale/swscale.h"
+
+static int  decavcodecInit( hb_work_object_t *, hb_job_t * );
+static int  decavcodecWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+static void decavcodecClose( hb_work_object_t * );
+static int decavcodecInfo( hb_work_object_t *, hb_work_info_t * );
+static int decavcodecBSInfo( hb_work_object_t *, const hb_buffer_t *, hb_work_info_t * );
+
+hb_work_object_t hb_decavcodec =
+{
+    WORK_DECAVCODEC,
+    "MPGA decoder (libavcodec)",
+    decavcodecInit,
+    decavcodecWork,
+    decavcodecClose,
+    decavcodecInfo,
+    decavcodecBSInfo
+};
+
+#define HEAP_SIZE 8
+typedef struct {
+    // there are nheap items on the heap indexed 1..nheap (i.e., top of
+    // heap is 1). The 0th slot is unused - a marker is put there to check
+    // for overwrite errs.
+    int64_t h[HEAP_SIZE+1];
+    int     nheap;
+} pts_heap_t;
+
+struct hb_work_private_s
+{
+    hb_job_t        *job;
+    AVCodecContext  *context;
+    AVCodecParserContext *parser;
+    hb_list_t       *list;
+    double          duration;   // frame duration (for video)
+    double          pts_next;   // next pts we expect to generate
+    int64_t         pts;        // (video) pts passing from parser to decoder
+    int64_t         chap_time;  // time of next chap mark (if new_chap != 0)
+    int             new_chap;   // output chapter mark pending
+    uint32_t        nframes;
+    uint32_t        ndrops;
+    uint32_t        decode_errors;
+    int             brokenByMicrosoft; // video stream may contain packed b-frames
+    hb_buffer_t*    delayq[HEAP_SIZE];
+    pts_heap_t      pts_heap;
+    void*           buffer;
+    struct SwsContext *sws_context; // if we have to rescale or convert color space
+};
+
+static int64_t heap_pop( pts_heap_t *heap )
+{
+    int64_t result;
+
+    if ( heap->nheap <= 0 )
+    {
+        return -1;
+    }
+
+    // return the top of the heap then put the bottom element on top,
+    // decrease the heap size by one & rebalence the heap.
+    result = heap->h[1];
+
+    int64_t v = heap->h[heap->nheap--];
+    int parent = 1;
+    int child = parent << 1;
+    while ( child <= heap->nheap )
+    {
+        // find the smallest of the two children of parent
+        if (child < heap->nheap && heap->h[child] > heap->h[child+1] )
+            ++child;
+
+        if (v <= heap->h[child])
+            // new item is smaller than either child so it's the new parent.
+            break;
+
+        // smallest child is smaller than new item so move it up then
+        // check its children.
+        int64_t hp = heap->h[child];
+        heap->h[parent] = hp;
+        parent = child;
+        child = parent << 1;
+    }
+    heap->h[parent] = v;
+    return result;
+}
+
+static void heap_push( pts_heap_t *heap, int64_t v )
+{
+    if ( heap->nheap < HEAP_SIZE )
+    {
+        ++heap->nheap;
+    }
+
+    // stick the new value on the bottom of the heap then bubble it
+    // up to its correct spot.
+       int child = heap->nheap;
+       while (child > 1) {
+               int parent = child >> 1;
+               if (heap->h[parent] <= v)
+                       break;
+               // move parent down
+               int64_t hp = heap->h[parent];
+               heap->h[child] = hp;
+               child = parent;
+       }
+       heap->h[child] = v;
+}
+
+
+/***********************************************************************
+ * hb_work_decavcodec_init
+ ***********************************************************************
+ *
+ **********************************************************************/
+static int decavcodecInit( hb_work_object_t * w, hb_job_t * job )
+{
+    AVCodec * codec;
+
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+
+    pv->job   = job;
+
+    int codec_id = w->codec_param;
+    /*XXX*/
+    if ( codec_id == 0 )
+        codec_id = CODEC_ID_MP2;
+    codec = avcodec_find_decoder( codec_id );
+    pv->parser = av_parser_init( codec_id );
+
+    pv->context = avcodec_alloc_context();
+    avcodec_open( pv->context, codec );
+
+    return 0;
+}
+
+/***********************************************************************
+ * Close
+ ***********************************************************************
+ *
+ **********************************************************************/
+static void decavcodecClose( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+
+    if ( pv )
+    {
+        if ( pv->job && pv->context && pv->context->codec )
+        {
+            hb_log( "%s-decoder done: %u frames, %u decoder errors, %u drops",
+                    pv->context->codec->name, pv->nframes, pv->decode_errors,
+                    pv->ndrops );
+        }
+        if ( pv->sws_context )
+        {
+            sws_freeContext( pv->sws_context );
+        }
+        if ( pv->parser )
+        {
+            av_parser_close(pv->parser);
+        }
+        if ( pv->context && pv->context->codec )
+        {
+            avcodec_close( pv->context );
+        }
+        if ( pv->list )
+        {
+            hb_list_close( &pv->list );
+        }
+        if ( pv->buffer )
+        {
+            free( pv->buffer );
+            pv->buffer = NULL;
+        }
+        free( pv );
+        w->private_data = NULL;
+    }
+}
+
+/***********************************************************************
+ * Work
+ ***********************************************************************
+ *
+ **********************************************************************/
+static int decavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                    hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * in = *buf_in, * buf, * last = NULL;
+    int   pos, len, out_size, i, uncompressed_len;
+    short buffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
+    uint64_t cur;
+    unsigned char *parser_output_buffer;
+    int parser_output_buffer_len;
+
+    if ( (*buf_in)->size <= 0 )
+    {
+        /* EOF on input stream - send it downstream & say that we're done */
+        *buf_out = *buf_in;
+        *buf_in = NULL;
+        return HB_WORK_DONE;
+    }
+
+    *buf_out = NULL;
+
+    cur = ( in->start < 0 )? pv->pts_next : in->start;
+
+    pos = 0;
+    while( pos < in->size )
+    {
+        len = av_parser_parse( pv->parser, pv->context,
+                               &parser_output_buffer, &parser_output_buffer_len,
+                               in->data + pos, in->size - pos, cur, cur );
+        out_size = 0;
+        uncompressed_len = 0;
+        if (parser_output_buffer_len)
+        {
+            out_size = sizeof(buffer);
+            uncompressed_len = avcodec_decode_audio2( pv->context, buffer,
+                                                      &out_size,
+                                                      parser_output_buffer,
+                                                      parser_output_buffer_len );
+        }
+        if( out_size )
+        {
+            short * s16;
+            float * fl32;
+
+            buf = hb_buffer_init( 2 * out_size );
+
+            int sample_size_in_bytes = 2;   // Default to 2 bytes
+            switch (pv->context->sample_fmt)
+            {
+              case SAMPLE_FMT_S16:
+                sample_size_in_bytes = 2;
+                break;
+              /* We should handle other formats here - but that needs additional format conversion work below */
+              /* For now we'll just report the error and try to carry on */
+              default:
+                hb_log("decavcodecWork - Unknown Sample Format from avcodec_decode_audio (%d) !", pv->context->sample_fmt);
+                break;
+            }
+
+            buf->start = cur;
+            buf->stop  = cur + 90000 * ( out_size / (sample_size_in_bytes * pv->context->channels) ) /
+                         pv->context->sample_rate;
+            cur = buf->stop;
+
+            s16  = buffer;
+            fl32 = (float *) buf->data;
+            for( i = 0; i < out_size / 2; i++ )
+            {
+                fl32[i] = s16[i];
+            }
+
+            if( last )
+            {
+                last = last->next = buf;
+            }
+            else
+            {
+                *buf_out = last = buf;
+            }
+        }
+
+        pos += len;
+    }
+
+    pv->pts_next = cur;
+
+    return HB_WORK_OK;
+}
+
+static int decavcodecInfo( hb_work_object_t *w, hb_work_info_t *info )
+{
+    hb_work_private_t *pv = w->private_data;
+
+    memset( info, 0, sizeof(*info) );
+
+    if ( pv && pv->context )
+    {
+        AVCodecContext *context = pv->context;
+        info->bitrate = context->bit_rate;
+        info->rate = context->time_base.num;
+        info->rate_base = context->time_base.den;
+        info->profile = context->profile;
+        info->level = context->level;
+        return 1;
+    }
+    return 0;
+}
+
+static int decavcodecBSInfo( hb_work_object_t *w, const hb_buffer_t *buf,
+                             hb_work_info_t *info )
+{
+    hb_work_private_t *pv = w->private_data;
+
+    memset( info, 0, sizeof(*info) );
+
+    if ( pv && pv->context )
+    {
+        return decavcodecInfo( w, info );
+    }
+    // XXX
+    // We should parse the bitstream to find its parameters but for right
+    // now we just return dummy values if there's a codec that will handle it.
+    AVCodec *codec = avcodec_find_decoder( w->codec_param? w->codec_param :
+                                                           CODEC_ID_MP2 );
+    if ( codec )
+    {
+        static char codec_name[64];
+
+        info->name =  strncpy( codec_name, codec->name, sizeof(codec_name)-1 );
+        info->bitrate = 384000;
+        info->rate = 48000;
+        info->rate_base = 1;
+        info->channel_layout = HB_INPUT_CH_LAYOUT_STEREO;
+        return 1;
+    }
+    return -1;
+}
+
+/* -------------------------------------------------------------
+ * General purpose video decoder using libavcodec
+ */
+
+static uint8_t *copy_plane( uint8_t *dst, uint8_t* src, int dstride, int sstride,
+                            int h )
+{
+    if ( dstride == sstride )
+    {
+        memcpy( dst, src, dstride * h );
+        return dst + dstride * h;
+    }
+    int lbytes = dstride <= sstride? dstride : sstride;
+    while ( --h >= 0 )
+    {
+        memcpy( dst, src, lbytes );
+        src += sstride;
+        dst += dstride;
+    }
+    return dst;
+}
+
+// copy one video frame into an HB buf. If the frame isn't in our color space
+// or at least one of its dimensions is odd, use sws_scale to convert/rescale it.
+// Otherwise just copy the bits.
+static hb_buffer_t *copy_frame( hb_work_private_t *pv, AVFrame *frame )
+{
+    AVCodecContext *context = pv->context;
+    int w, h;
+    if ( ! pv->job )
+    {
+        // if the dimensions are odd, drop the lsb since h264 requires that
+        // both width and height be even.
+        w = ( context->width >> 1 ) << 1;
+        h = ( context->height >> 1 ) << 1;
+    }
+    else
+    {
+        w =  pv->job->title->width;
+        h =  pv->job->title->height;
+    }
+    hb_buffer_t *buf = hb_video_buffer_init( w, h );
+    uint8_t *dst = buf->data;
+
+    if ( context->pix_fmt != PIX_FMT_YUV420P || w != context->width ||
+         h != context->height )
+    {
+        // have to convert to our internal color space and/or rescale
+        AVPicture dstpic;
+        avpicture_fill( &dstpic, dst, PIX_FMT_YUV420P, w, h );
+
+        if ( ! pv->sws_context )
+        {
+            pv->sws_context = sws_getContext( context->width, context->height, context->pix_fmt,
+                                              w, h, PIX_FMT_YUV420P,
+                                              SWS_LANCZOS|SWS_ACCURATE_RND,
+                                              NULL, NULL, NULL );
+        }
+        sws_scale( pv->sws_context, frame->data, frame->linesize, 0, h,
+                   dstpic.data, dstpic.linesize );
+    }
+    else
+    {
+        dst = copy_plane( dst, frame->data[0], w, frame->linesize[0], h );
+        w = (w + 1) >> 1; h = (h + 1) >> 1;
+        dst = copy_plane( dst, frame->data[1], w, frame->linesize[1], h );
+        dst = copy_plane( dst, frame->data[2], w, frame->linesize[2], h );
+    }
+    return buf;
+}
+
+static int get_frame_buf( AVCodecContext *context, AVFrame *frame )
+{
+    hb_work_private_t *pv = context->opaque;
+    frame->pts = pv->pts;
+    pv->pts = -1;
+    return avcodec_default_get_buffer( context, frame );
+}
+
+static void log_chapter( hb_work_private_t *pv, int chap_num, int64_t pts )
+{
+    hb_chapter_t *c = hb_list_item( pv->job->title->list_chapter, chap_num - 1 );
+    if ( c && c->title )
+    {
+        hb_log( "%s: \"%s\" (%d) at frame %u time %lld",
+                pv->context->codec->name, c->title, chap_num, pv->nframes, pts );
+    }
+    else
+    {
+        hb_log( "%s: Chapter %d at frame %u time %lld",
+                pv->context->codec->name, chap_num, pv->nframes, pts );
+    }
+}
+
+static void flushDelayQueue( hb_work_private_t *pv )
+{
+    hb_buffer_t *buf;
+    int slot = pv->nframes & (HEAP_SIZE-1);
+
+    // flush all the video packets left on our timestamp-reordering delay q
+    while ( ( buf = pv->delayq[slot] ) != NULL )
+    {
+        buf->start = heap_pop( &pv->pts_heap );
+        hb_list_add( pv->list, buf );
+        pv->delayq[slot] = NULL;
+        slot = ( slot + 1 ) & (HEAP_SIZE-1);
+    }
+}
+
+static int decodeFrame( hb_work_private_t *pv, uint8_t *data, int size )
+{
+    int got_picture;
+    AVFrame frame;
+
+    if ( avcodec_decode_video( pv->context, &frame, &got_picture, data, size ) < 0 )
+    {
+        ++pv->decode_errors;     
+    }
+    if( got_picture )
+    {
+        // ffmpeg makes it hard to attach a pts to a frame. if the MPEG ES
+        // packet had a pts we handed it to av_parser_parse (if the packet had
+        // no pts we set it to -1 but before the parse we can't distinguish between
+        // the start of a video frame with no pts & an intermediate packet of
+        // some frame which never has a pts). we hope that when parse returns
+        // the frame to us the pts we originally handed it will be in parser->pts.
+        // we put this pts into pv->pts so that when a avcodec_decode_video
+        // finally gets around to allocating an AVFrame to hold the decoded
+        // frame we can stuff that pts into the frame. if all of these relays
+        // worked at this point frame.pts should hold the frame's pts from the
+        // original data stream or -1 if it didn't have one. in the latter case
+        // we generate the next pts in sequence for it.
+        double frame_dur = pv->duration;
+        if ( frame_dur <= 0 )
+        {
+            frame_dur = 90000. * (double)pv->context->time_base.num /
+                        (double)pv->context->time_base.den;
+            pv->duration = frame_dur;
+        }
+        if ( frame.repeat_pict )
+        {
+            frame_dur += frame.repeat_pict * frame_dur * 0.5;
+        }
+        // If there was no pts for this frame, assume constant frame rate
+        // video & estimate the next frame time from the last & duration.
+        double pts = frame.pts;
+        if ( pts < 0 )
+        {
+            pts = pv->pts_next;
+        }
+        pv->pts_next = pts + frame_dur;
+
+        hb_buffer_t *buf;
+
+        // if we're doing a scan or this content couldn't have been broken
+        // by Microsoft we don't worry about timestamp reordering
+        if ( ! pv->job || ! pv->brokenByMicrosoft )
+        {
+            buf = copy_frame( pv, &frame );
+            buf->start = pts;
+            hb_list_add( pv->list, buf );
+            ++pv->nframes;
+            return got_picture;
+        }
+
+        // XXX This following probably addresses a libavcodec bug but I don't
+        //     see an easy fix so we workaround it here.
+        //
+        // The M$ 'packed B-frames' atrocity results in decoded frames with
+        // the wrong timestamp. E.g., if there are 2 b-frames the timestamps
+        // we see here will be "2 3 1 5 6 4 ..." instead of "1 2 3 4 5 6".
+        // The frames are actually delivered in the right order but with
+        // the wrong timestamp. To get the correct timestamp attached to
+        // each frame we have a delay queue (longer than the max number of
+        // b-frames) & a sorting heap for the timestamps. As each frame
+        // comes out of the decoder the oldest frame in the queue is removed
+        // and associated with the smallest timestamp. Then the new frame is
+        // added to the queue & its timestamp is pushed on the heap.
+        // This does nothing if the timestamps are correct (i.e., the video
+        // uses a codec that Micro$oft hasn't broken yet) but the frames
+        // get timestamped correctly even when M$ has munged them.
+
+        // remove the oldest picture from the frame queue (if any) &
+        // give it the smallest timestamp from our heap. The queue size
+        // is a power of two so we get the slot of the oldest by masking
+        // the frame count & this will become the slot of the newest
+        // once we've removed & processed the oldest.
+        int slot = pv->nframes & (HEAP_SIZE-1);
+        if ( ( buf = pv->delayq[slot] ) != NULL )
+        {
+            buf->start = heap_pop( &pv->pts_heap );
+
+            if ( pv->new_chap && buf->start >= pv->chap_time )
+            {
+                buf->new_chap = pv->new_chap;
+                pv->new_chap = 0;
+                pv->chap_time = 0;
+                log_chapter( pv, buf->new_chap, buf->start );
+            }
+            else if ( pv->nframes == 0 )
+            {
+                log_chapter( pv, pv->job->chapter_start, buf->start );
+            }
+            hb_list_add( pv->list, buf );
+        }
+
+        // add the new frame to the delayq & push its timestamp on the heap
+        pv->delayq[slot] = copy_frame( pv, &frame );
+        heap_push( &pv->pts_heap, pts );
+
+        ++pv->nframes;
+    }
+
+    return got_picture;
+}
+
+static void decodeVideo( hb_work_private_t *pv, uint8_t *data, int size,
+                         int64_t pts, int64_t dts )
+{
+    /*
+     * The following loop is a do..while because we need to handle both
+     * data & the flush at the end (signaled by size=0). At the end there's
+     * generally a frame in the parser & one or more frames in the decoder
+     * (depending on the bframes setting).
+     */
+    int pos = 0;
+    do {
+        uint8_t *pout;
+        int pout_len;
+        int len = av_parser_parse( pv->parser, pv->context, &pout, &pout_len,
+                                   data + pos, size - pos, pts, dts );
+        pos += len;
+
+        if ( pout_len > 0 )
+        {
+            pv->pts = pv->parser->pts;
+            decodeFrame( pv, pout, pout_len );
+        }
+    } while ( pos < size );
+
+    /* the stuff above flushed the parser, now flush the decoder */
+    if ( size <= 0 )
+    {
+        while ( decodeFrame( pv, NULL, 0 ) )
+        {
+        }
+        flushDelayQueue( pv );
+    }
+}
+
+static hb_buffer_t *link_buf_list( hb_work_private_t *pv )
+{
+    hb_buffer_t *head = hb_list_item( pv->list, 0 );
+
+    if ( head )
+    {
+        hb_list_rem( pv->list, head );
+
+        hb_buffer_t *last = head, *buf;
+
+        while ( ( buf = hb_list_item( pv->list, 0 ) ) != NULL )
+        {
+            hb_list_rem( pv->list, buf );
+            last->next = buf;
+            last = buf;
+        }
+    }
+    return head;
+}
+
+
+static int decavcodecvInit( hb_work_object_t * w, hb_job_t * job )
+{
+
+    hb_work_private_t *pv = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+    pv->job   = job;
+    pv->list = hb_list_init();
+
+    int codec_id = w->codec_param;
+    pv->parser = av_parser_init( codec_id );
+    pv->context = avcodec_alloc_context2( CODEC_TYPE_VIDEO );
+
+    /* we have to wrap ffmpeg's get_buffer to be able to set the pts (?!) */
+    pv->context->opaque = pv;
+    pv->context->get_buffer = get_frame_buf;
+
+    AVCodec *codec = avcodec_find_decoder( codec_id );
+
+    // we can't call the avstream funcs but the read_header func in the
+    // AVInputFormat may set up some state in the AVContext. In particular 
+    // vc1t_read_header allocates 'extradata' to deal with header issues
+    // related to Microsoft's bizarre engineering notions. We alloc a chunk
+    // of space to make vc1 work then associate the codec with the context.
+    pv->context->extradata_size = 32;
+    pv->context->extradata = av_malloc(pv->context->extradata_size);
+    avcodec_open( pv->context, codec );
+
+    return 0;
+}
+
+static int decavcodecvWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                            hb_buffer_t ** buf_out )
+{
+    hb_work_private_t *pv = w->private_data;
+    hb_buffer_t *in = *buf_in;
+    int64_t pts = AV_NOPTS_VALUE;
+    int64_t dts = pts;
+
+    *buf_in = NULL;
+
+    /* if we got an empty buffer signaling end-of-stream send it downstream */
+    if ( in->size == 0 )
+    {
+        decodeVideo( pv, in->data, in->size, pts, dts );
+        hb_list_add( pv->list, in );
+        *buf_out = link_buf_list( pv );
+        return HB_WORK_DONE;
+    }
+
+    if( in->start >= 0 )
+    {
+        pts = in->start;
+        dts = in->renderOffset;
+    }
+    if ( in->new_chap )
+    {
+        pv->new_chap = in->new_chap;
+        pv->chap_time = pts >= 0? pts : pv->pts_next;
+    }
+    decodeVideo( pv, in->data, in->size, pts, dts );
+    hb_buffer_close( &in );
+    *buf_out = link_buf_list( pv );
+    return HB_WORK_OK;
+}
+
+static int decavcodecvInfo( hb_work_object_t *w, hb_work_info_t *info )
+{
+    hb_work_private_t *pv = w->private_data;
+
+    memset( info, 0, sizeof(*info) );
+
+    if ( pv && pv->context )
+    {
+        AVCodecContext *context = pv->context;
+        info->bitrate = context->bit_rate;
+        info->width = context->width;
+        info->height = context->height;
+
+        /* ffmpeg gives the frame rate in frames per second while HB wants
+         * it in units of the 27MHz MPEG clock. */
+        info->rate = 27000000;
+        info->rate_base = (int64_t)context->time_base.num * 27000000LL /
+                          context->time_base.den;
+        
+        /* Sometimes there's no pixel aspect set in the source. In that case,
+           assume a 1:1 PAR. Otherwise, preserve the source PAR.             */
+        info->pixel_aspect_width = context->sample_aspect_ratio.num ?
+                                        context->sample_aspect_ratio.num : 1;
+        info->pixel_aspect_height = context->sample_aspect_ratio.den ?
+                                        context->sample_aspect_ratio.den : 1;
+
+        /* ffmpeg returns the Pixel Aspect Ratio (PAR). Handbrake wants the
+         * Display Aspect Ratio so we convert by scaling by the Storage
+         * Aspect Ratio (w/h). We do the calc in floating point to get the
+         * rounding right. */
+        info->aspect = (double)info->pixel_aspect_width * 
+                       (double)context->width /
+                       (double)info->pixel_aspect_height /
+                       (double)context->height;
+
+        info->profile = context->profile;
+        info->level = context->level;
+        info->name = context->codec->name;
+        return 1;
+    }
+    return 0;
+}
+
+static int decavcodecvBSInfo( hb_work_object_t *w, const hb_buffer_t *buf,
+                             hb_work_info_t *info )
+{
+    return 0;
+}
+
+hb_work_object_t hb_decavcodecv =
+{
+    WORK_DECAVCODECV,
+    "Video decoder (libavcodec)",
+    decavcodecvInit,
+    decavcodecvWork,
+    decavcodecClose,
+    decavcodecvInfo,
+    decavcodecvBSInfo
+};
+
+
+// This is a special decoder for ffmpeg streams. The ffmpeg stream reader
+// includes a parser and passes information from the parser to the decoder
+// via a codec context kept in the AVStream of the reader's AVFormatContext.
+// We *have* to use that codec context to decode the stream or we'll get
+// garbage. ffmpeg_title_scan put a cookie that can be used to get to that
+// codec context in our codec_param.
+
+// this routine gets the appropriate context pointer from the ffmpeg
+// stream reader. it can't be called until we get the first buffer because
+// we can't guarantee that reader will be called before the our init
+// routine and if our init is called first we'll get a pointer to the
+// old scan stream (which has already been closed).
+static void init_ffmpeg_context( hb_work_object_t *w )
+{
+    hb_work_private_t *pv = w->private_data;
+    pv->context = hb_ffmpeg_context( w->codec_param );
+
+    // during scan the decoder gets closed & reopened which will
+    // close the codec so reopen it if it's not there
+    if ( ! pv->context->codec )
+    {
+        AVCodec *codec = avcodec_find_decoder( pv->context->codec_id );
+        avcodec_open( pv->context, codec );
+    }
+    // set up our best guess at the frame duration.
+    // the frame rate in the codec is usually bogus but it's sometimes
+    // ok in the stream.
+    AVStream *st = hb_ffmpeg_avstream( w->codec_param );
+
+    if ( st->nb_frames && st->duration )
+    {
+        // compute the average frame duration from the total number
+        // of frames & the total duration.
+        pv->duration = ( (double)st->duration * (double)st->time_base.num ) /
+                       ( (double)st->nb_frames * (double)st->time_base.den );
+    }
+    else
+    {
+        // XXX We don't have a frame count or duration so try to use the
+        // far less reliable time base info in the stream.
+        // Because the time bases are so screwed up, we only take values
+        // in the range 8fps - 64fps.
+        AVRational tb;
+        if ( st->time_base.num * 64 > st->time_base.den &&
+             st->time_base.den > st->time_base.num * 8 )
+        {
+            tb = st->time_base;
+        }
+        else if ( st->r_frame_rate.den * 64 > st->r_frame_rate.num &&
+                  st->r_frame_rate.num > st->r_frame_rate.den * 8 )
+        {
+            tb.num = st->r_frame_rate.den;
+            tb.den = st->r_frame_rate.num;
+        }
+        else
+        {
+            tb.num = 1001;  /*XXX*/
+            tb.den = 24000; /*XXX*/
+        }
+        pv->duration =  (double)tb.num / (double)tb.den;
+    }
+    pv->duration *= 90000.;
+
+    // we have to wrap ffmpeg's get_buffer to be able to set the pts (?!)
+    pv->context->opaque = pv;
+    pv->context->get_buffer = get_frame_buf;
+
+    // avi, mkv and possibly mp4 containers can contain the M$ VFW packed
+    // b-frames abortion that messes up frame ordering and timestamps.
+    // XXX ffmpeg knows which streams are broken but doesn't expose the
+    //     info externally. We should patch ffmpeg to add a flag to the
+    //     codec context for this but until then we mark all ffmpeg streams
+    //     as suspicious.
+    pv->brokenByMicrosoft = 1;
+}
+
+static void prepare_ffmpeg_buffer( hb_buffer_t * in )
+{
+    // ffmpeg requires an extra 8 bytes of zero at the end of the buffer and
+    // will seg fault in odd, data dependent ways if it's not there. (my guess
+    // is this is a case of a local performance optimization creating a global
+    // performance degradation since all the time wasted by extraneous data
+    // copies & memory zeroing has to be huge compared to the minor reduction
+    // in inner-loop instructions this affords - modern cpus bottleneck on
+    // memory bandwidth not instruction bandwidth).
+    if ( in->size + FF_INPUT_BUFFER_PADDING_SIZE > in->alloc )
+    {
+        // have to realloc to add the padding
+        hb_buffer_realloc( in, in->size + FF_INPUT_BUFFER_PADDING_SIZE );
+    }
+    memset( in->data + in->size, 0, FF_INPUT_BUFFER_PADDING_SIZE );
+}
+
+static int decavcodecviInit( hb_work_object_t * w, hb_job_t * job )
+{
+
+    hb_work_private_t *pv = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+    pv->job   = job;
+    pv->list = hb_list_init();
+    pv->pts_next = -1;
+    pv->pts = -1;
+    return 0;
+}
+
+static int decavcodecviWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                             hb_buffer_t ** buf_out )
+{
+    hb_work_private_t *pv = w->private_data;
+    if ( ! pv->context )
+    {
+        init_ffmpeg_context( w );
+    }
+    hb_buffer_t *in = *buf_in;
+    *buf_in = NULL;
+
+    /* if we got an empty buffer signaling end-of-stream send it downstream */
+    if ( in->size == 0 )
+    {
+        /* flush any frames left in the decoder */
+        while ( decodeFrame( pv, NULL, 0 ) )
+        {
+        }
+        flushDelayQueue( pv );
+        hb_list_add( pv->list, in );
+        *buf_out = link_buf_list( pv );
+        return HB_WORK_DONE;
+    }
+
+    int64_t pts = in->start;
+    if( pts >= 0 )
+    {
+        // use the first timestamp as our 'next expected' pts
+        if ( pv->pts_next < 0 )
+        {
+            pv->pts_next = pts;
+        }
+        pv->pts = pts;
+    }
+
+    if ( in->new_chap )
+    {
+        pv->new_chap = in->new_chap;
+        pv->chap_time = pts >= 0? pts : pv->pts_next;
+    }
+    prepare_ffmpeg_buffer( in );
+    decodeFrame( pv, in->data, in->size );
+    hb_buffer_close( &in );
+    *buf_out = link_buf_list( pv );
+    return HB_WORK_OK;
+}
+
+static int decavcodecviInfo( hb_work_object_t *w, hb_work_info_t *info )
+{
+    if ( decavcodecvInfo( w, info ) )
+    {
+        hb_work_private_t *pv = w->private_data;
+        if ( ! pv->context )
+        {
+            init_ffmpeg_context( w );
+        }
+        // we have the frame duration in units of the 90KHz pts clock but
+        // need it in units of the 27MHz MPEG clock. */
+        info->rate = 27000000;
+        info->rate_base = pv->duration * 300.;
+        return 1;
+    }
+    return 0;
+}
+
+static void decodeAudio( hb_work_private_t *pv, uint8_t *data, int size )
+{
+    AVCodecContext *context = pv->context;
+    int pos = 0;
+
+    while ( pos < size )
+    {
+        int16_t *buffer = pv->buffer;
+        if ( buffer == NULL )
+        {
+            // XXX ffmpeg bug workaround
+            // malloc a buffer for the audio decode. On an x86, ffmpeg
+            // uses mmx/sse instructions on this buffer without checking
+            // that it's 16 byte aligned and this will cause an abort if
+            // the buffer is allocated on our stack. Rather than doing
+            // complicated, machine dependent alignment here we use the
+            // fact that malloc returns an aligned pointer on most architectures.
+            pv->buffer = malloc( AVCODEC_MAX_AUDIO_FRAME_SIZE );
+            buffer = pv->buffer;
+        }
+        int out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+        int len = avcodec_decode_audio2( context, buffer, &out_size,
+                                         data + pos, size - pos );
+        if ( len <= 0 )
+        {
+            return;
+        }
+        pos += len;
+        if( out_size > 0 )
+        {
+            hb_buffer_t *buf = hb_buffer_init( 2 * out_size );
+
+            // convert from bytes to total samples
+            out_size >>= 1;
+
+            double pts = pv->pts_next;
+            buf->start = pts;
+            pts += out_size * pv->duration;
+            buf->stop  = pts;
+            pv->pts_next = pts;
+
+            float *fl32 = (float *)buf->data;
+            int i;
+            for( i = 0; i < out_size; ++i )
+            {
+                fl32[i] = buffer[i];
+            }
+            hb_list_add( pv->list, buf );
+        }
+    }
+}
+
+static int decavcodecaiWork( hb_work_object_t *w, hb_buffer_t **buf_in,
+                    hb_buffer_t **buf_out )
+{
+    if ( (*buf_in)->size <= 0 )
+    {
+        /* EOF on input stream - send it downstream & say that we're done */
+        *buf_out = *buf_in;
+        *buf_in = NULL;
+        return HB_WORK_DONE;
+    }
+
+    hb_work_private_t *pv = w->private_data;
+    if ( ! pv->context )
+    {
+        init_ffmpeg_context( w );
+        // duration is a scaling factor to go from #bytes in the decoded
+        // frame to frame time (in 90KHz mpeg ticks). 'channels' converts
+        // total samples to per-channel samples. 'sample_rate' converts
+        // per-channel samples to seconds per sample and the 90000
+        // is mpeg ticks per second.
+        pv->duration = 90000. /
+                    (double)( pv->context->sample_rate * pv->context->channels );
+    }
+    hb_buffer_t *in = *buf_in;
+
+    // if the packet has a timestamp use it if we don't have a timestamp yet
+    // or if there's been a timing discontinuity of more than 100ms.
+    if ( in->start >= 0 &&
+         ( pv->pts_next < 0 || ( in->start - pv->pts_next ) > 90*100 ) )
+    {
+        pv->pts_next = in->start;
+    }
+    prepare_ffmpeg_buffer( in );
+    decodeAudio( pv, in->data, in->size );
+    *buf_out = link_buf_list( pv );
+
+    return HB_WORK_OK;
+}
+
+hb_work_object_t hb_decavcodecvi =
+{
+    WORK_DECAVCODECVI,
+    "Video decoder (ffmpeg streams)",
+    decavcodecviInit,
+    decavcodecviWork,
+    decavcodecClose,
+    decavcodecviInfo,
+    decavcodecvBSInfo
+};
+
+hb_work_object_t hb_decavcodecai =
+{
+    WORK_DECAVCODECAI,
+    "Audio decoder (ffmpeg streams)",
+    decavcodecviInit,
+    decavcodecaiWork,
+    decavcodecClose,
+    decavcodecInfo,
+    decavcodecBSInfo
+};
diff --git a/libhb/decdca.c b/libhb/decdca.c
new file mode 100644 (file)
index 0000000..b58a9ef
--- /dev/null
@@ -0,0 +1,323 @@
+/* $Id: decdca.c,v 1.14 2005/03/03 17:21:57 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+#include "dca.h"
+
+struct hb_work_private_s
+{
+    hb_job_t    * job;
+
+    /* libdca handle */
+    dca_state_t * state;
+
+    double        next_pts;
+    int           flags_in;
+    int           flags_out;
+    int           rate;
+    int           bitrate;
+    int           frame_length;
+    float         level;
+
+    int           error;
+    int           sync;
+    int           size;
+
+    /* max frame size of the 16 bits version is 16384 */
+    /* max frame size of the 14 bits version is 18726 */
+    uint8_t       frame[18726];
+
+    hb_list_t   * list;
+
+       int           out_discrete_channels;
+
+};
+
+static int  decdcaInit( hb_work_object_t *, hb_job_t * );
+static int  decdcaWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+static void decdcaClose( hb_work_object_t * );
+static int  decdcaBSInfo( hb_work_object_t *, const hb_buffer_t *,
+                          hb_work_info_t * );
+
+hb_work_object_t hb_decdca =
+{
+    WORK_DECDCA,
+    "DCA decoder",
+    decdcaInit,
+    decdcaWork,
+    decdcaClose,
+    0,
+    decdcaBSInfo
+};
+
+/***********************************************************************
+ * Local prototypes
+ **********************************************************************/
+static hb_buffer_t * Decode( hb_work_object_t * w );
+
+/***********************************************************************
+ * hb_work_decdca_init
+ ***********************************************************************
+ * Allocate the work object, initialize libdca
+ **********************************************************************/
+static int decdcaInit( hb_work_object_t * w, hb_job_t * job )
+{
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    hb_audio_t * audio = w->audio;
+    w->private_data = pv;
+
+    pv->job   = job;
+
+    pv->list      = hb_list_init();
+    pv->state     = dca_init( 0 );
+
+       /* Decide what format we want out of libdca
+       work.c has already done some of this deduction for us in do_job() */
+
+       pv->flags_out = HB_AMIXDOWN_GET_DCA_FORMAT(audio->config.out.mixdown);
+
+       /* pass the number of channels used into the private work data */
+       /* will only be actually used if we're not doing AC3 passthru */
+    pv->out_discrete_channels = HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->config.out.mixdown);
+
+    pv->level     = 32768.0;
+
+    return 0;
+}
+
+/***********************************************************************
+ * Close
+ ***********************************************************************
+ * Free memory
+ **********************************************************************/
+static void decdcaClose( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    dca_free( pv->state );
+    hb_list_empty( &pv->list );
+    free( pv );
+    w->private_data = NULL;
+}
+
+/***********************************************************************
+ * Work
+ ***********************************************************************
+ * Add the given buffer to the data we already have, and decode as much
+ * as we can
+ **********************************************************************/
+static int decdcaWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * buf;
+
+    if ( (*buf_in)->size <= 0 )
+    {
+        /* EOF on input stream - send it downstream & say that we're done */
+        *buf_out = *buf_in;
+        *buf_in = NULL;
+        return HB_WORK_DONE;
+    }
+
+    hb_list_add( pv->list, *buf_in );
+    *buf_in = NULL;
+
+    /* If we got more than a frame, chain raw buffers */
+    *buf_out = buf = Decode( w );
+    while( buf )
+    {
+        buf->next = Decode( w );
+        buf       = buf->next;
+    }
+
+    return HB_WORK_OK;
+}
+
+/***********************************************************************
+ * Decode
+ ***********************************************************************
+ *
+ **********************************************************************/
+static hb_buffer_t * Decode( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * buf;
+    int           i, j, k;
+    int64_t       pts, pos;
+    int           num_blocks;
+
+    /* Get a frame header if don't have one yet */
+    if( !pv->sync )
+    {
+        while( hb_list_bytes( pv->list ) >= 14 )
+        {
+            /* We have 14 bytes, check if this is a correct header */
+            hb_list_seebytes( pv->list, pv->frame, 14 );
+            pv->size = dca_syncinfo( pv->state, pv->frame, &pv->flags_in, &pv->rate,
+                                    &pv->bitrate, &pv->frame_length );
+            if( pv->size )
+            {
+                /* It is. W00t. */
+                if( pv->error )
+                {
+                    hb_log( "dca_syncinfo ok" );
+                }
+                pv->error = 0;
+                pv->sync  = 1;
+                break;
+            }
+
+            /* It is not */
+            if( !pv->error )
+            {
+                hb_log( "dca_syncinfo failed" );
+                pv->error = 1;
+            }
+
+            /* Try one byte later */
+            hb_list_getbytes( pv->list, pv->frame, 1, NULL, NULL );
+        }
+    }
+
+    if( !pv->sync || hb_list_bytes( pv->list ) < pv->size )
+    {
+        /* Need more data */
+        return NULL;
+    }
+
+    /* Get the whole frame */
+    hb_list_getbytes( pv->list, pv->frame, pv->size, &pts, &pos );
+
+    /* Feed libdca */
+    dca_frame( pv->state, pv->frame, &pv->flags_out, &pv->level, 0 );
+
+    /* find out how many blocks are in this frame */
+    num_blocks = dca_blocks_num( pv->state );
+
+    /* num_blocks blocks per frame, 256 samples per block, channelsused channels */
+    int nsamp = num_blocks * 256;
+    buf = hb_buffer_init( nsamp * pv->out_discrete_channels * sizeof( float ) );
+
+    // mkv files typically use a 1ms timebase which results in a lot of
+    // truncation error in their timestamps. Also, TSMuxer or something
+    // in the m2ts-to-mkv toolchain seems to take a very casual attitude
+    // about time - timestamps seem to randomly offset by ~40ms for a few
+    // seconds then recover. So, if the pts we got is within 50ms of the
+    // pts computed from the data stream, use the data stream pts.
+    if ( pts < 0 || fabs( (double)pts - pv->next_pts ) < 50.*90. )
+    {
+        pts = pv->next_pts;
+    }
+    buf->start = pts;
+    pv->next_pts += (double)nsamp / (double)pv->rate * 90000.;
+    buf->stop  = pv->next_pts;
+
+    for( i = 0; i < num_blocks; i++ )
+    {
+        dca_sample_t * samples_in;
+        float    * samples_out;
+
+        dca_block( pv->state );
+        samples_in  = dca_samples( pv->state );
+        samples_out = ((float *) buf->data) + 256 * pv->out_discrete_channels * i;
+
+        /* Interleave */
+        for( j = 0; j < 256; j++ )
+        {
+                       for ( k = 0; k < pv->out_discrete_channels; k++ )
+                       {
+                               samples_out[(pv->out_discrete_channels*j)+k]   = samples_in[(256*k)+j] * 16384;
+                       }
+        }
+
+    }
+
+    pv->sync = 0;
+    return buf;
+}
+
+
+static int decdcaBSInfo( hb_work_object_t *w, const hb_buffer_t *b,
+                         hb_work_info_t *info )
+{
+    int i, flags, rate, bitrate, frame_length;
+    dca_state_t * state = dca_init( 0 );
+
+    memset( info, 0, sizeof(*info) );
+
+    /* since DCA frames don't line up with MPEG ES frames scan the
+     * entire frame for an DCA sync pattern.  */
+    for ( i = 0; i < b->size - 7; ++i )
+    {
+        if( dca_syncinfo( state, &b->data[i], &flags, &rate, &bitrate,
+                          &frame_length ) )
+        {
+            break;
+        }
+    }
+    if ( i >= b->size - 7 )
+    {
+        /* didn't find DCA sync */
+        return 0;
+    }
+
+    info->name = "DCA";
+    info->rate = rate;
+    info->rate_base = 1;
+    info->bitrate = bitrate;
+    info->flags = flags;
+
+    if ( ( flags & DCA_CHANNEL_MASK) == DCA_DOLBY )
+    {
+        info->flags |= AUDIO_F_DOLBY;
+    }
+
+    switch( flags & DCA_CHANNEL_MASK )
+    {
+        /* mono sources */
+        case DCA_MONO:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_MONO;
+            break;
+        /* stereo input */
+        case DCA_CHANNEL:
+        case DCA_STEREO:
+        case DCA_STEREO_SUMDIFF:
+        case DCA_STEREO_TOTAL:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_STEREO;
+            break;
+        /* 3F/2R input */
+        case DCA_3F2R:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_3F2R;
+            break;
+        /* 3F/1R input */
+        case DCA_3F1R:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_3F1R;
+            break;
+        /* other inputs */
+        case DCA_3F:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_3F;
+            break;
+        case DCA_2F1R:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_2F1R;
+            break;
+        case DCA_2F2R:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_2F2R;
+            break;
+        case DCA_4F2R:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_4F2R;
+            break;
+        /* unknown */
+        default:
+            info->channel_layout = HB_INPUT_CH_LAYOUT_STEREO;
+    }
+
+    if (flags & DCA_LFE)
+    {
+        info->channel_layout |= HB_INPUT_CH_LAYOUT_HAS_LFE;
+    }
+
+    return 1;
+}
diff --git a/libhb/declpcm.c b/libhb/declpcm.c
new file mode 100644 (file)
index 0000000..50a5a12
--- /dev/null
@@ -0,0 +1,267 @@
+/* $Id: declpcm.c,v 1.8 2005/11/04 14:44:01 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+struct hb_work_private_s
+{
+    hb_job_t    *job;
+    uint32_t    size;       /* frame size in bytes */
+    uint32_t    count;      /* frame size in samples */
+    uint32_t    pos;        /* buffer offset for next input data */
+
+    int64_t     next_pts;   /* pts for next output frame */
+    int64_t     sequence;
+
+    /* the following is frame info for the frame we're currently accumulating */
+    uint64_t    duration;   /* frame duratin (in 90KHz ticks) */
+    uint32_t    offset;     /* where in buf frame starts */
+    uint32_t    samplerate; /* sample rate in bits/sec */
+    uint8_t     nchannels;
+    uint8_t     sample_size; /* bits per sample */
+
+    uint8_t     frame[HB_DVD_READ_BUFFER_SIZE*2];
+};
+
+static hb_buffer_t * Decode( hb_work_object_t * w );
+static int  declpcmInit( hb_work_object_t *, hb_job_t * );
+static int  declpcmWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+static void declpcmClose( hb_work_object_t * );
+static int  declpcmBSInfo( hb_work_object_t *, const hb_buffer_t *,
+                           hb_work_info_t * );
+
+hb_work_object_t hb_declpcm =
+{
+    WORK_DECLPCM,
+    "LPCM decoder",
+    declpcmInit,
+    declpcmWork,
+    declpcmClose,
+    0,
+    declpcmBSInfo
+};
+
+static const int hdr2samplerate[] = { 48000, 96000, 44100, 32000 };
+static const int hdr2samplesize[] = { 16, 20, 24, 16 };
+static const int hdr2layout[] = {
+        HB_INPUT_CH_LAYOUT_MONO,   HB_INPUT_CH_LAYOUT_STEREO,
+        HB_INPUT_CH_LAYOUT_2F1R,   HB_INPUT_CH_LAYOUT_2F2R,
+        HB_INPUT_CH_LAYOUT_3F2R,   HB_INPUT_CH_LAYOUT_4F2R,
+        HB_INPUT_CH_LAYOUT_STEREO, HB_INPUT_CH_LAYOUT_STEREO,
+};
+
+static void lpcmInfo( hb_work_object_t *w, hb_buffer_t *in )
+{
+    hb_work_private_t * pv = w->private_data;
+
+    /*
+     * LPCM packets have a 7 byte header (the substream id is stripped off
+     * before we get here so it's numbered -1 below)::
+     * byte -1  Substream id
+     * byte 0   Number of frames that begin in this packet
+     *          (last frame may finish in next packet)
+     * byte 1,2 offset to first frame that begins in this packet (not including hdr)
+     * byte 3:
+     *   bits 0-4  continuity counter (increments modulo 20)
+     *   bit   5   reserved
+     *   bit   6   audio mute on/off
+     *   bit   7   audio emphasis on/off
+     * byte 4:
+     *   bits 0-2  #channels - 1 (e.g., stereo = 1)
+     *   bit   3   reserved
+     *   bits 4-5  sample rate (0=48K,1=96K,2=44.1K,3=32K)
+     *   bits 6-7  bits per sample (0=16 bit, 1=20 bit, 2=24 bit)
+     * byte 5   Dynamic range control (0x80 = off)
+     *
+     * The audio is viewed as "frames" of 150 90KHz ticks each (80 samples @ 48KHz).
+     * The frames are laid down continuously without regard to MPEG packet
+     * boundaries. E.g., for 48KHz stereo, the first packet will contain 6
+     * frames plus the start of the 7th, the second packet will contain the
+     * end of the 7th, 8-13 & the start of 14, etc. The frame structure is
+     * important because the PTS on the packet gives the time of the first
+     * frame that starts in the packet *NOT* the time of the first sample 
+     * in the packet. Also samples get split across packet boundaries
+     * so we can't assume that we can consume all the data in one packet
+     * on every call to the work routine.
+     */
+    pv->offset = ( ( in->data[1] << 8 ) | in->data[2] ) + 2;
+    if ( pv->offset >= HB_DVD_READ_BUFFER_SIZE )
+    {
+        hb_log( "declpcm: illegal frame offset %d", pv->offset );
+        pv->offset = 2; /*XXX*/
+    }
+    pv->samplerate = hdr2samplerate[ ( in->data[4] >> 4 ) & 0x3 ];
+    pv->nchannels  = ( in->data[4] & 7 ) + 1;
+    pv->sample_size = hdr2samplesize[in->data[4] >> 6];
+
+    /*
+     * PCM frames have a constant duration (150 90KHz ticks).
+     * We need to convert that to the amount of data expected.  It's the
+     * duration divided by the sample rate (to get #samples) times the number
+     * of channels times the bits per sample divided by 8 to get bytes.
+     * (we have to compute in bits because 20 bit samples are not an integral
+     * number of bytes). We do all the multiplies first then the divides to
+     * avoid truncation errors. 
+     */
+    pv->duration = in->data[0] * 150;
+    pv->count = ( pv->duration * pv->nchannels * pv->samplerate ) / 90000;
+    pv->size = ( pv->count * pv->sample_size ) / 8;
+
+    pv->next_pts = in->start;
+}
+
+static int declpcmInit( hb_work_object_t * w, hb_job_t * job )
+{
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+    pv->job   = job;
+    return 0;
+}
+
+/* 
+ * Convert DVD encapsulated LPCM to floating point PCM audio buffers.
+ * The amount of audio in a PCM frame is always <= the amount that will fit
+ * in a DVD block (2048 bytes) but the standard doesn't require that the audio
+ * frames line up with the DVD frames. Since audio frame boundaries are unrelated
+ * to DVD PES boundaries, this routine has to reconstruct then extract the audio
+ * frames. Because of the arbitrary alignment, it can output zero, one or two buf's.
+ */
+static int declpcmWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                 hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t *in = *buf_in;
+    hb_buffer_t *buf = NULL;
+
+    if ( in->size <= 0 )
+    {
+        /* EOF on input stream - send it downstream & say that we're done */
+        *buf_out = in;
+        *buf_in = NULL;
+        return HB_WORK_DONE;
+    }
+
+    pv->sequence = in->sequence;
+
+    /* if we have a frame to finish, add enough data from this buf to finish it */
+    if ( pv->size )
+    {
+        memcpy( pv->frame + pv->pos, in->data + 6, pv->size - pv->pos );
+        buf = Decode( w );
+    }
+    *buf_out = buf;
+
+    /* save the (rest of) data from this buf in our frame buffer */
+    lpcmInfo( w, in );
+    int off = pv->offset;
+    int amt = in->size - off;
+    pv->pos = amt;
+    memcpy( pv->frame, in->data + off, amt );
+    if ( amt >= pv->size )
+    {
+        if ( buf )
+        {
+            buf->next = Decode( w );
+        }
+        else
+        {
+            *buf_out = Decode( w );
+        }
+        pv->size = 0;
+    }
+    return HB_WORK_OK;
+}
+
+static hb_buffer_t *Decode( hb_work_object_t *w )
+{
+    hb_work_private_t *pv = w->private_data;
+    hb_buffer_t *out = hb_buffer_init( pv->count * sizeof( float ) );
+    out->start  = pv->next_pts;
+    pv->next_pts += pv->duration;
+    out->stop = pv->next_pts;
+
+    uint8_t *frm = pv->frame;
+    float *odat = (float *)out->data;
+    int count = pv->count;
+
+    switch( pv->sample_size )
+    {
+        case 16: // 2 byte, big endian, signed (the right shift sign extends)
+            while ( --count >= 0 )
+            {
+                *odat++ = ( (int)( frm[0] << 24 ) >> 16 ) | frm[1];
+                frm += 2;
+            }
+            break;
+        case 20:
+            // 20 bit big endian signed (5 bytes for 2 samples = 2.5 bytes/sample
+            // so we do two samples per iteration).
+            count /= 2;
+            while ( --count >= 0 )
+            {
+                *odat++ = (float)( ( (int)( frm[0] << 24 ) >> 12 ) |
+                                   ( frm[1] << 4 ) | ( frm[2] >> 4 ) ) / 16.;
+                *odat++ = (float)( ( (int)( frm[2] << 28 ) >> 16 ) |
+                                   ( frm[3] << 8 ) | frm[4] ) / 16.;
+                frm += 5;
+            }
+            break;
+        case 24:
+            // This format is bizarre. It's 24 bit samples but some confused
+            // individual apparently thought they would be easier to interpret
+            // as 16 bits if they were scrambled in the following way:
+            // Things are stored in 4 sample (12 byte) chunks. Each chunk has
+            // 4 samples containing the two top bytes of the actual samples in
+            // 16 bit big-endian order followed by the four least significant bytes
+            // of each sample.
+            count /= 4; // the loop has to work in 4 sample chunks
+            while ( --count >= 0 )
+            {
+                *odat++ = (float)( ( (int)( frm[0] << 24 ) >> 8 ) |
+                            ( frm[1] << 8 ) | frm[8] ) / 256.;
+                *odat++ = (float)( ( (int)( frm[2] << 24 ) >> 8 ) |
+                            ( frm[3] << 8 ) | frm[9] ) / 256.;
+                *odat++ = (float)( ( (int)( frm[4] << 24 ) >> 8 ) |
+                            ( frm[5] << 8 ) | frm[10] ) / 256.;
+                *odat++ = (float)( ( (int)( frm[6] << 24 ) >> 8 ) |
+                            ( frm[7] << 8 ) | frm[11] ) / 256.;
+                frm += 12;
+            }
+            break;
+    }
+    return out;
+}
+
+static void declpcmClose( hb_work_object_t * w )
+{
+    if ( w->private_data )
+    {
+        free( w->private_data );
+        w->private_data = 0;
+    }
+}
+
+static int declpcmBSInfo( hb_work_object_t *w, const hb_buffer_t *b,
+                          hb_work_info_t *info )
+{
+    int nchannels  = ( b->data[4] & 7 ) + 1;
+    int sample_size = hdr2samplesize[b->data[4] >> 6];
+
+    int rate = hdr2samplerate[ ( b->data[4] >> 4 ) & 0x3 ];
+    int bitrate = rate * sample_size * nchannels;
+
+    memset( info, 0, sizeof(*info) );
+
+    info->name = "LPCM";
+    info->rate = rate;
+    info->rate_base = 1;
+    info->bitrate = bitrate;
+    info->flags = ( b->data[3] << 16 ) | ( b->data[4] << 8 ) | b->data[5];
+    info->channel_layout = hdr2layout[nchannels - 1];
+
+    return 1;
+}
diff --git a/libhb/decmpeg2.c b/libhb/decmpeg2.c
new file mode 100644 (file)
index 0000000..eae0091
--- /dev/null
@@ -0,0 +1,509 @@
+/* $Id: decmpeg2.c,v 1.12 2005/03/03 16:30:42 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+#include "mpeg2dec/mpeg2.h"
+#include "libavcodec/avcodec.h"
+#include "libswscale/swscale.h"
+
+/* Cadence tracking */
+#ifndef PIC_FLAG_REPEAT_FIRST_FIELD
+#define PIC_FLAG_REPEAT_FIRST_FIELD 256
+#endif
+#define TOP_FIRST PIC_FLAG_TOP_FIELD_FIRST
+#define PROGRESSIVE PIC_FLAG_PROGRESSIVE_FRAME
+#define COMPOSITE PIC_FLAG_COMPOSITE_DISPLAY
+#define SKIP PIC_FLAG_SKIP
+#define TAGS PIC_FLAG_TAGS
+#define REPEAT_FIRST PIC_FLAG_REPEAT_FIRST_FIELD
+#define COMPOSITE_MASK PIC_MASK_COMPOSITE_DISPLAY
+#define TB 8
+#define BT 16
+#define BT_PROG 32
+#define BTB_PROG 64
+#define TB_PROG 128
+#define TBT_PROG 256
+static int cadence[12];
+static int flag = 0;
+
+/**********************************************************************
+ * hb_libmpeg2_t
+ *********************************************************************/
+typedef struct hb_libmpeg2_s
+{
+    mpeg2dec_t         * libmpeg2;
+    const mpeg2_info_t * info;
+    hb_job_t           * job;
+    int                  width;
+    int                  height;
+    int                  rate;
+    double               aspect_ratio;
+    int                  got_iframe;        /* set when we get our first iframe */
+    int                  look_for_iframe;   /* need an iframe to add chap break */
+    int                  look_for_break;    /* need gop start to add chap break */
+    uint32_t             nframes;           /* number of frames we've decoded */
+    int64_t              last_pts;
+} hb_libmpeg2_t;
+
+/**********************************************************************
+ * hb_libmpeg2_init
+ **********************************************************************
+ *
+ *********************************************************************/
+static hb_libmpeg2_t * hb_libmpeg2_init()
+{
+    hb_libmpeg2_t * m = calloc( sizeof( hb_libmpeg2_t ), 1 );
+
+    m->libmpeg2 = mpeg2_init();
+    m->info     = mpeg2_info( m->libmpeg2 );
+    m->last_pts = -1;
+
+    return m;
+}
+
+static hb_buffer_t *hb_copy_frame( hb_job_t *job, int width, int height,
+                                   uint8_t* y, uint8_t *u, uint8_t *v )
+{
+    int dst_w = width, dst_h = height;
+    if ( job )
+    {
+        dst_w = job->title->width;
+        dst_h = job->title->height;
+    }
+    int dst_wh = dst_w * dst_h;
+    hb_buffer_t *buf  = hb_video_buffer_init( dst_w, dst_h );
+
+    if ( dst_w != width || dst_h != height )
+    {
+        // we're encoding and the frame dimensions don't match the title dimensions -
+        // rescale & matte Y, U, V into our output buf.
+        AVPicture in, out;
+        avpicture_alloc(&in,  PIX_FMT_YUV420P, width, height );
+        avpicture_alloc(&out, PIX_FMT_YUV420P, dst_w, dst_h );
+
+        int src_wh = width * height;
+        memcpy( in.data[0], y, src_wh );
+        memcpy( in.data[1], u, src_wh >> 2 );
+        memcpy( in.data[2], v, src_wh >> 2 );
+        struct SwsContext *context = sws_getContext( width, height, PIX_FMT_YUV420P,
+                                                     dst_w, dst_h, PIX_FMT_YUV420P,
+                                                     SWS_LANCZOS|SWS_ACCURATE_RND,
+                                                     NULL, NULL, NULL );
+        sws_scale( context, in.data, in.linesize, 0, height, out.data, out.linesize );
+        sws_freeContext( context );
+
+        u_int8_t *data = buf->data;
+        memcpy( data, out.data[0], dst_wh );
+        data += dst_wh;
+        // U & V planes are 1/4 the size of Y plane.
+        dst_wh >>= 2;
+        memcpy( data, out.data[1], dst_wh );
+        data += dst_wh;
+        memcpy( data, out.data[2], dst_wh );
+
+        avpicture_free( &out );
+        avpicture_free( &in );
+    }
+    else
+    {
+        // we're scanning or the frame dimensions match the title's dimensions
+        // so we can do a straight copy.
+        u_int8_t *data = buf->data;
+        memcpy( data, y, dst_wh );
+        data += dst_wh;
+        // U & V planes are 1/4 the size of Y plane.
+        dst_wh >>= 2;
+        memcpy( data, u, dst_wh );
+        data += dst_wh;
+        memcpy( data, v, dst_wh );
+    }
+    return buf;
+}
+
+/**********************************************************************
+ * hb_libmpeg2_decode
+ **********************************************************************
+ *
+ *********************************************************************/
+static int hb_libmpeg2_decode( hb_libmpeg2_t * m, hb_buffer_t * buf_es,
+                        hb_list_t * list_raw )
+{
+    mpeg2_state_t   state;
+    hb_buffer_t   * buf;
+
+    if ( buf_es->size )
+    {
+        /* Feed libmpeg2 */
+        if( buf_es->start > -1 )
+        {
+            mpeg2_tag_picture( m->libmpeg2, buf_es->start >> 32,
+                               buf_es->start & 0xFFFFFFFF );
+        }
+        mpeg2_buffer( m->libmpeg2, buf_es->data,
+                      buf_es->data + buf_es->size );
+    }
+
+    for( ;; )
+    {
+        state = mpeg2_parse( m->libmpeg2 );
+        if( state == STATE_BUFFER )
+        {
+            /* Require some more data */
+            break;
+        }
+        else if( state == STATE_SEQUENCE )
+        {
+            if( !( m->width && m->height && m->rate ) )
+            {
+                m->width  = m->info->sequence->width;
+                m->height = m->info->sequence->height;
+                m->rate   = m->info->sequence->frame_period;
+                if ( m->aspect_ratio <= 0 && m->height &&
+                     m->info->sequence->pixel_height )
+                {
+                    /* mpeg2_parse doesn't store the aspect ratio. Instead
+                     * it keeps the pixel width & height that would cause
+                     * the storage width & height to come out in the correct
+                     * aspect ratio. Convert these back to aspect ratio.
+                     */
+                    double ar_numer = m->width * m->info->sequence->pixel_width;
+                    double ar_denom = m->height * m->info->sequence->pixel_height;
+                    m->aspect_ratio = ar_numer / ar_denom;
+                }
+            }
+        }
+        else if( state == STATE_GOP && m->look_for_break)
+        {
+            // we were looking for a gop to add a chapter break - we found it
+            // so now start looking for an iframe.
+            m->look_for_iframe = m->look_for_break;
+            m->look_for_break = 0;
+        }
+        else if( ( state == STATE_SLICE || state == STATE_END ) &&
+                 m->info->display_fbuf )
+        {
+            if( ( m->info->display_picture->flags &
+                  PIC_MASK_CODING_TYPE ) == PIC_FLAG_CODING_TYPE_I )
+            {
+                // we got an iframe so we can start decoding video now
+                m->got_iframe = 1;
+            }
+
+            if( m->got_iframe )
+            {
+                buf  = hb_copy_frame( m->job, m->info->sequence->width,
+                                      m->info->sequence->height,
+                                      m->info->display_fbuf->buf[0],
+                                      m->info->display_fbuf->buf[1],
+                                      m->info->display_fbuf->buf[2] );
+                buf->sequence = buf_es->sequence;
+
+                if( m->info->display_picture->flags & PIC_FLAG_TAGS )
+                {
+                    buf->start =
+                        ( (uint64_t) m->info->display_picture->tag << 32 ) |
+                        ( (uint64_t) m->info->display_picture->tag2 );
+                }
+                else if( m->last_pts > -1 )
+                {
+                    /* For some reason nb_fields is sometimes 1 while it
+                       should be 2 */
+                    buf->start = m->last_pts +
+                        MAX( 2, m->info->display_picture->nb_fields ) *
+                        m->info->sequence->frame_period / 600;
+                }
+                else
+                {
+                    buf->start = -1;
+                }
+                m->last_pts = buf->start;
+
+                if( m->look_for_iframe && ( m->info->display_picture->flags &
+                      PIC_MASK_CODING_TYPE ) == PIC_FLAG_CODING_TYPE_I )
+                {
+                    // we were waiting for an iframe to insert a chapter mark
+                    // and we have one.
+                    buf->new_chap = m->look_for_iframe;
+                    m->look_for_iframe = 0;
+                    const char *chap_name = "";
+                    if ( m->job && buf->new_chap > 0 &&
+                         hb_list_item( m->job->title->list_chapter,
+                                       buf->new_chap - 1 ) )
+                    {
+                        hb_chapter_t * c = hb_list_item( m->job->title->list_chapter,
+                                                         buf->new_chap - 1 );
+                        chap_name = c->title;
+                    }
+                    hb_log( "mpeg2: \"%s\" (%d) at frame %u time %lld",
+                            chap_name, buf->new_chap, m->nframes, buf->start );
+                } else if ( m->nframes == 0 && m->job &&
+                            hb_list_item( m->job->title->list_chapter,
+                                          m->job->chapter_start - 1 ) )
+                {
+                    hb_chapter_t * c = hb_list_item( m->job->title->list_chapter,
+                                                     m->job->chapter_start - 1 );
+                    hb_log( "mpeg2: \"%s\" (%d) at frame %u time %lld", c->title,
+                            m->job->chapter_start, m->nframes, buf->start );
+                }
+                ++m->nframes;
+
+                flag = m->info->display_picture->flags;
+
+/*  Uncomment this block to see frame-by-frame picture flags, as the video encodes.
+               hb_log("***** MPEG 2 Picture Info for PTS %lld *****", buf->start);
+                if( flag & TOP_FIRST )
+                    hb_log("MPEG2 Flag: Top field first");
+                if( flag & PROGRESSIVE )
+                    hb_log("MPEG2 Flag: Progressive");
+                if( flag & COMPOSITE )
+                    hb_log("MPEG2 Flag: Composite");
+                if( flag & SKIP )
+                    hb_log("MPEG2 Flag: Skip!");
+                if( flag & TAGS )
+                    hb_log("MPEG2 Flag: TAGS");
+                if(flag & REPEAT_FIRST )
+                    hb_log("MPEG2 Flag: Repeat first field");
+                if( flag & COMPOSITE_MASK )
+                    hb_log("MPEG2 Flag: Composite mask");
+                hb_log("fields: %d", m->info->display_picture->nb_fields);
+*/
+                /*  Rotate the cadence tracking. */
+                int i = 0;
+                for(i=11; i > 0; i--)
+                {
+                    cadence[i] = cadence[i-1];
+                }
+
+                if ( !(flag & PROGRESSIVE) && !(flag & TOP_FIRST) )
+                {
+                    /* Not progressive, not top first...
+                       That means it's probably bottom
+                       first, 2 fields displayed.
+                    */
+                    //hb_log("MPEG2 Flag: Bottom field first, 2 fields displayed.");
+                    cadence[0] = BT;
+                }
+                else if ( !(flag & PROGRESSIVE) && (flag & TOP_FIRST) )
+                {
+                    /* Not progressive, top is first,
+                       Two fields displayed.
+                    */
+                    //hb_log("MPEG2 Flag: Top field first, 2 fields displayed.");
+                    cadence[0] = TB;
+                }
+                else if ( (flag & PROGRESSIVE) && !(flag & TOP_FIRST) && !( flag & REPEAT_FIRST )  )
+                {
+                    /* Progressive, but noting else.
+                       That means Bottom first,
+                       2 fields displayed.
+                    */
+                    //hb_log("MPEG2 Flag: Progressive. Bottom field first, 2 fields displayed.");
+                    cadence[0] = BT_PROG;
+                }
+                else if ( (flag & PROGRESSIVE) && !(flag & TOP_FIRST) && ( flag & REPEAT_FIRST )  )
+                {
+                    /* Progressive, and repeat. .
+                       That means Bottom first,
+                       3 fields displayed.
+                    */
+                    //hb_log("MPEG2 Flag: Progressive repeat. Bottom field first, 3 fields displayed.");
+                    cadence[0] = BTB_PROG;
+                }
+                else if ( (flag & PROGRESSIVE) && (flag & TOP_FIRST) && !( flag & REPEAT_FIRST )  )
+                {
+                    /* Progressive, top first.
+                       That means top first,
+                       2 fields displayed.
+                    */
+                    //hb_log("MPEG2 Flag: Progressive. Top field first, 2 fields displayed.");
+                    cadence[0] = TB_PROG;
+                }
+                else if ( (flag & PROGRESSIVE) && (flag & TOP_FIRST) && ( flag & REPEAT_FIRST )  )
+                {
+                    /* Progressive, top, repeat.
+                       That means top first,
+                       3 fields displayed.
+                    */
+                    //hb_log("MPEG2 Flag: Progressive repeat. Top field first, 3 fields displayed.");
+                    cadence[0] = TBT_PROG;
+                }
+
+                if ( (cadence[2] <= TB) && (cadence[1] <= TB) && (cadence[0] > TB) && (cadence[11]) )
+                    hb_log("%fs: Video -> Film", (float)buf->start / 90000);
+                if ( (cadence[2] > TB) && (cadence[1] <= TB) && (cadence[0] <= TB) && (cadence[11]) )
+                    hb_log("%fs: Film -> Video", (float)buf->start / 90000);
+
+                /* Store picture flags for later use by filters */
+                buf->flags = m->info->display_picture->flags;
+
+                hb_list_add( list_raw, buf );
+            }
+        }
+        else if( state == STATE_INVALID )
+        {
+            mpeg2_reset( m->libmpeg2, 0 );
+        }
+    }
+    return 1;
+}
+
+/**********************************************************************
+ * hb_libmpeg2_close
+ **********************************************************************
+ *
+ *********************************************************************/
+static void hb_libmpeg2_close( hb_libmpeg2_t ** _m )
+{
+    hb_libmpeg2_t * m = *_m;
+
+    mpeg2_close( m->libmpeg2 );
+
+    free( m );
+    *_m = NULL;
+}
+
+/**********************************************************************
+ * The decmpeg2 work object
+ **********************************************************************
+ *
+ *********************************************************************/
+struct hb_work_private_s
+{
+    hb_libmpeg2_t * libmpeg2;
+    hb_list_t     * list;
+};
+
+/**********************************************************************
+ * hb_work_decmpeg2_init
+ **********************************************************************
+ *
+ *********************************************************************/
+static int decmpeg2Init( hb_work_object_t * w, hb_job_t * job )
+{
+    hb_work_private_t * pv;
+
+    pv              = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+
+    pv->libmpeg2 = hb_libmpeg2_init();
+    pv->list     = hb_list_init();
+
+    pv->libmpeg2->job = job;
+
+    return 0;
+}
+
+/**********************************************************************
+ * Work
+ **********************************************************************
+ *
+ *********************************************************************/
+static int decmpeg2Work( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                   hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * buf, * last = NULL;
+    int status = HB_WORK_OK;
+
+    // The reader found a chapter break, consume it completely, and remove it from the
+    // stream. We need to shift it.
+    if( (*buf_in)->new_chap )
+    {
+        pv->libmpeg2->look_for_break = (*buf_in)->new_chap;
+        (*buf_in)->new_chap = 0;
+    }
+
+    hb_libmpeg2_decode( pv->libmpeg2, *buf_in, pv->list );
+
+    /* if we got an empty buffer signaling end-of-stream send it downstream */
+    if ( (*buf_in)->size == 0 )
+    {
+        hb_list_add( pv->list, *buf_in );
+        *buf_in = NULL;
+        status = HB_WORK_DONE;
+    }
+
+    *buf_out = NULL;
+    while( ( buf = hb_list_item( pv->list, 0 ) ) )
+    {
+        hb_list_rem( pv->list, buf );
+        if( last )
+        {
+            last->next = buf;
+            last       = buf;
+        }
+        else
+        {
+            *buf_out = buf;
+            last     = buf;
+        }
+    }
+
+    return status;
+}
+
+/**********************************************************************
+ * Close
+ **********************************************************************
+ *
+ *********************************************************************/
+static void decmpeg2Close( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+
+    // don't log during scan
+    if ( pv->libmpeg2->job )
+    {
+        hb_log( "mpeg2 done: %d frames", pv->libmpeg2->nframes );
+    }
+    hb_list_close( &pv->list );
+    hb_libmpeg2_close( &pv->libmpeg2 );
+    free( pv );
+}
+
+static int decmpeg2Info( hb_work_object_t *w, hb_work_info_t *info )
+{
+    hb_work_private_t *pv = w->private_data;
+
+    memset( info, 0, sizeof(*info) );
+
+    if ( pv && pv->libmpeg2 && pv->libmpeg2->info && pv->libmpeg2->info->sequence )
+    {
+        hb_libmpeg2_t *m = pv->libmpeg2;
+
+        info->width = m->width;
+        info->height = m->height;
+        info->pixel_aspect_width = m->info->sequence->pixel_width;
+        info->pixel_aspect_height = m->info->sequence->pixel_height;
+        info->aspect = m->aspect_ratio;
+
+        // if the frame is progressive & NTSC DVD height report it as 23.976 FPS
+        // so that scan can autodetect NTSC film
+        info->rate = 27000000;
+        info->rate_base = ( m->info->display_fbuf && m->info->display_picture &&
+                            (m->info->display_picture->flags & PROGRESSIVE) &&
+                            (m->height == 480 ) ) ?  1126125 : m->rate;
+
+        info->bitrate = m->info->sequence->byte_rate * 8;
+        info->profile = m->info->sequence->profile_level_id >> 4;
+        info->level = m->info->sequence->profile_level_id & 0xf;
+        info->name = "mpeg2";
+        return 1;
+    }
+    return 0;
+}
+
+hb_work_object_t hb_decmpeg2 =
+{
+    WORK_DECMPEG2,
+    "MPEG-2 decoder (libmpeg2)",
+    decmpeg2Init,
+    decmpeg2Work,
+    decmpeg2Close,
+    decmpeg2Info
+};
+
diff --git a/libhb/decomb.c b/libhb/decomb.c
new file mode 100644 (file)
index 0000000..2194f56
--- /dev/null
@@ -0,0 +1,1510 @@
+/* $Id: decomb.c,v 1.14 2008/04/25 5:00:00 jbrjake Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. 
+   
+   The yadif algorithm was created by Michael Niedermayer. */
+#include "hb.h"
+#include "libavcodec/avcodec.h"
+#include "mpeg2dec/mpeg2.h"
+
+#define SUPPRESS_AV_LOG
+
+#define MODE_DEFAULT     1
+#define PARITY_DEFAULT   -1
+
+#define MCDEINT_MODE_DEFAULT   -1
+#define MCDEINT_QP_DEFAULT      1
+
+#define ABS(a) ((a) > 0 ? (a) : (-(a)))
+#define MIN3(a,b,c) MIN(MIN(a,b),c)
+#define MAX3(a,b,c) MAX(MAX(a,b),c)
+
+typedef struct yadif_arguments_s {
+    uint8_t **dst;
+    int parity;
+    int tff;
+    int stop;
+    int is_combed;
+} yadif_arguments_t;
+
+typedef struct decomb_arguments_s {
+    int stop;
+} decomb_arguments_t;
+
+struct hb_filter_private_s
+{
+    int              pix_fmt;
+    int              width[3];
+    int              height[3];
+
+    int              mode;
+    int              spatial_metric;
+    int              motion_threshold;
+    int              spatial_threshold;
+    int              block_threshold;
+    int              block_width;
+    int              block_height;
+
+    int              parity;
+    
+    int              yadif_ready;
+
+    int              mcdeint_mode;
+    int              mcdeint_qp;
+
+    int              mcdeint_outbuf_size;
+    uint8_t        * mcdeint_outbuf;
+    AVCodecContext * mcdeint_avctx_enc;
+    AVFrame        * mcdeint_frame;
+    AVFrame        * mcdeint_frame_dec;
+
+    int              yadif_deinterlaced_frames;
+    int              blend_deinterlaced_frames;
+    int              unfiltered_frames;
+
+    uint8_t        * ref[4][3];
+    int              ref_stride[3];
+
+    /* Make a buffer to store a comb mask. */
+    uint8_t        * mask[3];
+
+    AVPicture        pic_in;
+    AVPicture        pic_out;
+    hb_buffer_t *    buf_out[2];
+    hb_buffer_t *    buf_settings;
+    
+    int              cpu_count;
+
+    hb_thread_t    ** yadif_threads;         // Threads for Yadif - one per CPU
+    hb_lock_t      ** yadif_begin_lock;      // Thread has work
+    hb_lock_t      ** yadif_complete_lock;   // Thread has completed work
+    yadif_arguments_t *yadif_arguments;      // Arguments to thread for work
+    
+    hb_thread_t    ** decomb_threads;        // Threads for comb detection - one per CPU
+    hb_lock_t      ** decomb_begin_lock;     // Thread has work
+    hb_lock_t      ** decomb_complete_lock;  // Thread has completed work
+    decomb_arguments_t *decomb_arguments;    // Arguments to thread for work
+    
+};
+
+hb_filter_private_t * hb_decomb_init( int pix_fmt,
+                                           int width,
+                                           int height,
+                                           char * settings );
+
+int hb_decomb_work(      const hb_buffer_t * buf_in,
+                         hb_buffer_t ** buf_out,
+                         int pix_fmt,
+                         int width,
+                         int height,
+                         hb_filter_private_t * pv );
+
+void hb_decomb_close( hb_filter_private_t * pv );
+
+hb_filter_object_t hb_filter_decomb =
+{
+    FILTER_DECOMB,
+    "Deinterlaces selectively with yadif/mcdeint and lowpass5 blending",
+    NULL,
+    hb_decomb_init,
+    hb_decomb_work,
+    hb_decomb_close,
+};
+
+int cubic_interpolate( int y0, int y1, int y2, int y3 )
+{
+    /* From http://www.neuron2.net/library/cubicinterp.html */
+    int result = ( y0 * -3 ) + ( y1 * 23 ) + ( y2 * 23 ) + ( y3 * -3 );
+    result /= 40;
+    
+    if( result > 255 )
+    {
+        result = 255;
+    }
+    else if( result < 0 )
+    {
+        result = 0;
+    }
+    
+    return result;
+}
+
+static void store_ref( const uint8_t ** pic,
+                             hb_filter_private_t * pv )
+{
+    memcpy( pv->ref[3],
+            pv->ref[0],
+            sizeof(uint8_t *)*3 );
+
+    memmove( pv->ref[0],
+             pv->ref[1],
+             sizeof(uint8_t *)*3*3 );
+
+    int i;
+    for( i = 0; i < 3; i++ )
+    {
+        const uint8_t * src = pic[i];
+        uint8_t * ref = pv->ref[2][i];
+
+        int w = pv->width[i];
+        int h = pv->height[i];
+        int ref_stride = pv->ref_stride[i];
+
+        int y;
+        for( y = 0; y < pv->height[i]; y++ )
+        {
+            memcpy(ref, src, w);
+            src = (uint8_t*)src + w;
+            ref = (uint8_t*)ref + ref_stride;
+        }
+    }
+}
+
+static void get_ref( uint8_t ** pic, hb_filter_private_t * pv, int frm )
+{
+    int i;
+    for( i = 0; i < 3; i++ )
+    {
+        uint8_t * dst = pic[i];
+        const uint8_t * ref = pv->ref[frm][i];
+        int w = pv->width[i];
+        int ref_stride = pv->ref_stride[i];
+        
+        int y;
+        for( y = 0; y < pv->height[i]; y++ )
+        {
+            memcpy(dst, ref, w);
+            dst += w;
+            ref += ref_stride;
+        }
+    }
+}
+
+int blend_filter_pixel( int up2, int up1, int current, int down1, int down2 )
+{
+    /* Low-pass 5-tap filter */
+    int result = 0;
+    result += -up2;
+    result += up1 * 2;
+    result += current * 6;
+    result += down1 *2;
+    result += -down2;
+    result /= 8;
+
+    if( result > 255 )
+    {
+        result = 255;
+    }
+    if( result < 0 )
+    {
+        result = 0;
+    }
+    
+    return result;
+}
+
+static void blend_filter_line( uint8_t *dst,
+                               uint8_t *cur,
+                               int plane,
+                               int y,
+                               hb_filter_private_t * pv )
+{
+    int w = pv->width[plane];
+    int refs = pv->ref_stride[plane];
+    int x;
+
+    for( x = 0; x < w; x++)
+    {
+        int a, b, c, d, e;
+        
+        a = cur[-2*refs];
+        b = cur[-refs];
+        c = cur[0];
+        d = cur[+refs];
+        e = cur[2*refs];
+        
+        if( y == 0 )
+        {
+            /* First line, so A and B don't exist.*/
+            a = cur[0];
+            b = cur[0];
+        }
+        else if( y == 1 )
+        {
+            /* Second line, no A. */
+            a = cur[-refs];
+        }
+        else if( y == (pv->height[plane] - 2) )
+        {
+            /* Second to last line, no E. */
+            e = cur[+refs];
+        }
+        else if( y == (pv->height[plane] -1) )
+        {
+            /* Last line, no D or E. */
+            d = cur[0];
+            e = cur[0];
+        }
+                
+        dst[0] = blend_filter_pixel( a, b, c, d, e );
+
+        dst++;
+        cur++;
+    }
+}
+
+int check_combing_mask( hb_filter_private_t * pv )
+{
+    /* Go through the mask in X*Y blocks. If any of these windows
+       have threshold or more combed pixels, consider the whole
+       frame to be combed and send it on to be deinterlaced.     */
+
+    /* Block mask threshold -- The number of pixels
+       in a block_width * block_height window of
+       he mask that need to show combing for the
+       whole frame to be seen as such.            */
+    int threshold       = pv->block_threshold;
+    int block_width     = pv->block_width;
+    int block_height    = pv->block_height;
+    int block_x, block_y;
+    int block_score = 0; int send_to_blend = 0;
+    
+    int x, y, k;
+
+    for( k = 0; k < 1; k++ )
+    {
+        int ref_stride = pv->ref_stride[k];
+        for( y = 0; y < ( pv->height[k] - block_height ); y = y + block_height )
+        {
+            for( x = 0; x < ( pv->width[k] - block_width ); x = x + block_width )
+            {
+                block_score = 0;
+                for( block_y = 0; block_y < block_height; block_y++ )
+                {
+                    for( block_x = 0; block_x < block_width; block_x++ )
+                    {
+                        int mask_y = y + block_y;
+                        int mask_x = x + block_x;
+                        
+                        /* We only want to mark a pixel in a block as combed
+                           if the pixels above and below are as well. Got to
+                           handle the top and bottom lines separately.       */
+                        if( y + block_y == 0 )
+                        {
+                            if( pv->mask[k][mask_y*ref_stride+mask_x    ] == 255 &&
+                                pv->mask[k][mask_y*ref_stride+mask_x + 1] == 255 )
+                                    block_score++;
+                        }
+                        else if( y + block_y == pv->height[k] - 1 )
+                        {
+                            if( pv->mask[k][mask_y*ref_stride+mask_x - 1] == 255 &&
+                                pv->mask[k][mask_y*ref_stride+mask_x    ] == 255 )
+                                    block_score++;
+                        }
+                        else
+                        {
+                            if( pv->mask[k][mask_y*ref_stride+mask_x - 1] == 255 &&
+                                pv->mask[k][mask_y*ref_stride+mask_x    ] == 255 &&
+                                pv->mask[k][mask_y*ref_stride+mask_x + 1] == 255 )
+                                    block_score++;
+                        } 
+                    }
+                }
+
+                if( block_score >= ( threshold / 2 ) )
+                {
+#if 0
+                    hb_log("decomb: frame %i | score %i | type %s", pv->yadif_deinterlaced_frames + pv->blend_deinterlaced_frames +  pv->unfiltered_frames + 1, block_score, pv->buf_settings->flags & 16 ? "Film" : "Video");
+#endif
+                    if ( block_score <= threshold && !( pv->buf_settings->flags & 16) )
+                    {
+                        /* Blend video content that scores between
+                           ( threshold / 2 ) and threshold.        */
+                        send_to_blend = 1;
+                    }
+                    else if( block_score > threshold )
+                    {
+                        if( pv->buf_settings->flags & 16 )
+                        {
+                            /* Blend progressive content above the threshold.*/
+                            return 2;
+                        }
+                        else
+                        {
+                            /* Yadif deinterlace video content above the threshold. */
+                            return 1;
+                        }
+                    }
+                }
+            }
+        } 
+    }
+    
+    if( send_to_blend )
+    {
+        return 2;
+    }
+    else
+    {
+        /* Consider this frame to be uncombed. */
+        return 0;
+    }
+}
+
+int detect_combed_segment( hb_filter_private_t * pv, int segment_start, int segment_stop )
+{
+    /* A mish-mash of various comb detection tricks
+       picked up from neuron2's Decomb plugin for
+       AviSynth and tritical's IsCombedT and
+       IsCombedTIVTC plugins.                       */
+       
+    int x, y, k, width, height;
+    
+    /* Comb scoring algorithm */
+    int spatial_metric  = pv->spatial_metric;
+    /* Motion threshold */
+    int mthresh         = pv->motion_threshold;
+    /* Spatial threshold */
+    int athresh         = pv->spatial_threshold;
+    int athresh_squared = athresh * athresh;
+    int athresh6        = 6 *athresh;
+
+    /* One pas for Y, one pass for U, one pass for V */    
+    for( k = 0; k < 1; k++ )
+    {
+        int ref_stride  = pv->ref_stride[k];
+        width           = pv->width[k];
+        height          = pv->height[k];
+        
+        /* Comb detection has to start at y = 2 and end at
+           y = height - 2, because it needs to examine
+           2 pixels above and 2 below the current pixel.      */
+        if( segment_start < 2 )
+            segment_start = 2;
+        if( segment_stop > height - 2 )
+            segment_stop = height - 2;
+            
+        for( y =  segment_start; y < segment_stop; y++ )
+        {
+            /* These are just to make the buffer locations easier to read. */
+            int back_2    = ( y - 2 )*ref_stride ;
+            int back_1    = ( y - 1 )*ref_stride;
+            int current   =         y*ref_stride;
+            int forward_1 = ( y + 1 )*ref_stride;
+            int forward_2 = ( y + 2 )*ref_stride;
+            
+            /* We need to examine a column of 5 pixels
+               in the prev, cur, and next frames.      */
+            uint8_t previous_frame[5];
+            uint8_t current_frame[5];
+            uint8_t next_frame[5];
+            
+            for( x = 0; x < width; x++ )
+            {
+                /* Fill up the current frame array with the current pixel values.*/
+                current_frame[0] = pv->ref[1][k][back_2    + x];
+                current_frame[1] = pv->ref[1][k][back_1    + x];
+                current_frame[2] = pv->ref[1][k][current   + x];
+                current_frame[3] = pv->ref[1][k][forward_1 + x];
+                current_frame[4] = pv->ref[1][k][forward_2 + x];
+
+                int up_diff   = current_frame[2] - current_frame[1];
+                int down_diff = current_frame[2] - current_frame[3];
+
+                if( ( up_diff >  athresh && down_diff >  athresh ) ||
+                    ( up_diff < -athresh && down_diff < -athresh ) )
+                {
+                    /* The pixel above and below are different,
+                       and they change in the same "direction" too.*/
+                    int motion = 0;
+                    if( mthresh > 0 )
+                    {
+                        /* Make sure there's sufficient motion between frame t-1 to frame t+1. */
+                        previous_frame[0] = pv->ref[0][k][back_2    + x];
+                        previous_frame[1] = pv->ref[0][k][back_1    + x];
+                        previous_frame[2] = pv->ref[0][k][current   + x];
+                        previous_frame[3] = pv->ref[0][k][forward_1 + x];
+                        previous_frame[4] = pv->ref[0][k][forward_2 + x];
+                        next_frame[0]     = pv->ref[2][k][back_2    + x];
+                        next_frame[1]     = pv->ref[2][k][back_1    + x];
+                        next_frame[2]     = pv->ref[2][k][current   + x];
+                        next_frame[3]     = pv->ref[2][k][forward_1 + x];
+                        next_frame[4]     = pv->ref[2][k][forward_2 + x];
+                        
+                        if( abs( previous_frame[2] - current_frame[2] ) > mthresh &&
+                            abs(  current_frame[1] - next_frame[1]    ) > mthresh &&
+                            abs(  current_frame[3] - next_frame[3]    ) > mthresh )
+                                motion++;
+                        if( abs(     next_frame[2] - current_frame[2] ) > mthresh &&
+                            abs( previous_frame[1] - current_frame[1] ) > mthresh &&
+                            abs( previous_frame[3] - current_frame[3] ) > mthresh )
+                                motion++;
+                    }
+                    else
+                    {
+                        /* User doesn't want to check for motion,
+                           so move on to the spatial check.       */
+                        motion = 1;
+                    }
+                           
+                    if( motion || ( pv->yadif_deinterlaced_frames==0 && pv->blend_deinterlaced_frames==0 && pv->unfiltered_frames==0) )
+                    {
+                           /* That means it's time for the spatial check.
+                              We've got several options here.             */
+                        if( spatial_metric == 0 )
+                        {
+                            /* Simple 32detect style comb detection */
+                            if( ( abs( current_frame[2] - current_frame[4] ) < 10  ) &&
+                                ( abs( current_frame[2] - current_frame[3] ) > 15 ) )
+                            {
+                                pv->mask[k][y*ref_stride + x] = 255;
+                            }
+                            else
+                            {
+                                pv->mask[k][y*ref_stride + x] = 0;
+                            }
+                        }
+                        else if( spatial_metric == 1 )
+                        {
+                            /* This, for comparison, is what IsCombed uses.
+                               It's better, but still noise senstive.      */
+                               int combing = ( current_frame[1] - current_frame[2] ) *
+                                             ( current_frame[3] - current_frame[2] );
+                               
+                               if( combing > athresh_squared )
+                                   pv->mask[k][y*ref_stride + x] = 255; 
+                               else
+                                   pv->mask[k][y*ref_stride + x] = 0;
+                        }
+                        else if( spatial_metric == 2 )
+                        {
+                            /* Tritical's noise-resistant combing scorer.
+                               The check is done on a bob+blur convolution. */
+                            int combing = abs( current_frame[0]
+                                             + ( 4 * current_frame[2] )
+                                             + current_frame[4]
+                                             - ( 3 * ( current_frame[1]
+                                                     + current_frame[3] ) ) );
+
+                            /* If the frame is sufficiently combed,
+                               then mark it down on the mask as 255. */
+                            if( combing > athresh6 )
+                                pv->mask[k][y*ref_stride + x] = 255; 
+                            else
+                                pv->mask[k][y*ref_stride + x] = 0;
+                        }
+                    }
+                    else
+                    {
+                        pv->mask[k][y*ref_stride + x] = 0;
+                    }
+                }
+                else
+                {
+                    pv->mask[k][y*ref_stride + x] = 0;
+                }
+            }
+        }
+    }
+}
+
+typedef struct decomb_thread_arg_s {
+    hb_filter_private_t *pv;
+    int segment;
+} decomb_thread_arg_t;
+
+/*
+ * comb detect this segment of all three planes in a single thread.
+ */
+void decomb_filter_thread( void *thread_args_v )
+{
+    decomb_arguments_t *decomb_work = NULL;
+    hb_filter_private_t * pv;
+    int run = 1;
+    int segment, segment_start, segment_stop, plane;
+    decomb_thread_arg_t *thread_args = thread_args_v;
+
+    pv = thread_args->pv;
+    segment = thread_args->segment;
+
+    hb_log("decomb thread started for segment %d", segment);
+
+    while( run )
+    {
+        /*
+         * Wait here until there is work to do. hb_lock() blocks until
+         * render releases it to say that there is more work to do.
+         */
+        hb_lock( pv->decomb_begin_lock[segment] );
+
+        decomb_work = &pv->decomb_arguments[segment];
+
+        if( decomb_work->stop )
+        {
+            /*
+             * No more work to do, exit this thread.
+             */
+            run = 0;
+            continue;
+        } 
+
+        /*
+         * Process segment (for now just from luma)
+         */
+        for( plane = 0; plane < 1; plane++)
+        {
+
+            int w = pv->width[plane];
+            int h = pv->height[plane];
+            int ref_stride = pv->ref_stride[plane];
+            segment_start = ( h / pv->cpu_count ) * segment;
+            if( segment == pv->cpu_count - 1 )
+            {
+                /*
+                 * Final segment
+                 */
+                segment_stop = h;
+            } else {
+                segment_stop = ( h / pv->cpu_count ) * ( segment + 1 );
+            }
+            
+            detect_combed_segment( pv, segment_start, segment_stop );
+        }
+        /*
+         * Finished this segment, let everyone know.
+         */
+        hb_unlock( pv->decomb_complete_lock[segment] );
+    }
+    free( thread_args_v );
+}
+
+int comb_segmenter( hb_filter_private_t * pv )
+{
+    int segment;
+
+    for( segment = 0; segment < pv->cpu_count; segment++ )
+    {  
+        /*
+         * Let the thread for this plane know that we've setup work 
+         * for it by releasing the begin lock (ensuring that the
+         * complete lock is already locked so that we block when
+         * we try to lock it again below).
+         */
+        hb_lock( pv->decomb_complete_lock[segment] );
+        hb_unlock( pv->decomb_begin_lock[segment] );
+    }
+
+    /*
+     * Wait until all three threads have completed by trying to get
+     * the complete lock that we locked earlier for each thread, which
+     * will block until that thread has completed the work on that
+     * plane.
+     */
+    for( segment = 0; segment < pv->cpu_count; segment++ )
+    {
+        hb_lock( pv->decomb_complete_lock[segment] );
+        hb_unlock( pv->decomb_complete_lock[segment] );
+    }
+    
+    return check_combing_mask( pv );
+}
+
+static void yadif_filter_line( uint8_t *dst,
+                               uint8_t *prev,
+                               uint8_t *cur,
+                               uint8_t *next,
+                               int plane,
+                               int parity,
+                               int y,
+                               hb_filter_private_t * pv )
+{
+    /* While prev and next point to the previous and next frames,
+       prev2 and next2 will shift depending on the parity, usually 1.
+       They are the previous and next fields, the fields temporally adjacent
+       to the other field in the current frame--the one not being filtered.  */
+    uint8_t *prev2 = parity ? prev : cur ;
+    uint8_t *next2 = parity ? cur  : next;
+    int w = pv->width[plane];
+    int refs = pv->ref_stride[plane];
+    int x;
+    
+    /* Decomb's cubic interpolation can only function when there are
+       three samples above and below, so regress to yadif's traditional
+       two-tap interpolation when filtering at the top and bottom edges. */
+    int edge = 0;
+    if( ( y < 3 ) || ( y > ( pv->height[plane] - 4 ) )  )
+        edge = 1;
+
+    for( x = 0; x < w; x++)
+    {
+        /* Pixel above*/
+        int c              = cur[-refs];
+        /* Temporal average: the current location in the adjacent fields */
+        int d              = (prev2[0] + next2[0])>>1;
+        /* Pixel below */
+        int e              = cur[+refs];
+        
+        /* How the current pixel changes between the adjacent fields */
+        int temporal_diff0 = ABS(prev2[0] - next2[0]);
+        /* The average of how much the pixels above and below change from the frame before to now. */
+        int temporal_diff1 = ( ABS(prev[-refs] - cur[-refs]) + ABS(prev[+refs] - cur[+refs]) ) >> 1;
+        /* The average of how much the pixels above and below change from now to the next frame. */
+        int temporal_diff2 = ( ABS(next[-refs] - cur[-refs]) + ABS(next[+refs] - cur[+refs]) ) >> 1;
+        /* For the actual difference, use the largest of the previous average diffs. */
+        int diff           = MAX3(temporal_diff0>>1, temporal_diff1, temporal_diff2);
+        
+        /* SAD of how the pixel-1, the pixel, and the pixel+1 change from the line above to below. */ 
+        int spatial_score  = ABS(cur[-refs-1] - cur[+refs-1]) + ABS(cur[-refs]-cur[+refs]) +
+                                     ABS(cur[-refs+1] - cur[+refs+1]) - 1;         
+        int spatial_pred;
+         
+        /* Spatial pred is either a bilinear or cubic vertical interpolation. */
+        if( pv->mode > 0 && !edge)
+        {
+            spatial_pred = cubic_interpolate( cur[-3*refs], cur[-refs], cur[+refs], cur[3*refs] );
+        }
+        else
+        {
+            spatial_pred = (c+e)>>1;
+        }
+
+/* EDDI: Edge Directed Deinterlacing Interpolation
+   Uses the Martinez-Lim Line Shift Parametric Modeling algorithm...I think.
+   Checks 4 different slopes to see if there is more similarity along a diagonal
+   than there was vertically. If a diagonal is more similar, then it indicates
+   an edge, so interpolate along that instead of a vertical line, using either
+   linear or cubic interpolation depending on mode. */
+#define YADIF_CHECK(j)\
+        {   int score = ABS(cur[-refs-1+j] - cur[+refs-1-j])\
+                      + ABS(cur[-refs  +j] - cur[+refs  -j])\
+                      + ABS(cur[-refs+1+j] - cur[+refs+1-j]);\
+            if( score < spatial_score ){\
+                spatial_score = score;\
+                if( pv->mode > 0 && !edge )\
+                {\
+                    switch(j)\
+                    {\
+                        case -1:\
+                            spatial_pred = cubic_interpolate(cur[-3 * refs - 3], cur[-refs -1], cur[+refs + 1], cur[3* refs + 3] );\
+                        break;\
+                        case -2:\
+                            spatial_pred = cubic_interpolate( ( ( cur[-3*refs - 4] + cur[-refs - 4] ) / 2 ) , cur[-refs -2], cur[+refs + 2], ( ( cur[3*refs + 4] + cur[refs + 4] ) / 2 ) );\
+                        break;\
+                        case 1:\
+                            spatial_pred = cubic_interpolate(cur[-3 * refs +3], cur[-refs +1], cur[+refs - 1], cur[3* refs -3] );\
+                        break;\
+                        case 2:\
+                            spatial_pred = cubic_interpolate(( ( cur[-3*refs + 4] + cur[-refs + 4] ) / 2 ), cur[-refs +2], cur[+refs - 2], ( ( cur[3*refs - 4] + cur[refs - 4] ) / 2 ) );\
+                        break;\
+                    }\
+                }\
+                else\
+                {\
+                    spatial_pred = ( cur[-refs +j] + cur[+refs -j] ) >>1;\
+                }\
+                
+                YADIF_CHECK(-1) YADIF_CHECK(-2) }} }}
+                YADIF_CHECK( 1) YADIF_CHECK( 2) }} }}
+                                
+        /* Temporally adjust the spatial prediction by
+           comparing against lines in the adjacent fields. */
+        int b = (prev2[-2*refs] + next2[-2*refs])>>1;
+        int f = (prev2[+2*refs] + next2[+2*refs])>>1;
+        
+        /* Find the median value */
+        int max = MAX3(d-e, d-c, MIN(b-c, f-e));
+        int min = MIN3(d-e, d-c, MAX(b-c, f-e));
+        diff = MAX3( diff, min, -max );
+        
+        if( spatial_pred > d + diff )
+        {
+            spatial_pred = d + diff;
+        }
+        else if( spatial_pred < d - diff )
+        {
+            spatial_pred = d - diff;
+        }
+        
+        dst[0] = spatial_pred;
+                        
+        dst++;
+        cur++;
+        prev++;
+        next++;
+        prev2++;
+        next2++;
+    }
+}
+
+typedef struct yadif_thread_arg_s {
+    hb_filter_private_t *pv;
+    int segment;
+} yadif_thread_arg_t;
+
+/*
+ * deinterlace this segment of all three planes in a single thread.
+ */
+void yadif_decomb_filter_thread( void *thread_args_v )
+{
+    yadif_arguments_t *yadif_work = NULL;
+    hb_filter_private_t * pv;
+    int run = 1;
+    int plane;
+    int segment, segment_start, segment_stop;
+    yadif_thread_arg_t *thread_args = thread_args_v;
+    uint8_t **dst;
+    int parity, tff, y, w, h, penultimate, ultimate, ref_stride, is_combed;
+
+    pv = thread_args->pv;
+    segment = thread_args->segment;
+
+    hb_log("yadif thread started for segment %d", segment);
+
+    while( run )
+    {
+        /*
+         * Wait here until there is work to do. hb_lock() blocks until
+         * render releases it to say that there is more work to do.
+         */
+        hb_lock( pv->yadif_begin_lock[segment] );
+
+        yadif_work = &pv->yadif_arguments[segment];
+
+        if( yadif_work->stop )
+        {
+            /*
+             * No more work to do, exit this thread.
+             */
+            run = 0;
+            continue;
+        } 
+
+        if( yadif_work->dst == NULL )
+        {
+            hb_error( "thread started when no work available" );
+            hb_snooze(500);
+            continue;
+        }
+        
+        is_combed = pv->yadif_arguments[segment].is_combed;
+
+        /*
+         * Process all three planes, but only this segment of it.
+         */
+        for( plane = 0; plane < 3; plane++)
+        {
+
+            dst = yadif_work->dst;
+            parity = yadif_work->parity;
+            tff = yadif_work->tff;
+            w = pv->width[plane];
+            h = pv->height[plane];
+            penultimate = h - 2;
+            ultimate = h - 1;
+            ref_stride = pv->ref_stride[plane];
+            segment_start = ( h / pv->cpu_count ) * segment;
+            if( segment == pv->cpu_count - 1 )
+            {
+                /*
+                 * Final segment
+                 */
+                segment_stop = h;
+            } else {
+                segment_stop = ( h / pv->cpu_count ) * ( segment + 1 );
+            }
+
+            for( y = segment_start; y < segment_stop; y++ )
+            {
+                if( ( pv->mode == 4 && is_combed ) || is_combed == 2 )
+                {
+                    /* This line gets blend filtered, not yadif filtered. */
+                    uint8_t *prev = &pv->ref[0][plane][y*ref_stride];
+                    uint8_t *cur  = &pv->ref[1][plane][y*ref_stride];
+                    uint8_t *next = &pv->ref[2][plane][y*ref_stride];
+                    uint8_t *dst2 = &dst[plane][y*w];
+
+                    blend_filter_line( dst2, cur, plane, y, pv );
+                }
+                else if( ( ( y ^ parity ) &  1 )  && ( is_combed == 1 ) )
+                {
+                    /* This line gets yadif filtered. It is the bottom field
+                       when TFF and vice-versa. It's the field that gets
+                       filtered. Because yadif needs 2 lines above and below
+                       the one being filtered, we need to mirror the edges.
+                       When TFF, this means replacing the 2nd line with a
+                       copy of the 1st, and the last with the second-to-last. */
+                    if( y > 1 && y < ( h -2 ) )
+                    {
+                        /* This isn't the top or bottom, proceed as normal to yadif. */
+                        uint8_t *prev = &pv->ref[0][plane][y*ref_stride];
+                        uint8_t *cur  = &pv->ref[1][plane][y*ref_stride];
+                        uint8_t *next = &pv->ref[2][plane][y*ref_stride];
+                        uint8_t *dst2 = &dst[plane][y*w];
+
+                        yadif_filter_line( dst2, 
+                                           prev, 
+                                           cur, 
+                                           next, 
+                                           plane, 
+                                           parity ^ tff,
+                                           y, 
+                                           pv );
+                    }
+                    else if( y == 0 )
+                    {
+                        /* BFF, so y0 = y1 */
+                        memcpy( &dst[plane][y*w],
+                                &pv->ref[1][plane][1*ref_stride],
+                                w * sizeof(uint8_t) );
+                    }
+                    else if( y == 1 )
+                    {
+                        /* TFF, so y1 = y0 */
+                        memcpy( &dst[plane][y*w],
+                                &pv->ref[1][plane][0],
+                                w * sizeof(uint8_t) );
+                    }
+                    else if( y == penultimate )
+                    {
+                        /* BFF, so penultimate y = ultimate y */
+                        memcpy( &dst[plane][y*w],
+                                &pv->ref[1][plane][ultimate*ref_stride],
+                                w * sizeof(uint8_t) );
+                    }
+                    else if( y == ultimate )
+                    {
+                        /* TFF, so ultimate y = penultimate y */
+                        memcpy( &dst[plane][y*w],
+                                &pv->ref[1][plane][penultimate*ref_stride],
+                                w * sizeof(uint8_t) );
+                    }
+                }
+                else
+                {
+                    memcpy( &dst[plane][y*w],
+                            &pv->ref[1][plane][y*ref_stride],
+                            w * sizeof(uint8_t) );              
+                }
+            }
+        }
+        /*
+         * Finished this segment, let everyone know.
+         */
+        hb_unlock( pv->yadif_complete_lock[segment] );
+    }
+    free( thread_args_v );
+}
+
+static void yadif_filter( uint8_t ** dst,
+                          int parity,
+                          int tff,
+                          hb_filter_private_t * pv )
+{
+    
+    int is_combed = comb_segmenter( pv );
+    
+    if( is_combed == 1 )
+    {
+        pv->yadif_deinterlaced_frames++;
+    }
+    else if( is_combed == 2 )
+    {
+        pv->blend_deinterlaced_frames++;
+    }
+    else
+    {
+        pv->unfiltered_frames++;
+    }
+    
+    if( is_combed )
+    {
+        int segment;
+
+        for( segment = 0; segment < pv->cpu_count; segment++ )
+        {  
+            /*
+             * Setup the work for this plane.
+             */
+            pv->yadif_arguments[segment].parity = parity;
+            pv->yadif_arguments[segment].tff = tff;
+            pv->yadif_arguments[segment].dst = dst;
+            pv->yadif_arguments[segment].is_combed = is_combed;
+
+            /*
+             * Let the thread for this plane know that we've setup work 
+             * for it by releasing the begin lock (ensuring that the
+             * complete lock is already locked so that we block when
+             * we try to lock it again below).
+             */
+            hb_lock( pv->yadif_complete_lock[segment] );
+            hb_unlock( pv->yadif_begin_lock[segment] );
+        }
+
+        /*
+         * Wait until all three threads have completed by trying to get
+         * the complete lock that we locked earlier for each thread, which
+         * will block until that thread has completed the work on that
+         * plane.
+         */
+        for( segment = 0; segment < pv->cpu_count; segment++ )
+        {
+            hb_lock( pv->yadif_complete_lock[segment] );
+            hb_unlock( pv->yadif_complete_lock[segment] );
+        }
+
+        /*
+         * Entire frame is now deinterlaced.
+         */
+    }
+    else
+    {
+        /*  Just passing through... */
+        int i;
+        for( i = 0; i < 3; i++ )
+        {
+            uint8_t * ref = pv->ref[1][i];
+            uint8_t * dest = dst[i];
+            
+            int w = pv->width[i];
+            int ref_stride = pv->ref_stride[i];
+            
+            int y;
+            for( y = 0; y < pv->height[i]; y++ )
+            {
+                memcpy(dest, ref, w);
+                dest += w;
+                ref += ref_stride;
+            }
+        }
+    }
+}
+
+static void mcdeint_filter( uint8_t ** dst,
+                            uint8_t ** src,
+                            int parity,
+                            hb_filter_private_t * pv )
+{
+    int x, y, i;
+    int out_size;
+
+#ifdef SUPPRESS_AV_LOG
+    /* TODO: temporarily change log level to suppress obnoxious debug output */
+    int loglevel = av_log_get_level();
+    av_log_set_level( AV_LOG_QUIET );
+#endif
+
+    for( i=0; i<3; i++ )
+    {
+        pv->mcdeint_frame->data[i] = src[i];
+        pv->mcdeint_frame->linesize[i] = pv->width[i];
+    }
+    pv->mcdeint_avctx_enc->me_cmp     = FF_CMP_SAD;
+    pv->mcdeint_avctx_enc->me_sub_cmp = FF_CMP_SAD;
+    pv->mcdeint_frame->quality        = pv->mcdeint_qp * FF_QP2LAMBDA;
+
+    out_size = avcodec_encode_video( pv->mcdeint_avctx_enc,
+                                     pv->mcdeint_outbuf,
+                                     pv->mcdeint_outbuf_size,
+                                     pv->mcdeint_frame );
+
+    pv->mcdeint_frame_dec = pv->mcdeint_avctx_enc->coded_frame;
+
+    for( i = 0; i < 3; i++ )
+    {
+        int w    = pv->width[i];
+        int h    = pv->height[i];
+        int fils = pv->mcdeint_frame_dec->linesize[i];
+        int srcs = pv->width[i];
+
+        for( y = 0; y < h; y++ )
+        {
+            if( (y ^ parity) & 1 )
+            {
+                for( x = 0; x < w; x++ )
+                {
+                    if( (x-2)+(y-1)*w >= 0 && (x+2)+(y+1)*w < w*h )
+                    {
+                        uint8_t * filp =
+                            &pv->mcdeint_frame_dec->data[i][x + y*fils];
+                        uint8_t * srcp = &src[i][x + y*srcs];
+
+                        int diff0 = filp[-fils] - srcp[-srcs];
+                        int diff1 = filp[+fils] - srcp[+srcs];
+
+                        int spatial_score =
+                              ABS(srcp[-srcs-1] - srcp[+srcs-1])
+                            + ABS(srcp[-srcs  ] - srcp[+srcs  ])
+                            + ABS(srcp[-srcs+1] - srcp[+srcs+1]) - 1;
+
+                        int temp = filp[0];
+
+#define MCDEINT_CHECK(j)\
+                        {   int score = ABS(srcp[-srcs-1+j] - srcp[+srcs-1-j])\
+                                      + ABS(srcp[-srcs  +j] - srcp[+srcs  -j])\
+                                      + ABS(srcp[-srcs+1+j] - srcp[+srcs+1-j]);\
+                            if( score < spatial_score ) {\
+                                spatial_score = score;\
+                                diff0 = filp[-fils+j] - srcp[-srcs+j];\
+                                diff1 = filp[+fils-j] - srcp[+srcs-j];
+
+                        MCDEINT_CHECK(-1) MCDEINT_CHECK(-2) }} }}
+                        MCDEINT_CHECK( 1) MCDEINT_CHECK( 2) }} }}
+
+                        if(diff0 + diff1 > 0)
+                        {
+                            temp -= (diff0 + diff1 -
+                                     ABS( ABS(diff0) - ABS(diff1) ) / 2) / 2;
+                        }
+                        else
+                        {
+                            temp -= (diff0 + diff1 +
+                                     ABS( ABS(diff0) - ABS(diff1) ) / 2) / 2;
+                        }
+
+                        filp[0] = dst[i][x + y*w] =
+                            temp > 255U ? ~(temp>>31) : temp;
+                    }
+                    else
+                    {
+                        dst[i][x + y*w] =
+                            pv->mcdeint_frame_dec->data[i][x + y*fils];
+                    }
+                }
+            }
+        }
+
+        for( y = 0; y < h; y++ )
+        {
+            if( !((y ^ parity) & 1) )
+            {
+                for( x = 0; x < w; x++ )
+                {
+                    pv->mcdeint_frame_dec->data[i][x + y*fils] =
+                        dst[i][x + y*w]= src[i][x + y*srcs];
+                }
+            }
+        }
+    }
+
+#ifdef SUPPRESS_AV_LOG
+    /* TODO: restore previous log level */
+    av_log_set_level(loglevel);
+#endif
+}
+
+hb_filter_private_t * hb_decomb_init( int pix_fmt,
+                                           int width,
+                                           int height,
+                                           char * settings )
+{
+    if( pix_fmt != PIX_FMT_YUV420P )
+    {
+        return 0;
+    }
+
+    hb_filter_private_t * pv = calloc( 1, sizeof(struct hb_filter_private_s) );
+
+    pv->pix_fmt = pix_fmt;
+
+    pv->width[0]  = width;
+    pv->height[0] = height;
+    pv->width[1]  = pv->width[2]  = width >> 1;
+    pv->height[1] = pv->height[2] = height >> 1;
+
+    pv->buf_out[0] = hb_video_buffer_init( width, height );
+    pv->buf_out[1] = hb_video_buffer_init( width, height );
+    pv->buf_settings = hb_buffer_init( 0 );
+
+    pv->yadif_deinterlaced_frames = 0;
+    pv->blend_deinterlaced_frames = 0;
+    pv->unfiltered_frames = 0;
+
+    pv->yadif_ready    = 0;
+
+    pv->mode     = MODE_DEFAULT;
+    pv->spatial_metric = 2;
+    pv->motion_threshold = 6;
+    pv->spatial_threshold = 9;
+    pv->block_threshold = 80;
+    pv->block_width = 16;
+    pv->block_height = 16;
+    
+    pv->parity   = PARITY_DEFAULT;
+
+    pv->mcdeint_mode   = MCDEINT_MODE_DEFAULT;
+    pv->mcdeint_qp     = MCDEINT_QP_DEFAULT;
+
+    if( settings )
+    {
+        sscanf( settings, "%d:%d:%d:%d:%d:%d:%d",
+                &pv->mode,
+                &pv->spatial_metric,
+                &pv->motion_threshold,
+                &pv->spatial_threshold,
+                &pv->block_threshold,
+                &pv->block_width,
+                &pv->block_height );
+    }
+    
+    pv->cpu_count = hb_get_cpu_count();
+    
+
+    if( pv->mode == 2 || pv->mode == 3 )
+    {
+        pv->mcdeint_mode = 0;
+    }
+    
+    /* Allocate yadif specific buffers */
+    int i, j;
+    for( i = 0; i < 3; i++ )
+    {
+        int is_chroma = !!i;
+        int w = ((width   + 31) & (~31))>>is_chroma;
+        int h = ((height+6+ 31) & (~31))>>is_chroma;
+
+        pv->ref_stride[i] = w;
+
+        for( j = 0; j < 3; j++ )
+        {
+            pv->ref[j][i] = malloc( w*h*sizeof(uint8_t) ) + 3*w;
+        }
+    }
+
+    /* Allocate a buffer to store a comb mask. */
+    for( i = 0; i < 3; i++ )
+    {
+        int is_chroma = !!i;
+        int w = ((pv->width[0]   + 31) & (~31))>>is_chroma;
+        int h = ((pv->height[0]+6+ 31) & (~31))>>is_chroma;
+
+        pv->mask[i] = calloc( 1, w*h*sizeof(uint8_t) ) + 3*w;
+    }
+
+     /*
+      * Create yadif threads and locks.
+      */
+     pv->yadif_threads = malloc( sizeof( hb_thread_t* ) * pv->cpu_count );
+     pv->yadif_begin_lock = malloc( sizeof( hb_lock_t * ) * pv->cpu_count );
+     pv->yadif_complete_lock = malloc( sizeof( hb_lock_t * ) * pv->cpu_count );
+     pv->yadif_arguments = malloc( sizeof( yadif_arguments_t ) * pv->cpu_count );
+
+     for( i = 0; i < pv->cpu_count; i++ )
+     {
+         yadif_thread_arg_t *thread_args;
+
+         thread_args = malloc( sizeof( yadif_thread_arg_t ) );
+
+         if( thread_args )
+         {
+             thread_args->pv = pv;
+             thread_args->segment = i;
+
+             pv->yadif_begin_lock[i] = hb_lock_init();
+             pv->yadif_complete_lock[i] = hb_lock_init();
+
+             /*
+              * Important to start off with the threads locked waiting
+              * on input.
+              */
+             hb_lock( pv->yadif_begin_lock[i] );
+
+             pv->yadif_arguments[i].stop = 0;
+             pv->yadif_arguments[i].dst = NULL;
+             
+             pv->yadif_threads[i] = hb_thread_init( "yadif_filter_segment",
+                                                    yadif_decomb_filter_thread,
+                                                    thread_args,
+                                                    HB_NORMAL_PRIORITY );
+         }
+         else
+         {
+             hb_error( "yadif could not create threads" );
+         }
+    }
+    
+    /*
+     * Create decomb threads and locks.
+     */
+    pv->decomb_threads = malloc( sizeof( hb_thread_t* ) * pv->cpu_count );
+    pv->decomb_begin_lock = malloc( sizeof( hb_lock_t * ) * pv->cpu_count );
+    pv->decomb_complete_lock = malloc( sizeof( hb_lock_t * ) * pv->cpu_count );
+    pv->decomb_arguments = malloc( sizeof( decomb_arguments_t ) * pv->cpu_count );
+    
+    for( i = 0; i < pv->cpu_count; i++ )
+    {
+        decomb_thread_arg_t *decomb_thread_args;
+    
+        decomb_thread_args = malloc( sizeof( decomb_thread_arg_t ) );
+    
+        if( decomb_thread_args )
+        {
+            decomb_thread_args->pv = pv;
+            decomb_thread_args->segment = i;
+    
+            pv->decomb_begin_lock[i] = hb_lock_init();
+            pv->decomb_complete_lock[i] = hb_lock_init();
+    
+            /*
+             * Important to start off with the threads locked waiting
+             * on input.
+             */
+            hb_lock( pv->decomb_begin_lock[i] );
+    
+            pv->decomb_arguments[i].stop = 0;
+    
+            pv->decomb_threads[i] = hb_thread_init( "decomb_filter_segment",
+                                                   decomb_filter_thread,
+                                                   decomb_thread_args,
+                                                   HB_NORMAL_PRIORITY );
+        }
+        else
+        {
+            hb_error( "decomb could not create threads" );
+        }
+    }
+
+    
+    
+    /* Allocate mcdeint specific buffers */
+    if( pv->mcdeint_mode >= 0 )
+    {
+        avcodec_init();
+        avcodec_register_all();
+
+        AVCodec * enc = avcodec_find_encoder( CODEC_ID_SNOW );
+
+        int i;
+        for (i = 0; i < 3; i++ )
+        {
+            AVCodecContext * avctx_enc;
+
+            avctx_enc = pv->mcdeint_avctx_enc = avcodec_alloc_context();
+
+            avctx_enc->width                    = width;
+            avctx_enc->height                   = height;
+            avctx_enc->time_base                = (AVRational){1,25};  // meaningless
+            avctx_enc->gop_size                 = 300;
+            avctx_enc->max_b_frames             = 0;
+            avctx_enc->pix_fmt                  = PIX_FMT_YUV420P;
+            avctx_enc->flags                    = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY;
+            avctx_enc->strict_std_compliance    = FF_COMPLIANCE_EXPERIMENTAL;
+            avctx_enc->global_quality           = 1;
+            avctx_enc->flags2                   = CODEC_FLAG2_MEMC_ONLY;
+            avctx_enc->me_cmp                   = FF_CMP_SAD; //SSE;
+            avctx_enc->me_sub_cmp               = FF_CMP_SAD; //SSE;
+            avctx_enc->mb_cmp                   = FF_CMP_SSE;
+
+            switch( pv->mcdeint_mode )
+            {
+                case 3:
+                    avctx_enc->refs = 3;
+                case 2:
+                    avctx_enc->me_method = ME_UMH;
+                case 1:
+                    avctx_enc->flags |= CODEC_FLAG_4MV;
+                    avctx_enc->dia_size =2;
+                case 0:
+                    avctx_enc->flags |= CODEC_FLAG_QPEL;
+            }
+
+            avcodec_open(avctx_enc, enc);
+        }
+
+        pv->mcdeint_frame       = avcodec_alloc_frame();
+        pv->mcdeint_outbuf_size = width * height * 10;
+        pv->mcdeint_outbuf      = malloc( pv->mcdeint_outbuf_size );
+    }
+
+    return pv;
+}
+
+void hb_decomb_close( hb_filter_private_t * pv )
+{
+    if( !pv )
+    {
+        return;
+    }
+    
+    hb_log("decomb: yadif deinterlaced %i | blend deinterlaced %i | unfiltered %i | total %i", pv->yadif_deinterlaced_frames, pv->blend_deinterlaced_frames, pv->unfiltered_frames, pv->yadif_deinterlaced_frames + pv->blend_deinterlaced_frames + pv->unfiltered_frames);
+
+    /* Cleanup frame buffers */
+    if( pv->buf_out[0] )
+    {
+        hb_buffer_close( &pv->buf_out[0] );
+    }
+    if( pv->buf_out[1] )
+    {
+        hb_buffer_close( &pv->buf_out[1] );
+    }
+    if (pv->buf_settings )
+    {
+        hb_buffer_close( &pv->buf_settings );
+    }
+
+    /* Cleanup yadif specific buffers */
+    int i;
+    for( i = 0; i<3*3; i++ )
+    {
+        uint8_t **p = &pv->ref[i%3][i/3];
+        if (*p)
+        {
+            free( *p - 3*pv->ref_stride[i/3] );
+            *p = NULL;
+        }
+    }
+    
+    /* Cleanup combing mask. */
+    for( i = 0; i<3*3; i++ )
+    {
+        uint8_t **p = &pv->mask[i/3];
+        if (*p)
+        {
+            free( *p - 3*pv->ref_stride[i/3] );
+            *p = NULL;
+        }
+    }
+    
+    for( i = 0; i < pv->cpu_count; i++)
+    {
+        /*
+         * Tell each yadif thread to stop, and then cleanup.
+         */
+        pv->yadif_arguments[i].stop = 1;
+        hb_unlock(  pv->yadif_begin_lock[i] );
+
+        hb_thread_close( &pv->yadif_threads[i] );
+        hb_lock_close( &pv->yadif_begin_lock[i] );
+        hb_lock_close( &pv->yadif_complete_lock[i] );
+    }
+    
+    /*
+     * free memory for yadif structs
+     */
+    free( pv->yadif_threads );
+    free( pv->yadif_begin_lock );
+    free( pv->yadif_complete_lock );
+    free( pv->yadif_arguments );
+    
+    for( i = 0; i < pv->cpu_count; i++)
+    {
+        /*
+         * Tell each decomb thread to stop, and then cleanup.
+         */
+        pv->decomb_arguments[i].stop = 1;
+        hb_unlock(  pv->decomb_begin_lock[i] );
+
+        hb_thread_close( &pv->decomb_threads[i] );
+        hb_lock_close( &pv->decomb_begin_lock[i] );
+        hb_lock_close( &pv->decomb_complete_lock[i] );
+    }
+    
+    /*
+     * free memory for decomb structs
+     */
+    free( pv->decomb_threads );
+    free( pv->decomb_begin_lock );
+    free( pv->decomb_complete_lock );
+    free( pv->decomb_arguments );
+    
+    /* Cleanup mcdeint specific buffers */
+    if( pv->mcdeint_mode >= 0 )
+    {
+        if( pv->mcdeint_avctx_enc )
+        {
+            avcodec_close( pv->mcdeint_avctx_enc );
+            av_freep( &pv->mcdeint_avctx_enc );
+        }
+        if( pv->mcdeint_outbuf )
+        {
+            free( pv->mcdeint_outbuf );
+        }
+    }
+
+    free( pv );
+}
+
+int hb_decomb_work( const hb_buffer_t * cbuf_in,
+                    hb_buffer_t ** buf_out,
+                    int pix_fmt,
+                    int width,
+                    int height,
+                    hb_filter_private_t * pv )
+{
+    hb_buffer_t * buf_in = (hb_buffer_t *)cbuf_in;
+
+    if( !pv ||
+        pix_fmt != pv->pix_fmt ||
+        width   != pv->width[0] ||
+        height  != pv->height[0] )
+    {
+        return FILTER_FAILED;
+    }
+
+    avpicture_fill( &pv->pic_in, buf_in->data,
+                    pix_fmt, width, height );
+
+    /* Determine if top-field first layout */
+    int tff;
+    if( pv->parity < 0 )
+    {
+        tff = !!(buf_in->flags & PIC_FLAG_TOP_FIELD_FIRST);
+    }
+    else
+    {
+        tff = (pv->parity & 1) ^ 1;
+    }
+
+    /* Store current frame in yadif cache */
+    store_ref( (const uint8_t**)pv->pic_in.data, pv );
+
+    /* If yadif is not ready, store another ref and return FILTER_DELAY */
+    if( pv->yadif_ready == 0 )
+    {
+        store_ref( (const uint8_t**)pv->pic_in.data, pv );
+
+        hb_buffer_copy_settings( pv->buf_settings, buf_in );
+
+        /* don't let 'work_loop' send a chapter mark upstream */
+        buf_in->new_chap  = 0;
+
+        pv->yadif_ready = 1;
+
+        return FILTER_DELAY;
+    }
+
+    /* Perform yadif filtering */        
+    int frame;
+    for( frame = 0; frame <= ( ( pv->mode == 2 || pv->mode == 3 )? 1 : 0 ) ; frame++ )
+    {
+        int parity = frame ^ tff ^ 1;
+
+        avpicture_fill( &pv->pic_out, pv->buf_out[!(frame^1)]->data,
+                        pix_fmt, width, height );
+
+        yadif_filter( pv->pic_out.data, parity, tff, pv );
+
+        if( pv->mcdeint_mode >= 0 )
+        {
+            /* Perform mcdeint filtering */
+            avpicture_fill( &pv->pic_in,  pv->buf_out[(frame^1)]->data,
+                            pix_fmt, width, height );
+
+            mcdeint_filter( pv->pic_in.data, pv->pic_out.data, parity, pv );
+        }
+
+        *buf_out = pv->buf_out[!(frame^1)];
+    }
+
+    /* Copy buffered settings to output buffer settings */
+    hb_buffer_copy_settings( *buf_out, pv->buf_settings );
+
+    /* Replace buffered settings with input buffer settings */
+    hb_buffer_copy_settings( pv->buf_settings, buf_in );
+
+    /* don't let 'work_loop' send a chapter mark upstream */
+    buf_in->new_chap  = 0;
+
+    return FILTER_OK;
+}
diff --git a/libhb/decsub.c b/libhb/decsub.c
new file mode 100644 (file)
index 0000000..98ffa1a
--- /dev/null
@@ -0,0 +1,556 @@
+/* $Id: decsub.c,v 1.12 2005/04/14 17:37:54 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+struct hb_work_private_s
+{
+    hb_job_t * job;
+
+    uint8_t    buf[0xFFFF];
+    int        size_sub;
+    int        size_got;
+    int        size_rle;
+    int64_t    pts;
+    int64_t    pts_start;
+    int64_t    pts_stop;
+    int        pts_forced;
+    int        x;
+    int        y;
+    int        width;
+    int        height;
+    int        stream_id;
+
+    int        offsets[2];
+    uint8_t    lum[4];
+    uint8_t    chromaU[4];
+    uint8_t    chromaV[4];
+    uint8_t    alpha[4];
+};
+
+static hb_buffer_t * Decode( hb_work_object_t * );
+
+int decsubInit( hb_work_object_t * w, hb_job_t * job )
+{
+    hb_work_private_t * pv;
+
+    pv              = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+
+    pv->job = job;
+    pv->pts = -1;
+
+    return 0;
+}
+
+int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * in = *buf_in;
+    int size_sub, size_rle;
+
+    if ( in->size <= 0 )
+    {
+        /* EOF on input stream - send it downstream & say that we're done */
+        *buf_out = in;
+        *buf_in = NULL;
+        return HB_WORK_DONE;
+    }
+
+    pv->stream_id = in->id;
+
+    size_sub = ( in->data[0] << 8 ) | in->data[1];
+    size_rle = ( in->data[2] << 8 ) | in->data[3];
+
+    if( !pv->size_sub )
+    {
+        /* We are looking for the start of a new subtitle */
+        if( size_sub && size_rle && size_sub > size_rle &&
+            in->size <= size_sub )
+        {
+            /* Looks all right so far */
+            pv->size_sub = size_sub;
+            pv->size_rle = size_rle;
+
+            memcpy( pv->buf, in->data, in->size );
+            pv->size_got = in->size;
+            pv->pts      = in->start;
+        }
+    }
+    else
+    {
+        /* We are waiting for the end of the current subtitle */
+        if( in->size <= pv->size_sub - pv->size_got )
+        {
+            memcpy( pv->buf + pv->size_got, in->data, in->size );
+            pv->size_got += in->size;
+            if( in->start >= 0 )
+            {
+                pv->pts = in->start;
+            }
+        }
+    }
+
+    *buf_out = NULL;
+
+    if( pv->size_sub && pv->size_sub == pv->size_got )
+    {
+        /* We got a complete subtitle, decode it */
+        *buf_out = Decode( w );
+
+        if( buf_out && *buf_out )
+        {
+            (*buf_out)->sequence = in->sequence;
+        }
+
+        /* Wait for the next one */
+        pv->size_sub = 0;
+        pv->size_got = 0;
+        pv->size_rle = 0;
+        pv->pts      = -1;
+    }
+
+    return HB_WORK_OK;
+}
+
+void decsubClose( hb_work_object_t * w )
+{
+    free( w->private_data );
+}
+
+hb_work_object_t hb_decsub =
+{
+    WORK_DECSUB,
+    "Subtitle decoder",
+    decsubInit,
+    decsubWork,
+    decsubClose
+};
+
+
+/***********************************************************************
+ * ParseControls
+ ***********************************************************************
+ * Get the start and end dates (relative to the PTS from the PES
+ * header), the width and height of the subpicture and the colors and
+ * alphas used in it
+ **********************************************************************/
+static void ParseControls( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_job_t * job = pv->job;
+    hb_title_t * title = job->title;
+    hb_subtitle_t * subtitle;
+
+    int i, n;
+    int command;
+    int date, next;
+
+    pv->pts_start = 0;
+    pv->pts_stop  = 0;
+    pv->pts_forced  = 0;
+
+    pv->alpha[3] = 0;
+    pv->alpha[2] = 0;
+    pv->alpha[1] = 0;
+    pv->alpha[0] = 0;
+
+    for( i = pv->size_rle; ; )
+    {
+        date = ( pv->buf[i] << 8 ) | pv->buf[i+1]; i += 2;
+        next = ( pv->buf[i] << 8 ) | pv->buf[i+1]; i += 2;
+
+        for( ;; )
+        {
+            command = pv->buf[i++];
+
+            /*
+             * There are eight commands available for
+             * Sub-Pictures. The first SP_DCSQ should contain, as a
+             * minimum, SET_COLOR, SET_CONTR, SET_DAREA, and
+             * SET_DSPXA
+             */
+
+            if( command == 0xFF ) // 0xFF - CMD_END - ends one SP_DCSQ
+            {
+                break;
+            }
+
+            switch( command )
+            {
+                case 0x00: // 0x00 - FSTA_DSP - Forced Start Display, no arguments
+                    pv->pts_start = pv->pts + date * 900;
+                    pv->pts_forced = 1;
+
+                    /*
+                     * If we are doing a subtitle scan then note down
+                     */
+                    if( job->indepth_scan )
+                    {
+                        for( n=0; n < hb_list_count(title->list_subtitle); n++ )
+                        {
+                            subtitle = hb_list_item( title->list_subtitle, n);
+                            if( pv->stream_id == subtitle->id ) {
+                                /*
+                                 * A hit, count it.
+                                 */
+                                subtitle->forced_hits++;
+                            }
+                        }
+                    }
+                    break;
+
+                case 0x01: // 0x01 - STA_DSP - Start Display, no arguments
+                    pv->pts_start = pv->pts + date * 900;
+                    pv->pts_forced  = 0;
+                    break;
+
+                case 0x02: // 0x02 - STP_DSP - Stop Display, no arguments
+                    if(!pv->pts_stop)
+                        pv->pts_stop = pv->pts + date * 900;
+                    break;
+
+                case 0x03: // 0x03 - SET_COLOR - Set Colour indices
+                {
+                    /*
+                     * SET_COLOR - provides four indices into the CLUT
+                     * for the current PGC to associate with the four
+                     * pixel values
+                     */
+                    int colors[4];
+                    int j;
+
+                    colors[0] = (pv->buf[i+0]>>4)&0x0f;
+                    colors[1] = (pv->buf[i+0])&0x0f;
+                    colors[2] = (pv->buf[i+1]>>4)&0x0f;
+                    colors[3] = (pv->buf[i+1])&0x0f;
+
+                    for( j = 0; j < 4; j++ )
+                    {
+                        /*
+                         * Not sure what is happening here, in theory
+                         * the palette is in YCbCr. And we want YUV.
+                         *
+                         * However it looks more like YCrCb (according
+                         * to pgcedit). And the scalers for YCrCb don't
+                         * work, but I get the right colours by doing
+                         * no conversion.
+                         */
+                        uint32_t color = title->palette[colors[j]];
+                        uint8_t Cr, Cb, y;
+                        y = (color>>16) & 0xff;
+                        Cr = (color>>8) & 0xff;
+                        Cb = (color) & 0xff;
+                        pv->lum[3-j] = y;
+                        pv->chromaU[3-j] = Cb;
+                        pv->chromaV[3-j] = Cr;
+                        /* hb_log("color[%d] y = %d, u = %d, v = %d",
+                               3-j,
+                               pv->lum[3-j],
+                               pv->chromaU[3-j],
+                               pv->chromaV[3-j]);
+                        */
+                    }
+                    i += 2;
+                    break;
+                }
+                case 0x04: // 0x04 - SET_CONTR - Set Contrast
+                {
+                    /*
+                     * SET_CONTR - directly provides the four contrast
+                     * (alpha blend) values to associate with the four
+                     * pixel values
+                     */
+                    uint8_t    alpha[4];
+
+                    alpha[3] = (pv->buf[i+0]>>4)&0x0f;
+                    alpha[2] = (pv->buf[i+0])&0x0f;
+                    alpha[1] = (pv->buf[i+1]>>4)&0x0f;
+                    alpha[0] = (pv->buf[i+1])&0x0f;
+
+
+                    int lastAlpha = pv->alpha[3] + pv->alpha[2] + pv->alpha[1] + pv->alpha[0];
+                    int currAlpha = alpha[3] + alpha[2] + alpha[1] + alpha[0];
+
+                    // fading-in, save the highest alpha value
+                    if( currAlpha > lastAlpha )
+                    {
+                        pv->alpha[3] = alpha[3];
+                        pv->alpha[2] = alpha[2];
+                        pv->alpha[1] = alpha[1];
+                        pv->alpha[0] = alpha[0];
+                    }
+
+                    // fading-out
+                    if( currAlpha < lastAlpha && !pv->pts_stop )
+                    {
+                        pv->pts_stop = pv->pts + date * 900;
+                    }
+
+                    i += 2;
+                    break;
+                }
+                case 0x05: // 0x05 - SET_DAREA - defines the display area
+                {
+                    pv->x     = (pv->buf[i+0]<<4) | ((pv->buf[i+1]>>4)&0x0f);
+                    pv->width = (((pv->buf[i+1]&0x0f)<<8)| pv->buf[i+2]) - pv->x + 1;
+                    pv->y     = (pv->buf[i+3]<<4)| ((pv->buf[i+4]>>4)&0x0f);
+                    pv->height = (((pv->buf[i+4]&0x0f)<<8)| pv->buf[i+5]) - pv->y + 1;
+                    i += 6;
+                    break;
+                }
+                case 0x06: // 0x06 - SET_DSPXA - defines the pixel data addresses
+                {
+                    pv->offsets[0] = ( pv->buf[i] << 8 ) | pv->buf[i+1]; i += 2;
+                    pv->offsets[1] = ( pv->buf[i] << 8 ) | pv->buf[i+1]; i += 2;
+                    break;
+                }
+            }
+        }
+
+
+
+        if( i > next )
+        {
+            break;
+        }
+        i = next;
+    }
+
+    if( !pv->pts_stop )
+    {
+        /* Show it for 3 seconds */
+        pv->pts_stop = pv->pts_start + 3 * 90000;
+    }
+}
+
+/***********************************************************************
+ * CropSubtitle
+ ***********************************************************************
+ * Given a raw decoded subtitle, detects transparent borders and
+ * returns a cropped subtitle in a hb_buffer_t ready to be used by
+ * the renderer, or NULL if the subtitle was completely transparent
+ **********************************************************************/
+static int LineIsTransparent( hb_work_object_t * w, uint8_t * p )
+{
+    hb_work_private_t * pv = w->private_data;
+    int i;
+    for( i = 0; i < pv->width; i++ )
+    {
+        if( p[i] )
+        {
+            return 0;
+        }
+    }
+    return 1;
+}
+static int ColumnIsTransparent( hb_work_object_t * w, uint8_t * p )
+{
+    hb_work_private_t * pv = w->private_data;
+    int i;
+    for( i = 0; i < pv->height; i++ )
+    {
+        if( p[i*pv->width] )
+        {
+            return 0;
+        }
+    }
+    return 1;
+}
+static hb_buffer_t * CropSubtitle( hb_work_object_t * w, uint8_t * raw )
+{
+    hb_work_private_t * pv = w->private_data;
+    int i;
+    int crop[4] = { -1,-1,-1,-1 };
+    uint8_t * alpha;
+    int realwidth, realheight;
+    hb_buffer_t * buf;
+    uint8_t * lum_in, * lum_out, * alpha_in, * alpha_out;
+    uint8_t * u_in, * u_out, * v_in, * v_out;
+
+    alpha = raw + pv->width * pv->height;
+
+    /* Top */
+    for( i = 0; i < pv->height; i++ )
+    {
+        if( !LineIsTransparent( w, &alpha[i*pv->width] ) )
+        {
+            crop[0] = i;
+            break;
+        }
+    }
+
+    if( crop[0] < 0 )
+    {
+        /* Empty subtitle */
+        return NULL;
+    }
+
+    /* Bottom */
+    for( i = pv->height - 1; i >= 0; i-- )
+    {
+        if( !LineIsTransparent( w, &alpha[i*pv->width] ) )
+        {
+            crop[1] = i;
+            break;
+        }
+    }
+
+    /* Left */
+    for( i = 0; i < pv->width; i++ )
+    {
+        if( !ColumnIsTransparent( w, &alpha[i] ) )
+        {
+            crop[2] = i;
+            break;
+        }
+    }
+
+    /* Right */
+    for( i = pv->width - 1; i >= 0; i-- )
+    {
+        if( !ColumnIsTransparent( w, &alpha[i] ) )
+        {
+            crop[3] = i;
+            break;
+        }
+    }
+
+    realwidth  = crop[3] - crop[2] + 1;
+    realheight = crop[1] - crop[0] + 1;
+
+    buf         = hb_buffer_init( realwidth * realheight * 4 );
+    buf->start  = pv->pts_start;
+    buf->stop   = pv->pts_stop;
+    buf->x      = pv->x + crop[2];
+    buf->y      = pv->y + crop[0];
+    buf->width  = realwidth;
+    buf->height = realheight;
+
+    lum_in    = raw + crop[0] * pv->width + crop[2];
+    alpha_in  = lum_in + pv->width * pv->height;
+    u_in      = alpha_in + pv->width * pv->height;
+    v_in      = u_in + pv->width * pv->height;
+
+    lum_out   = buf->data;
+    alpha_out = lum_out + realwidth * realheight;
+    u_out     = alpha_out + realwidth * realheight;
+    v_out     = u_out + realwidth * realheight;
+
+    for( i = 0; i < realheight; i++ )
+    {
+        memcpy( lum_out, lum_in, realwidth );
+        memcpy( alpha_out, alpha_in, realwidth );
+        memcpy( u_out, u_in, realwidth );
+        memcpy( v_out, v_in, realwidth );
+
+        lum_in    += pv->width;
+        alpha_in  += pv->width;
+        u_in      += pv->width;
+        v_in      += pv->width;
+
+        lum_out   += realwidth;
+        alpha_out += realwidth;
+        u_out     += realwidth;
+        v_out     += realwidth;
+    }
+
+    return buf;
+}
+
+static hb_buffer_t * Decode( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    int code, line, col;
+    int offsets[2];
+    int * offset;
+    hb_buffer_t * buf;
+    uint8_t * buf_raw = NULL;
+    hb_job_t * job = pv->job;
+
+    /* Get infos about the subtitle */
+    ParseControls( w );
+
+    if( job->indepth_scan || ( job->subtitle_force && pv->pts_forced == 0 ) )
+    {
+        /*
+         * Don't encode subtitles when doing a scan.
+         *
+         * When forcing subtitles, ignore all those that don't
+         * have the forced flag set.
+         */
+        return NULL;
+    }
+
+    /* Do the actual decoding now */
+    buf_raw = malloc( ( pv->width * pv->height ) * 4 );
+
+#define GET_NEXT_NIBBLE code = ( code << 4 ) | ( ( ( *offset & 1 ) ? \
+( pv->buf[((*offset)>>1)] & 0xF ) : ( pv->buf[((*offset)>>1)] >> 4 ) ) ); \
+(*offset)++
+
+    offsets[0] = pv->offsets[0] * 2;
+    offsets[1] = pv->offsets[1] * 2;
+
+    for( line = 0; line < pv->height; line++ )
+    {
+        /* Select even or odd field */
+        offset = ( line & 1 ) ? &offsets[1] : &offsets[0];
+
+        for( col = 0; col < pv->width; col += code >> 2 )
+        {
+            uint8_t * lum, * alpha,  * chromaU, * chromaV;
+
+            code = 0;
+            GET_NEXT_NIBBLE;
+            if( code < 0x4 )
+            {
+                GET_NEXT_NIBBLE;
+                if( code < 0x10 )
+                {
+                    GET_NEXT_NIBBLE;
+                    if( code < 0x40 )
+                    {
+                        GET_NEXT_NIBBLE;
+                        if( code < 0x100 )
+                        {
+                            /* End of line */
+                            code |= ( pv->width - col ) << 2;
+                        }
+                    }
+                }
+            }
+
+            lum   = buf_raw;
+            alpha = lum + pv->width * pv->height;
+            chromaU = alpha + pv->width * pv->height;
+            chromaV = chromaU + pv->width * pv->height;
+
+            memset( lum + line * pv->width + col,
+                    pv->lum[code & 3], code >> 2 );
+            memset( alpha + line * pv->width + col,
+                    pv->alpha[code & 3], code >> 2 );
+            memset( chromaU + line * pv->width + col,
+                    pv->chromaU[code & 3], code >> 2 );
+            memset( chromaV + line * pv->width + col,
+                    pv->chromaV[code & 3], code >> 2 );
+        }
+
+        /* Byte-align */
+        if( *offset & 1 )
+        {
+            (*offset)++;
+        }
+    }
+
+    /* Crop subtitle (remove transparent borders) */
+    buf = CropSubtitle( w, buf_raw );
+
+    free( buf_raw );
+
+    return buf;
+}
diff --git a/libhb/deinterlace.c b/libhb/deinterlace.c
new file mode 100644 (file)
index 0000000..b6b10fe
--- /dev/null
@@ -0,0 +1,842 @@
+/*
+ Copyright (C) 2006 Michael Niedermayer <michaelni@gmx.at>
+
+ 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 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 St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#include "hb.h"
+#include "libavcodec/avcodec.h"
+#include "mpeg2dec/mpeg2.h"
+
+#define SUPPRESS_AV_LOG
+
+#define YADIF_MODE_DEFAULT     -1
+#define YADIF_PARITY_DEFAULT   -1
+
+#define MCDEINT_MODE_DEFAULT   -1
+#define MCDEINT_QP_DEFAULT      1
+
+#define ABS(a) ((a) > 0 ? (a) : (-(a)))
+#define MIN3(a,b,c) MIN(MIN(a,b),c)
+#define MAX3(a,b,c) MAX(MAX(a,b),c)
+
+typedef struct yadif_arguments_s {
+    uint8_t **dst;
+    int parity;
+    int tff;
+    int stop;
+} yadif_arguments_t;
+
+struct hb_filter_private_s
+{
+    int              pix_fmt;
+    int              width[3];
+    int              height[3];
+
+    int              yadif_mode;
+    int              yadif_parity;
+    int              yadif_ready;
+
+    uint8_t        * yadif_ref[4][3];
+    int              yadif_ref_stride[3];
+
+    int              cpu_count;
+
+    hb_thread_t    ** yadif_threads;        // Threads for Yadif - one per CPU
+    hb_lock_t      ** yadif_begin_lock;     // Thread has work
+    hb_lock_t      ** yadif_complete_lock;  // Thread has completed work
+    yadif_arguments_t *yadif_arguments;     // Arguments to thread for work
+
+    int              mcdeint_mode;
+    int              mcdeint_qp;
+
+    int              mcdeint_outbuf_size;
+    uint8_t        * mcdeint_outbuf;
+    AVCodecContext * mcdeint_avctx_enc;
+    AVFrame        * mcdeint_frame;
+    AVFrame        * mcdeint_frame_dec;
+
+    AVPicture        pic_in;
+    AVPicture        pic_out;
+    hb_buffer_t *    buf_out[2];
+    hb_buffer_t *    buf_settings;
+};
+
+hb_filter_private_t * hb_deinterlace_init( int pix_fmt,
+                                           int width,
+                                           int height,
+                                           char * settings );
+
+int hb_deinterlace_work( hb_buffer_t * buf_in,
+                         hb_buffer_t ** buf_out,
+                         int pix_fmt,
+                         int width,
+                         int height,
+                         hb_filter_private_t * pv );
+
+void hb_deinterlace_close( hb_filter_private_t * pv );
+
+hb_filter_object_t hb_filter_deinterlace =
+{
+    FILTER_DEINTERLACE,
+    "Deinterlace (ffmpeg or yadif/mcdeint)",
+    NULL,
+    hb_deinterlace_init,
+    hb_deinterlace_work,
+    hb_deinterlace_close,
+};
+
+
+static void yadif_store_ref( const uint8_t ** pic,
+                             hb_filter_private_t * pv )
+{
+    memcpy( pv->yadif_ref[3],
+            pv->yadif_ref[0],
+            sizeof(uint8_t *)*3 );
+
+    memmove( pv->yadif_ref[0],
+             pv->yadif_ref[1],
+             sizeof(uint8_t *)*3*3 );
+
+    int i;
+    for( i = 0; i < 3; i++ )
+    {
+        const uint8_t * src = pic[i];
+        uint8_t * ref = pv->yadif_ref[2][i];
+
+        int w = pv->width[i];
+        int ref_stride = pv->yadif_ref_stride[i];
+
+        int y;
+        for( y = 0; y < pv->height[i]; y++ )
+        {
+            memcpy(ref, src, w);
+            src = (uint8_t*)src + w;
+            ref = (uint8_t*)ref + ref_stride;
+        }
+    }
+}
+
+static void yadif_filter_line( uint8_t *dst,
+                               uint8_t *prev,
+                               uint8_t *cur,
+                               uint8_t *next,
+                               int plane,
+                               int parity,
+                               hb_filter_private_t * pv )
+{
+    uint8_t *prev2 = parity ? prev : cur ;
+    uint8_t *next2 = parity ? cur  : next;
+
+    int w = pv->width[plane];
+    int refs = pv->yadif_ref_stride[plane];
+
+    int x;
+    for( x = 0; x < w; x++)
+    {
+        int c              = cur[-refs];
+        int d              = (prev2[0] + next2[0])>>1;
+        int e              = cur[+refs];
+        int temporal_diff0 = ABS(prev2[0] - next2[0]);
+        int temporal_diff1 = ( ABS(prev[-refs] - c) + ABS(prev[+refs] - e) ) >> 1;
+        int temporal_diff2 = ( ABS(next[-refs] - c) + ABS(next[+refs] - e) ) >> 1;
+        int diff           = MAX3(temporal_diff0>>1, temporal_diff1, temporal_diff2);
+        int spatial_pred   = (c+e)>>1;
+        int spatial_score  = ABS(cur[-refs-1] - cur[+refs-1]) + ABS(c-e) +
+                             ABS(cur[-refs+1] - cur[+refs+1]) - 1;
+
+#define YADIF_CHECK(j)\
+        {   int score = ABS(cur[-refs-1+j] - cur[+refs-1-j])\
+                      + ABS(cur[-refs  +j] - cur[+refs  -j])\
+                      + ABS(cur[-refs+1+j] - cur[+refs+1-j]);\
+            if( score < spatial_score ){\
+                spatial_score = score;\
+                spatial_pred  = (cur[-refs  +j] + cur[+refs  -j])>>1;\
+
+        YADIF_CHECK(-1) YADIF_CHECK(-2) }} }}
+        YADIF_CHECK( 1) YADIF_CHECK( 2) }} }}
+
+        if( pv->yadif_mode < 2 )
+        {
+            int b = (prev2[-2*refs] + next2[-2*refs])>>1;
+            int f = (prev2[+2*refs] + next2[+2*refs])>>1;
+
+            int max = MAX3(d-e, d-c, MIN(b-c, f-e));
+            int min = MIN3(d-e, d-c, MAX(b-c, f-e));
+
+            diff = MAX3( diff, min, -max );
+        }
+
+        if( spatial_pred > d + diff )
+        {
+            spatial_pred = d + diff;
+        }
+        else if( spatial_pred < d - diff )
+        {
+            spatial_pred = d - diff;
+        }
+
+        dst[0] = spatial_pred;
+
+        dst++;
+        cur++;
+        prev++;
+        next++;
+        prev2++;
+        next2++;
+    }
+}
+
+typedef struct yadif_thread_arg_s {
+    hb_filter_private_t *pv;
+    int segment;
+} yadif_thread_arg_t;
+
+/*
+ * deinterlace this segment of all three planes in a single thread.
+ */
+void yadif_filter_thread( void *thread_args_v )
+{
+    yadif_arguments_t *yadif_work = NULL;
+    hb_filter_private_t * pv;
+    int run = 1;
+    int plane;
+    int segment, segment_start, segment_stop;
+    yadif_thread_arg_t *thread_args = thread_args_v;
+    uint8_t **dst;
+    int parity, tff, y, w, h, ref_stride, penultimate, ultimate;
+
+
+    pv = thread_args->pv;
+    segment = thread_args->segment;
+
+    hb_log("Yadif Deinterlace thread started for segment %d", segment);
+
+    while( run )
+    {
+        /*
+         * Wait here until there is work to do. hb_lock() blocks until
+         * render releases it to say that there is more work to do.
+         */
+        hb_lock( pv->yadif_begin_lock[segment] );
+
+        yadif_work = &pv->yadif_arguments[segment];
+
+        if( yadif_work->stop )
+        {
+            /*
+             * No more work to do, exit this thread.
+             */
+            run = 0;
+            continue;
+        } 
+
+        if( yadif_work->dst == NULL )
+        {
+            hb_error( "Thread started when no work available" );
+            hb_snooze(500);
+            continue;
+        }
+        
+        /*
+         * Process all three planes, but only this segment of it.
+         */
+        for( plane = 0; plane < 3; plane++)
+        {
+
+            dst = yadif_work->dst;
+            parity = yadif_work->parity;
+            tff = yadif_work->tff;
+            w = pv->width[plane];
+            h = pv->height[plane];
+            penultimate = h -2;
+            ultimate = h - 1;
+            ref_stride = pv->yadif_ref_stride[plane];
+            segment_start = ( h / pv->cpu_count ) * segment;
+            if( segment == pv->cpu_count - 1 )
+            {
+                /*
+                 * Final segment
+                 */
+                segment_stop = h;
+            } else {
+                segment_stop = ( h / pv->cpu_count ) * ( segment + 1 );
+            }
+
+            for( y = segment_start; y < segment_stop; y++ )
+            {
+                if( ( ( y ^ parity ) &  1 ) )
+                {
+                    /* This is the bottom field when TFF and vice-versa.
+                       It's the field that gets filtered. Because yadif
+                       needs 2 lines above and below the one being filtered,
+                       we need to mirror the edges. When TFF, this means
+                       replacing the 2nd line with a copy of the 1st,
+                       and the last with the second-to-last.                  */
+                    if( y > 1 && y < ( h -2 ) )
+                    {
+                        /* This isn't the top or bottom, proceed as normal to yadif. */
+                        uint8_t *prev = &pv->yadif_ref[0][plane][y*ref_stride];
+                        uint8_t *cur  = &pv->yadif_ref[1][plane][y*ref_stride];
+                        uint8_t *next = &pv->yadif_ref[2][plane][y*ref_stride];
+                        uint8_t *dst2 = &dst[plane][y*w];
+
+                        yadif_filter_line( dst2, 
+                                           prev, 
+                                           cur, 
+                                           next, 
+                                           plane, 
+                                           parity ^ tff, 
+                                           pv );
+                    }
+                    else if( y == 0 )
+                    {
+                        /* BFF, so y0 = y1 */
+                        memcpy( &dst[plane][y*w],
+                                &pv->yadif_ref[1][plane][1*ref_stride],
+                                w * sizeof(uint8_t) );
+                    }
+                    else if( y == 1 )
+                    {
+                        /* TFF, so y1 = y0 */
+                        memcpy( &dst[plane][y*w],
+                                &pv->yadif_ref[1][plane][0],
+                                w * sizeof(uint8_t) );
+                    }
+                    else if( y == penultimate )
+                    {
+                        /* BFF, so penultimate y = ultimate y */
+                        memcpy( &dst[plane][y*w],
+                                &pv->yadif_ref[1][plane][ultimate*ref_stride],
+                                w * sizeof(uint8_t) );
+                    }
+                    else if( y == ultimate )
+                    {
+                        /* TFF, so ultimate y = penultimate y */
+                        memcpy( &dst[plane][y*w],
+                                &pv->yadif_ref[1][plane][penultimate*ref_stride],
+                                w * sizeof(uint8_t) );
+                    }
+                }
+                else
+                {
+                    /* Preserve this field unfiltered */
+                    memcpy( &dst[plane][y*w],
+                            &pv->yadif_ref[1][plane][y*ref_stride],
+                            w * sizeof(uint8_t) );
+                }
+            }
+        }
+        /*
+         * Finished this segment, let everyone know.
+         */
+        hb_unlock( pv->yadif_complete_lock[segment] );
+    }
+    free( thread_args_v );
+}
+
+
+/*
+ * threaded yadif - each thread deinterlaces a single segment of all
+ * three planes. Where a segment is defined as the frame divided by
+ * the number of CPUs.
+ *
+ * This function blocks until the frame is deinterlaced.
+ */
+static void yadif_filter( uint8_t ** dst,
+                          int parity,
+                          int tff,
+                          hb_filter_private_t * pv )
+{
+
+    int segment;
+
+    for( segment = 0; segment < pv->cpu_count; segment++ )
+    {  
+        /*
+         * Setup the work for this plane.
+         */
+        pv->yadif_arguments[segment].parity = parity;
+        pv->yadif_arguments[segment].tff = tff;
+        pv->yadif_arguments[segment].dst = dst;
+
+        /*
+         * Let the thread for this plane know that we've setup work 
+         * for it by releasing the begin lock (ensuring that the
+         * complete lock is already locked so that we block when
+         * we try to lock it again below).
+         */
+        hb_lock( pv->yadif_complete_lock[segment] );
+        hb_unlock( pv->yadif_begin_lock[segment] );
+    }
+
+    /*
+     * Wait until all three threads have completed by trying to get
+     * the complete lock that we locked earlier for each thread, which
+     * will block until that thread has completed the work on that
+     * plane.
+     */
+    for( segment = 0; segment < pv->cpu_count; segment++ )
+    {
+        hb_lock( pv->yadif_complete_lock[segment] );
+        hb_unlock( pv->yadif_complete_lock[segment] );
+    }
+
+    /*
+     * Entire frame is now deinterlaced.
+     */
+}
+
+static void mcdeint_filter( uint8_t ** dst,
+                            uint8_t ** src,
+                            int parity,
+                            hb_filter_private_t * pv )
+{
+    int x, y, i;
+    int out_size;
+
+#ifdef SUPPRESS_AV_LOG
+    /* TODO: temporarily change log level to suppress obnoxious debug output */
+    int loglevel = av_log_get_level();
+    av_log_set_level( AV_LOG_QUIET );
+#endif
+
+    for( i=0; i<3; i++ )
+    {
+        pv->mcdeint_frame->data[i] = src[i];
+        pv->mcdeint_frame->linesize[i] = pv->width[i];
+    }
+    pv->mcdeint_avctx_enc->me_cmp     = FF_CMP_SAD;
+    pv->mcdeint_avctx_enc->me_sub_cmp = FF_CMP_SAD;
+    pv->mcdeint_frame->quality        = pv->mcdeint_qp * FF_QP2LAMBDA;
+
+    out_size = avcodec_encode_video( pv->mcdeint_avctx_enc,
+                                     pv->mcdeint_outbuf,
+                                     pv->mcdeint_outbuf_size,
+                                     pv->mcdeint_frame );
+
+    pv->mcdeint_frame_dec = pv->mcdeint_avctx_enc->coded_frame;
+
+    for( i = 0; i < 3; i++ )
+    {
+        int w    = pv->width[i];
+        int h    = pv->height[i];
+        int fils = pv->mcdeint_frame_dec->linesize[i];
+        int srcs = pv->width[i];
+
+        for( y = 0; y < h; y++ )
+        {
+            if( (y ^ parity) & 1 )
+            {
+                for( x = 0; x < w; x++ )
+                {
+                    if( (x-2)+(y-1)*w >= 0 && (x+2)+(y+1)*w < w*h )
+                    {
+                        uint8_t * filp =
+                            &pv->mcdeint_frame_dec->data[i][x + y*fils];
+                        uint8_t * srcp = &src[i][x + y*srcs];
+
+                        int diff0 = filp[-fils] - srcp[-srcs];
+                        int diff1 = filp[+fils] - srcp[+srcs];
+
+                        int spatial_score =
+                              ABS(srcp[-srcs-1] - srcp[+srcs-1])
+                            + ABS(srcp[-srcs  ] - srcp[+srcs  ])
+                            + ABS(srcp[-srcs+1] - srcp[+srcs+1]) - 1;
+
+                        int temp = filp[0];
+
+#define MCDEINT_CHECK(j)\
+                        {   int score = ABS(srcp[-srcs-1+j] - srcp[+srcs-1-j])\
+                                      + ABS(srcp[-srcs  +j] - srcp[+srcs  -j])\
+                                      + ABS(srcp[-srcs+1+j] - srcp[+srcs+1-j]);\
+                            if( score < spatial_score ) {\
+                                spatial_score = score;\
+                                diff0 = filp[-fils+j] - srcp[-srcs+j];\
+                                diff1 = filp[+fils-j] - srcp[+srcs-j];
+
+                        MCDEINT_CHECK(-1) MCDEINT_CHECK(-2) }} }}
+                        MCDEINT_CHECK( 1) MCDEINT_CHECK( 2) }} }}
+
+                        if(diff0 + diff1 > 0)
+                        {
+                            temp -= (diff0 + diff1 -
+                                     ABS( ABS(diff0) - ABS(diff1) ) / 2) / 2;
+                        }
+                        else
+                        {
+                            temp -= (diff0 + diff1 +
+                                     ABS( ABS(diff0) - ABS(diff1) ) / 2) / 2;
+                        }
+
+                        filp[0] = dst[i][x + y*w] =
+                            temp > 255U ? ~(temp>>31) : temp;
+                    }
+                    else
+                    {
+                        dst[i][x + y*w] =
+                            pv->mcdeint_frame_dec->data[i][x + y*fils];
+                    }
+                }
+            }
+        }
+
+        for( y = 0; y < h; y++ )
+        {
+            if( !((y ^ parity) & 1) )
+            {
+                for( x = 0; x < w; x++ )
+                {
+                    pv->mcdeint_frame_dec->data[i][x + y*fils] =
+                        dst[i][x + y*w]= src[i][x + y*srcs];
+                }
+            }
+        }
+    }
+
+#ifdef SUPPRESS_AV_LOG
+    /* TODO: restore previous log level */
+    av_log_set_level(loglevel);
+#endif
+}
+
+hb_filter_private_t * hb_deinterlace_init( int pix_fmt,
+                                           int width,
+                                           int height,
+                                           char * settings )
+{
+    if( pix_fmt != PIX_FMT_YUV420P )
+    {
+        return 0;
+    }
+
+    hb_filter_private_t * pv = calloc( 1, sizeof(struct hb_filter_private_s) );
+
+    pv->pix_fmt = pix_fmt;
+
+    pv->width[0]  = width;
+    pv->height[0] = height;
+    pv->width[1]  = pv->width[2]  = width >> 1;
+    pv->height[1] = pv->height[2] = height >> 1;
+
+    pv->buf_out[0] = hb_video_buffer_init( width, height );
+    pv->buf_out[1] = hb_video_buffer_init( width, height );
+    pv->buf_settings = hb_buffer_init( 0 );
+
+    pv->yadif_ready    = 0;
+    pv->yadif_mode     = YADIF_MODE_DEFAULT;
+    pv->yadif_parity   = YADIF_PARITY_DEFAULT;
+
+    pv->mcdeint_mode   = MCDEINT_MODE_DEFAULT;
+    pv->mcdeint_qp     = MCDEINT_QP_DEFAULT;
+
+    if( settings )
+    {
+        sscanf( settings, "%d:%d:%d:%d",
+                &pv->yadif_mode,
+                &pv->yadif_parity,
+                &pv->mcdeint_mode,
+                &pv->mcdeint_qp );
+    }
+
+    pv->cpu_count = hb_get_cpu_count();
+
+    /* Allocate yadif specific buffers */
+    if( pv->yadif_mode >= 0 )
+    {
+        int i, j;
+        for( i = 0; i < 3; i++ )
+        {
+            int is_chroma = !!i;
+            int w = ((width   + 31) & (~31))>>is_chroma;
+            int h = ((height+6+ 31) & (~31))>>is_chroma;
+
+            pv->yadif_ref_stride[i] = w;
+
+            for( j = 0; j < 3; j++ )
+            {
+                pv->yadif_ref[j][i] = malloc( w*h*sizeof(uint8_t) ) + 3*w;
+            }
+        }
+
+        /*
+         * Create yadif threads and locks.
+         */
+        pv->yadif_threads = malloc( sizeof( hb_thread_t* ) * pv->cpu_count );
+        pv->yadif_begin_lock = malloc( sizeof( hb_lock_t * ) * pv->cpu_count );
+        pv->yadif_complete_lock = malloc( sizeof( hb_lock_t * ) * pv->cpu_count );
+        pv->yadif_arguments = malloc( sizeof( yadif_arguments_t ) * pv->cpu_count );
+
+        for( i = 0; i < pv->cpu_count; i++ )
+        {
+            yadif_thread_arg_t *thread_args;
+
+            thread_args = malloc( sizeof( yadif_thread_arg_t ) );
+
+            if( thread_args ) {
+                thread_args->pv = pv;
+                thread_args->segment = i;
+
+                pv->yadif_begin_lock[i] = hb_lock_init();
+                pv->yadif_complete_lock[i] = hb_lock_init();
+
+                /*
+                 * Important to start off with the threads locked waiting
+                 * on input.
+                 */
+                hb_lock( pv->yadif_begin_lock[i] );
+
+                pv->yadif_arguments[i].stop = 0;
+                pv->yadif_arguments[i].dst = NULL;
+                
+                pv->yadif_threads[i] = hb_thread_init( "yadif_filter_segment",
+                                                       yadif_filter_thread,
+                                                       thread_args,
+                                                       HB_NORMAL_PRIORITY );
+            } else {
+                hb_error( "Yadif could not create threads" );
+            }
+        }
+    }
+
+    /* Allocate mcdeint specific buffers */
+    if( pv->mcdeint_mode >= 0 )
+    {
+        avcodec_init();
+        avcodec_register_all();
+
+        AVCodec * enc = avcodec_find_encoder( CODEC_ID_SNOW );
+
+        int i;
+        for (i = 0; i < 3; i++ )
+        {
+            AVCodecContext * avctx_enc;
+
+            avctx_enc = pv->mcdeint_avctx_enc = avcodec_alloc_context();
+
+            avctx_enc->width                    = width;
+            avctx_enc->height                   = height;
+            avctx_enc->time_base                = (AVRational){1,25};  // meaningless
+            avctx_enc->gop_size                 = 300;
+            avctx_enc->max_b_frames             = 0;
+            avctx_enc->pix_fmt                  = PIX_FMT_YUV420P;
+            avctx_enc->flags                    = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY;
+            avctx_enc->strict_std_compliance    = FF_COMPLIANCE_EXPERIMENTAL;
+            avctx_enc->global_quality           = 1;
+            avctx_enc->flags2                   = CODEC_FLAG2_MEMC_ONLY;
+            avctx_enc->me_cmp                   = FF_CMP_SAD; //SSE;
+            avctx_enc->me_sub_cmp               = FF_CMP_SAD; //SSE;
+            avctx_enc->mb_cmp                   = FF_CMP_SSE;
+
+            switch( pv->mcdeint_mode )
+            {
+                case 3:
+                    avctx_enc->refs = 3;
+                case 2:
+                    avctx_enc->me_method = ME_UMH;
+                case 1:
+                    avctx_enc->flags |= CODEC_FLAG_4MV;
+                    avctx_enc->dia_size =2;
+                case 0:
+                    avctx_enc->flags |= CODEC_FLAG_QPEL;
+            }
+
+            avcodec_open(avctx_enc, enc);
+        }
+
+        pv->mcdeint_frame       = avcodec_alloc_frame();
+        pv->mcdeint_outbuf_size = width * height * 10;
+        pv->mcdeint_outbuf      = malloc( pv->mcdeint_outbuf_size );
+    }
+
+    return pv;
+}
+
+void hb_deinterlace_close( hb_filter_private_t * pv )
+{
+    if( !pv )
+    {
+        return;
+    }
+
+    /* Cleanup frame buffers */
+    if( pv->buf_out[0] )
+    {
+        hb_buffer_close( &pv->buf_out[0] );
+    }
+    if( pv->buf_out[1] )
+    {
+        hb_buffer_close( &pv->buf_out[1] );
+    }
+    if (pv->buf_settings )
+    {
+        hb_buffer_close( &pv->buf_settings );
+    }
+
+    /* Cleanup yadif specific buffers */
+    if( pv->yadif_mode >= 0 )
+    {
+        int i;
+        for( i = 0; i<3*3; i++ )
+        {
+            uint8_t **p = &pv->yadif_ref[i%3][i/3];
+            if (*p)
+            {
+                free( *p - 3*pv->yadif_ref_stride[i/3] );
+                *p = NULL;
+            }
+        }
+
+        for( i = 0; i < pv->cpu_count; i++)
+        {
+            /*
+             * Tell each yadif thread to stop, and then cleanup.
+             */
+            pv->yadif_arguments[i].stop = 1;
+            hb_unlock(  pv->yadif_begin_lock[i] );
+
+            hb_thread_close( &pv->yadif_threads[i] );
+            hb_lock_close( &pv->yadif_begin_lock[i] );
+            hb_lock_close( &pv->yadif_complete_lock[i] );
+        }
+        
+        /*
+         * free memory for yadif structs
+         */
+        free( pv->yadif_threads );
+        free( pv->yadif_begin_lock );
+        free( pv->yadif_complete_lock );
+        free( pv->yadif_arguments );
+    }
+
+    /* Cleanup mcdeint specific buffers */
+    if( pv->mcdeint_mode >= 0 )
+    {
+        if( pv->mcdeint_avctx_enc )
+        {
+            avcodec_close( pv->mcdeint_avctx_enc );
+            av_freep( &pv->mcdeint_avctx_enc );
+        }
+        if( pv->mcdeint_outbuf )
+        {
+            free( pv->mcdeint_outbuf );
+        }
+    }
+
+    free( pv );
+}
+
+int hb_deinterlace_work( hb_buffer_t * buf_in,
+                         hb_buffer_t ** buf_out,
+                         int pix_fmt,
+                         int width,
+                         int height,
+                         hb_filter_private_t * pv )
+{
+    if( !pv ||
+        pix_fmt != pv->pix_fmt ||
+        width   != pv->width[0] ||
+        height  != pv->height[0] )
+    {
+        return FILTER_FAILED;
+    }
+
+    avpicture_fill( &pv->pic_in, buf_in->data,
+                    pix_fmt, width, height );
+
+    /* Use libavcodec deinterlace if yadif_mode < 0 */
+    if( pv->yadif_mode < 0 )
+    {
+        avpicture_fill( &pv->pic_out, pv->buf_out[0]->data,
+                        pix_fmt, width, height );
+
+        avpicture_deinterlace( &pv->pic_out, &pv->pic_in,
+                               pix_fmt, width, height );
+
+        hb_buffer_copy_settings( pv->buf_out[0], buf_in );
+
+        *buf_out = pv->buf_out[0];
+
+        return FILTER_OK;
+    }
+
+    /* Determine if top-field first layout */
+    int tff;
+    if( pv->yadif_parity < 0 )
+    {
+        tff = !!(buf_in->flags & PIC_FLAG_TOP_FIELD_FIRST);
+    }
+    else
+    {
+        tff = (pv->yadif_parity & 1) ^ 1;
+    }
+
+    /* Store current frame in yadif cache */
+    yadif_store_ref( (const uint8_t**)pv->pic_in.data, pv );
+
+    /* If yadif is not ready, store another ref and return FILTER_DELAY */
+    if( pv->yadif_ready == 0 )
+    {
+        yadif_store_ref( (const uint8_t**)pv->pic_in.data, pv );
+
+        hb_buffer_copy_settings( pv->buf_settings, buf_in );
+
+        /* don't let 'work_loop' send a chapter mark upstream */
+        buf_in->new_chap  = 0;
+
+        pv->yadif_ready = 1;
+
+        return FILTER_DELAY;
+    }
+
+    /* Perform yadif and mcdeint filtering */
+    int frame;
+    for( frame = 0; frame <= (pv->yadif_mode & 1); frame++ )
+    {
+        int parity = frame ^ tff ^ 1;
+
+        avpicture_fill( &pv->pic_out, pv->buf_out[!(frame^1)]->data,
+                        pix_fmt, width, height );
+
+        yadif_filter( pv->pic_out.data, parity, tff, pv );
+
+        if( pv->mcdeint_mode >= 0 )
+        {
+            avpicture_fill( &pv->pic_in,  pv->buf_out[(frame^1)]->data,
+                            pix_fmt, width, height );
+
+            mcdeint_filter( pv->pic_in.data, pv->pic_out.data, parity, pv );
+
+            *buf_out = pv->buf_out[ (frame^1)];
+        }
+        else
+        {
+            *buf_out = pv->buf_out[!(frame^1)];
+        }
+    }
+
+    /* Copy buffered settings to output buffer settings */
+    hb_buffer_copy_settings( *buf_out, pv->buf_settings );
+
+    /* Replace buffered settings with input buffer settings */
+    hb_buffer_copy_settings( pv->buf_settings, buf_in );
+
+    /* don't let 'work_loop' send a chapter mark upstream */
+    buf_in->new_chap  = 0;
+
+    return FILTER_OK;
+}
+
+
diff --git a/libhb/demuxmpeg.c b/libhb/demuxmpeg.c
new file mode 100644 (file)
index 0000000..b92a8de
--- /dev/null
@@ -0,0 +1,235 @@
+/* $Id: demuxmpeg.c,v 1.4 2004/10/19 23:11:36 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+/* Basic MPEG demuxer */
+
+int hb_demux_ps( hb_buffer_t * buf_ps, hb_list_t * list_es, hb_psdemux_t* state )
+{
+    hb_buffer_t * buf_es;
+    int           pos = 0;
+
+#define d (buf_ps->data)
+
+    /* pack_header */
+    if( d[pos] != 0 || d[pos+1] != 0 ||
+        d[pos+2] != 0x1 || d[pos+3] != 0xBA )
+    {
+        hb_log( "hb_demux_ps: not a PS packet (%02x%02x%02x%02x)",
+                d[pos], d[pos+1], d[pos+2], d[pos+3] );
+        return 0;
+    }
+    pos += 4;                    /* pack_start_code */
+
+    if ( state )
+    {
+        /*
+         * This section of code implements the timing model of
+         * the "Standard Target Decoder" (STD) of the MPEG2 standard
+         * (specified in ISO 13818-1 sections 2.4.2, 2.5.2 & Annex D).
+         * The STD removes and corrects for clock discontinuities so
+         * that the time stamps on the video, audio & other media
+         * streams can be used for cross-media synchronization. To do
+         * this the STD has its own timestamp value, the System Clock
+         * Reference or SCR, in the PACK header. Clock discontinuities
+         * are detected using the SCR & and the adjustment needed
+         * to correct post-discontinuity timestamps to be contiguous
+         * with pre-discontinuity timestamps is computed from pre- and
+         * post-discontinuity values of the SCR. Then this adjustment
+         * is applied to every media timestamp (PTS).
+         *
+         * ISO 13818-1 says there must be an SCR at least every 700ms
+         * (100ms for Transport Streams) so if the difference between
+         * this SCR & the previous is >700ms it's a discontinuity.
+         * If the difference is negative it's non-physical (time doesn't
+         * go backward) and must also be a discontinuity. When we find a
+         * discontinuity we adjust the scr_offset so that the SCR of the
+         * new packet lines up with that of the previous packet.
+         */
+        /* extract the system clock reference (scr) */
+        int64_t scr = ((uint64_t)(d[pos] & 0x38) << 27) |
+                      ((uint64_t)(d[pos] & 0x03) << 28) |
+                      ((uint64_t)(d[pos+1]) << 20) |
+                      ((uint64_t)(d[pos+2] >> 3) << 15) |
+                      ((uint64_t)(d[pos+2] & 3) << 13) |
+                      ((uint64_t)(d[pos+3]) << 5) |
+                      (d[pos+4] >> 3);
+        // we declare a discontinuity if there's a gap of more than
+        // 100ms between the last scr & this or if this scr goes back
+        // by more than half a frame time.
+        int64_t scr_delta = scr - state->last_scr;
+        if ( scr_delta > 90*100 || scr_delta < -90*10 )
+        {
+            ++state->scr_changes;
+        }
+        state->last_scr = scr;
+    }
+
+    pos += 9;                    /* pack_header */
+    pos += 1 + ( d[pos] & 0x7 ); /* stuffing bytes */
+
+    /* system_header */
+    if( d[pos] == 0 && d[pos+1] == 0 &&
+        d[pos+2] == 0x1 && d[pos+3] == 0xBB )
+    {
+        int header_length;
+
+        pos           += 4; /* system_header_start_code */
+        header_length  = ( d[pos] << 8 ) + d[pos+1];
+        pos           += 2 + header_length;
+    }
+
+    /* pes */
+    while( pos + 6 < buf_ps->size &&
+           d[pos] == 0 && d[pos+1] == 0 && d[pos+2] == 0x1 )
+    {
+        int      id;
+        int      pes_packet_length;
+        int      pes_packet_end;
+        int      pes_header_d_length;
+        int      pes_header_end;
+        int      has_pts;
+        int64_t  pts = -1, dts = -1;
+
+        pos               += 3;               /* packet_start_code_prefix */
+        id           = d[pos];
+        pos               += 1;
+
+        pes_packet_length  = ( d[pos] << 8 ) + d[pos+1];
+        pos               += 2;               /* pes_packet_length */
+        pes_packet_end     = pos + pes_packet_length;
+
+        if( id != 0xE0 && id != 0xBD &&
+            ( id & 0xC0 ) != 0xC0  )
+        {
+            /* Not interesting */
+            pos = pes_packet_end;
+            continue;
+        }
+
+        has_pts            = d[pos+1] >> 6;
+        pos               += 2;               /* Required headers */
+
+        pes_header_d_length  = d[pos];
+        pos                    += 1;
+        pes_header_end          = pos + pes_header_d_length;
+
+        if( has_pts )
+        {
+            pts = ( (uint64_t)(d[pos] & 0xe ) << 29 ) +
+                  ( d[pos+1] << 22 ) +
+                  ( ( d[pos+2] >> 1 ) << 15 ) +
+                  ( d[pos+3] << 7 ) +
+                  ( d[pos+4] >> 1 );
+            if ( has_pts & 1 )
+            {
+                dts = ( (uint64_t)(d[pos+5] & 0xe ) << 29 ) +
+                      ( d[pos+6] << 22 ) +
+                      ( ( d[pos+7] >> 1 ) << 15 ) +
+                      ( d[pos+8] << 7 ) +
+                      ( d[pos+9] >> 1 );
+            }
+            else
+            {
+                dts = pts;
+            }
+            if ( state && state->flaky_clock )
+            {
+                // Program streams have an SCR in every PACK header so they
+                // can't lose their clock reference. But the PCR in Transport
+                // streams is typically on <.1% of the packets. If a PCR
+                // packet gets lost and it marks a clock discontinuity then
+                // the data following it will be referenced to the wrong
+                // clock & introduce huge gaps or throw our A/V sync off.
+                // We try to protect against that here by sanity checking
+                // timestamps against the current reference clock and discarding
+                // packets where the DTS is "too far" from its clock.
+                int64_t fdelta = dts - state->last_scr;
+                if ( fdelta < -300 * 90000LL || fdelta > 300 * 90000LL )
+                {
+                    // packet too far behind or ahead of its clock reference
+                    ++state->dts_drops;
+                    pos = pes_packet_end;
+                    continue;
+                }
+            }
+        }
+
+        pos = pes_header_end;
+
+        if( id == 0xBD )
+        {
+            id |= ( d[pos] << 8 );
+            if( ( id & 0xF0FF ) == 0x80BD ) /* A52 */
+            {
+                pos += 4;
+            }
+            else if( ( id & 0xE0FF ) == 0x20BD || /* SPU */
+                     ( id & 0xF0FF ) == 0xA0BD )  /* LPCM */
+            {
+                pos += 1;
+            }
+        }
+
+        /* Sanity check */
+        if( pos >= pes_packet_end )
+        {
+            pos = pes_packet_end;
+            continue;
+        }
+
+        /* Here we hit we ES payload */
+        buf_es = hb_buffer_init( pes_packet_end - pos );
+
+        buf_es->id       = id;
+        buf_es->start    = pts;
+        buf_es->renderOffset = dts;
+        buf_es->stop     = -1;
+        if (id == 0xE0) {
+            // Consume a chapter break, and apply it to the ES.
+            buf_es->new_chap = buf_ps->new_chap;
+            buf_ps->new_chap = 0;
+        }
+        memcpy( buf_es->data, d + pos, pes_packet_end - pos );
+
+        hb_list_add( list_es, buf_es );
+
+        pos = pes_packet_end;
+    }
+
+#undef d
+
+    return 1;
+}
+
+// "null" demuxer (makes a copy of input buf & returns it in list)
+// used when the reader for some format includes its own demuxer.
+// for example, ffmpeg.
+int hb_demux_null( hb_buffer_t * buf_ps, hb_list_t * list_es, hb_psdemux_t* state )
+{
+    // if we don't have a time offset yet, use this timestamp as the offset.
+    if ( state && state->scr_changes == 0 &&
+         ( buf_ps->start >= 0 || buf_ps->renderOffset >= 0 ) )
+    {
+        ++state->scr_changes;
+        state->last_scr = buf_ps->start >= 0 ? buf_ps->start : buf_ps->renderOffset;
+    }
+
+    hb_buffer_t *buf = hb_buffer_init( buf_ps->size );
+
+    // copy everything from the old to the new except the data ptr & alloc
+    uint8_t *data = buf->data;
+    int alloc = buf->alloc;
+    *buf = *buf_ps;
+    buf->data = data;
+    buf->alloc = alloc;
+
+    // now copy the data
+    memcpy( buf->data, buf_ps->data, buf_ps->size );
+    hb_list_add( list_es, buf );
+    return 1;
+}
diff --git a/libhb/denoise.c b/libhb/denoise.c
new file mode 100644 (file)
index 0000000..3913912
--- /dev/null
@@ -0,0 +1,467 @@
+/*
+ Copyright (C) 2003 Daniel Moreno <comac@comac.darktech.org>
+
+ 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 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 St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#include "hb.h"
+#include "libavcodec/avcodec.h"
+#include "mpeg2dec/mpeg2.h"
+
+#define HQDN3D_SPATIAL_LUMA_DEFAULT    4.0f
+#define HQDN3D_SPATIAL_CHROMA_DEFAULT  3.0f
+#define HQDN3D_TEMPORAL_LUMA_DEFAULT   6.0f
+
+#define ABS(A) ( (A) > 0 ? (A) : -(A) )
+
+struct hb_filter_private_s
+{
+    int              pix_fmt;
+    int              width[3];
+    int              height[3];
+
+    int              hqdn3d_coef[4][512*16];
+    unsigned int   * hqdn3d_line;
+       unsigned short * hqdn3d_frame[3];
+
+    AVPicture        pic_in;
+    AVPicture        pic_out;
+    hb_buffer_t    * buf_out;
+};
+
+hb_filter_private_t * hb_denoise_init( int pix_fmt,
+                                       int width,
+                                       int height,
+                                       char * settings );
+
+int hb_denoise_work( const hb_buffer_t * buf_in,
+                     hb_buffer_t ** buf_out,
+                     int pix_fmt,
+                     int width,
+                     int height,
+                     hb_filter_private_t * pv );
+
+void hb_denoise_close( hb_filter_private_t * pv );
+
+hb_filter_object_t hb_filter_denoise =
+{
+    FILTER_DENOISE,
+    "Denoise (hqdn3d)",
+    NULL,
+    hb_denoise_init,
+    hb_denoise_work,
+    hb_denoise_close,
+};
+
+static void hqdn3d_precalc_coef( int * ct,
+                                 double dist25 )
+{
+    int i;
+    double gamma, simil, c;
+
+    gamma = log( 0.25 ) / log( 1.0 - dist25/255.0 - 0.00001 );
+
+    for( i = -255*16; i <= 255*16; i++ )
+    {
+        simil = 1.0 - ABS(i) / (16*255.0);
+        c = pow( simil, gamma ) * 65536.0 * (double)i / 16.0;
+        ct[16*256+i] = (c<0) ? (c-0.5) : (c+0.5);
+    }
+
+    ct[0] = (dist25 != 0);
+}
+
+static inline unsigned int hqdn3d_lowpass_mul( unsigned int prev_mul,
+                                               unsigned int curr_mul,
+                                               int * coef )
+{
+    int diff_mul = prev_mul - curr_mul;
+    int d = ((diff_mul+0x10007FF)>>12);
+    return curr_mul + coef[d];
+}
+
+static void hqdn3d_denoise_temporal( unsigned char * frame_src,
+                                     unsigned char * frame_dst,
+                                     unsigned short * frame_ant,
+                                     int w, int h,
+                                     int * temporal)
+{
+    int x, y;
+    unsigned int pixel_dst;
+
+    for( y = 0; y < h; y++ )
+    {
+        for( x = 0; x < w; x++ )
+        {
+            pixel_dst = hqdn3d_lowpass_mul( frame_ant[x]<<8,
+                                            frame_src[x]<<16,
+                                            temporal );
+
+            frame_ant[x] = ((pixel_dst+0x1000007F)>>8);
+            frame_dst[x] = ((pixel_dst+0x10007FFF)>>16);
+        }
+
+        frame_src += w;
+        frame_dst += w;
+        frame_ant += w;
+    }
+}
+
+static void hqdn3d_denoise_spatial( unsigned char * frame_src,
+                                    unsigned char * frame_dst,
+                                    unsigned int * line_ant,
+                                    int w, int h,
+                                    int * horizontal,
+                                    int * vertical )
+{
+    int x, y;
+    int line_offset_src = 0, line_offset_dst = 0;
+    unsigned int pixel_ant;
+    unsigned int pixel_dst;
+
+    /* First pixel has no left nor top neighbor. */
+    pixel_dst = line_ant[0] = pixel_ant = frame_src[0]<<16;
+    frame_dst[0] = ((pixel_dst+0x10007FFF)>>16);
+
+    /* First line has no top neighbor, only left. */
+    for( x = 1; x < w; x++ )
+    {
+        pixel_dst = line_ant[x] = hqdn3d_lowpass_mul(pixel_ant,
+                                                     frame_src[x]<<16,
+                                                     horizontal);
+
+        frame_dst[x] = ((pixel_dst+0x10007FFF)>>16);
+    }
+
+    for( y = 1; y < h; y++ )
+    {
+        unsigned int pixel_ant;
+        line_offset_src += w, line_offset_dst += w;
+
+        /* First pixel on each line doesn't have previous pixel */
+        pixel_ant = frame_src[line_offset_src]<<16;
+
+        pixel_dst = line_ant[0] = hqdn3d_lowpass_mul( line_ant[0],
+                                                      pixel_ant,
+                                                      vertical);
+
+        frame_dst[line_offset_dst] = ((pixel_dst+0x10007FFF)>>16);
+
+        /* The rest of the pixels in the line are normal */
+        for( x = 1; x < w; x++ )
+        {
+            unsigned int pixel_dst;
+
+            pixel_ant = hqdn3d_lowpass_mul( pixel_ant,
+                                            frame_src[line_offset_src+x]<<16,
+                                            horizontal );
+            pixel_dst = line_ant[x] = hqdn3d_lowpass_mul( line_ant[x],
+                                                          pixel_ant,
+                                                          vertical );
+
+            frame_dst[line_offset_dst+x]= ((pixel_dst+0x10007FFF)>>16);
+        }
+    }
+}
+
+static void hqdn3d_denoise( unsigned char * frame_src,
+                            unsigned char * frame_dst,
+                            unsigned int * line_ant,
+                            unsigned short ** frame_ant_ptr,
+                            int w,
+                            int h,
+                            int * horizontal,
+                            int * vertical,
+                            int * temporal)
+{
+    int x, y;
+    int line_offset_src = 0, line_offset_dst = 0;
+    unsigned int pixel_ant;
+    unsigned int pixel_dst;
+    unsigned short* frame_ant = (*frame_ant_ptr);
+
+    if( !frame_ant)
+    {
+        (*frame_ant_ptr) = frame_ant = malloc( w*h*sizeof(unsigned short) );
+        for( y = 0; y < h; y++ )
+        {
+            unsigned short* dst = &frame_ant[y*w];
+            unsigned char*  src = frame_src + y*w;
+
+            for( x = 0; x < w; x++ )
+            {
+                dst[x] = src[x] << 8;
+            }
+        }
+    }
+
+    /* If no spatial coefficients, do temporal denoise only */
+    if( !horizontal[0] && !vertical[0] )
+    {
+        hqdn3d_denoise_temporal( frame_src,
+                                 frame_dst,
+                                 frame_ant,
+                                 w, h,
+                                 temporal);
+        return;
+    }
+
+    /* If no temporal coefficients, do spatial denoise only */
+    if( !temporal[0] )
+    {
+        hqdn3d_denoise_spatial( frame_src,
+                                frame_dst,
+                                line_ant,
+                                w, h,
+                                horizontal,
+                                vertical);
+        return;
+    }
+
+    /* First pixel has no left nor top neighbor. Only previous frame */
+    line_ant[0]  = pixel_ant = frame_src[0] << 16;
+
+    pixel_dst    = hqdn3d_lowpass_mul( frame_ant[0]<<8,
+                                       pixel_ant,
+                                       temporal );
+
+    frame_ant[0] = ((pixel_dst+0x1000007F)>>8);
+    frame_dst[0] = ((pixel_dst+0x10007FFF)>>16);
+
+    /* First line has no top neighbor. Only left one for each pixel and last frame */
+    for( x = 1; x < w; x++ )
+    {
+        line_ant[x]  = pixel_ant = hqdn3d_lowpass_mul( pixel_ant,
+                                                       frame_src[x]<<16,
+                                                       horizontal);
+
+        pixel_dst    = hqdn3d_lowpass_mul( frame_ant[x]<<8,
+                                           pixel_ant,
+                                           temporal);
+
+        frame_ant[x] = ((pixel_dst+0x1000007F)>>8);
+        frame_dst[x] = ((pixel_dst+0x10007FFF)>>16);
+    }
+
+    /* The rest of the lines in the frame are normal */
+    for( y = 1; y < h; y++ )
+    {
+        unsigned int pixel_ant;
+        unsigned short * line_prev = &frame_ant[y*w];
+        line_offset_src += w, line_offset_dst += w;
+
+        /* First pixel on each line doesn't have previous pixel */
+        pixel_ant    = frame_src[line_offset_src]<<16;
+        line_ant[0]  = hqdn3d_lowpass_mul( line_ant[0],
+                                           pixel_ant,
+                                           vertical);
+        pixel_dst    = hqdn3d_lowpass_mul( line_prev[0]<<8,
+                                           line_ant[0],
+                                           temporal);
+        line_prev[0] = ((pixel_dst+0x1000007F)>>8);
+
+        frame_dst[line_offset_dst] = ((pixel_dst+0x10007FFF)>>16);
+
+        /* The rest of the pixels in the line are normal */
+        for( x = 1; x < w; x++ )
+        {
+            unsigned int pixel_dst;
+            pixel_ant    = hqdn3d_lowpass_mul( pixel_ant,
+                                               frame_src[line_offset_src+x]<<16,
+                                               horizontal );
+            line_ant[x]  = hqdn3d_lowpass_mul( line_ant[x],
+                                               pixel_ant, vertical);
+            pixel_dst    = hqdn3d_lowpass_mul( line_prev[x]<<8,
+                                               line_ant[x],
+                                               temporal );
+            line_prev[x] = ((pixel_dst+0x1000007F)>>8);
+
+            frame_dst[line_offset_dst+x] = ((pixel_dst+0x10007FFF)>>16);
+        }
+    }
+}
+
+hb_filter_private_t * hb_denoise_init( int pix_fmt,
+                                       int width,
+                                       int height,
+                                       char * settings )
+{
+    if( pix_fmt != PIX_FMT_YUV420P )
+    {
+        return 0;
+    }
+
+    hb_filter_private_t * pv = malloc( sizeof(struct hb_filter_private_s) );
+
+    /*
+     * Clear the memory to avoid freeing uninitialised memory later.
+     */
+    memset( pv, 0, sizeof( struct hb_filter_private_s ) );
+
+    pv->pix_fmt  = pix_fmt;
+    pv->width[0]  = width;
+    pv->height[0] = height;
+    pv->width[1]  = pv->width[2] = width >> 1;
+    pv->height[1] = pv->height[2] = height >> 1;
+
+    double spatial_luma, temporal_luma, spatial_chroma, temporal_chroma;
+
+    if( settings )
+    {
+        switch( sscanf( settings, "%lf:%lf:%lf:%lf",
+                        &spatial_luma, &spatial_chroma,
+                        &temporal_luma, &temporal_chroma ) )
+        {
+            case 0:
+                spatial_luma    = HQDN3D_SPATIAL_LUMA_DEFAULT;
+
+                spatial_chroma  = HQDN3D_SPATIAL_CHROMA_DEFAULT;
+
+                temporal_luma   = HQDN3D_TEMPORAL_LUMA_DEFAULT;
+
+                temporal_chroma = temporal_luma *
+                                  spatial_chroma / spatial_luma;
+                break;
+
+            case 1:
+                spatial_chroma = HQDN3D_SPATIAL_CHROMA_DEFAULT *
+                                 spatial_luma / HQDN3D_SPATIAL_LUMA_DEFAULT;
+
+                temporal_luma   = HQDN3D_TEMPORAL_LUMA_DEFAULT *
+                                  spatial_luma / HQDN3D_SPATIAL_LUMA_DEFAULT;
+
+                temporal_chroma = temporal_luma *
+                                  spatial_chroma / spatial_luma;
+                break;
+
+            case 2:
+                temporal_luma   = HQDN3D_TEMPORAL_LUMA_DEFAULT *
+                                  spatial_luma / HQDN3D_SPATIAL_LUMA_DEFAULT;
+
+                temporal_chroma = temporal_luma *
+                                  spatial_chroma / spatial_luma;
+                break;
+
+            case 3:
+                temporal_chroma = temporal_luma *
+                                  spatial_chroma / spatial_luma;
+                break;
+        }
+    }
+
+    pv->hqdn3d_line = malloc( width * sizeof(int) );
+
+    hqdn3d_precalc_coef( pv->hqdn3d_coef[0], spatial_luma );
+    hqdn3d_precalc_coef( pv->hqdn3d_coef[1], temporal_luma );
+    hqdn3d_precalc_coef( pv->hqdn3d_coef[2], spatial_chroma );
+    hqdn3d_precalc_coef( pv->hqdn3d_coef[3], temporal_chroma );
+
+    pv->buf_out = hb_video_buffer_init( width, height );
+
+    return pv;
+}
+
+void hb_denoise_close( hb_filter_private_t * pv )
+{
+    if( !pv )
+    {
+        return;
+    }
+
+       if( pv->hqdn3d_line )
+    {
+        free( pv->hqdn3d_line );
+        pv->hqdn3d_line = NULL;
+    }
+       if( pv->hqdn3d_frame[0] )
+    {
+        free( pv->hqdn3d_frame[0] );
+        pv->hqdn3d_frame[0] = NULL;
+    }
+       if( pv->hqdn3d_frame[1] )
+    {
+        free( pv->hqdn3d_frame[1] );
+        pv->hqdn3d_frame[1] = NULL;
+    }
+       if( pv->hqdn3d_frame[2] )
+    {
+        free( pv->hqdn3d_frame[2] );
+        pv->hqdn3d_frame[2] = NULL;
+    }
+    if( pv->buf_out )
+    {
+        hb_buffer_close( &pv->buf_out );
+    }
+
+    free( pv );
+}
+
+int hb_denoise_work( const hb_buffer_t * buf_in,
+                     hb_buffer_t ** buf_out,
+                     int pix_fmt,
+                     int width,
+                     int height,
+                     hb_filter_private_t * pv )
+{
+    if( !pv ||
+        pix_fmt != pv->pix_fmt ||
+        width != pv->width[0] ||
+        height != pv->height[0] )
+    {
+        return FILTER_FAILED;
+    }
+
+    avpicture_fill( &pv->pic_in, buf_in->data,
+                    pix_fmt, width, height );
+
+    avpicture_fill( &pv->pic_out, pv->buf_out->data,
+                    pix_fmt, width, height );
+
+    hqdn3d_denoise( pv->pic_in.data[0],
+                    pv->pic_out.data[0],
+                    pv->hqdn3d_line,
+                    &pv->hqdn3d_frame[0],
+                    pv->width[0],
+                    pv->height[0],
+                    pv->hqdn3d_coef[0],
+                    pv->hqdn3d_coef[0],
+                    pv->hqdn3d_coef[1] );
+
+    hqdn3d_denoise( pv->pic_in.data[1],
+                    pv->pic_out.data[1],
+                    pv->hqdn3d_line,
+                    &pv->hqdn3d_frame[1],
+                    pv->width[1],
+                    pv->height[1],
+                    pv->hqdn3d_coef[2],
+                    pv->hqdn3d_coef[2],
+                    pv->hqdn3d_coef[3] );
+
+    hqdn3d_denoise( pv->pic_in.data[2],
+                    pv->pic_out.data[2],
+                    pv->hqdn3d_line,
+                    &pv->hqdn3d_frame[2],
+                    pv->width[2],
+                    pv->height[2],
+                    pv->hqdn3d_coef[2],
+                    pv->hqdn3d_coef[2],
+                    pv->hqdn3d_coef[3] );
+
+    hb_buffer_copy_settings( pv->buf_out, buf_in );
+
+    *buf_out = pv->buf_out;
+
+    return FILTER_OK;
+}
diff --git a/libhb/detelecine.c b/libhb/detelecine.c
new file mode 100644 (file)
index 0000000..92d279d
--- /dev/null
@@ -0,0 +1,1048 @@
+#include "hb.h"
+#include "libavcodec/avcodec.h"
+#include "mpeg2dec/mpeg2.h"
+
+/*
+ *
+ * PULLUP DEFINITIONS
+ *
+ */
+
+#define PULLUP_FMT_Y         1
+#define PULLUP_HAVE_BREAKS   1
+#define PULLUP_HAVE_AFFINITY 2
+#define PULLUP_BREAK_LEFT    1
+#define PULLUP_BREAK_RIGHT   2
+
+#define PULLUP_ABS( a ) (((a)^((a)>>31))-((a)>>31))
+
+#ifndef PIC_FLAG_REPEAT_FIRST_FIELD
+#define PIC_FLAG_REPEAT_FIRST_FIELD 256
+#endif
+
+struct pullup_buffer
+{
+    int lock[2];
+    unsigned char **planes;
+};
+
+struct pullup_field
+{
+    int parity;
+    struct pullup_buffer *buffer;
+    unsigned int flags;
+    int breaks;
+    int affinity;
+    int *diffs;
+    int *comb;
+    int *var;
+    struct pullup_field *prev, *next;
+};
+
+struct pullup_frame
+{
+    int lock;
+    int length;
+    int parity;
+    struct pullup_buffer **ifields, *ofields[2];
+    struct pullup_buffer *buffer;
+};
+
+struct pullup_context
+{
+    /* Public interface */
+    int format;
+    int nplanes;
+    int *bpp, *w, *h, *stride, *background;
+    unsigned int cpu;
+    int junk_left, junk_right, junk_top, junk_bottom;
+    int verbose;
+    int metric_plane;
+    int strict_breaks;
+    int strict_pairs;
+    /* Internal data */
+    struct pullup_field *first, *last, *head;
+    struct pullup_buffer *buffers;
+    int nbuffers;
+    int (*diff)(unsigned char *, unsigned char *, int);
+    int (*comb)(unsigned char *, unsigned char *, int);
+    int (*var)(unsigned char *, unsigned char *, int);
+    int metric_w, metric_h, metric_len, metric_offset;
+    struct pullup_frame *frame;
+};
+
+/*
+ *
+ * DETELECINE FILTER DEFINITIONS
+ *
+ */
+
+struct hb_filter_private_s
+{
+    int              pix_fmt;
+    int              width[3];
+    int              height[3];
+
+    struct pullup_context * pullup_ctx;
+    int                     pullup_fakecount;
+    int                     pullup_skipflag;
+
+    AVPicture        pic_in;
+    AVPicture        pic_out;
+    hb_buffer_t    * buf_out;
+};
+
+hb_filter_private_t * hb_detelecine_init( int pix_fmt,
+                                          int width,
+                                          int height,
+                                          char * settings );
+
+int hb_detelecine_work( const hb_buffer_t * buf_in,
+                        hb_buffer_t ** buf_out,
+                        int pix_fmt,
+                        int width,
+                        int height,
+                        hb_filter_private_t * pv );
+
+void hb_detelecine_close( hb_filter_private_t * pv );
+
+hb_filter_object_t hb_filter_detelecine =
+{
+    FILTER_DETELECINE,
+    "Detelecine (pullup)",
+    NULL,
+    hb_detelecine_init,
+    hb_detelecine_work,
+    hb_detelecine_close,
+};
+
+/*
+ *
+ * PULLUP STATIC FUNCTIONS
+ *
+ */
+
+static int pullup_diff_y( unsigned char  *a, unsigned char * b, int s )
+{
+    int i, j, diff = 0;
+    for( i = 4; i; i-- )
+    {
+        for( j = 0; j < 8; j++ )
+        {
+            diff += PULLUP_ABS( a[j]-b[j] );
+        }
+        a+=s; b+=s;
+    }
+    return diff;
+}
+
+static int pullup_licomb_y( unsigned char * a, unsigned char * b, int s )
+{
+    int i, j, diff = 0;
+    for( i = 4; i; i-- )
+    {
+        for( j = 0; j < 8; j++ )
+        {
+            diff += PULLUP_ABS( (a[j]<<1) - b[j-s] - b[j] )
+                  + PULLUP_ABS( (b[j]<<1) - a[j] - a[j+s] );
+        }
+        a+=s; b+=s;
+    }
+    return diff;
+}
+
+static int pullup_var_y( unsigned char * a, unsigned char * b, int s )
+{
+    int i, j, var = 0;
+    for( i = 3; i; i-- )
+    {
+        for( j = 0; j < 8; j++ )
+        {
+            var += PULLUP_ABS( a[j]-a[j+s] );
+        }
+        a+=s; b+=s;
+    }
+    return 4*var;
+}
+
+static void pullup_alloc_metrics( struct pullup_context * c,
+                                  struct pullup_field * f )
+{
+    f->diffs = calloc( c->metric_len, sizeof(int) );
+    f->comb  = calloc( c->metric_len, sizeof(int) );
+    f->var   = calloc( c->metric_len, sizeof(int) );
+}
+
+static void pullup_compute_metric( struct pullup_context * c,
+                                   struct pullup_field * fa, int pa,
+                                   struct pullup_field * fb, int pb,
+                                   int (* func)( unsigned char *,
+                                                 unsigned char *, int),
+                                   int * dest )
+{
+    unsigned char *a, *b;
+    int x, y;
+    int mp    = c->metric_plane;
+    int xstep = c->bpp[mp];
+    int ystep = c->stride[mp]<<3;
+    int s     = c->stride[mp]<<1; /* field stride */
+    int w     = c->metric_w*xstep;
+
+    if( !fa->buffer || !fb->buffer ) return;
+
+    /* Shortcut for duplicate fields (e.g. from RFF flag) */
+    if( fa->buffer == fb->buffer && pa == pb )
+    {
+        memset( dest, 0, c->metric_len * sizeof(int) );
+        return;
+    }
+
+    a = fa->buffer->planes[mp] + pa * c->stride[mp] + c->metric_offset;
+    b = fb->buffer->planes[mp] + pb * c->stride[mp] + c->metric_offset;
+
+    for( y = c->metric_h; y; y-- )
+    {
+        for( x = 0; x < w; x += xstep )
+        {
+            *dest++ = func( a + x, b + x, s );
+        }
+        a += ystep; b += ystep;
+    }
+}
+
+static struct pullup_field * pullup_make_field_queue( struct pullup_context * c,
+                                                      int len )
+{
+    struct pullup_field * head, * f;
+    f = head = calloc( 1, sizeof(struct pullup_field) );
+    pullup_alloc_metrics( c, f );
+    for ( ; len > 0; len-- )
+    {
+        f->next = calloc( 1, sizeof(struct pullup_field) );
+        f->next->prev = f;
+        f = f->next;
+        pullup_alloc_metrics( c, f );
+    }
+    f->next = head;
+    head->prev = f;
+    return head;
+}
+
+static void pullup_check_field_queue( struct pullup_context * c )
+{
+    if( c->head->next == c->first )
+    {
+        struct pullup_field *f = calloc( 1, sizeof(struct pullup_field) );
+        pullup_alloc_metrics( c, f );
+        f->prev = c->head;
+        f->next = c->first;
+        c->head->next = f;
+        c->first->prev = f;
+    }
+}
+
+static void pullup_copy_field( struct pullup_context * c,
+                               struct pullup_buffer * dest,
+                               struct pullup_buffer * src,
+                               int parity )
+{
+    int i, j;
+    unsigned char *d, *s;
+    for( i = 0; i < c->nplanes; i++ )
+    {
+        s = src->planes[i] + parity*c->stride[i];
+        d = dest->planes[i] + parity*c->stride[i];
+        for( j = c->h[i]>>1; j; j-- )
+        {
+            memcpy( d, s, c->stride[i] );
+            s += c->stride[i]<<1;
+            d += c->stride[i]<<1;
+        }
+    }
+}
+
+
+static int pullup_queue_length( struct pullup_field * begin,
+                                struct pullup_field * end )
+{
+    int count = 1;
+    struct pullup_field * f;
+
+    if( !begin || !end ) return 0;
+    for( f = begin; f != end; f = f->next ) count++;
+    return count;
+}
+
+static int pullup_find_first_break( struct pullup_field * f, int max )
+{
+    int i;
+    for( i = 0; i < max; i++ )
+    {
+        if( f->breaks & PULLUP_BREAK_RIGHT ||
+            f->next->breaks & PULLUP_BREAK_LEFT )
+        {
+            return i+1;
+        }
+        f = f->next;
+    }
+    return 0;
+}
+
+static void pullup_compute_breaks( struct pullup_context * c,
+                                   struct pullup_field * f0 )
+{
+    int i;
+    struct pullup_field *f1 = f0->next;
+    struct pullup_field *f2 = f1->next;
+    struct pullup_field *f3 = f2->next;
+    int l, max_l=0, max_r=0;
+
+    if( f0->flags & PULLUP_HAVE_BREAKS ) return;
+    f0->flags |= PULLUP_HAVE_BREAKS;
+
+    /* Special case when fields are 100% identical */
+    if( f0->buffer == f2->buffer && f1->buffer != f3->buffer )
+    {
+        f2->breaks |= PULLUP_BREAK_RIGHT;
+        return;
+    }
+    if( f0->buffer != f2->buffer && f1->buffer == f3->buffer )
+    {
+        f1->breaks |= PULLUP_BREAK_LEFT;
+        return;
+    }
+
+    for( i = 0; i < c->metric_len; i++ )
+    {
+        l = f2->diffs[i] - f3->diffs[i];
+        if(  l > max_l) max_l = l;
+        if( -l > max_r) max_r = -l;
+    }
+
+    /* Don't get tripped up when differences are mostly quant error */
+    if( max_l + max_r < 128 ) return;
+    if( max_l > 4*max_r ) f1->breaks |= PULLUP_BREAK_LEFT;
+    if( max_r > 4*max_l ) f2->breaks |= PULLUP_BREAK_RIGHT;
+}
+
+static void pullup_compute_affinity( struct pullup_context * c,
+                                     struct pullup_field * f )
+{
+    int i;
+    int max_l = 0, max_r = 0, l;
+
+    if( f->flags & PULLUP_HAVE_AFFINITY )
+    {
+        return;
+    }
+    f->flags |= PULLUP_HAVE_AFFINITY;
+
+    if( f->buffer == f->next->next->buffer )
+    {
+        f->affinity             =  1;
+        f->next->affinity       =  0;
+        f->next->next->affinity = -1;
+
+        f->next->flags       |= PULLUP_HAVE_AFFINITY;
+        f->next->next->flags |= PULLUP_HAVE_AFFINITY;
+
+        return;
+    }
+
+    for( i = 0; i < c->metric_len; i++ )
+    {
+        int lv = f->prev->var[i];
+        int rv = f->next->var[i];
+        int v  = f->var[i];
+        int lc = f->comb[i] - (v+lv) + PULLUP_ABS( v-lv );
+        int rc = f->next->comb[i] - (v+rv) + PULLUP_ABS( v-rv );
+
+        lc = (lc > 0) ? lc : 0;
+        rc = (rc > 0) ? rc : 0;
+        l = lc - rc;
+        if(  l > max_l ) max_l = l;
+        if( -l > max_r ) max_r = -l;
+    }
+
+    if( max_l + max_r < 64 )
+    {
+        return;
+    }
+
+    if( max_r > 6*max_l )
+    {
+        f->affinity = -1;
+    }
+    else if( max_l > 6*max_r )
+    {
+        f->affinity = 1;
+    }
+}
+
+static void pullup_foo( struct pullup_context * c )
+{
+    struct pullup_field * f = c->first;
+    int i, n = pullup_queue_length (f, c->last );
+    for( i = 0; i < n-1; i++ )
+    {
+        if( i < n-3 ) pullup_compute_breaks( c, f );
+        pullup_compute_affinity( c, f );
+        f = f->next;
+    }
+}
+
+static int pullup_decide_frame_length( struct pullup_context * c )
+{
+    struct pullup_field *f0 = c->first;
+    struct pullup_field *f1 = f0->next;
+    struct pullup_field *f2 = f1->next;
+    int l;
+
+    if( pullup_queue_length( c->first, c->last ) < 4 )
+    {
+        return 0;
+    }
+    pullup_foo( c );
+
+    if( f0->affinity == -1 ) return 1;
+
+    l = pullup_find_first_break( f0, 3 );
+    if( l == 1 && c->strict_breaks < 0 ) l = 0;
+
+    switch (l)
+    {
+        case 1:
+            if ( c->strict_breaks < 1 &&
+                 f0->affinity == 1 &&
+                 f1->affinity == -1 )
+            {
+                return 2;
+            }
+            else
+            {
+                return 1;
+            }
+
+        case 2:
+            /* FIXME: strictly speaking, f0->prev is no longer valid... :) */
+            if( c->strict_pairs &&
+                (f0->prev->breaks & PULLUP_BREAK_RIGHT) &&
+                (f2->breaks & PULLUP_BREAK_LEFT) &&
+                (f0->affinity != 1 || f1->affinity != -1) )
+            {
+                return 1;
+            }
+            if( f1->affinity == 1 )
+            {
+                return 1;
+            }
+            else
+            {
+                return 2;
+            }
+
+        case 3:
+            if( f2->affinity == 1 )
+            {
+                return 2;
+            }
+            else
+            {
+                return 3;
+            }
+
+        default:
+            /* 9 possibilities covered before switch */
+            if( f1->affinity == 1 )
+            {
+                return 1; /* covers 6 */
+            }
+            else if( f1->affinity == -1 )
+            {
+                return 2; /* covers 6 */
+            }
+            else if( f2->affinity == -1 )
+            {
+                /* covers 2 */
+                if( f0->affinity == 1 )
+                {
+                    return 3;
+                }
+                else
+                {
+                    return 1;
+                }
+            }
+            else
+            {
+                return 2; /* the remaining 6 */
+            }
+    }
+}
+
+static void pullup_print_aff_and_breaks(struct pullup_context * c,
+                                        struct pullup_field * f )
+{
+    int i;
+    struct pullup_field * f0 = f;
+    const char aff_l[] = "+..", aff_r[] = "..+";
+    printf( "\naffinity: " );
+    for( i = 0; i < 4; i++ )
+    {
+        printf( "%c%d%c",
+                aff_l[1+f->affinity],
+                i,
+                aff_r[1+f->affinity] );
+
+        f = f->next;
+    }
+    f = f0;
+    printf("\nbreaks:   ");
+    for( i = 0; i < 4; i++ )
+    {
+        printf( "%c%d%c",
+                f->breaks & PULLUP_BREAK_LEFT  ? '|' : '.',
+                i,
+                f->breaks & PULLUP_BREAK_RIGHT ? '|' : '.' );
+
+        f = f->next;
+    }
+    printf("\n");
+}
+
+/*
+ *
+ * PULLUP CONTEXT FUNCTIONS
+ *
+ */
+
+struct pullup_context * pullup_alloc_context( void )
+{
+    struct pullup_context * c;
+
+    c = calloc( 1, sizeof(struct pullup_context)) ;
+
+    return c;
+}
+
+void pullup_preinit_context( struct pullup_context * c )
+{
+    c->bpp        = calloc( c->nplanes, sizeof(int) );
+    c->w          = calloc( c->nplanes, sizeof(int) );
+    c->h          = calloc( c->nplanes, sizeof(int) );
+    c->stride     = calloc( c->nplanes, sizeof(int) );
+    c->background = calloc( c->nplanes, sizeof(int) );
+}
+
+void pullup_init_context( struct pullup_context * c )
+{
+    int mp = c->metric_plane;
+    if ( c->nbuffers < 10 )
+    {
+        c->nbuffers = 10;
+    }
+    c->buffers = calloc( c->nbuffers, sizeof (struct pullup_buffer) );
+
+    c->metric_w      = (c->w[mp] - ((c->junk_left + c->junk_right) << 3)) >> 3;
+    c->metric_h      = (c->h[mp] - ((c->junk_top + c->junk_bottom) << 1)) >> 3;
+    c->metric_offset = c->junk_left*c->bpp[mp] + (c->junk_top<<1)*c->stride[mp];
+    c->metric_len    = c->metric_w * c->metric_h;
+
+    c->head = pullup_make_field_queue( c, 8 );
+
+    c->frame = calloc( 1, sizeof (struct pullup_frame) );
+    c->frame->ifields = calloc( 3, sizeof (struct pullup_buffer *) );
+
+    if( c->format == PULLUP_FMT_Y )
+    {
+        c->diff = pullup_diff_y;
+        c->comb = pullup_licomb_y;
+        c->var  = pullup_var_y;
+    }
+}
+
+void pullup_free_context( struct pullup_context * c )
+{
+    struct pullup_field * f;
+
+    free( c->buffers );
+
+    f = c->head->next;
+    while( f != c->head )
+    {
+        free( f->diffs );
+        free( f->comb );
+        f = f->next;
+        free( f->prev );
+    }
+    free( f->diffs );
+    free( f->comb );
+    free(f);
+
+    free( c->frame );
+    free( c );
+}
+
+/*
+ *
+ * PULLUP BUFFER FUNCTIONS
+ *
+ */
+
+static void pullup_alloc_buffer( struct pullup_context * c,
+                                 struct pullup_buffer * b )
+{
+    int i;
+    if( b->planes ) return;
+    b->planes = calloc( c->nplanes, sizeof(unsigned char *) );
+    for ( i = 0; i < c->nplanes; i++ )
+    {
+        b->planes[i] = malloc(c->h[i]*c->stride[i]);
+        /* Deal with idiotic 128=0 for chroma: */
+        memset( b->planes[i], c->background[i], c->h[i]*c->stride[i] );
+    }
+}
+
+struct pullup_buffer * pullup_lock_buffer( struct pullup_buffer * b,
+                                           int parity )
+{
+    if( !b ) return 0;
+    if( (parity+1) & 1 ) b->lock[0]++;
+    if( (parity+1) & 2 ) b->lock[1]++;
+
+    return b;
+}
+
+void pullup_release_buffer( struct pullup_buffer * b,
+                            int parity )
+{
+    if( !b ) return;
+    if( (parity+1) & 1 ) b->lock[0]--;
+    if( (parity+1) & 2 ) b->lock[1]--;
+}
+
+struct pullup_buffer * pullup_get_buffer( struct pullup_context * c,
+                                          int parity )
+{
+    int i;
+
+    /* Try first to get the sister buffer for the previous field */
+    if( parity < 2 &&
+        c->last &&
+        parity != c->last->parity &&
+        !c->last->buffer->lock[parity])
+    {
+        pullup_alloc_buffer( c, c->last->buffer );
+        return pullup_lock_buffer( c->last->buffer, parity );
+    }
+
+    /* Prefer a buffer with both fields open */
+    for( i = 0; i < c->nbuffers; i++ )
+    {
+        if( c->buffers[i].lock[0] ) continue;
+        if( c->buffers[i].lock[1] ) continue;
+        pullup_alloc_buffer( c, &c->buffers[i] );
+        return pullup_lock_buffer( &c->buffers[i], parity );
+    }
+
+    if( parity == 2 ) return 0;
+
+    /* Search for any half-free buffer */
+    for( i = 0; i < c->nbuffers; i++ )
+    {
+        if( ((parity+1) & 1) && c->buffers[i].lock[0] ) continue;
+        if( ((parity+1) & 2) && c->buffers[i].lock[1] ) continue;
+        pullup_alloc_buffer( c, &c->buffers[i] );
+        return pullup_lock_buffer( &c->buffers[i], parity );
+    }
+
+    return 0;
+}
+
+/*
+ *
+ * PULLUP FRAME FUNCTIONS
+ *
+ */
+
+struct pullup_frame * pullup_get_frame( struct pullup_context * c )
+{
+    int i;
+    struct pullup_frame * fr = c->frame;
+    int n = pullup_decide_frame_length( c );
+    int aff = c->first->next->affinity;
+
+    if ( !n ) return 0;
+    if ( fr->lock ) return 0;
+
+    if ( c->verbose )
+    {
+        pullup_print_aff_and_breaks(c, c->first);
+        printf("duration: %d    \n", n);
+    }
+
+    fr->lock++;
+    fr->length = n;
+    fr->parity = c->first->parity;
+    fr->buffer = 0;
+    for( i = 0; i < n; i++ )
+    {
+        /* We cheat and steal the buffer without release+relock */
+        fr->ifields[i] = c->first->buffer;
+        c->first->buffer = 0;
+        c->first = c->first->next;
+    }
+
+    if( n == 1 )
+    {
+        fr->ofields[fr->parity] = fr->ifields[0];
+        fr->ofields[fr->parity^1] = 0;
+    }
+    else if( n == 2 )
+    {
+        fr->ofields[fr->parity] = fr->ifields[0];
+        fr->ofields[fr->parity^1] = fr->ifields[1];
+    }
+    else if( n == 3 )
+    {
+        if( aff == 0 )
+        {
+            aff = (fr->ifields[0] == fr->ifields[1]) ? -1 : 1;
+        }
+        fr->ofields[fr->parity]   = fr->ifields[1+aff];
+        fr->ofields[fr->parity^1] = fr->ifields[1];
+    }
+    pullup_lock_buffer( fr->ofields[0], 0 );
+    pullup_lock_buffer( fr->ofields[1], 1 );
+
+    if( fr->ofields[0] == fr->ofields[1] )
+    {
+        fr->buffer = fr->ofields[0];
+        pullup_lock_buffer(fr->buffer, 2);
+        return fr;
+    }
+    return fr;
+}
+
+void pullup_pack_frame( struct pullup_context * c, struct pullup_frame * fr)
+{
+    int i;
+    if (fr->buffer) return;
+    if (fr->length < 2) return; /* FIXME: deal with this */
+    for( i = 0; i < 2; i++ )
+    {
+        if( fr->ofields[i]->lock[i^1] ) continue;
+        fr->buffer = fr->ofields[i];
+        pullup_lock_buffer(fr->buffer, 2);
+        pullup_copy_field( c, fr->buffer, fr->ofields[i^1], i^1 );
+        return;
+    }
+    fr->buffer = pullup_get_buffer( c, 2 );
+    pullup_copy_field( c, fr->buffer, fr->ofields[0], 0 );
+    pullup_copy_field( c, fr->buffer, fr->ofields[1], 1 );
+}
+
+void pullup_release_frame( struct pullup_frame * fr )
+{
+    int i;
+    for( i = 0; i < fr->length; i++ )
+    {
+        pullup_release_buffer( fr->ifields[i], fr->parity ^ (i&1) );
+    }
+    pullup_release_buffer( fr->ofields[0], 0 );
+    pullup_release_buffer( fr->ofields[1], 1 );
+    if (fr->buffer) pullup_release_buffer( fr->buffer, 2 );
+    fr->lock--;
+}
+
+/*
+ *
+ * PULLUP FIELD FUNCTIONS
+ *
+ */
+
+void pullup_submit_field( struct pullup_context * c,
+                          struct pullup_buffer * b,
+                          int parity )
+{
+    struct pullup_field * f;
+
+    /* Grow the circular list if needed */
+    pullup_check_field_queue( c );
+
+    /* Cannot have two fields of same parity in a row; drop the new one */
+    if( c->last && c->last->parity == parity ) return;
+
+    f = c->head;
+    f->parity = parity;
+    f->buffer = pullup_lock_buffer( b, parity );
+    f->flags = 0;
+    f->breaks = 0;
+    f->affinity = 0;
+
+    pullup_compute_metric( c, f, parity, f->prev->prev,
+                           parity, c->diff, f->diffs );
+    pullup_compute_metric( c, parity?f->prev:f, 0,
+                           parity?f:f->prev, 1, c->comb, f->comb );
+    pullup_compute_metric( c, f, parity, f,
+                           -1, c->var, f->var );
+
+    /* Advance the circular list */
+    if( !c->first ) c->first = c->head;
+    c->last = c->head;
+    c->head = c->head->next;
+}
+
+void pullup_flush_fields( struct pullup_context * c )
+{
+    struct pullup_field * f;
+
+    for( f = c->first; f && f != c->head; f = f->next )
+    {
+        pullup_release_buffer( f->buffer, f->parity );
+        f->buffer = 0;
+    }
+    c->first = c->last = 0;
+}
+
+/*
+ *
+ * DETELECINE FILTER FUNCTIONS
+ *
+ */
+
+hb_filter_private_t * hb_detelecine_init( int pix_fmt,
+                                          int width,
+                                          int height,
+                                          char * settings )
+{
+    if( pix_fmt != PIX_FMT_YUV420P )
+    {
+        return 0;
+    }
+
+    hb_filter_private_t * pv = malloc( sizeof(struct hb_filter_private_s) );
+
+    pv->pix_fmt  = pix_fmt;
+    pv->width[0]  = width;
+    pv->height[0] = height;
+    pv->width[1]  = pv->width[2] = width >> 1;
+    pv->height[1] = pv->height[2] = height >> 1;
+
+    pv->buf_out = hb_video_buffer_init( width, height );
+
+    struct pullup_context * ctx;
+    pv->pullup_ctx = ctx = pullup_alloc_context();
+
+    ctx->junk_left = ctx->junk_right  = 1;
+    ctx->junk_top  = ctx->junk_bottom = 4;
+    ctx->strict_breaks = -1;
+    ctx->metric_plane  = 0;
+
+    if( settings )
+    {
+        sscanf( settings, "%d:%d:%d:%d:%d:%d",
+                &ctx->junk_left,
+                &ctx->junk_right,
+                &ctx->junk_top,
+                &ctx->junk_bottom,
+                &ctx->strict_breaks,
+                &ctx->metric_plane );
+    }
+
+    ctx->format = PULLUP_FMT_Y;
+    ctx->nplanes = 4;
+
+    pullup_preinit_context( ctx );
+
+    ctx->bpp[0] = ctx->bpp[1] = ctx->bpp[2] = 8;
+    ctx->background[1] = ctx->background[2] = 128;
+
+    ctx->w[0]      = pv->width[0];
+    ctx->h[0]      = pv->height[0];
+    ctx->stride[0] = pv->width[0];
+
+    ctx->w[1]      = pv->width[1];
+    ctx->h[1]      = pv->height[1];
+    ctx->stride[1] = pv->width[1];
+
+    ctx->w[2]      = pv->width[2];
+    ctx->h[2]      = pv->height[2];
+    ctx->stride[2] = pv->width[2];
+
+    ctx->w[3]      = ((width+15)/16) * ((height+15)/16);
+    ctx->h[3]      = 2;
+    ctx->stride[3] = ctx->w[3];
+
+#if 0
+    ctx->verbose = 1;
+#endif
+
+    pullup_init_context( ctx );
+
+    pv->pullup_fakecount = 1;
+    pv->pullup_skipflag = 0;
+
+    return pv;
+}
+
+void hb_detelecine_close( hb_filter_private_t * pv )
+{
+    if( !pv )
+    {
+        return;
+    }
+
+    if( pv->buf_out )
+    {
+        hb_buffer_close( &pv->buf_out );
+    }
+
+    if( pv->pullup_ctx )
+    {
+        pullup_free_context( pv->pullup_ctx );
+    }
+
+    free( pv );
+}
+
+int hb_detelecine_work( const hb_buffer_t * buf_in,
+                        hb_buffer_t ** buf_out,
+                        int pix_fmt,
+                        int width,
+                        int height,
+                        hb_filter_private_t * pv )
+{
+    if( !pv ||
+        pix_fmt != pv->pix_fmt ||
+        width != pv->width[0] ||
+        height != pv->height[0] )
+    {
+        return FILTER_FAILED;
+    }
+
+    struct pullup_context * ctx = pv->pullup_ctx;
+    struct pullup_buffer  * buf;
+    struct pullup_frame   * frame;
+
+    buf = pullup_get_buffer( ctx, 2 );
+    if( !buf )
+    {
+        frame = pullup_get_frame( ctx );
+        pullup_release_frame( frame );
+        hb_log( "Could not get buffer from pullup!" );
+        return FILTER_FAILED;
+    }
+
+    /* Copy input buffer into pullup buffer */
+    avpicture_fill( &pv->pic_in, buf_in->data,
+                    pix_fmt, width, height );
+
+    hb_buffer_copy_settings( pv->buf_out, buf_in );
+
+    memcpy( buf->planes[0], pv->pic_in.data[0],
+            pv->width[0] * pv->height[0] * sizeof(uint8_t) );
+    memcpy( buf->planes[1], pv->pic_in.data[1],
+            pv->width[1] * pv->height[1] * sizeof(uint8_t) );
+    memcpy( buf->planes[2], pv->pic_in.data[2],
+            pv->width[2] * pv->height[2] * sizeof(uint8_t) );
+
+    /* Submit buffer fields based on buffer flags */
+    int parity = 1;
+    if( buf_in->flags & PIC_FLAG_TOP_FIELD_FIRST )
+    {
+        parity = 0;
+    }
+    pullup_submit_field( ctx, buf, parity );
+    pullup_submit_field( ctx, buf, parity^1 );
+    if( buf_in->flags & PIC_FLAG_REPEAT_FIRST_FIELD )
+    {
+        pullup_submit_field( ctx, buf, parity );
+    }
+    pullup_release_buffer( buf, 2 );
+
+    /* Get frame and check if pullup is ready */
+    frame = pullup_get_frame( ctx );
+    if( !frame )
+    {
+        if( pv->pullup_fakecount )
+        {
+            pv->pullup_fakecount--;
+
+            memcpy( pv->buf_out->data, buf_in->data, buf_in->size );
+
+            goto output_frame;
+        }
+        else
+        {
+            goto discard_frame;
+        }
+    }
+
+    /* Check to see if frame should be dropped */
+    if( frame->length < 2 )
+    {
+        pullup_release_frame( frame );
+        frame = pullup_get_frame( ctx );
+
+        if (!frame)
+        {
+            goto discard_frame;
+        }
+        if( frame->length < 2 )
+        {
+            pullup_release_frame( frame );
+
+            if( !(buf_in->flags & PIC_FLAG_REPEAT_FIRST_FIELD) )
+            {
+                goto discard_frame;
+            }
+
+            frame = pullup_get_frame( ctx );
+
+            if( !frame )
+            {
+                goto discard_frame;
+            }
+            if( frame->length < 2 )
+            {
+                pullup_release_frame( frame );
+                goto discard_frame;
+            }
+        }
+    }
+
+    /* Check to see if frame buffer is ready for export */
+    if( !frame->buffer )
+    {
+        pullup_pack_frame( ctx, frame );
+    }
+
+    /* Copy pullup frame buffer into output buffer */
+    avpicture_fill( &pv->pic_out, pv->buf_out->data,
+                    pix_fmt, width, height );
+
+    memcpy( pv->pic_out.data[0], frame->buffer->planes[0],
+            pv->width[0] * pv->height[0] * sizeof(uint8_t) );
+    memcpy( pv->pic_out.data[1], frame->buffer->planes[1],
+            pv->width[1] * pv->height[1] * sizeof(uint8_t) );
+    memcpy( pv->pic_out.data[2], frame->buffer->planes[2],
+            pv->width[2] * pv->height[2] * sizeof(uint8_t) );
+
+    pullup_release_frame( frame );
+
+output_frame:
+    *buf_out = pv->buf_out;
+    return FILTER_OK;
+
+/* This and all discard_frame calls shown above are
+   the result of me restoring the functionality in
+   pullup that huevos_rancheros disabled because
+   HB couldn't handle it.                           */
+discard_frame:
+    *buf_out = pv->buf_out;
+    return FILTER_DROP;
+
+}
+
+
diff --git a/libhb/dvd.c b/libhb/dvd.c
new file mode 100644 (file)
index 0000000..85fe47e
--- /dev/null
@@ -0,0 +1,1160 @@
+/* $Id: dvd.c,v 1.12 2005/11/25 15:05:25 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+#include "lang.h"
+
+#include "dvdread/ifo_read.h"
+#include "dvdread/nav_read.h"
+
+struct hb_dvd_s
+{
+    char         * path;
+
+    dvd_reader_t * reader;
+    ifo_handle_t * vmg;
+
+    int            vts;
+    int            ttn;
+    ifo_handle_t * ifo;
+    dvd_file_t   * file;
+
+    pgc_t        * pgc;
+    int            cell_start;
+    int            cell_end;
+    int            title_start;
+    int            title_end;
+    int            title_block_count;
+    int            cell_cur;
+    int            cell_next;
+    int            cell_overlap;
+    int            block;
+    int            pack_len;
+    int            next_vobu;
+    int            in_cell;
+    int            in_sync;
+    uint16_t       cur_vob_id;
+    uint8_t        cur_cell_id;
+};
+
+/***********************************************************************
+ * Local prototypes
+ **********************************************************************/
+static void FindNextCell( hb_dvd_t * );
+static int  dvdtime2msec( dvd_time_t * );
+
+char * hb_dvd_name( char * path )
+{
+    static char name[1024];
+    unsigned char unused[1024];
+    dvd_reader_t * reader;
+
+    reader = DVDOpen( path );
+    if( !reader )
+    {
+        return NULL;
+    }
+
+    if( DVDUDFVolumeInfo( reader, name, sizeof( name ),
+                          unused, sizeof( unused ) ) )
+    {
+        DVDClose( reader );
+        return NULL;
+    }
+
+    DVDClose( reader );
+    return name;
+}
+
+/***********************************************************************
+ * hb_dvd_init
+ ***********************************************************************
+ *
+ **********************************************************************/
+hb_dvd_t * hb_dvd_init( char * path )
+{
+    hb_dvd_t * d;
+
+    d = calloc( sizeof( hb_dvd_t ), 1 );
+
+    /* Open device */
+    if( !( d->reader = DVDOpen( path ) ) )
+    {
+        /*
+         * Not an error, may be a stream - which we'll try in a moment.
+         */
+        hb_log( "dvd: not a dvd - trying as a stream/file instead" );
+        goto fail;
+    }
+
+    /* Open main IFO */
+    if( !( d->vmg = ifoOpen( d->reader, 0 ) ) )
+    {
+        hb_error( "dvd: ifoOpen failed" );
+        goto fail;
+    }
+
+    d->path = strdup( path );
+
+    return d;
+
+fail:
+    if( d->vmg )    ifoClose( d->vmg );
+    if( d->reader ) DVDClose( d->reader );
+    free( d );
+    return NULL;
+}
+
+/***********************************************************************
+ * hb_dvd_title_count
+ **********************************************************************/
+int hb_dvd_title_count( hb_dvd_t * d )
+{
+    return d->vmg->tt_srpt->nr_of_srpts;
+}
+
+/***********************************************************************
+ * hb_dvd_title_scan
+ **********************************************************************/
+hb_title_t * hb_dvd_title_scan( hb_dvd_t * d, int t )
+{
+
+    hb_title_t   * title;
+    ifo_handle_t * vts = NULL;
+    int            pgc_id, pgn, i;
+    hb_chapter_t * chapter;
+    int            c;
+    uint64_t       duration;
+    float          duration_correction;
+    unsigned char  unused[1024];
+
+    hb_log( "scan: scanning title %d", t );
+
+    title = hb_title_init( d->path, t );
+    if( DVDUDFVolumeInfo( d->reader, title->name, sizeof( title->name ),
+                          unused, sizeof( unused ) ) )
+    {
+        char * p_cur, * p_last = d->path;
+        for( p_cur = d->path; *p_cur; p_cur++ )
+        {
+            if( p_cur[0] == '/' && p_cur[1] )
+            {
+                p_last = &p_cur[1];
+            }
+        }
+        snprintf( title->name, sizeof( title->name ), "%s", p_last );
+    }
+
+    /* VTS which our title is in */
+    title->vts = d->vmg->tt_srpt->title[t-1].title_set_nr;
+
+    if ( !title->vts )
+    {
+        /* A VTS of 0 means the title wasn't found in the title set */
+        hb_error("Invalid VTS (title set) number: %i", title->vts);
+        goto fail;
+    }
+
+    hb_log( "scan: opening IFO for VTS %d", title->vts );
+    if( !( vts = ifoOpen( d->reader, title->vts ) ) )
+    {
+        hb_error( "scan: ifoOpen failed" );
+        goto fail;
+    }
+
+    if( global_verbosity_level == 3 )
+    {
+        ifoPrint( d->reader, title->vts );
+    }
+
+    /* Position of the title in the VTS */
+    title->ttn = d->vmg->tt_srpt->title[t-1].vts_ttn;
+
+    /* Get pgc */
+    pgc_id = vts->vts_ptt_srpt->title[title->ttn-1].ptt[0].pgcn;
+    pgn    = vts->vts_ptt_srpt->title[title->ttn-1].ptt[0].pgn;
+    d->pgc = vts->vts_pgcit->pgci_srp[pgc_id-1].pgc;
+
+    hb_log("pgc_id: %d, pgn: %d: pgc: 0x%x", pgc_id, pgn, d->pgc);
+
+    if( !d->pgc )
+    {
+        hb_error( "scan: pgc not valid, skipping" );
+        goto fail;
+    }
+
+    if( pgn <= 0 || pgn > 99 )
+    {
+        hb_error( "scan: pgn %d not valid, skipping", pgn );
+        goto fail;
+    }
+
+    /* Start cell */
+    title->cell_start  = d->pgc->program_map[pgn-1] - 1;
+    title->block_start = d->pgc->cell_playback[title->cell_start].first_sector;
+
+    /* End cell */
+    title->cell_end  = d->pgc->nr_of_cells - 1;
+    title->block_end = d->pgc->cell_playback[title->cell_end].last_sector;
+
+    /* Block count */
+    title->block_count = 0;
+    d->cell_cur = title->cell_start;
+    while( d->cell_cur <= title->cell_end )
+    {
+#define cp d->pgc->cell_playback[d->cell_cur]
+        title->block_count += cp.last_sector + 1 - cp.first_sector;
+#undef cp
+        FindNextCell( d );
+        d->cell_cur = d->cell_next;
+    }
+
+    hb_log( "scan: vts=%d, ttn=%d, cells=%d->%d, blocks=%d->%d, "
+            "%d blocks", title->vts, title->ttn, title->cell_start,
+            title->cell_end, title->block_start, title->block_end,
+            title->block_count );
+
+    /* Get duration */
+    title->duration = 90LL * dvdtime2msec( &d->pgc->playback_time );
+    title->hours    = title->duration / 90000 / 3600;
+    title->minutes  = ( ( title->duration / 90000 ) % 3600 ) / 60;
+    title->seconds  = ( title->duration / 90000 ) % 60;
+    hb_log( "scan: duration is %02d:%02d:%02d (%lld ms)",
+            title->hours, title->minutes, title->seconds,
+            title->duration / 90 );
+
+    /* ignore titles under 10 seconds because they're often stills or
+     * clips with no audio & our preview code doesn't currently handle
+     * either of these. */
+    if( title->duration < 900000LL )
+    {
+        hb_log( "scan: ignoring title (too short)" );
+        goto fail;
+    }
+
+    /* Detect languages */
+    for( i = 0; i < vts->vtsi_mat->nr_of_vts_audio_streams; i++ )
+    {
+        hb_audio_t * audio, * audio_tmp;
+        int          audio_format, lang_code, audio_control,
+                     position, j;
+        iso639_lang_t * lang;
+        int lang_extension = 0;
+
+        hb_log( "scan: checking audio %d", i + 1 );
+
+        audio = calloc( sizeof( hb_audio_t ), 1 );
+
+        audio_format  = vts->vtsi_mat->vts_audio_attr[i].audio_format;
+        lang_code     = vts->vtsi_mat->vts_audio_attr[i].lang_code;
+        lang_extension = vts->vtsi_mat->vts_audio_attr[i].code_extension;
+        audio_control =
+            vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->audio_control[i];
+
+        if( !( audio_control & 0x8000 ) )
+        {
+            hb_log( "scan: audio channel is not active" );
+            free( audio );
+            continue;
+        }
+
+        position = ( audio_control & 0x7F00 ) >> 8;
+
+        switch( audio_format )
+        {
+            case 0x00:
+                audio->id    = ( ( 0x80 + position ) << 8 ) | 0xbd;
+                audio->config.in.codec = HB_ACODEC_AC3;
+                break;
+
+            case 0x02:
+            case 0x03:
+                audio->id    = 0xc0 + position;
+                audio->config.in.codec = HB_ACODEC_MPGA;
+                break;
+
+            case 0x04:
+                audio->id    = ( ( 0xa0 + position ) << 8 ) | 0xbd;
+                audio->config.in.codec = HB_ACODEC_LPCM;
+                break;
+
+            case 0x06:
+                audio->id    = ( ( 0x88 + position ) << 8 ) | 0xbd;
+                audio->config.in.codec = HB_ACODEC_DCA;
+                break;
+
+            default:
+                audio->id    = 0;
+                audio->config.in.codec = 0;
+                hb_log( "scan: unknown audio codec (%x)",
+                        audio_format );
+                break;
+        }
+        if( !audio->id )
+        {
+            continue;
+        }
+
+        /* Check for duplicate tracks */
+        audio_tmp = NULL;
+        for( j = 0; j < hb_list_count( title->list_audio ); j++ )
+        {
+            audio_tmp = hb_list_item( title->list_audio, j );
+            if( audio->id == audio_tmp->id )
+            {
+                break;
+            }
+            audio_tmp = NULL;
+        }
+        if( audio_tmp )
+        {
+            hb_log( "scan: duplicate audio track" );
+            free( audio );
+            continue;
+        }
+
+        audio->config.lang.type = lang_extension;
+
+        lang = lang_for_code( vts->vtsi_mat->vts_audio_attr[i].lang_code );
+
+        snprintf( audio->config.lang.description, sizeof( audio->config.lang.description ), "%s (%s)",
+            strlen(lang->native_name) ? lang->native_name : lang->eng_name,
+            audio->config.in.codec == HB_ACODEC_AC3 ? "AC3" : ( audio->config.in.codec ==
+                HB_ACODEC_DCA ? "DTS" : ( audio->config.in.codec ==
+                HB_ACODEC_MPGA ? "MPEG" : "LPCM" ) ) );
+        snprintf( audio->config.lang.simple, sizeof( audio->config.lang.simple ), "%s",
+                  strlen(lang->native_name) ? lang->native_name : lang->eng_name );
+        snprintf( audio->config.lang.iso639_2, sizeof( audio->config.lang.iso639_2 ), "%s",
+                  lang->iso639_2);
+
+        switch( lang_extension )
+        {
+        case 0:
+        case 1:
+            break;
+        case 2:
+            strcat( audio->config.lang.description, " (Visually Impaired)" );
+            break;
+        case 3:
+            strcat( audio->config.lang.description, " (Director's Commentary 1)" );
+            break;
+        case 4:
+            strcat( audio->config.lang.description, " (Director's Commentary 2)" );
+            break;
+        default:
+            break;
+        }
+
+        hb_log( "scan: id=%x, lang=%s, 3cc=%s ext=%i", audio->id,
+                audio->config.lang.description, audio->config.lang.iso639_2,
+                lang_extension );
+
+        audio->config.in.track = i;
+        hb_list_add( title->list_audio, audio );
+    }
+
+    if( !hb_list_count( title->list_audio ) )
+    {
+        hb_log( "scan: ignoring title (no audio track)" );
+        goto fail;
+    }
+
+    memcpy( title->palette,
+            vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->palette,
+            16 * sizeof( uint32_t ) );
+
+    /* Check for subtitles */
+    for( i = 0; i < vts->vtsi_mat->nr_of_vts_subp_streams; i++ )
+    {
+        hb_subtitle_t * subtitle;
+        int spu_control;
+        int position;
+        iso639_lang_t * lang;
+        int lang_extension = 0;
+
+        hb_log( "scan: checking subtitle %d", i + 1 );
+
+        spu_control =
+            vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->subp_control[i];
+
+        if( !( spu_control & 0x80000000 ) )
+        {
+            hb_log( "scan: subtitle channel is not active" );
+            continue;
+        }
+
+        if( vts->vtsi_mat->vts_video_attr.display_aspect_ratio )
+        {
+            switch( vts->vtsi_mat->vts_video_attr.permitted_df )
+            {
+                case 1:
+                    position = spu_control & 0xFF;
+                    break;
+                case 2:
+                    position = ( spu_control >> 8 ) & 0xFF;
+                    break;
+                default:
+                    position = ( spu_control >> 16 ) & 0xFF;
+            }
+        }
+        else
+        {
+            position = ( spu_control >> 24 ) & 0x7F;
+        }
+
+        lang_extension = vts->vtsi_mat->vts_subp_attr[i].code_extension;
+
+        lang = lang_for_code( vts->vtsi_mat->vts_subp_attr[i].lang_code );
+
+        subtitle = calloc( sizeof( hb_subtitle_t ), 1 );
+        subtitle->id = ( ( 0x20 + position ) << 8 ) | 0xbd;
+        snprintf( subtitle->lang, sizeof( subtitle->lang ), "%s",
+             strlen(lang->native_name) ? lang->native_name : lang->eng_name);
+        snprintf( subtitle->iso639_2, sizeof( subtitle->iso639_2 ), "%s",
+                  lang->iso639_2);
+
+        subtitle->type = lang_extension;
+
+        switch( lang_extension )
+        {  
+        case 0:
+            break;
+        case 1:
+            break;
+        case 2:
+            strcat( subtitle->lang, " (Caption with bigger size character)");
+            break;
+        case 3: 
+            strcat( subtitle->lang, " (Caption for Children)");
+            break;
+        case 4:
+            break;
+        case 5:
+            strcat( subtitle->lang, " (Closed Caption)");
+            break;
+        case 6:
+            strcat( subtitle->lang, " (Closed Caption with bigger size character)");
+            break;
+        case 7:
+            strcat( subtitle->lang, " (Closed Caption for Children)");
+            break;
+        case 8:
+            break;
+        case 9:
+            strcat( subtitle->lang, " (Forced Caption)");
+            break;
+        case 10:
+            break;
+        case 11:
+            break;
+        case 12:
+            break;
+        case 13:
+            strcat( subtitle->lang, " (Director's Commentary)");
+            break;
+        case 14:
+            strcat( subtitle->lang, " (Director's Commentary with bigger size character)");
+            break;
+        case 15:
+            strcat( subtitle->lang, " (Director's Commentary for Children)");
+        default:
+            break;
+        }
+
+        hb_log( "scan: id=%x, lang=%s, 3cc=%s", subtitle->id,
+                subtitle->lang, subtitle->iso639_2 );
+
+        hb_list_add( title->list_subtitle, subtitle );
+    }
+
+    /* Chapters */
+    hb_log( "scan: title %d has %d chapters", t,
+            vts->vts_ptt_srpt->title[title->ttn-1].nr_of_ptts );
+    for( i = 0, c = 1;
+         i < vts->vts_ptt_srpt->title[title->ttn-1].nr_of_ptts; i++ )
+    {
+        int pgc_id_next, pgn_next;
+        pgc_t * pgc_next;
+
+        chapter = calloc( sizeof( hb_chapter_t ), 1 );
+        /* remember the on-disc chapter number */
+        chapter->index = i + 1;
+
+        pgc_id = vts->vts_ptt_srpt->title[title->ttn-1].ptt[i].pgcn;
+        pgn    = vts->vts_ptt_srpt->title[title->ttn-1].ptt[i].pgn;
+        d->pgc = vts->vts_pgcit->pgci_srp[pgc_id-1].pgc;
+
+        /* Start cell */
+        chapter->cell_start  = d->pgc->program_map[pgn-1] - 1;
+        chapter->block_start =
+            d->pgc->cell_playback[chapter->cell_start].first_sector;
+
+        /* End cell */
+        if( i != vts->vts_ptt_srpt->title[title->ttn-1].nr_of_ptts - 1 )
+        {
+            /* The cell before the starting cell of the next chapter,
+               or... */
+            pgc_id_next = vts->vts_ptt_srpt->title[title->ttn-1].ptt[i+1].pgcn;
+            pgn_next    = vts->vts_ptt_srpt->title[title->ttn-1].ptt[i+1].pgn;
+            pgc_next    = vts->vts_pgcit->pgci_srp[pgc_id_next-1].pgc;
+            chapter->cell_end = pgc_next->program_map[pgn_next-1] - 2;
+            if( chapter->cell_end < 0 )
+            {
+                /* Huh? */
+                free( chapter );
+                continue;
+            }
+        }
+        else
+        {
+            /* ... the last cell of the title */
+            chapter->cell_end = title->cell_end;
+        }
+        chapter->block_end =
+            d->pgc->cell_playback[chapter->cell_end].last_sector;
+
+        /* Block count, duration */
+        pgc_id = vts->vts_ptt_srpt->title[title->ttn-1].ptt[0].pgcn;
+        pgn    = vts->vts_ptt_srpt->title[title->ttn-1].ptt[0].pgn;
+        d->pgc = vts->vts_pgcit->pgci_srp[pgc_id-1].pgc;
+        chapter->block_count = 0;
+        chapter->duration = 0;
+
+        d->cell_cur = chapter->cell_start;
+        while( d->cell_cur <= chapter->cell_end )
+        {
+#define cp d->pgc->cell_playback[d->cell_cur]
+            chapter->block_count += cp.last_sector + 1 - cp.first_sector;
+            chapter->duration += 90LL * dvdtime2msec( &cp.playback_time );
+#undef cp
+            FindNextCell( d );
+            d->cell_cur = d->cell_next;
+        }
+        hb_list_add( title->list_chapter, chapter );
+        c++;
+    }
+
+    /* The durations we get for chapters aren't precise. Scale them so
+       the total matches the title duration */
+    duration = 0;
+    for( i = 0; i < hb_list_count( title->list_chapter ); i++ )
+    {
+        chapter = hb_list_item( title->list_chapter, i );
+        duration += chapter->duration;
+    }
+    duration_correction = (float) title->duration / (float) duration;
+    for( i = 0; i < hb_list_count( title->list_chapter ); i++ )
+    {
+        int seconds;
+        chapter            = hb_list_item( title->list_chapter, i );
+        chapter->duration  = duration_correction * chapter->duration;
+        seconds            = ( chapter->duration + 45000 ) / 90000;
+        chapter->hours     = seconds / 3600;
+        chapter->minutes   = ( seconds % 3600 ) / 60;
+        chapter->seconds   = seconds % 60;
+
+        hb_log( "scan: chap %d c=%d->%d, b=%d->%d (%d), %lld ms",
+                chapter->index, chapter->cell_start, chapter->cell_end,
+                chapter->block_start, chapter->block_end,
+                chapter->block_count, chapter->duration / 90 );
+    }
+
+    /* Get aspect. We don't get width/height/rate infos here as
+       they tend to be wrong */
+    switch( vts->vtsi_mat->vts_video_attr.display_aspect_ratio )
+    {
+        case 0:
+            title->container_aspect = 4. / 3.;
+            break;
+        case 3:
+            title->container_aspect = 16. / 9.;
+            break;
+        default:
+            hb_log( "scan: unknown aspect" );
+            goto fail;
+    }
+
+    hb_log( "scan: aspect = %g", title->aspect );
+
+    /* This title is ok so far */
+    goto cleanup;
+
+fail:
+    hb_list_close( &title->list_audio );
+    free( title );
+    title = NULL;
+
+cleanup:
+    if( vts ) ifoClose( vts );
+
+    return title;
+}
+
+/***********************************************************************
+ * hb_dvd_start
+ ***********************************************************************
+ * Title and chapter start at 1
+ **********************************************************************/
+int hb_dvd_start( hb_dvd_t * d, int title, int chapter )
+{
+    int pgc_id, pgn;
+    int i;
+
+    /* Open the IFO and the VOBs for this title */
+    d->vts = d->vmg->tt_srpt->title[title-1].title_set_nr;
+    d->ttn = d->vmg->tt_srpt->title[title-1].vts_ttn;
+    if( !( d->ifo = ifoOpen( d->reader, d->vts ) ) )
+    {
+        hb_error( "dvd: ifoOpen failed for VTS %d", d->vts );
+        return 0;
+    }
+    if( !( d->file = DVDOpenFile( d->reader, d->vts,
+                                  DVD_READ_TITLE_VOBS ) ) )
+    {
+        hb_error( "dvd: DVDOpenFile failed for VTS %d", d->vts );
+        return 0;
+    }
+
+    /* Get title first and last blocks */
+    pgc_id         = d->ifo->vts_ptt_srpt->title[d->ttn-1].ptt[0].pgcn;
+    pgn            = d->ifo->vts_ptt_srpt->title[d->ttn-1].ptt[0].pgn;
+    d->pgc         = d->ifo->vts_pgcit->pgci_srp[pgc_id-1].pgc;
+    d->cell_start  = d->pgc->program_map[pgn - 1] - 1;
+    d->cell_end    = d->pgc->nr_of_cells - 1;
+    d->title_start = d->pgc->cell_playback[d->cell_start].first_sector;
+    d->title_end   = d->pgc->cell_playback[d->cell_end].last_sector;
+
+    /* Block count */
+    d->title_block_count = 0;
+    for( i = d->cell_start; i <= d->cell_end; i++ )
+    {
+        d->title_block_count += d->pgc->cell_playback[i].last_sector + 1 -
+            d->pgc->cell_playback[i].first_sector;
+    }
+
+    /* Get pgc for the current chapter */
+    pgc_id = d->ifo->vts_ptt_srpt->title[d->ttn-1].ptt[chapter-1].pgcn;
+    pgn    = d->ifo->vts_ptt_srpt->title[d->ttn-1].ptt[chapter-1].pgn;
+    d->pgc = d->ifo->vts_pgcit->pgci_srp[pgc_id-1].pgc;
+
+    /* Get the two first cells */
+    d->cell_cur = d->pgc->program_map[pgn-1] - 1;
+    FindNextCell( d );
+
+    d->block     = d->pgc->cell_playback[d->cell_cur].first_sector;
+    d->next_vobu = d->block;
+    d->pack_len  = 0;
+    d->cell_overlap = 0;
+    d->in_cell = 0;
+    d->in_sync = 2;
+
+    return 1;
+}
+
+/***********************************************************************
+ * hb_dvd_stop
+ ***********************************************************************
+ *
+ **********************************************************************/
+void hb_dvd_stop( hb_dvd_t * d )
+{
+    if( d->ifo )
+    {
+        ifoClose( d->ifo );
+        d->ifo = NULL;
+    }
+    if( d->file )
+    {
+        DVDCloseFile( d->file );
+        d->file = NULL;
+    }
+}
+
+/***********************************************************************
+ * hb_dvd_seek
+ ***********************************************************************
+ *
+ **********************************************************************/
+int hb_dvd_seek( hb_dvd_t * d, float f )
+{
+    int count, sizeCell;
+    int i;
+
+    count = f * d->title_block_count;
+
+    for( i = d->cell_start; i <= d->cell_end; i++ )
+    {
+        sizeCell = d->pgc->cell_playback[i].last_sector + 1 -
+            d->pgc->cell_playback[i].first_sector;
+
+        if( count < sizeCell )
+        {
+            d->cell_cur = i;
+            d->cur_cell_id = 0;
+            FindNextCell( d );
+
+            /* Now let hb_dvd_read find the next VOBU */
+            d->next_vobu = d->pgc->cell_playback[i].first_sector + count;
+            d->pack_len  = 0;
+            break;
+        }
+
+        count -= sizeCell;
+    }
+
+    if( i > d->cell_end )
+    {
+        return 0;
+    }
+
+    /*
+     * Assume that we are in sync, even if we are not given that it is obvious
+     * that we are out of sync if we have just done a seek.
+     */
+    d->in_sync = 2;
+
+    return 1;
+}
+
+
+/***********************************************************************
+ * is_nav_pack
+ ***********************************************************************/
+int is_nav_pack( unsigned char *buf )
+{
+    /*
+     * The NAV Pack is comprised of the PCI Packet and DSI Packet, both
+     * of these start at known offsets and start with a special identifier.
+     *
+     * NAV = {
+     *  PCI = { 00 00 01 bf  # private stream header
+     *          ?? ??        # length
+     *          00           # substream
+     *          ...
+     *        }
+     *  DSI = { 00 00 01 bf  # private stream header
+     *          ?? ??        # length
+     *          01           # substream
+     *          ...
+     *        }
+     *
+     * The PCI starts at offset 0x26 into the sector, and the DSI starts at 0x400
+     *
+     * This information from: http://dvd.sourceforge.net/dvdinfo/
+     */
+    if( ( buf[0x26] == 0x00 &&      // PCI
+          buf[0x27] == 0x00 &&
+          buf[0x28] == 0x01 &&
+          buf[0x29] == 0xbf &&
+          buf[0x2c] == 0x00 ) &&
+        ( buf[0x400] == 0x00 &&     // DSI
+          buf[0x401] == 0x00 &&
+          buf[0x402] == 0x01 &&
+          buf[0x403] == 0xbf &&
+          buf[0x406] == 0x01 ) )
+    {
+        return ( 1 );
+    } else {
+        return ( 0 );
+    }
+}
+
+
+/***********************************************************************
+ * hb_dvd_read
+ ***********************************************************************
+ *
+ **********************************************************************/
+int hb_dvd_read( hb_dvd_t * d, hb_buffer_t * b )
+{
+ top:
+    if( !d->pack_len )
+    {
+        /* New pack */
+        dsi_t dsi_pack;
+        int   error = 0;
+
+        // if we've just finished the last cell of the title we don't
+        // want to read another block because our next_vobu pointer
+        // is probably invalid. Just return 'no data' & our caller
+        // should check and discover we're at eof.
+        if ( d->cell_cur > d->cell_end )
+            return 0;
+
+        for( ;; )
+        {
+            int block, pack_len, next_vobu, read_retry;
+
+            for( read_retry = 0; read_retry < 3; read_retry++ )
+            {
+                if( DVDReadBlocks( d->file, d->next_vobu, 1, b->data ) == 1 )
+                {
+                    /*
+                     * Successful read.
+                     */
+                    break;
+                } else {
+                    hb_log( "dvd: Read Error on blk %d, attempt %d",
+                            d->next_vobu, read_retry );
+                }
+            }
+
+            if( read_retry == 3 )
+            {
+                hb_log( "dvd: vobu read error blk %d - skipping to cell %d",
+                        d->next_vobu, d->cell_next );
+                d->cell_cur  = d->cell_next;
+                if ( d->cell_cur > d->cell_end )
+                    return 0;
+                d->in_cell = 0;
+                d->next_vobu = d->pgc->cell_playback[d->cell_cur].first_sector;
+                FindNextCell( d );
+                d->cell_overlap = 1;
+                continue;
+            }
+
+            if ( !is_nav_pack( b->data ) ) {
+                (d->next_vobu)++;
+                if( d->in_sync == 1 ) {
+                    hb_log("dvd: Lost sync, searching for NAV pack at blk %d",
+                           d->next_vobu);
+                    d->in_sync = 0;
+                }
+                continue;
+            }
+
+            navRead_DSI( &dsi_pack, &b->data[DSI_START_BYTE] );
+
+            if ( d->in_sync == 0 && d->cur_cell_id &&
+                 (d->cur_vob_id != dsi_pack.dsi_gi.vobu_vob_idn ||
+                  d->cur_cell_id != dsi_pack.dsi_gi.vobu_c_idn ) )
+            {
+                // We walked out of the cell we're supposed to be in.
+                // If we're not at the start of our next cell go there.
+                hb_log("dvd: left cell %d (%u,%u) for (%u,%u) at block %u",
+                       d->cell_cur, d->cur_vob_id, d->cur_cell_id,
+                       dsi_pack.dsi_gi.vobu_vob_idn, dsi_pack.dsi_gi.vobu_c_idn,
+                       d->next_vobu );
+                if ( d->next_vobu != d->pgc->cell_playback[d->cell_next].first_sector )
+                {
+                    d->next_vobu = d->pgc->cell_playback[d->cell_next].first_sector;
+                    d->cur_cell_id = 0;
+                    continue;
+                }
+            }
+
+            block     = dsi_pack.dsi_gi.nv_pck_lbn;
+            pack_len  = dsi_pack.dsi_gi.vobu_ea;
+
+            // There are a total of 21 next vobu offsets (and 21 prev_vobu
+            // offsets) in the navpack SRI structure. The primary one is
+            // 'next_vobu' which is the offset (in dvd blocks) from the current
+            // block to the start of the next vobu. If the block at 'next_vobu'
+            // can't be read, 'next_video' is the offset to the vobu closest to it.
+            // The other 19 offsets are vobus at successively longer distances from
+            // the current block (this is so that a hardware player can do
+            // adaptive error recovery to skip over a bad spot on the disk). In all
+            // these offsets the high bit is set to indicate when it contains a
+            // valid offset. The next bit (2^30) is set to indicate that there's
+            // another valid offset in the SRI that's closer to the current block.
+            // A hardware player uses these bits to chose the closest valid offset
+            // and uses that as its next vobu. (Some mastering schemes appear to
+            // put a bogus offset in next_vobu with the 2^30 bit set & the
+            // correct offset in next_video. This works fine in hardware players
+            // but will mess up software that doesn't implement the full next
+            // vobu decision logic.) In addition to the flag bits there's a
+            // reserved value of the offset that indicates 'no next vobu' (which
+            // indicates the end of a cell). But having no next vobu pointer with a
+            // 'valid' bit set also indicates end of cell. Different mastering
+            // schemes seem to use all possible combinations of the flag bits
+            // and reserved values to indicate end of cell so we have to check
+            // them all or we'll get a disk read error from following an
+            // invalid offset.
+            uint32_t next_ptr = dsi_pack.vobu_sri.next_vobu;
+            if ( ( next_ptr & ( 1 << 31 ) ) == 0  ||
+                 ( next_ptr & ( 1 << 30 ) ) != 0 ||
+                 ( next_ptr & 0x3fffffff ) == 0x3fffffff )
+            {
+                next_ptr = dsi_pack.vobu_sri.next_video;
+                if ( ( next_ptr & ( 1 << 31 ) ) == 0 ||
+                     ( next_ptr & 0x3fffffff ) == 0x3fffffff )
+                {
+                    // don't have a valid forward pointer - assume end-of-cell
+                    d->block     = block;
+                    d->pack_len  = pack_len;
+                    break;
+                }
+            }
+            next_vobu = block + ( next_ptr & 0x3fffffff );
+
+            if( pack_len >  0    &&
+                pack_len <  1024 &&
+                block    >= d->next_vobu &&
+                ( block <= d->title_start + d->title_block_count ||
+                  block <= d->title_end ) )
+            {
+                d->block     = block;
+                d->pack_len  = pack_len;
+                d->next_vobu = next_vobu;
+                break;
+            }
+
+            /* Wasn't a valid VOBU, try next block */
+            if( ++error > 1024 )
+            {
+                hb_log( "dvd: couldn't find a VOBU after 1024 blocks" );
+                return 0;
+            }
+
+            (d->next_vobu)++;
+        }
+
+        if( d->in_sync == 0 || d->in_sync == 2 )
+        {
+            if( d->in_sync == 0 )
+            {
+                hb_log( "dvd: In sync with DVD at block %d", d->block );
+            }
+            d->in_sync = 1;
+        }
+
+        // Revert the cell overlap, and check for a chapter break
+        // If this cell is zero length (prev_vobu & next_vobu both
+        // set to END_OF_CELL) we need to check for beginning of
+        // cell before checking for end or we'll advance to the next
+        // cell too early and fail to generate a chapter mark when this
+        // cell starts a chapter.
+        if( ( dsi_pack.vobu_sri.prev_vobu & (1 << 31 ) ) == 0 ||
+            ( dsi_pack.vobu_sri.prev_vobu & 0x3fffffff ) == 0x3fffffff )
+        {
+            // A vobu that's not at the start of a cell can have an
+            // EOC prev pointer (this seems to be associated with some
+            // sort of drm). The rest of the content in the cell may be
+            // booby-trapped so treat this like an end-of-cell rather
+            // than a beginning of cell.
+            if ( d->pgc->cell_playback[d->cell_cur].first_sector < dsi_pack.dsi_gi.nv_pck_lbn &&
+                 d->pgc->cell_playback[d->cell_cur].last_sector >= dsi_pack.dsi_gi.nv_pck_lbn )
+            {
+                hb_log( "dvd: null prev_vobu in cell %d at block %d", d->cell_cur,
+                        d->block );
+                // treat like end-of-cell then go directly to start of next cell.
+                d->cell_cur  = d->cell_next;
+                d->in_cell = 0;
+                d->next_vobu = d->pgc->cell_playback[d->cell_cur].first_sector;
+                FindNextCell( d );
+                d->cell_overlap = 1;
+                goto top;
+            }
+            else
+            {
+                if ( d->block != d->pgc->cell_playback[d->cell_cur].first_sector )
+                {
+                    hb_log( "dvd: beginning of cell %d at block %d", d->cell_cur,
+                           d->block );
+                }
+                if( d->in_cell )
+                {
+                    hb_error( "dvd: assuming missed end of cell %d", d->cell_cur );
+                    d->cell_cur  = d->cell_next;
+                    d->next_vobu = d->pgc->cell_playback[d->cell_cur].first_sector;
+                    FindNextCell( d );
+                    d->cell_overlap = 1;
+                    d->in_cell = 0;
+                } else {
+                    d->in_cell = 1;
+                }
+                d->cur_vob_id = dsi_pack.dsi_gi.vobu_vob_idn;
+                d->cur_cell_id = dsi_pack.dsi_gi.vobu_c_idn;
+
+                if( d->cell_overlap )
+                {
+                    b->new_chap = hb_dvd_is_break( d );
+                    d->cell_overlap = 0;
+                }
+            }
+        }
+
+        if( ( dsi_pack.vobu_sri.next_vobu & (1 << 31 ) ) == 0 ||
+            ( dsi_pack.vobu_sri.next_vobu & 0x3fffffff ) == 0x3fffffff )
+        {
+            if ( d->block <= d->pgc->cell_playback[d->cell_cur].first_sector ||
+                 d->block > d->pgc->cell_playback[d->cell_cur].last_sector )
+            {
+                hb_log( "dvd: end of cell %d at block %d", d->cell_cur,
+                        d->block );
+            }
+            d->cell_cur  = d->cell_next;
+            d->in_cell = 0;
+            d->next_vobu = d->pgc->cell_playback[d->cell_cur].first_sector;
+            FindNextCell( d );
+            d->cell_overlap = 1;
+
+        }
+    }
+    else
+    {
+        if( DVDReadBlocks( d->file, d->block, 1, b->data ) != 1 )
+        {
+            // this may be a real DVD error or may be DRM. Either way
+            // we don't want to quit because of one bad block so set
+            // things up so we'll advance to the next vobu and recurse.
+            hb_error( "dvd: DVDReadBlocks failed (%d), skipping to vobu %u",
+                      d->block, d->next_vobu );
+            d->pack_len = 0;
+            goto top;  /* XXX need to restructure this routine & avoid goto */
+        }
+        d->pack_len--;
+    }
+
+    d->block++;
+
+    return 1;
+}
+
+/***********************************************************************
+ * hb_dvd_chapter
+ ***********************************************************************
+ * Returns in which chapter the next block to be read is.
+ * Chapter numbers start at 1.
+ **********************************************************************/
+int hb_dvd_chapter( hb_dvd_t * d )
+{
+    int     i;
+    int     pgc_id, pgn;
+    int     nr_of_ptts = d->ifo->vts_ptt_srpt->title[d->ttn-1].nr_of_ptts;
+    pgc_t * pgc;
+
+    for( i = nr_of_ptts - 1;
+         i >= 0;
+         i-- )
+    {
+        /* Get pgc for chapter (i+1) */
+        pgc_id = d->ifo->vts_ptt_srpt->title[d->ttn-1].ptt[i].pgcn;
+        pgn    = d->ifo->vts_ptt_srpt->title[d->ttn-1].ptt[i].pgn;
+        pgc    = d->ifo->vts_pgcit->pgci_srp[pgc_id-1].pgc;
+
+        if( d->cell_cur - d->cell_overlap >= pgc->program_map[pgn-1] - 1 &&
+            d->cell_cur - d->cell_overlap <= pgc->nr_of_cells - 1 )
+        {
+            /* We are in this chapter */
+            return i + 1;
+        }
+    }
+
+    /* End of title */
+    return -1;
+}
+
+/***********************************************************************
+ * hb_dvd_is_break
+ ***********************************************************************
+ * Returns chapter number if the current block is a new chapter start
+ **********************************************************************/
+int hb_dvd_is_break( hb_dvd_t * d )
+{
+    int     i;
+    int     pgc_id, pgn;
+       int     nr_of_ptts = d->ifo->vts_ptt_srpt->title[d->ttn-1].nr_of_ptts;
+    pgc_t * pgc;
+    int     cell;
+
+    for( i = nr_of_ptts - 1;
+         i > 0;
+         i-- )
+    {
+        /* Get pgc for chapter (i+1) */
+        pgc_id = d->ifo->vts_ptt_srpt->title[d->ttn-1].ptt[i].pgcn;
+        pgn    = d->ifo->vts_ptt_srpt->title[d->ttn-1].ptt[i].pgn;
+        pgc    = d->ifo->vts_pgcit->pgci_srp[pgc_id-1].pgc;
+        cell   = pgc->program_map[pgn-1] - 1;
+
+        if( cell <= d->cell_start )
+            break;
+
+        // This must not match against the start cell.
+        if( pgc->cell_playback[cell].first_sector == d->block && cell != d->cell_start )
+        {
+            return i + 1;
+        }
+    }
+
+    return 0;
+}
+
+/***********************************************************************
+ * hb_dvd_close
+ ***********************************************************************
+ * Closes and frees everything
+ **********************************************************************/
+void hb_dvd_close( hb_dvd_t ** _d )
+{
+    hb_dvd_t * d = *_d;
+
+    if( d->vmg )
+    {
+        ifoClose( d->vmg );
+    }
+    if( d->reader )
+    {
+        DVDClose( d->reader );
+    }
+
+    free( d );
+    *_d = NULL;
+}
+
+/***********************************************************************
+ * FindNextCell
+ ***********************************************************************
+ * Assumes pgc and cell_cur are correctly set, and sets cell_next to the
+ * cell to be read when we will be done with cell_cur.
+ **********************************************************************/
+static void FindNextCell( hb_dvd_t * d )
+{
+    int i = 0;
+
+    if( d->pgc->cell_playback[d->cell_cur].block_type ==
+            BLOCK_TYPE_ANGLE_BLOCK )
+    {
+
+        while( d->pgc->cell_playback[d->cell_cur+i].block_mode !=
+                   BLOCK_MODE_LAST_CELL )
+        {
+             i++;
+        }
+        d->cell_next = d->cell_cur + i + 1;
+        hb_log( "dvd: Skipping multi-angle cells %d-%d",
+                d->cell_cur,
+                d->cell_next - 1 );
+    }
+    else
+    {
+        d->cell_next = d->cell_cur + 1;
+    }
+}
+
+/***********************************************************************
+ * dvdtime2msec
+ ***********************************************************************
+ * From lsdvd
+ **********************************************************************/
+static int dvdtime2msec(dvd_time_t * dt)
+{
+    double frames_per_s[4] = {-1.0, 25.00, -1.0, 29.97};
+    double fps = frames_per_s[(dt->frame_u & 0xc0) >> 6];
+    long   ms;
+    ms  = (((dt->hour &   0xf0) >> 3) * 5 + (dt->hour   & 0x0f)) * 3600000;
+    ms += (((dt->minute & 0xf0) >> 3) * 5 + (dt->minute & 0x0f)) * 60000;
+    ms += (((dt->second & 0xf0) >> 3) * 5 + (dt->second & 0x0f)) * 1000;
+
+    if( fps > 0 )
+    {
+        ms += ((dt->frame_u & 0x30) >> 3) * 5 +
+              (dt->frame_u & 0x0f) * 1000.0 / fps;
+    }
+
+    return ms;
+}
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c
new file mode 100644 (file)
index 0000000..d22d30d
--- /dev/null
@@ -0,0 +1,260 @@
+/* $Id: encavcodec.c,v 1.23 2005/10/13 23:47:06 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+#include "libavcodec/avcodec.h"
+
+struct hb_work_private_s
+{
+    hb_job_t * job;
+    AVCodecContext * context;
+    FILE * file;
+};
+
+int  encavcodecInit( hb_work_object_t *, hb_job_t * );
+int  encavcodecWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+void encavcodecClose( hb_work_object_t * );
+
+hb_work_object_t hb_encavcodec =
+{
+    WORK_ENCAVCODEC,
+    "MPEG-4 encoder (libavcodec)",
+    encavcodecInit,
+    encavcodecWork,
+    encavcodecClose
+};
+
+int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
+{
+    AVCodec * codec;
+    AVCodecContext * context;
+    int rate_num, rate_den;
+
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+
+    pv->job = job;
+
+    codec = avcodec_find_encoder( CODEC_ID_MPEG4 );
+    if( !codec )
+    {
+        hb_log( "hb_work_encavcodec_init: avcodec_find_encoder "
+                "failed" );
+    }
+    context = avcodec_alloc_context();
+    if( job->vquality < 0.0 )
+    {
+        /* Rate control */
+        context->bit_rate = 1000 * job->vbitrate;
+        context->bit_rate_tolerance = 10 * context->bit_rate;
+    }
+    else
+    {
+        /* Constant quantizer */
+        // These settings produce better image quality than
+        // what was previously used
+        context->flags |= CODEC_FLAG_QSCALE;
+        if (job->vquality < 1.0)
+        {
+            float vquality;
+            vquality = 31 - job->vquality * 31;
+            // A value of 0 has undefined behavior
+            // and ffmpeg qp has integral increments
+            if (vquality < 1.0)
+                vquality = 1.0;
+            context->global_quality = FF_QP2LAMBDA * vquality + 0.5;
+        }
+        else
+        {
+            context->global_quality = FF_QP2LAMBDA * job->vquality + 0.5;
+        }
+        context->mb_decision = 1;
+        hb_log( "encavcodec: encoding at constant quantizer %d",
+                context->global_quality );
+    }
+    context->width     = job->width;
+    context->height    = job->height;
+    rate_num = job->vrate_base;
+    rate_den = job->vrate;
+    if (rate_den == 27000000)
+    {
+        int ii;
+        for (ii = 0; ii < hb_video_rates_count; ii++)
+        {
+            if (abs(rate_num - hb_video_rates[ii].rate) < 10)
+            {
+                rate_num = hb_video_rates[ii].rate;
+                break;
+            }
+        }
+    }
+    hb_reduce(&rate_num, &rate_den, rate_num, rate_den);
+    if ((rate_num & ~0xFFFF) || (rate_den & ~0xFFFF))
+    {
+        hb_log( "encavcodec: truncating framerate %d / %d", 
+                rate_num, rate_den );
+    }
+    while ((rate_num & ~0xFFFF) || (rate_den & ~0xFFFF))
+    {
+        rate_num >>= 1;
+        rate_den >>= 1;
+    }
+    context->time_base = (AVRational) { rate_num, rate_den };
+    context->gop_size  = 10 * job->vrate / job->vrate_base;
+    context->pix_fmt   = PIX_FMT_YUV420P;
+
+    if( job->pixel_ratio )
+    {
+        context->sample_aspect_ratio.num = job->pixel_aspect_width;
+        context->sample_aspect_ratio.den = job->pixel_aspect_height;
+
+        hb_log( "encavcodec: encoding with stored aspect %d/%d",
+                job->pixel_aspect_width, job->pixel_aspect_height );
+    }
+
+    if( job->mux & ( HB_MUX_MP4 | HB_MUX_PSP ) )
+    {
+        context->flags |= CODEC_FLAG_GLOBAL_HEADER;
+    }
+    if( job->mux & HB_MUX_PSP )
+    {
+        context->flags |= CODEC_FLAG_BITEXACT;
+    }
+    if( job->grayscale )
+    {
+        context->flags |= CODEC_FLAG_GRAY;
+    }
+
+    if( job->pass != 0 && job->pass != -1 )
+    {
+        char filename[1024]; memset( filename, 0, 1024 );
+        hb_get_tempory_filename( job->h, filename, "ffmpeg.log" );
+
+        if( job->pass == 1 )
+        {
+            pv->file = fopen( filename, "wb" );
+            context->flags |= CODEC_FLAG_PASS1;
+        }
+        else
+        {
+            int    size;
+            char * log;
+
+            pv->file = fopen( filename, "rb" );
+            fseek( pv->file, 0, SEEK_END );
+            size = ftell( pv->file );
+            fseek( pv->file, 0, SEEK_SET );
+            log = malloc( size + 1 );
+            log[size] = '\0';
+            fread( log, size, 1, pv->file );
+            fclose( pv->file );
+            pv->file = NULL;
+
+            context->flags    |= CODEC_FLAG_PASS2;
+            context->stats_in  = log;
+        }
+    }
+
+    if( avcodec_open( context, codec ) )
+    {
+        hb_log( "hb_work_encavcodec_init: avcodec_open failed" );
+    }
+    pv->context = context;
+
+    if( ( job->mux & ( HB_MUX_MP4 | HB_MUX_PSP ) ) && job->pass != 1 )
+    {
+#if 0
+        /* Hem hem */
+        w->config->mpeg4.length = 15;
+        memcpy( w->config->mpeg4.bytes, context->extradata + 15, 15 );
+#else
+        w->config->mpeg4.length = context->extradata_size;
+        memcpy( w->config->mpeg4.bytes, context->extradata,
+                context->extradata_size );
+#endif
+    }
+
+    return 0;
+}
+
+/***********************************************************************
+ * Close
+ ***********************************************************************
+ *
+ **********************************************************************/
+void encavcodecClose( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+
+    if( pv->context )
+    {
+        hb_deep_log( 2, "encavcodec: closing libavcodec" );
+        avcodec_flush_buffers( pv->context );
+        avcodec_close( pv->context );
+    }
+    if( pv->file )
+    {
+        fclose( pv->file );
+    }
+    free( pv );
+    w->private_data = NULL;
+}
+
+/***********************************************************************
+ * Work
+ ***********************************************************************
+ *
+ **********************************************************************/
+int encavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                    hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_job_t * job = pv->job;
+    AVFrame  * frame;
+    hb_buffer_t * in = *buf_in, * buf;
+
+    if ( in->size <= 0 )
+    {
+        /* EOF on input - send it downstream & say we're done */
+        *buf_out = in;
+        *buf_in = NULL;
+       return HB_WORK_DONE;
+    }
+
+    frame              = avcodec_alloc_frame();
+    frame->data[0]     = in->data;
+    frame->data[1]     = frame->data[0] + job->width * job->height;
+    frame->data[2]     = frame->data[1] + job->width * job->height / 4;
+    frame->linesize[0] = job->width;
+    frame->linesize[1] = job->width / 2;
+    frame->linesize[2] = job->width / 2;
+    // For constant quality, setting the quality in AVCodecContext 
+    // doesn't do the trick.  It must be set in the AVFrame.
+    frame->quality = pv->context->global_quality;
+
+    /* Should be way too large */
+    buf = hb_video_buffer_init( job->width, job->height );
+    buf->size = avcodec_encode_video( pv->context, buf->data, buf->alloc,
+                                      frame );
+    buf->start = in->start;
+    buf->stop  = in->stop;
+    buf->frametype   = pv->context->coded_frame->key_frame ? HB_FRAME_KEY : HB_FRAME_REF;
+
+    av_free( frame );
+
+    if( job->pass == 1 )
+    {
+        /* Write stats */
+        fprintf( pv->file, "%s", pv->context->stats_out );
+    }
+
+    *buf_out = buf;
+
+    return HB_WORK_OK;
+}
+
+
diff --git a/libhb/encfaac.c b/libhb/encfaac.c
new file mode 100644 (file)
index 0000000..c955199
--- /dev/null
@@ -0,0 +1,304 @@
+/* $Id: encfaac.c,v 1.13 2005/03/03 17:21:57 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+#include "faac.h"
+
+struct hb_work_private_s
+{
+    hb_job_t   * job;
+
+    faacEncHandle * faac;
+    unsigned long   input_samples;
+    unsigned long   output_bytes;
+    uint8_t       * buf;
+    uint8_t       * obuf;
+    hb_list_t     * list;
+    int64_t         pts;
+    int64_t         framedur;
+       int             out_discrete_channels;
+};
+
+int  encfaacInit( hb_work_object_t *, hb_job_t * );
+int  encfaacWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+void encfaacClose( hb_work_object_t * );
+
+hb_work_object_t hb_encfaac =
+{
+    WORK_ENCFAAC,
+    "AAC encoder (libfaac)",
+    encfaacInit,
+    encfaacWork,
+    encfaacClose
+};
+
+static const int valid_rates[] =
+{
+    22050, 24000, 32000, 44100, 48000, 0
+};
+
+static int find_samplerate( int rate )
+{
+    int i;
+
+    for ( i = 0; valid_rates[i] && rate > valid_rates[i]; ++i )
+    {
+    }
+    return i;
+}
+
+/***********************************************************************
+ * hb_work_encfaac_init
+ ***********************************************************************
+ *
+ **********************************************************************/
+int encfaacInit( hb_work_object_t * w, hb_job_t * job )
+{
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    hb_audio_t * audio = w->audio;
+    faacEncConfigurationPtr cfg;
+    uint8_t * bytes;
+    unsigned long length;
+
+    w->private_data = pv;
+
+    pv->job   = job;
+
+       /* pass the number of channels used into the private work data */
+    pv->out_discrete_channels = HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->config.out.mixdown);
+
+    /* if the sample rate is 'auto' and that has given us an invalid output */
+    /* rate, map it to the next highest output rate or 48K if above the highest. */
+    int rate_index = find_samplerate(audio->config.out.samplerate);
+    if ( audio->config.out.samplerate != valid_rates[rate_index] )
+    {
+        int rate = valid_rates[valid_rates[rate_index]? rate_index : rate_index - 1];
+        hb_log( "encfaac changing output samplerate from %d to %d",
+                audio->config.out.samplerate, rate );
+        audio->config.out.samplerate = rate;
+
+        /* if the new rate is over the max bandwidth per channel limit */
+        /* lower the bandwidth. */
+        double bw = audio->config.out.bitrate * 1000 / pv->out_discrete_channels;
+        if ( bw > (double)rate * (6144./1024.) )
+        {
+            int newbr = (double)rate * (6.144/1024.) * pv->out_discrete_channels;
+            hb_log( "encfaac changing output bitrate from %d to %d",
+                    audio->config.out.bitrate, newbr );
+            audio->config.out.bitrate = newbr;
+        }
+    }
+
+    pv->faac = faacEncOpen( audio->config.out.samplerate, pv->out_discrete_channels,
+                            &pv->input_samples, &pv->output_bytes );
+    pv->buf  = malloc( pv->input_samples * sizeof( float ) );
+    pv->obuf = malloc( pv->output_bytes );
+    pv->framedur = 90000LL * pv->input_samples /
+                   ( audio->config.out.samplerate * pv->out_discrete_channels );
+
+    cfg                = faacEncGetCurrentConfiguration( pv->faac );
+    cfg->mpegVersion   = MPEG4;
+    cfg->aacObjectType = LOW;
+    cfg->allowMidside  = 1;
+
+       if (pv->out_discrete_channels == 6) {
+               /* we are preserving 5.1 audio into 6-channel AAC,
+               so indicate that we have an lfe channel */
+               cfg->useLfe    = 1;
+       } else {
+               cfg->useLfe    = 0;
+       }
+
+    cfg->useTns        = 0;
+    cfg->bitRate       = audio->config.out.bitrate * 1000 / pv->out_discrete_channels; /* Per channel */
+    cfg->bandWidth     = 0;
+    cfg->outputFormat  = 0;
+    cfg->inputFormat   =  FAAC_INPUT_FLOAT;
+
+    if (audio->config.out.mixdown == HB_AMIXDOWN_6CH && audio->config.in.codec == HB_ACODEC_AC3)
+    {
+        /* we are preserving 5.1 AC-3 audio into 6-channel AAC, and need to
+        re-map the output of deca52 into our own mapping - the mapping
+        below is the default mapping expected by QuickTime */
+        /* DTS output from libdca is already in the right mapping for QuickTime */
+        /* This doesn't seem to be correct for VLC on Linux */
+        cfg->channel_map[0] = 2;
+        cfg->channel_map[1] = 1;
+        cfg->channel_map[2] = 3;
+        cfg->channel_map[3] = 4;
+        cfg->channel_map[4] = 5;
+        cfg->channel_map[5] = 0;
+       }
+
+    if( !faacEncSetConfiguration( pv->faac, cfg ) )
+    {
+        hb_log( "faacEncSetConfiguration failed" );
+        *job->die = 1;
+        return 0;
+    }
+
+    if( faacEncGetDecoderSpecificInfo( pv->faac, &bytes, &length ) < 0 )
+    {
+        hb_log( "faacEncGetDecoderSpecificInfo failed" );
+        *job->die = 1;
+        return 0;
+    }
+    memcpy( w->config->aac.bytes, bytes, length );
+    w->config->aac.length = length;
+    free( bytes );
+
+    pv->list = hb_list_init();
+
+    return 0;
+}
+
+/***********************************************************************
+ * Close
+ ***********************************************************************
+ *
+ **********************************************************************/
+void encfaacClose( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    if ( pv )
+    {
+        if ( pv->faac )
+        {
+            faacEncClose( pv->faac );
+            pv->faac = NULL;
+        }
+        if ( pv->buf )
+        {
+            free( pv->buf );
+            pv->buf = NULL;
+        }
+        if ( pv->obuf )
+        {
+            free( pv->obuf );
+            pv->obuf = NULL;
+        }
+        if ( pv->list )
+            hb_list_empty( &pv->list );
+
+        free( pv );
+        w->private_data = NULL;
+    }
+}
+
+/***********************************************************************
+ * Encode
+ ***********************************************************************
+ *
+ **********************************************************************/
+static hb_buffer_t * Encode( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+
+    if( hb_list_bytes( pv->list ) < pv->input_samples * sizeof( float ) )
+    {
+        /* Need more data */
+        return NULL;
+    }
+
+    uint64_t pts, pos;
+    hb_list_getbytes( pv->list, pv->buf, pv->input_samples * sizeof( float ),
+                      &pts, &pos );
+    int size = faacEncEncode( pv->faac, (int32_t *)pv->buf, pv->input_samples,
+                              pv->obuf, pv->output_bytes );
+
+    // AAC needs four frames before it can start encoding so we'll get nothing
+    // on the first three calls to the encoder.
+    if ( size > 0 )
+    {
+        hb_buffer_t * buf = hb_buffer_init( size );
+        memcpy( buf->data, pv->obuf, size );
+        buf->size = size;
+        buf->start = pv->pts;
+        pv->pts += pv->framedur;
+        buf->stop = pv->pts;
+        buf->frametype   = HB_FRAME_AUDIO;
+        return buf;
+    }
+    return NULL;
+}
+
+static hb_buffer_t *Flush( hb_work_object_t *w, hb_buffer_t *bufin )
+{
+    hb_work_private_t *pv = w->private_data;
+
+    // pad whatever data we have out to four input frames.
+    int nbytes = hb_list_bytes( pv->list );
+    int pad = pv->input_samples * sizeof(float) * 4 - nbytes;
+    if ( pad > 0 )
+    {
+        hb_buffer_t *tmp = hb_buffer_init( pad );
+        memset( tmp->data, 0, pad );
+        hb_list_add( pv->list, tmp );
+    }
+
+    // There are up to three frames buffered in the encoder plus one
+    // in our list buffer so four calls to Encode should get them all.
+    hb_buffer_t *bufout = NULL, *buf = NULL;
+    while ( hb_list_bytes( pv->list ) >= pv->input_samples * sizeof(float) )
+    {
+        hb_buffer_t *b = Encode( w );
+        if ( b )
+        {
+            if ( bufout == NULL )
+            {
+                bufout = b;
+            }
+            else
+            {
+                buf->next = b;
+            }
+            buf = b;
+        }
+    }
+    // add the eof marker to the end of our buf chain
+    if ( buf )
+        buf->next = bufin;
+    else
+        bufout = bufin;
+    return bufout;
+}
+
+/***********************************************************************
+ * Work
+ ***********************************************************************
+ *
+ **********************************************************************/
+int encfaacWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                 hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * buf;
+
+    if ( (*buf_in)->size <= 0 )
+    {
+        // EOF on input. Finish encoding what we have buffered then send
+        // it & the eof downstream.
+
+        *buf_out = Flush( w, *buf_in );
+        *buf_in = NULL;
+        return HB_WORK_DONE;
+    }
+
+    hb_list_add( pv->list, *buf_in );
+    *buf_in = NULL;
+
+    *buf_out = buf = Encode( w );
+
+    while( buf )
+    {
+        buf->next = Encode( w );
+        buf       = buf->next;
+    }
+
+    return HB_WORK_OK;
+}
+
diff --git a/libhb/enclame.c b/libhb/enclame.c
new file mode 100644 (file)
index 0000000..8f4defc
--- /dev/null
@@ -0,0 +1,164 @@
+/* $Id: enclame.c,v 1.9 2005/03/05 14:27:05 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+#include "lame/lame.h"
+
+int  enclameInit( hb_work_object_t *, hb_job_t * );
+int  enclameWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+void enclameClose( hb_work_object_t * );
+
+hb_work_object_t hb_enclame =
+{
+    WORK_ENCLAME,
+    "MP3 encoder (libmp3lame)",
+    enclameInit,
+    enclameWork,
+    enclameClose
+};
+
+struct hb_work_private_s
+{
+    hb_job_t   * job;
+
+    /* LAME handle */
+    lame_global_flags * lame;
+
+    unsigned long   input_samples;
+    unsigned long   output_bytes;
+    uint8_t       * buf;
+
+    hb_list_t     * list;
+    int64_t         pts;
+};
+
+int enclameInit( hb_work_object_t * w, hb_job_t * job )
+{
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    hb_audio_t * audio = w->audio;
+    w->private_data = pv;
+
+    pv->job   = job;
+
+    hb_log( "enclame: opening libmp3lame" );
+
+    pv->lame = lame_init();
+    lame_set_brate( pv->lame, audio->config.out.bitrate );
+    lame_set_in_samplerate( pv->lame, audio->config.out.samplerate );
+    lame_set_out_samplerate( pv->lame, audio->config.out.samplerate );
+    lame_init_params( pv->lame );
+
+    pv->input_samples = 1152 * 2;
+    pv->output_bytes = LAME_MAXMP3BUFFER;
+    pv->buf  = malloc( pv->input_samples * sizeof( float ) );
+
+    pv->list = hb_list_init();
+    pv->pts  = -1;
+
+    return 0;
+}
+
+/***********************************************************************
+ * Close
+ ***********************************************************************
+ *
+ **********************************************************************/
+void enclameClose( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+
+    lame_close( pv->lame );
+    hb_list_empty( &pv->list );
+    free( pv->buf );
+    free( pv );
+    w->private_data = NULL;
+}
+
+/***********************************************************************
+ * Encode
+ ***********************************************************************
+ *
+ **********************************************************************/
+static hb_buffer_t * Encode( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_audio_t * audio = w->audio;
+    hb_buffer_t * buf;
+    int16_t samples_s16[1152 * 2];
+    uint64_t pts, pos;
+       int      i;
+
+    if( hb_list_bytes( pv->list ) < pv->input_samples * sizeof( float ) )
+    {
+        return NULL;
+    }
+
+    hb_list_getbytes( pv->list, pv->buf, pv->input_samples * sizeof( float ),
+                      &pts, &pos);
+
+    for( i = 0; i < 1152 * 2; i++ )
+    {
+        samples_s16[i] = ((float*) pv->buf)[i];
+    }
+
+    buf        = hb_buffer_init( pv->output_bytes );
+    buf->start = pts + 90000 * pos / 2 / sizeof( float ) / audio->config.out.samplerate;
+    buf->stop  = buf->start + 90000 * 1152 / audio->config.out.samplerate;
+    buf->size  = lame_encode_buffer_interleaved( pv->lame, samples_s16,
+            1152, buf->data, LAME_MAXMP3BUFFER );
+    buf->frametype   = HB_FRAME_AUDIO;
+
+    if( !buf->size )
+    {
+        /* Encoding was successful but we got no data. Try to encode
+           more */
+        hb_buffer_close( &buf );
+        return Encode( w );
+    }
+    else if( buf->size < 0 )
+    {
+        hb_log( "enclame: lame_encode_buffer failed" );
+        hb_buffer_close( &buf );
+        return NULL;
+    }
+
+    return buf;
+}
+
+/***********************************************************************
+ * Work
+ ***********************************************************************
+ *
+ **********************************************************************/
+int enclameWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                 hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * buf;
+
+    if ( (*buf_in)->size <= 0 )
+    {
+        /* EOF on input - send it downstream & say we're done */
+        *buf_out = *buf_in;
+        *buf_in = NULL;
+       return HB_WORK_DONE;
+    }
+
+    hb_list_add( pv->list, *buf_in );
+    *buf_in = NULL;
+
+    *buf_out = buf = Encode( w );
+
+    while( buf )
+    {
+        buf->next = Encode( w );
+        buf       = buf->next;
+    }
+
+    return HB_WORK_OK;
+}
+
diff --git a/libhb/enctheora.c b/libhb/enctheora.c
new file mode 100644 (file)
index 0000000..bcc27eb
--- /dev/null
@@ -0,0 +1,168 @@
+/* This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+#include "theora/theora.h"
+
+int  enctheoraInit( hb_work_object_t *, hb_job_t * );
+int  enctheoraWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+void enctheoraClose( hb_work_object_t * );
+
+hb_work_object_t hb_enctheora =
+{
+    WORK_ENCTHEORA,
+    "Theora encoder (libtheora)",
+    enctheoraInit,
+    enctheoraWork,
+    enctheoraClose
+};
+
+struct hb_work_private_s
+{
+    hb_job_t * job;
+
+    theora_state theora;
+};
+
+int enctheoraInit( hb_work_object_t * w, hb_job_t * job )
+{
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+
+    pv->job = job;
+
+    theora_info ti;
+    theora_comment tc;
+    ogg_packet op;
+    theora_info_init( &ti );
+
+    ti.width = ti.frame_width = job->width;
+    ti.height = ti.frame_height = job->height;
+    ti.offset_x = ti.offset_y = 0;
+    ti.fps_numerator = job->vrate;
+    ti.fps_denominator = job->vrate_base;
+    if (job->pixel_ratio)
+    {
+        ti.aspect_numerator = job->pixel_aspect_width;
+        ti.aspect_denominator = job->pixel_aspect_height;
+    }
+    else
+    {
+        ti.aspect_numerator = ti.aspect_denominator = 1;
+    }
+    ti.colorspace = OC_CS_UNSPECIFIED;
+    ti.pixelformat = OC_PF_420;
+    ti.keyframe_auto_p = 1;
+    ti.keyframe_frequency = (job->vrate / job->vrate_base) + 1;
+    ti.keyframe_frequency_force = (10 * job->vrate / job->vrate_base) + 1;
+    /* From encoder_example.c */
+    ti.quick_p = 1;
+    ti.dropframes_p = 0;
+    ti.keyframe_auto_threshold = 80;
+    ti.keyframe_mindistance = 8;
+    ti.noise_sensitivity = 1;
+    ti.sharpness = 0;
+    if (job->vquality < 0.0 || job->vquality > 1.0)
+    {
+        ti.target_bitrate = job->vbitrate * 1000;
+        ti.keyframe_data_target_bitrate = job->vbitrate * 1000 * 1.5;
+        ti.quality = 0;
+    }
+    else
+    {
+        ti.target_bitrate = 0;
+        ti.quality = 63 * job->vquality;
+    }
+
+    theora_encode_init( &pv->theora, &ti );
+    theora_info_clear( &ti );
+
+    theora_encode_header( &pv->theora, &op );
+    memcpy(w->config->theora.headers[0], &op, sizeof(op));
+    memcpy(w->config->theora.headers[0] + sizeof(op), op.packet, op.bytes );
+
+    theora_comment_init(&tc);
+    theora_encode_comment(&tc,&op);
+    memcpy(w->config->theora.headers[1], &op, sizeof(op));
+    memcpy(w->config->theora.headers[1] + sizeof(op), op.packet, op.bytes );
+    free(op.packet);
+
+    theora_encode_tables(&pv->theora, &op);
+    memcpy(w->config->theora.headers[2], &op, sizeof(op));
+    memcpy(w->config->theora.headers[2] + sizeof(op), op.packet, op.bytes );
+
+    return 0;
+}
+
+/***********************************************************************
+ * Close
+ ***********************************************************************
+ *
+ **********************************************************************/
+void enctheoraClose( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    /* TODO: Free alloc'd */
+
+    free( pv );
+    w->private_data = NULL;
+}
+
+/***********************************************************************
+ * Work
+ ***********************************************************************
+ *
+ **********************************************************************/
+int enctheoraWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                 hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_job_t * job = pv->job;
+    hb_buffer_t * in = *buf_in, * buf;
+    yuv_buffer yuv;
+    ogg_packet op;
+
+    if ( in->size <= 0 )
+    {
+        // EOF on input - send it downstream & say we're done.
+        // XXX may need to flush packets via a call to
+        //  theora_encode_packetout(&pv->theora, 1, &op);
+        // but we don't have a timestamp to put on those packets so we
+        // drop them for now.
+        *buf_out = in;
+        *buf_in = NULL;
+       return HB_WORK_DONE;
+    }
+
+    memset(&op, 0, sizeof(op));
+    memset(&yuv, 0, sizeof(yuv));
+
+    yuv.y_width = job->width;
+    yuv.y_height = job->height;
+    yuv.y_stride = job->width;
+
+    yuv.uv_width = (job->width + 1) / 2;
+    yuv.uv_height = (job->height + 1) / 2;
+    yuv.uv_stride = yuv.uv_width;
+
+    yuv.y = in->data;
+    yuv.u = in->data + job->width * job->height;
+    yuv.v = in->data + ( job->width * job->height ) + ( yuv.uv_width * yuv.uv_height );
+
+    theora_encode_YUVin(&pv->theora, &yuv);
+
+    theora_encode_packetout(&pv->theora, 0, &op);
+
+    buf = hb_buffer_init( op.bytes + sizeof(op) );
+    memcpy(buf->data, &op, sizeof(op));
+    memcpy(buf->data + sizeof(op), op.packet, op.bytes);
+    buf->frametype = ( theora_packet_iskeyframe(&op) ) ? HB_FRAME_KEY : HB_FRAME_REF;
+    buf->start = in->start;
+    buf->stop  = in->stop;
+
+    *buf_out = buf;
+
+    return HB_WORK_OK;
+}
+
diff --git a/libhb/encvorbis.c b/libhb/encvorbis.c
new file mode 100644 (file)
index 0000000..47a6077
--- /dev/null
@@ -0,0 +1,275 @@
+/* $Id: encvorbis.c,v 1.6 2005/03/05 15:08:32 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+#include "vorbis/vorbisenc.h"
+
+#define OGGVORBIS_FRAME_SIZE 1024
+
+int  encvorbisInit( hb_work_object_t *, hb_job_t * );
+int  encvorbisWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+void encvorbisClose( hb_work_object_t * );
+
+hb_work_object_t hb_encvorbis =
+{
+    WORK_ENCVORBIS,
+    "Vorbis encoder (libvorbis)",
+    encvorbisInit,
+    encvorbisWork,
+    encvorbisClose
+};
+
+struct hb_work_private_s
+{
+    hb_job_t   * job;
+
+    vorbis_info        vi;
+    vorbis_comment     vc;
+    vorbis_dsp_state   vd;
+    vorbis_block       vb;
+
+    unsigned long   input_samples;
+    uint8_t       * buf;
+    uint64_t        pts;
+
+    hb_list_t     * list;
+    int           out_discrete_channels;
+    int           channel_map[6];
+    int64_t       prev_blocksize;
+};
+
+int encvorbisInit( hb_work_object_t * w, hb_job_t * job )
+{
+    hb_audio_t * audio = w->audio;
+    int i;
+    ogg_packet header[3];
+    struct ovectl_ratemanage2_arg  ctl_rate_arg;
+
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+    pv->out_discrete_channels = HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->config.out.mixdown);
+
+    pv->job   = job;
+
+    hb_log( "encvorbis: opening libvorbis" );
+
+    /* 28kbps/channel seems to be the minimum for 6ch vorbis. */
+    int min_bitrate = 28 * pv->out_discrete_channels;
+    if (pv->out_discrete_channels > 2 && audio->config.out.bitrate < min_bitrate)
+    {
+        hb_log( "encvorbis: Selected bitrate (%d kbps) too low for %d channel audio.", audio->config.out.bitrate, pv->out_discrete_channels);
+        hb_log( "encvorbis: Resetting bitrate to %d kbps", min_bitrate);
+        /* Naughty! We shouldn't modify the audio from here. */
+        audio->config.out.bitrate = min_bitrate;
+    }
+
+    /* init */
+    vorbis_info_init( &pv->vi );
+    if( vorbis_encode_setup_managed( &pv->vi, pv->out_discrete_channels,
+          audio->config.out.samplerate, -1, 1000 * audio->config.out.bitrate, -1 ) )
+    {
+        hb_error( "encvorbis: vorbis_encode_setup_managed failed.\n" );
+        *job->die = 1;
+        return 0;
+    }
+
+    if( vorbis_encode_ctl( &pv->vi, OV_ECTL_RATEMANAGE2_GET, &ctl_rate_arg) )
+    {
+        hb_log( "encvorbis: vorbis_encode_ctl( ratemanage2_get ) failed" );
+    }
+
+    ctl_rate_arg.bitrate_average_kbps = audio->config.out.bitrate;
+    ctl_rate_arg.management_active = 1;
+
+    if( vorbis_encode_ctl( &pv->vi, OV_ECTL_RATEMANAGE2_SET, &ctl_rate_arg ) ||
+          vorbis_encode_setup_init( &pv->vi ) )
+    {
+        hb_error( "encvorbis: vorbis_encode_ctl( ratemanage2_set ) OR vorbis_encode_setup_init failed.\n" );
+        *job->die = 1;
+        return 0;
+    }
+
+    /* add a comment */
+    vorbis_comment_init( &pv->vc );
+    vorbis_comment_add_tag( &pv->vc, "Encoder", "HandBrake");
+    vorbis_comment_add_tag( &pv->vc, "LANGUAGE", w->config->vorbis.language);
+
+    /* set up the analysis state and auxiliary encoding storage */
+    vorbis_analysis_init( &pv->vd, &pv->vi);
+    vorbis_block_init( &pv->vd, &pv->vb);
+
+    /* get the 3 headers */
+    vorbis_analysis_headerout( &pv->vd, &pv->vc,
+                               &header[0], &header[1], &header[2] );
+    for( i = 0; i < 3; i++ )
+    {
+        memcpy( w->config->vorbis.headers[i], &header[i],
+                sizeof( ogg_packet ) );
+        memcpy( w->config->vorbis.headers[i] + sizeof( ogg_packet ),
+                header[i].packet, header[i].bytes );
+    }
+
+    pv->input_samples = pv->out_discrete_channels * OGGVORBIS_FRAME_SIZE;
+    pv->buf = malloc( pv->input_samples * sizeof( float ) );
+
+    pv->list = hb_list_init();
+
+    switch (pv->out_discrete_channels) {
+        case 1:
+            pv->channel_map[0] = 0;
+            break;
+        case 6:
+            pv->channel_map[0] = 0;
+            pv->channel_map[1] = 2;
+            pv->channel_map[2] = 1;
+            pv->channel_map[3] = 4;
+            pv->channel_map[4] = 5;
+            pv->channel_map[5] = 3;
+            break;
+        default:
+            hb_log("encvorbis.c: Unable to correctly proccess %d channels, assuming stereo.", pv->out_discrete_channels);
+        case 2:
+            // Assume stereo
+            pv->channel_map[0] = 0;
+            pv->channel_map[1] = 1;
+            break;
+    }
+
+    return 0;
+}
+
+/***********************************************************************
+ * Close
+ ***********************************************************************
+ *
+ **********************************************************************/
+void encvorbisClose( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+
+    vorbis_block_clear( &pv->vb );
+    vorbis_dsp_clear( &pv->vd );
+    vorbis_comment_clear( &pv->vc );
+    vorbis_info_clear( &pv->vi );
+
+    if (pv->list)
+        hb_list_empty( &pv->list );
+
+    free( pv->buf );
+    free( pv );
+    w->private_data = NULL;
+}
+
+/***********************************************************************
+ * Flush
+ ***********************************************************************
+ *
+ **********************************************************************/
+static hb_buffer_t * Flush( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * buf;
+    int64_t     blocksize = 0;
+
+    if( vorbis_analysis_blockout( &pv->vd, &pv->vb ) == 1 )
+    {
+        ogg_packet op;
+
+        vorbis_analysis( &pv->vb, NULL );
+        vorbis_bitrate_addblock( &pv->vb );
+
+        if( vorbis_bitrate_flushpacket( &pv->vd, &op ) )
+        {
+            buf = hb_buffer_init( sizeof( ogg_packet ) + op.bytes );
+            memcpy( buf->data, &op, sizeof( ogg_packet ) );
+            memcpy( buf->data + sizeof( ogg_packet ), op.packet,
+                    op.bytes );
+            blocksize = vorbis_packet_blocksize(&pv->vi, &op);
+            buf->frametype   = HB_FRAME_AUDIO;
+            buf->start = (int64_t)(vorbis_granule_time(&pv->vd, op.granulepos) * 90000);
+            buf->stop  = (int64_t)(vorbis_granule_time(&pv->vd, (pv->prev_blocksize + blocksize)/4 + op.granulepos) * 90000);
+            /* The stop time isn't accurate for the first ~3 packets, as the actual blocksize depends on the previous _and_ current packets. */
+            pv->prev_blocksize = blocksize;
+            return buf;
+        }
+    }
+
+    return NULL;
+}
+
+/***********************************************************************
+ * Encode
+ ***********************************************************************
+ *
+ **********************************************************************/
+static hb_buffer_t * Encode( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * buf;
+    float ** buffer;
+    int i, j;
+
+    /* Try to extract more data */
+    if( ( buf = Flush( w ) ) )
+    {
+        return buf;
+    }
+
+    if( hb_list_bytes( pv->list ) < pv->input_samples * sizeof( float ) )
+    {
+        return NULL;
+    }
+
+    /* Process more samples */
+    hb_list_getbytes( pv->list, pv->buf, pv->input_samples * sizeof( float ),
+                      &pv->pts, NULL );
+    buffer = vorbis_analysis_buffer( &pv->vd, OGGVORBIS_FRAME_SIZE );
+    for( i = 0; i < OGGVORBIS_FRAME_SIZE; i++ )
+    {
+        for( j = 0; j < pv->out_discrete_channels; j++)
+        {
+            buffer[j][i] = ((float *) pv->buf)[(pv->out_discrete_channels * i + pv->channel_map[j])] / 32768.f;
+        }
+    }
+    vorbis_analysis_wrote( &pv->vd, OGGVORBIS_FRAME_SIZE );
+
+    /* Try to extract again */
+    return Flush( w );
+}
+
+/***********************************************************************
+ * Work
+ ***********************************************************************
+ *
+ **********************************************************************/
+int encvorbisWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                   hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * buf;
+
+    if ( (*buf_in)->size <= 0 )
+    {
+        /* EOF on input - send it downstream & say we're done */
+        *buf_out = *buf_in;
+        *buf_in = NULL;
+       return HB_WORK_DONE;
+    }
+
+    hb_list_add( pv->list, *buf_in );
+    *buf_in = NULL;
+
+    *buf_out = buf = Encode( w );
+
+    while( buf )
+    {
+        buf->next = Encode( w );
+        buf       = buf->next;
+    }
+
+    return HB_WORK_OK;
+}
diff --git a/libhb/encx264.c b/libhb/encx264.c
new file mode 100644 (file)
index 0000000..97de03e
--- /dev/null
@@ -0,0 +1,674 @@
+/* $Id: encx264.c,v 1.21 2005/11/04 13:09:41 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include <stdarg.h>
+
+#include "hb.h"
+
+#include "x264.h"
+
+int  encx264Init( hb_work_object_t *, hb_job_t * );
+int  encx264Work( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+void encx264Close( hb_work_object_t * );
+
+hb_work_object_t hb_encx264 =
+{
+    WORK_ENCX264,
+    "H.264/AVC encoder (libx264)",
+    encx264Init,
+    encx264Work,
+    encx264Close
+};
+
+#define DTS_BUFFER_SIZE 32
+
+/*
+ * The frame info struct remembers information about each frame across calls
+ * to x264_encoder_encode. Since frames are uniquely identified by their
+ * timestamp, we use some bits of the timestamp as an index. The LSB is
+ * chosen so that two successive frames will have different values in the
+ * bits over any plausible range of frame rates. (Starting with bit 8 allows
+ * any frame rate slower than 352fps.) The MSB determines the size of the array.
+ * It is chosen so that two frames can't use the same slot during the
+ * encoder's max frame delay (set by the standard as 16 frames) and so
+ * that, up to some minimum frame rate, frames are guaranteed to map to
+ * different slots. (An MSB of 17 which is 2^(17-8+1) = 1024 slots guarantees
+ * no collisions down to a rate of .7 fps).
+ */
+#define FRAME_INFO_MAX2 (8)     // 2^8 = 256; 90000/256 = 352 frames/sec
+#define FRAME_INFO_MIN2 (17)    // 2^17 = 128K; 90000/131072 = 1.4 frames/sec
+#define FRAME_INFO_SIZE (1 << (FRAME_INFO_MIN2 - FRAME_INFO_MAX2 + 1))
+#define FRAME_INFO_MASK (FRAME_INFO_SIZE - 1)
+
+struct hb_work_private_s
+{
+    hb_job_t       * job;
+    x264_t         * x264;
+    x264_picture_t   pic_in;
+    uint8_t         *x264_allocated_pic;
+
+    int            chap_mark;   // saved chap mark when we're propagating it
+    int64_t        last_stop;   // Debugging - stop time of previous input frame
+    int64_t        init_delay;
+    int64_t        next_chap;
+
+    struct {
+        int64_t duration;
+    } frame_info[FRAME_INFO_SIZE];
+
+    char             filename[1024];
+};
+
+/***********************************************************************
+ * hb_work_encx264_init
+ ***********************************************************************
+ *
+ **********************************************************************/
+int encx264Init( hb_work_object_t * w, hb_job_t * job )
+{
+    x264_param_t       param;
+    x264_nal_t       * nal;
+    int                nal_count;
+    int                nal_size;
+
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+
+    pv->job = job;
+
+    memset( pv->filename, 0, 1024 );
+    hb_get_tempory_filename( job->h, pv->filename, "x264.log" );
+
+    x264_param_default( &param );
+
+    param.i_threads    = ( hb_get_cpu_count() * 3 / 2 );
+    param.i_width      = job->width;
+    param.i_height     = job->height;
+    param.i_fps_num    = job->vrate;
+    param.i_fps_den    = job->vrate_base;
+
+    if (job->vrate_base != 1080000)
+    {
+        /* If the fps isn't 25, adjust the key intervals. Add 1 because
+           we want 24, not 23 with a truncated remainder.               */
+        param.i_keyint_min     = (job->vrate / job->vrate_base) + 1;
+        param.i_keyint_max = (10 * job->vrate / job->vrate_base) + 1;
+        hb_log("encx264: keyint-min: %i, keyint-max: %i", param.i_keyint_min, param.i_keyint_max);
+    }
+
+    param.i_log_level  = X264_LOG_INFO;
+    if( job->h264_level )
+    {
+        param.b_cabac     = 0;
+        param.i_level_idc = job->h264_level;
+        hb_log( "encx264: encoding at level %i",
+                param.i_level_idc );
+    }
+
+    /*
+               This section passes the string x264opts to libx264 for parsing into
+        parameter names and values.
+
+        The string is set up like this:
+        option1=value1:option2=value 2
+
+        So, you have to iterate through based on the colons, and then put
+        the left side of the equals sign in "name" and the right side into
+        "value." Then you hand those strings off to x264 for interpretation.
+
+        This is all based on the universal x264 option handling Loren
+        Merritt implemented in the Mplayer/Mencoder project.
+     */
+
+    if( job->x264opts != NULL && *job->x264opts != '\0' )
+    {
+        char *x264opts, *x264opts_start;
+
+        x264opts = x264opts_start = strdup(job->x264opts);
+
+        while( x264opts_start && *x264opts )
+        {
+            char *name = x264opts;
+            char *value;
+            int ret;
+
+            x264opts += strcspn( x264opts, ":" );
+            if( *x264opts )
+            {
+                *x264opts = 0;
+                x264opts++;
+            }
+
+            value = strchr( name, '=' );
+            if( value )
+            {
+                *value = 0;
+                value++;
+            }
+
+            /*
+               When B-frames are enabled, the max frame count increments
+               by 1 (regardless of the number of B-frames). If you don't
+               change the duration of the video track when you mux, libmp4
+               barfs.  So, check if the x264opts are using B-frames, and
+               when they are, set the boolean job->areBframes as true.
+             */
+
+            if( !( strcmp( name, "bframes" ) ) )
+            {
+                if( atoi( value ) > 0 )
+                {
+                    job->areBframes = 1;
+                }
+            }
+
+            /* Note b-pyramid here, so the initial delay can be doubled */
+            if( !( strcmp( name, "b-pyramid" ) ) )
+            {
+                if( value != NULL )
+                {
+                    if( atoi( value ) > 0 )
+                    {
+                        job->areBframes = 2;
+                    }
+                }
+                else
+                {
+                    job->areBframes = 2;
+                }
+            }
+
+            /* Here's where the strings are passed to libx264 for parsing. */
+            ret = x264_param_parse( &param, name, value );
+
+            /*         Let x264 sanity check the options for us*/
+            if( ret == X264_PARAM_BAD_NAME )
+                hb_log( "x264 options: Unknown suboption %s", name );
+            if( ret == X264_PARAM_BAD_VALUE )
+                hb_log( "x264 options: Bad argument %s=%s", name, value ? value : "(null)" );
+        }
+        free(x264opts_start);
+    }
+
+    /* set up the VUI color model & gamma to match what the COLR atom
+     * set in muxmp4.c says. See libhb/muxmp4.c for notes. */
+    if( job->color_matrix == 1 )
+    {
+        // ITU BT.601 DVD or SD TV content
+        param.vui.i_colorprim = 6;
+        param.vui.i_transfer = 1;
+        param.vui.i_colmatrix = 6;
+    }
+    else if( job->color_matrix == 2 )
+    {
+        // ITU BT.709 HD content
+        param.vui.i_colorprim = 1;
+        param.vui.i_transfer = 1;
+        param.vui.i_colmatrix = 1;
+    }
+    else if ( job->title->width >= 1280 || job->title->height >= 720 )
+    {
+        // we guess that 720p or above is ITU BT.709 HD content
+        param.vui.i_colorprim = 1;
+        param.vui.i_transfer = 1;
+        param.vui.i_colmatrix = 1;
+    }
+    else
+    {
+        // ITU BT.601 DVD or SD TV content
+        param.vui.i_colorprim = 6;
+        param.vui.i_transfer = 1;
+        param.vui.i_colmatrix = 6;
+    }
+
+    if( job->pixel_ratio )
+    {
+        param.vui.i_sar_width = job->pixel_aspect_width;
+        param.vui.i_sar_height = job->pixel_aspect_height;
+
+        hb_log( "encx264: encoding with stored aspect %d/%d",
+                param.vui.i_sar_width, param.vui.i_sar_height );
+    }
+
+
+    if( job->vquality > 0.0 && job->vquality < 1.0 )
+    {
+        switch( job->crf )
+        {
+            case 1:
+                /*Constant RF*/
+                param.rc.i_rc_method = X264_RC_CRF;
+                param.rc.f_rf_constant = 51 - job->vquality * 51;
+                hb_log( "encx264: Encoding at constant RF %f",
+                        param.rc.f_rf_constant );
+                break;
+
+            case 0:
+                /*Constant QP*/
+                param.rc.i_rc_method = X264_RC_CQP;
+                param.rc.i_qp_constant = 51 - job->vquality * 51;
+                hb_log( "encx264: encoding at constant QP %d",
+                        param.rc.i_qp_constant );
+                break;
+        }
+    }
+    else if( job->vquality == 0 || job->vquality >= 1.0 )
+    {
+        /* Use the vquality as a raw RF or QP
+          instead of treating it like a percentage. */
+        switch( job->crf )
+        {
+            case 1:
+                /*Constant RF*/
+                param.rc.i_rc_method = X264_RC_CRF;
+                param.rc.f_rf_constant = job->vquality;
+                hb_log( "encx264: Encoding at constant RF %f",
+                        param.rc.f_rf_constant );
+                break;
+
+            case 0:
+                /*Constant QP*/
+                param.rc.i_rc_method = X264_RC_CQP;
+                param.rc.i_qp_constant = job->vquality;
+                hb_log( "encx264: encoding at constant QP %d",
+                        param.rc.i_qp_constant );
+                break;
+        }        
+    }
+    else
+    {
+        /* Rate control */
+        param.rc.i_rc_method = X264_RC_ABR;
+        param.rc.i_bitrate = job->vbitrate;
+        switch( job->pass )
+        {
+            case 1:
+                param.rc.b_stat_write  = 1;
+                param.rc.psz_stat_out = pv->filename;
+                break;
+            case 2:
+                param.rc.b_stat_read = 1;
+                param.rc.psz_stat_in = pv->filename;
+                break;
+        }
+    }
+
+    hb_deep_log( 2, "encx264: opening libx264 (pass %d)", job->pass );
+    pv->x264 = x264_encoder_open( &param );
+
+    x264_encoder_headers( pv->x264, &nal, &nal_count );
+
+    /* Sequence Parameter Set */
+    x264_nal_encode( w->config->h264.sps, &nal_size, 0, &nal[1] );
+    w->config->h264.sps_length = nal_size;
+
+    /* Picture Parameter Set */
+    x264_nal_encode( w->config->h264.pps, &nal_size, 0, &nal[2] );
+    w->config->h264.pps_length = nal_size;
+
+    x264_picture_alloc( &pv->pic_in, X264_CSP_I420,
+                        job->width, job->height );
+
+    pv->pic_in.img.i_stride[2] = pv->pic_in.img.i_stride[1] = ( ( job->width + 1 ) >> 1 );
+    pv->x264_allocated_pic = pv->pic_in.img.plane[0];
+
+    if (job->areBframes)
+    {
+        /* Basic initDelay value is the clockrate divided by the FPS
+           -- the length of one frame in clockticks.                  */
+        pv->init_delay = 90000. / ((double)job->vrate / (double)job->vrate_base);
+
+        /* 23.976-length frames are 3753.75 ticks long on average but the DVD
+           creates that average rate by repeating 59.95 fields so the max
+           frame size is actually 4504.5 (3 field times). The field durations
+           are computed based on quantized times (see below) so we need an extra
+           two ticks to account for the rounding. */
+        if (pv->init_delay == 3753)
+            pv->init_delay = 4507;
+
+        /* frame rates are not exact in the DVD 90KHz PTS clock (they are
+           exact in the DVD 27MHz system clock but we never see that) so the
+           rates computed above are all +-1 due to quantization. Worst case
+           is when a clock-rounded-down frame is adjacent to a rounded-up frame
+           which makes one of the frames 2 ticks longer than the nominal
+           frame time. */
+        pv->init_delay += 2;
+
+        /* For VFR, libhb sees the FPS as 29.97, but the longest frames
+           will use the duration of frames running at 23.976fps instead.. */
+        if (job->vfr)
+        {
+            pv->init_delay = 7506;
+        }
+
+        /* The delay is 1 frames for regular b-frames, 2 for b-pyramid. */
+        pv->init_delay *= job->areBframes;
+    }
+    w->config->h264.init_delay = pv->init_delay;
+
+    return 0;
+}
+
+void encx264Close( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    /*
+     * Patch the x264 allocated data back in so that x264 can free it
+     * we have been using our own buffers during the encode to avoid copying.
+     */
+    pv->pic_in.img.plane[0] = pv->x264_allocated_pic;
+    x264_picture_clean( &pv->pic_in );
+    x264_encoder_close( pv->x264 );
+    free( pv );
+    w->private_data = NULL;
+
+    /* TODO */
+}
+
+/*
+ * see comments in definition of 'frame_info' in pv struct for description
+ * of what these routines are doing.
+ */
+static void save_frame_info( hb_work_private_t * pv, hb_buffer_t * in )
+{
+    int i = (in->start >> FRAME_INFO_MAX2) & FRAME_INFO_MASK;
+    pv->frame_info[i].duration = in->stop - in->start;
+}
+
+static int64_t get_frame_duration( hb_work_private_t * pv, int64_t pts )
+{
+    int i = (pts >> FRAME_INFO_MAX2) & FRAME_INFO_MASK;
+    return pv->frame_info[i].duration;
+}
+
+static hb_buffer_t *nal_encode( hb_work_object_t *w, x264_picture_t *pic_out,
+                                int i_nal, x264_nal_t *nal )
+{
+    hb_buffer_t *buf = NULL;
+    hb_work_private_t *pv = w->private_data;
+    hb_job_t *job = pv->job;
+
+    /* Should be way too large */
+    buf = hb_video_buffer_init( job->width, job->height );
+    buf->size = 0;
+    buf->frametype = 0;
+
+    // use the pts to get the original frame's duration.
+    int64_t duration  = get_frame_duration( pv, pic_out->i_pts );
+    buf->start = pic_out->i_pts;
+    buf->stop  = pic_out->i_pts + duration;
+
+    /* Encode all the NALs we were given into buf.
+       NOTE: This code assumes one video frame per NAL (but there can
+             be other stuff like SPS and/or PPS). If there are multiple
+             frames we only get the duration of the first which will
+             eventually screw up the muxer & decoder. */
+    int i;
+    for( i = 0; i < i_nal; i++ )
+    {
+        int data = buf->alloc - buf->size;
+        int size = x264_nal_encode( buf->data + buf->size, &data, 1, &nal[i] );
+        if( size < 1 )
+        {
+            continue;
+        }
+
+        if( job->mux & HB_MUX_AVI )
+        {
+            if( nal[i].i_ref_idc == NAL_PRIORITY_HIGHEST )
+            {
+                buf->frametype = HB_FRAME_KEY;
+            }
+            buf->size += size;
+            continue;
+        }
+
+        /* H.264 in .mp4 or .mkv */
+        int naltype = buf->data[buf->size+4] & 0x1f;
+        if ( naltype == 0x7 || naltype == 0x8 )
+        {
+            // Sequence Parameter Set & Program Parameter Set go in the
+            // mp4 header so skip them here
+            continue;
+        }
+
+        /* H.264 in mp4 (stolen from mp4creator) */
+        buf->data[buf->size+0] = ( ( size - 4 ) >> 24 ) & 0xFF;
+        buf->data[buf->size+1] = ( ( size - 4 ) >> 16 ) & 0xFF;
+        buf->data[buf->size+2] = ( ( size - 4 ) >>  8 ) & 0xFF;
+        buf->data[buf->size+3] = ( ( size - 4 ) >>  0 ) & 0xFF;
+
+        /* Decide what type of frame we have. */
+        switch( pic_out->i_type )
+        {
+            case X264_TYPE_IDR:
+                buf->frametype = HB_FRAME_IDR;
+                /* if we have a chapter marker pending and this
+                   frame's presentation time stamp is at or after
+                   the marker's time stamp, use this as the
+                   chapter start. */
+                if( pv->next_chap != 0 && pv->next_chap <= pic_out->i_pts )
+                {
+                    pv->next_chap = 0;
+                    buf->new_chap = pv->chap_mark;
+                }
+                break;
+
+            case X264_TYPE_I:
+                buf->frametype = HB_FRAME_I;
+                break;
+
+            case X264_TYPE_P:
+                buf->frametype = HB_FRAME_P;
+                break;
+
+            case X264_TYPE_B:
+                buf->frametype = HB_FRAME_B;
+                break;
+
+        /*  This is for b-pyramid, which has reference b-frames
+            However, it doesn't seem to ever be used... */
+            case X264_TYPE_BREF:
+                buf->frametype = HB_FRAME_BREF;
+                break;
+
+            // If it isn't the above, what type of frame is it??
+            default:
+                buf->frametype = 0;
+                break;
+        }
+
+        /* Since libx264 doesn't tell us when b-frames are
+           themselves reference frames, figure it out on our own. */
+        if( (buf->frametype == HB_FRAME_B) &&
+            (nal[i].i_ref_idc != NAL_PRIORITY_DISPOSABLE) )
+            buf->frametype = HB_FRAME_BREF;
+
+        buf->size += size;
+    }
+    // make sure we found at least one video frame
+    if ( buf->size <= 0 )
+    {
+        // no video - discard the buf
+        hb_buffer_close( &buf );
+    }
+    return buf;
+}
+
+static hb_buffer_t *x264_encode( hb_work_object_t *w, hb_buffer_t *in )
+{
+    hb_work_private_t *pv = w->private_data;
+    hb_job_t *job = pv->job;
+
+    /* Point x264 at our current buffers Y(UV) data.  */
+    pv->pic_in.img.plane[0] = in->data;
+
+    int uvsize = ( (job->width + 1) >> 1 ) * ( (job->height + 1) >> 1 );
+    if( job->grayscale )
+    {
+        /* XXX x264 has currently no option for grayscale encoding */
+        memset( pv->pic_in.img.plane[1], 0x80, uvsize );
+        memset( pv->pic_in.img.plane[2], 0x80, uvsize );
+    }
+    else
+    {
+        /* Point x264 at our buffers (Y)UV data */
+        pv->pic_in.img.plane[1] = in->data + job->width * job->height;
+        pv->pic_in.img.plane[2] = pv->pic_in.img.plane[1] + uvsize;
+    }
+    if( in->new_chap && job->chapter_markers )
+    {
+        /* chapters have to start with an IDR frame so request that this
+           frame be coded as IDR. Since there may be up to 16 frames
+           currently buffered in the encoder remember the timestamp so
+           when this frame finally pops out of the encoder we'll mark
+           its buffer as the start of a chapter. */
+        pv->pic_in.i_type = X264_TYPE_IDR;
+        if( pv->next_chap == 0 )
+        {
+            pv->next_chap = in->start;
+            pv->chap_mark = in->new_chap;
+        }
+        /* don't let 'work_loop' put a chapter mark on the wrong buffer */
+        in->new_chap = 0;
+    }
+    else
+    {
+        pv->pic_in.i_type = X264_TYPE_AUTO;
+    }
+    pv->pic_in.i_qpplus1 = 0;
+
+    /* XXX this is temporary debugging code to check that the upstream
+     * modules (render & sync) have generated a continuous, self-consistent
+     * frame stream with the current frame's start time equal to the
+     * previous frame's stop time.
+     */
+    if( pv->last_stop != in->start )
+    {
+        hb_log("encx264 input continuity err: last stop %lld  start %lld",
+                pv->last_stop, in->start);
+    }
+    pv->last_stop = in->stop;
+
+    // Remember info about this frame that we need to pass across
+    // the x264_encoder_encode call (since it reorders frames).
+    save_frame_info( pv, in );
+
+    /* Feed the input PTS to x264 so it can figure out proper output PTS */
+    pv->pic_in.i_pts = in->start;
+
+    x264_picture_t pic_out;
+    int i_nal;
+    x264_nal_t *nal;
+
+    x264_encoder_encode( pv->x264, &nal, &i_nal, &pv->pic_in, &pic_out );
+    if ( i_nal > 0 )
+    {
+        return nal_encode( w, &pic_out, i_nal, nal );
+    }
+    return NULL;
+}
+
+int encx264Work( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                  hb_buffer_t ** buf_out )
+{
+    hb_work_private_t *pv = w->private_data;
+    hb_buffer_t *in = *buf_in;
+
+    *buf_out = NULL;
+
+    if( in->size <= 0 )
+    {
+        // EOF on input. Flush any frames still in the decoder then
+        // send the eof downstream to tell the muxer we're done.
+        x264_picture_t pic_out;
+        int i_nal;
+        x264_nal_t *nal;
+        hb_buffer_t *last_buf = NULL;
+
+        while (1)
+        {
+            x264_encoder_encode( pv->x264, &nal, &i_nal, NULL, &pic_out );
+            if ( i_nal <= 0 )
+                break;
+
+            hb_buffer_t *buf = nal_encode( w, &pic_out, i_nal, nal );
+            if ( buf )
+            {
+                if ( last_buf == NULL )
+                    *buf_out = buf;
+                else
+                    last_buf->next = buf;
+                last_buf = buf;
+            }
+        }
+        // Flushed everything - add the eof to the end of the chain.
+        if ( last_buf == NULL )
+            *buf_out = in;
+        else
+            last_buf->next = in;
+
+        *buf_in = NULL;
+        return HB_WORK_DONE;
+    }
+
+    // Not EOF - encode the packet & wrap it in a NAL
+
+    // if we're re-ordering frames, check if this frame is too large to reorder
+    if ( pv->init_delay && in->stop - in->start > pv->init_delay )
+    {
+        // This frame's duration is larger than the time allotted for b-frame
+        // reordering. That means that if it's used as a reference the decoder
+        // won't be able to move it early enough to render it in correct
+        // sequence & the playback will have odd jumps & twitches. To make
+        // sure this doesn't happen we pretend this frame is multiple
+        // frames, each with duration <= init_delay. Since each of these
+        // new frames contains the same image the visual effect is identical
+        // to the original but the resulting stream can now be coded without
+        // error. We take advantage of the fact that x264 buffers frame
+        // data internally to feed the same image into the encoder multiple
+        // times, just changing its start & stop times each time.
+        int64_t orig_stop = in->stop;
+        int64_t new_stop = in->start;
+        hb_buffer_t *last_buf = NULL;
+
+        // We want to spread the new frames uniformly over the total time
+        // so that we don't end up with a very short frame at the end.
+        // In the number of pieces calculation we add in init_delay-1 to
+        // round up but not add an extra piece if the frame duration is
+        // a multiple of init_delay. The final increment of frame_dur is
+        // to restore the bits that got truncated by the divide on the
+        // previous line. If we don't do this we end up with an extra tiny
+        // frame at the end whose duration is npieces-1.
+        int64_t frame_dur = orig_stop - new_stop;
+        int64_t npieces = ( frame_dur + pv->init_delay - 1 ) / pv->init_delay;
+        frame_dur /= npieces;
+        ++frame_dur;
+
+        while ( in->start < orig_stop )
+        {
+            new_stop += frame_dur;
+            if ( new_stop > orig_stop )
+                new_stop = orig_stop;
+            in->stop = new_stop;
+            hb_buffer_t *buf = x264_encode( w, in );
+            if ( buf )
+            {
+                if ( last_buf == NULL )
+                    *buf_out = buf;
+                else
+                    last_buf->next = buf;
+                last_buf = buf;
+            }
+            in->start = new_stop;
+        }
+    }
+    else
+    {
+        *buf_out = x264_encode( w, in );
+    }
+    return HB_WORK_OK;
+}
diff --git a/libhb/encxvid.c b/libhb/encxvid.c
new file mode 100644 (file)
index 0000000..cb4ca01
--- /dev/null
@@ -0,0 +1,234 @@
+/* $Id: encxvid.c,v 1.10 2005/03/09 23:28:39 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+#include "xvid.h"
+
+int  encxvidInit( hb_work_object_t *, hb_job_t * );
+int  encxvidWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+void encxvidClose( hb_work_object_t * );
+
+hb_work_object_t hb_encxvid =
+{
+    WORK_ENCXVID,
+    "MPEG-4 encoder (libxvidcore)",
+    encxvidInit,
+    encxvidWork,
+    encxvidClose
+};
+
+struct hb_work_private_s
+{
+    hb_job_t * job;
+    void     * xvid;
+    char       filename[1024];
+    int        quant;
+    int        configDone;
+};
+
+int encxvidInit( hb_work_object_t * w, hb_job_t * job )
+{
+    xvid_gbl_init_t xvid_gbl_init;
+    xvid_enc_create_t create;
+    xvid_plugin_single_t single;
+    xvid_plugin_2pass1_t rc2pass1;
+    xvid_plugin_2pass2_t rc2pass2;
+    xvid_enc_plugin_t plugins[1];
+
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+
+    pv->job = job;
+
+    memset( pv->filename, 0, 1024 );
+    hb_get_tempory_filename( job->h, pv->filename, "xvid.log" );
+
+    memset( &xvid_gbl_init, 0, sizeof( xvid_gbl_init ) );
+    xvid_gbl_init.version = XVID_VERSION;
+    xvid_global( NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL );
+
+    memset( &create, 0, sizeof( create ) );
+    create.version   = XVID_VERSION;
+    create.width     = job->width;
+    create.height    = job->height;
+    create.zones     = NULL;
+    create.num_zones = 0;
+
+    switch( job->pass )
+    {
+        case 0:
+            memset( &single, 0, sizeof( single ) );
+            single.version   = XVID_VERSION;
+            if( job->vquality < 0.0 || job->vquality > 1.0 )
+            {
+                /* Rate control */
+                single.bitrate = 1000 * job->vbitrate;
+                pv->quant = 0;
+            }
+            else
+            {
+                /* Constant quantizer */
+                pv->quant = 31 - job->vquality * 30;
+                hb_log( "encxvid: encoding at constant quantizer %d",
+                        pv->quant );
+            }
+            plugins[0].func  = xvid_plugin_single;
+            plugins[0].param = &single;
+            break;
+
+        case 1:
+            memset( &rc2pass1, 0, sizeof( rc2pass1 ) );
+            rc2pass1.version  = XVID_VERSION;
+            rc2pass1.filename = pv->filename;
+            plugins[0].func   = xvid_plugin_2pass1;
+            plugins[0].param  = &rc2pass1;
+            break;
+
+        case 2:
+            memset( &rc2pass2, 0, sizeof( rc2pass2 ) );
+            rc2pass2.version  = XVID_VERSION;
+            rc2pass2.filename = pv->filename;
+            rc2pass2.bitrate  = 1000 * job->vbitrate;
+            plugins[0].func   = xvid_plugin_2pass2;
+            plugins[0].param  = &rc2pass2;
+            break;
+    }
+
+    create.plugins     = plugins;
+    create.num_plugins = 1;
+
+    create.num_threads      = 0;
+    create.fincr            = job->vrate_base;
+    create.fbase            = job->vrate;
+    create.max_key_interval = 10 * job->vrate / job->vrate_base;
+    create.max_bframes      = 0;
+    create.bquant_ratio     = 150;
+    create.bquant_offset    = 100;
+    create.frame_drop_ratio = 0;
+    create.global           = 0;
+
+    xvid_encore( NULL, XVID_ENC_CREATE, &create, NULL );
+    pv->xvid = create.handle;
+
+    return 0;
+}
+
+/***********************************************************************
+ * Close
+ ***********************************************************************
+ *
+ **********************************************************************/
+void encxvidClose( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+
+    if( pv->xvid )
+    {
+        hb_deep_log( 2, "encxvid: closing libxvidcore" );
+        xvid_encore( pv->xvid, XVID_ENC_DESTROY, NULL, NULL);
+    }
+
+    free( pv );
+    w->private_data = NULL;
+}
+
+/***********************************************************************
+ * Work
+ ***********************************************************************
+ *
+ **********************************************************************/
+int encxvidWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                 hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_job_t * job = pv->job;
+    xvid_enc_frame_t frame;
+    hb_buffer_t * in = *buf_in, * buf;
+
+    if ( in->size <= 0 )
+    {
+        /* EOF on input - send it downstream & say we're done */
+        *buf_out = in;
+        *buf_in = NULL;
+       return HB_WORK_DONE;
+    }
+
+    /* Should be way too large */
+    buf = hb_video_buffer_init( job->width, job->height );
+    buf->start = in->start;
+    buf->stop  = in->stop;
+
+    memset( &frame, 0, sizeof( frame ) );
+
+    frame.version = XVID_VERSION;
+    frame.bitstream = buf->data;
+    frame.length = -1;
+    frame.input.plane[0] = in->data;
+    frame.input.csp = XVID_CSP_I420;
+    frame.input.stride[0] = job->width;
+    frame.vol_flags = 0;
+    frame.vop_flags = XVID_VOP_HALFPEL | XVID_VOP_INTER4V |
+                      XVID_VOP_TRELLISQUANT | XVID_VOP_HQACPRED;
+    if( job->pixel_ratio )
+    {
+        frame.par = XVID_PAR_EXT;
+        frame.par_width = job->pixel_aspect_width;
+        frame.par_height = job->pixel_aspect_height;
+    }
+
+    if( job->grayscale )
+    {
+        frame.vop_flags |= XVID_VOP_GREYSCALE;
+    }
+    frame.type = XVID_TYPE_AUTO;
+    frame.quant = pv->quant;
+    frame.motion = XVID_ME_ADVANCEDDIAMOND16 | XVID_ME_HALFPELREFINE16 |
+                   XVID_ME_EXTSEARCH16 | XVID_ME_ADVANCEDDIAMOND8 |
+                   XVID_ME_HALFPELREFINE8 | XVID_ME_EXTSEARCH8 |
+                   XVID_ME_CHROMA_PVOP | XVID_ME_CHROMA_BVOP;
+    frame.quant_intra_matrix = NULL;
+    frame.quant_inter_matrix = NULL;
+
+    buf->size = xvid_encore( pv->xvid, XVID_ENC_ENCODE, &frame, NULL );
+    buf->frametype = ( frame.out_flags & XVID_KEYFRAME ) ? HB_FRAME_KEY : HB_FRAME_REF;
+
+    if( !pv->configDone )
+    {
+        int vol_start, vop_start;
+        for( vol_start = 0; ; vol_start++ )
+        {
+            if( buf->data[vol_start]   == 0x0 &&
+                buf->data[vol_start+1] == 0x0 &&
+                buf->data[vol_start+2] == 0x1 &&
+                buf->data[vol_start+3] == 0x20 )
+            {
+                break;
+            }
+        }
+        for( vop_start = vol_start + 4; ; vop_start++ )
+        {
+            if( buf->data[vop_start]   == 0x0 &&
+                buf->data[vop_start+1] == 0x0 &&
+                buf->data[vop_start+2] == 0x1 &&
+                buf->data[vop_start+3] == 0xB6 )
+            {
+                break;
+            }
+        }
+
+        hb_deep_log( 2, "encxvid: VOL size is %d bytes", vop_start - vol_start );
+        job->config.mpeg4.length = vop_start - vol_start;
+        memcpy( job->config.mpeg4.bytes, &buf->data[vol_start],
+                job->config.mpeg4.length );
+        pv->configDone = 1;
+    }
+
+    *buf_out = buf;
+
+    return HB_WORK_OK;
+}
+
diff --git a/libhb/fifo.c b/libhb/fifo.c
new file mode 100644 (file)
index 0000000..9441f71
--- /dev/null
@@ -0,0 +1,389 @@
+/* $Id: fifo.c,v 1.17 2005/10/15 18:05:03 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+#ifndef SYS_DARWIN
+#include <malloc.h>
+#endif
+
+/* Fifo */
+struct hb_fifo_s
+{
+    hb_lock_t    * lock;
+    uint32_t       capacity;
+    uint32_t       size;
+    uint32_t       buffer_size;
+    hb_buffer_t  * first;
+    hb_buffer_t  * last;
+};
+
+/* we round the requested buffer size up to the next power of 2 so there can
+ * be at most 32 possible pools when the size is a 32 bit int. To avoid a lot
+ * of slow & error-prone run-time checking we allow for all 32. */
+#define MAX_BUFFER_POOLS  32
+/* the buffer pool only exists to avoid the two malloc and two free calls that
+ * it would otherwise take to allocate & free a buffer. but we don't want to
+ * tie up a lot of memory in the pool because this allocator isn't as general
+ * as malloc so memory tied up here puts more pressure on the malloc pool.
+ * A pool of 16 elements will avoid 94% of the malloc/free calls without wasting
+ * too much memory. */
+#define BUFFER_POOL_MAX_ELEMENTS 32
+
+struct hb_buffer_pools_s
+{
+    int64_t allocated;
+    hb_lock_t *lock;
+    hb_fifo_t *pool[MAX_BUFFER_POOLS];
+} buffers;
+
+
+void hb_buffer_pool_init( void )
+{
+    buffers.lock = hb_lock_init();
+    buffers.allocated = 0;
+
+    /* we allocate pools for sizes 2^10 through 2^25. requests larger than
+     * 2^25 will get passed through to malloc. */
+    int i;
+    for ( i = 10; i < 26; ++i )
+    {
+        buffers.pool[i] = hb_fifo_init(BUFFER_POOL_MAX_ELEMENTS);
+        buffers.pool[i]->buffer_size = 1 << i;
+    }
+    /* requests smaller than 2^10 are satisfied from the 2^10 pool. */
+    for ( i = 1; i < 10; ++i )
+    {
+        buffers.pool[i] = buffers.pool[10];
+    }
+}
+
+void hb_buffer_pool_free( void )
+{
+    int i;
+    int count;
+    int64_t freed = 0;
+    hb_buffer_t *b;
+
+    hb_lock(buffers.lock);
+
+    for( i = 10; i < 26; ++i)
+    {
+        count = 0;
+        while( ( b = hb_fifo_get(buffers.pool[i]) ) )
+        {
+            freed += b->alloc;
+            if( b->data )
+            {
+                free( b->data );
+            }
+            free( b );
+            count++;
+        }
+        if ( count )
+        {
+            hb_deep_log( 2, "Freed %d buffers of size %d", count,
+                    buffers.pool[i]->buffer_size);
+        }
+    }
+
+    hb_deep_log( 2, "Allocated %lld bytes of buffers on this pass and Freed %lld bytes, "
+           "%lld bytes leaked", buffers.allocated, freed, buffers.allocated - freed);
+    buffers.allocated = 0;
+    hb_unlock(buffers.lock);
+}
+
+static hb_fifo_t *size_to_pool( int size )
+{
+    int i;
+    for ( i = 0; i < 30; ++i )
+    {
+        if ( size <= (1 << i) )
+        {
+            return buffers.pool[i];
+        }
+    }
+    return NULL;
+}
+
+hb_buffer_t * hb_buffer_init( int size )
+{
+    hb_buffer_t * b;
+    hb_fifo_t *buffer_pool = size_to_pool( size );
+
+    if( buffer_pool )
+    {
+        b = hb_fifo_get( buffer_pool );
+
+        if( b )
+        {
+            /*
+             * Zero the contents of the buffer, would be nice if we
+             * didn't have to do this.
+             */
+            uint8_t *data = b->data;
+            memset( b, 0, sizeof(hb_buffer_t) );
+            b->alloc = buffer_pool->buffer_size;
+            b->size = size;
+            b->data = data;
+            return( b );
+        }
+    }
+
+    /*
+     * No existing buffers, create a new one
+     */
+    if( !( b = calloc( sizeof( hb_buffer_t ), 1 ) ) )
+    {
+        hb_log( "out of memory" );
+        return NULL;
+    }
+
+    b->size  = size;
+    b->alloc  = buffer_pool? buffer_pool->buffer_size : size;
+
+    if (size)
+    {
+#if defined( SYS_DARWIN ) || defined( SYS_FREEBSD )
+        b->data  = malloc( b->alloc );
+#elif defined( SYS_CYGWIN )
+        /* FIXME */
+        b->data  = malloc( b->alloc + 17 );
+#else
+        b->data  = memalign( 16, b->alloc );
+#endif
+        if( !b->data )
+        {
+            hb_log( "out of memory" );
+            free( b );
+            return NULL;
+        }
+        hb_lock(buffers.lock);
+        buffers.allocated += b->alloc;
+        hb_unlock(buffers.lock);
+    }
+    return b;
+}
+
+void hb_buffer_realloc( hb_buffer_t * b, int size )
+{
+    if ( size > b->alloc )
+    {
+        uint32_t orig = b->alloc;
+        size = size_to_pool( size )->buffer_size;
+        b->data  = realloc( b->data, size );
+        b->alloc = size;
+
+        hb_lock(buffers.lock);
+        buffers.allocated += size - orig;
+        hb_unlock(buffers.lock);
+    }
+}
+
+void hb_buffer_close( hb_buffer_t ** _b )
+{
+    hb_buffer_t * b = *_b;
+    hb_fifo_t *buffer_pool = size_to_pool( b->alloc );
+
+    if( buffer_pool && b->data && !hb_fifo_is_full( buffer_pool ) )
+    {
+        hb_fifo_push_head( buffer_pool, b );
+        return;
+    }
+    /* either the pool is full or this size doesn't use a pool - free the buf */
+    if( b->data )
+    {
+        free( b->data );
+        hb_lock(buffers.lock);
+        buffers.allocated -= b->alloc;
+        hb_unlock(buffers.lock);
+    }
+    free( b );
+    *_b = NULL;
+}
+
+void hb_buffer_copy_settings( hb_buffer_t * dst, const hb_buffer_t * src )
+{
+    dst->start     = src->start;
+    dst->stop      = src->stop;
+    dst->new_chap  = src->new_chap;
+    dst->frametype = src->frametype;
+    dst->flags     = src->flags;
+}
+
+hb_fifo_t * hb_fifo_init( int capacity )
+{
+    hb_fifo_t * f;
+    f           = calloc( sizeof( hb_fifo_t ), 1 );
+    f->lock     = hb_lock_init();
+    f->capacity = capacity;
+    f->buffer_size = 0;
+    return f;
+}
+
+int hb_fifo_size( hb_fifo_t * f )
+{
+    int ret;
+
+    hb_lock( f->lock );
+    ret = f->size;
+    hb_unlock( f->lock );
+
+    return ret;
+}
+
+int hb_fifo_is_full( hb_fifo_t * f )
+{
+    int ret;
+
+    hb_lock( f->lock );
+    ret = ( f->size >= f->capacity );
+    hb_unlock( f->lock );
+
+    return ret;
+}
+
+float hb_fifo_percent_full( hb_fifo_t * f )
+{
+    float ret;
+
+    hb_lock( f->lock );
+    ret = f->size / f->capacity;
+    hb_unlock( f->lock );
+
+    return ret;
+}
+
+hb_buffer_t * hb_fifo_get( hb_fifo_t * f )
+{
+    hb_buffer_t * b;
+
+    hb_lock( f->lock );
+    if( f->size < 1 )
+    {
+        hb_unlock( f->lock );
+        return NULL;
+    }
+    b         = f->first;
+    f->first  = b->next;
+    b->next   = NULL;
+    f->size  -= 1;
+    hb_unlock( f->lock );
+
+    return b;
+}
+
+hb_buffer_t * hb_fifo_see( hb_fifo_t * f )
+{
+    hb_buffer_t * b;
+
+    hb_lock( f->lock );
+    if( f->size < 1 )
+    {
+        hb_unlock( f->lock );
+        return NULL;
+    }
+    b = f->first;
+    hb_unlock( f->lock );
+
+    return b;
+}
+
+hb_buffer_t * hb_fifo_see2( hb_fifo_t * f )
+{
+    hb_buffer_t * b;
+
+    hb_lock( f->lock );
+    if( f->size < 2 )
+    {
+        hb_unlock( f->lock );
+        return NULL;
+    }
+    b = f->first->next;
+    hb_unlock( f->lock );
+
+    return b;
+}
+
+void hb_fifo_push( hb_fifo_t * f, hb_buffer_t * b )
+{
+    if( !b )
+    {
+        return;
+    }
+
+    hb_lock( f->lock );
+    if( f->size > 0 )
+    {
+        f->last->next = b;
+    }
+    else
+    {
+        f->first = b;
+    }
+    f->last  = b;
+    f->size += 1;
+    while( f->last->next )
+    {
+        f->size += 1;
+        f->last  = f->last->next;
+    }
+    hb_unlock( f->lock );
+}
+
+void hb_fifo_push_head( hb_fifo_t * f, hb_buffer_t * b )
+{
+    hb_buffer_t * tmp;
+    uint32_t      size = 0;
+
+    if( !b )
+    {
+        return;
+    }
+
+    hb_lock( f->lock );
+
+    /*
+     * If there are a chain of buffers prepend the lot
+     */
+    tmp = b;
+    while( tmp->next )
+    {
+        tmp = tmp->next;
+        size += 1;
+    }
+
+    if( f->size > 0 )
+    {
+        tmp->next = f->first;
+    } 
+    else
+    {
+        f->last = tmp;
+    }
+
+    f->first = b;
+    f->size += ( size + 1 );
+
+    hb_unlock( f->lock );
+}
+
+void hb_fifo_close( hb_fifo_t ** _f )
+{
+    hb_fifo_t   * f = *_f;
+    hb_buffer_t * b;
+
+    hb_deep_log( 2, "fifo_close: trashing %d buffer(s)", hb_fifo_size( f ) );
+    while( ( b = hb_fifo_get( f ) ) )
+    {
+        hb_buffer_close( &b );
+    }
+
+    hb_lock_close( &f->lock );
+    free( f );
+
+    *_f = NULL;
+}
diff --git a/libhb/hb.c b/libhb/hb.c
new file mode 100644 (file)
index 0000000..713c825
--- /dev/null
@@ -0,0 +1,1316 @@
+#include "hb.h"
+
+#include "libavcodec/avcodec.h"
+#include "libavformat/avformat.h"
+#include "libswscale/swscale.h"
+
+struct hb_handle_s
+{
+    /* The "Check for update" thread */
+    int            build;
+    char           version[16];
+    hb_thread_t  * update_thread;
+
+    /* This thread's only purpose is to check other threads'
+       states */
+    volatile int   die;
+    hb_thread_t  * main_thread;
+    int            pid;
+
+    /* DVD/file scan thread */
+    hb_list_t    * list_title;
+    hb_thread_t  * scan_thread;
+
+    /* The thread which processes the jobs. Others threads are launched
+       from this one (see work.c) */
+    hb_list_t    * jobs;
+    hb_job_t     * current_job;
+    int            job_count;
+    int            job_count_permanent;
+    volatile int   work_die;
+    int            work_error;
+    hb_thread_t  * work_thread;
+
+    int            cpu_count;
+
+    hb_lock_t    * state_lock;
+    hb_state_t     state;
+
+    int            paused;
+    hb_lock_t    * pause_lock;
+    /* For MacGui active queue
+       increments each time the scan thread completes*/
+    int            scanCount;
+
+};
+
+hb_work_object_t * hb_objects = NULL;
+
+static void thread_func( void * );
+
+/**
+ * Registers work objects, by adding the work object to a liked list.
+ * @param w Handle to hb_work_object_t to register.
+ */
+void hb_register( hb_work_object_t * w )
+{
+    w->next    = hb_objects;
+    hb_objects = w;
+}
+
+/**
+ * libhb initialization routine.
+ * @param verbose HB_DEBUG_NONE or HB_DEBUG_ALL.
+ * @param update_check signals libhb to check for updated version from HandBrake website.
+ * @return Handle to hb_handle_t for use on all subsequent calls to libhb.
+ */
+hb_handle_t * hb_init_real( int verbose, int update_check )
+{
+    hb_handle_t * h = calloc( sizeof( hb_handle_t ), 1 );
+    uint64_t      date;
+
+    /* See hb_deep_log() and hb_log() in common.c */
+    global_verbosity_level = verbose;
+    if( verbose )
+        putenv( "HB_DEBUG=1" );
+
+    /* Check for an update on the website if asked to */
+    h->build = -1;
+
+    if( update_check )
+    {
+        hb_log( "hb_init: checking for updates" );
+        date             = hb_get_date();
+        h->update_thread = hb_update_init( &h->build, h->version );
+
+        for( ;; )
+        {
+            if( hb_thread_has_exited( h->update_thread ) )
+            {
+                /* Immediate success or failure */
+                hb_thread_close( &h->update_thread );
+                break;
+            }
+            if( hb_get_date() > date + 1000 )
+            {
+                /* Still nothing after one second. Connection problem,
+                   let the thread die */
+                hb_log( "hb_init: connection problem, not waiting for "
+                        "update_thread" );
+                break;
+            }
+            hb_snooze( 500 );
+        }
+    }
+
+    /*
+     * Initialise buffer pool
+     */
+    hb_buffer_pool_init();
+
+    /* CPU count detection */
+    hb_log( "hb_init: checking cpu count" );
+    h->cpu_count = hb_get_cpu_count();
+
+    h->list_title = hb_list_init();
+    h->jobs       = hb_list_init();
+
+    h->state_lock  = hb_lock_init();
+    h->state.state = HB_STATE_IDLE;
+
+    h->pause_lock = hb_lock_init();
+
+    /* libavcodec */
+    av_register_all();
+
+    /* Start library thread */
+    hb_log( "hb_init: starting libhb thread" );
+    h->die         = 0;
+    h->main_thread = hb_thread_init( "libhb", thread_func, h,
+                                     HB_NORMAL_PRIORITY );
+
+    return h;
+
+       /* Set the scan count to start at 0 */
+       //scan_count = 0;
+}
+
+/**
+ * libhb initialization routine.
+ * This version is to use when calling the dylib, the macro hb_init isn't available from a dylib call!
+ * @param verbose HB_DEBUG_NONE or HB_DEBUG_ALL.
+ * @param update_check signals libhb to check for updated version from HandBrake website.
+ * @return Handle to hb_handle_t for use on all subsequent calls to libhb.
+ */
+hb_handle_t * hb_init_dl( int verbose, int update_check )
+{
+    hb_handle_t * h = calloc( sizeof( hb_handle_t ), 1 );
+    uint64_t      date;
+
+    /* See hb_log() in common.c */
+    if( verbose > HB_DEBUG_NONE )
+    {
+        putenv( "HB_DEBUG=1" );
+    }
+
+    /* Check for an update on the website if asked to */
+    h->build = -1;
+
+    if( update_check )
+    {
+        hb_log( "hb_init: checking for updates" );
+        date             = hb_get_date();
+        h->update_thread = hb_update_init( &h->build, h->version );
+
+        for( ;; )
+        {
+            if( hb_thread_has_exited( h->update_thread ) )
+            {
+                /* Immediate success or failure */
+                hb_thread_close( &h->update_thread );
+                break;
+            }
+            if( hb_get_date() > date + 1000 )
+            {
+                /* Still nothing after one second. Connection problem,
+                   let the thread die */
+                hb_log( "hb_init: connection problem, not waiting for "
+                        "update_thread" );
+                break;
+            }
+            hb_snooze( 500 );
+        }
+    }
+
+    /* CPU count detection */
+    hb_log( "hb_init: checking cpu count" );
+    h->cpu_count = hb_get_cpu_count();
+
+    h->list_title = hb_list_init();
+    h->jobs       = hb_list_init();
+    h->current_job = NULL;
+
+    h->state_lock  = hb_lock_init();
+    h->state.state = HB_STATE_IDLE;
+
+    h->pause_lock = hb_lock_init();
+
+    /* libavcodec */
+    avcodec_init();
+    avcodec_register_all();
+
+    /* Start library thread */
+    hb_log( "hb_init: starting libhb thread" );
+    h->die         = 0;
+    h->main_thread = hb_thread_init( "libhb", thread_func, h,
+                                     HB_NORMAL_PRIORITY );
+
+    hb_register( &hb_sync );
+       hb_register( &hb_decmpeg2 );
+       hb_register( &hb_decsub );
+       hb_register( &hb_render );
+       hb_register( &hb_encavcodec );
+       hb_register( &hb_encxvid );
+       hb_register( &hb_encx264 );
+    hb_register( &hb_enctheora );
+       hb_register( &hb_deca52 );
+       hb_register( &hb_decdca );
+       hb_register( &hb_decavcodec );
+       hb_register( &hb_decavcodecv );
+       hb_register( &hb_decavcodecvi );
+       hb_register( &hb_decavcodecai );
+       hb_register( &hb_declpcm );
+       hb_register( &hb_encfaac );
+       hb_register( &hb_enclame );
+       hb_register( &hb_encvorbis );
+
+       return h;
+}
+
+
+/**
+ * Returns current version of libhb.
+ * @param h Handle to hb_handle_t.
+ * @return character array of version number.
+ */
+char * hb_get_version( hb_handle_t * h )
+{
+    return HB_VERSION;
+}
+
+/**
+ * Returns current build of libhb.
+ * @param h Handle to hb_handle_t.
+ * @return character array of build number.
+ */
+int hb_get_build( hb_handle_t * h )
+{
+    return HB_BUILD;
+}
+
+/**
+ * Checks for needed update.
+ * @param h Handle to hb_handle_t.
+ * @param version Pointer to handle where version will be copied.
+ * @return update indicator.
+ */
+int hb_check_update( hb_handle_t * h, char ** version )
+{
+    *version = ( h->build < 0 ) ? NULL : h->version;
+    return h->build;
+}
+
+/**
+ * Sets the cpu count to the desired value.
+ * @param h Handle to hb_handle_t
+ * @param cpu_count Number of CPUs to use.
+ */
+void hb_set_cpu_count( hb_handle_t * h, int cpu_count )
+{
+    cpu_count    = MAX( 1, cpu_count );
+    cpu_count    = MIN( cpu_count, 8 );
+    h->cpu_count = cpu_count;
+}
+
+/**
+ * Initializes a scan of the by calling hb_scan_init
+ * @param h Handle to hb_handle_t
+ * @param path location of VIDEO_TS folder.
+ * @param title_index Desired title to scan.  0 for all titles.
+ */
+void hb_scan( hb_handle_t * h, const char * path, int title_index )
+{
+    hb_title_t * title;
+
+    /* Clean up from previous scan */
+    while( ( title = hb_list_item( h->list_title, 0 ) ) )
+    {
+        hb_list_rem( h->list_title, title );
+        hb_title_close( &title );
+    }
+
+    hb_log( "hb_scan: path=%s, title_index=%d", path, title_index );
+    h->scan_thread = hb_scan_init( h, path, title_index, h->list_title );
+}
+
+/**
+ * Returns the list of titles found.
+ * @param h Handle to hb_handle_t
+ * @return Handle to hb_list_t of the title list.
+ */
+hb_list_t * hb_get_titles( hb_handle_t * h )
+{
+    return h->list_title;
+}
+
+/**
+ * Create preview image of desired title a index of picture.
+ * @param h Handle to hb_handle_t.
+ * @param title Handle to hb_title_t of desired title.
+ * @param picture Index in title.
+ * @param buffer Handle to buufer were inage will be drawn.
+ */
+void hb_get_preview( hb_handle_t * h, hb_title_t * title, int picture,
+                     uint8_t * buffer )
+{
+    hb_job_t           * job = title->job;
+    char                 filename[1024];
+    FILE               * file;
+    uint8_t            * buf1, * buf2, * buf3, * buf4, * pen;
+    uint32_t           * p32, swsflags;
+    AVPicture            pic_in, pic_preview, pic_deint, pic_crop, pic_scale;
+    struct SwsContext  * context;
+    int                  i;
+    int                  rgb_width = ((job->width + 7) >> 3) << 3;
+    int                  preview_size;
+
+    swsflags = SWS_LANCZOS;
+#ifndef __x86_64__
+    swsflags |= SWS_ACCURATE_RND;
+#endif  /* __x86_64__ */
+
+    buf1 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P, title->width, title->height ) );
+    buf2 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P, title->width, title->height ) );
+    buf3 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P, job->width, job->height ) );
+    buf4 = av_malloc( avpicture_get_size( PIX_FMT_RGBA32, rgb_width, job->height ) );
+    avpicture_fill( &pic_in, buf1, PIX_FMT_YUV420P,
+                    title->width, title->height );
+    avpicture_fill( &pic_deint, buf2, PIX_FMT_YUV420P,
+                    title->width, title->height );
+    avpicture_fill( &pic_scale, buf3, PIX_FMT_YUV420P,
+                    job->width, job->height );
+    avpicture_fill( &pic_preview, buf4, PIX_FMT_RGBA32,
+                    rgb_width, job->height );
+
+    // Allocate the AVPicture frames and fill in
+
+    memset( filename, 0, 1024 );
+
+    hb_get_tempory_filename( h, filename, "%x%d",
+                             (intptr_t) title, picture );
+
+    file = fopen( filename, "r" );
+    if( !file )
+    {
+        hb_log( "hb_get_preview: fopen failed" );
+        return;
+    }
+
+    fread( buf1, avpicture_get_size( PIX_FMT_YUV420P, title->width, title->height), 1, file );
+    fclose( file );
+
+    if( job->deinterlace )
+    {
+        // Deinterlace and crop
+        avpicture_deinterlace( &pic_deint, &pic_in, PIX_FMT_YUV420P, title->width, title->height );
+        av_picture_crop( &pic_crop, &pic_deint, PIX_FMT_YUV420P, job->crop[0], job->crop[2] );
+    }
+    else
+    {
+        // Crop
+        av_picture_crop( &pic_crop, &pic_in, PIX_FMT_YUV420P, job->crop[0], job->crop[2] );
+    }
+
+    // Get scaling context
+    context = sws_getContext(title->width  - (job->crop[2] + job->crop[3]),
+                             title->height - (job->crop[0] + job->crop[1]),
+                             PIX_FMT_YUV420P,
+                             job->width, job->height, PIX_FMT_YUV420P,
+                             swsflags, NULL, NULL, NULL);
+
+    // Scale
+    sws_scale(context,
+              pic_crop.data, pic_crop.linesize,
+              0, title->height - (job->crop[0] + job->crop[1]),
+              pic_scale.data, pic_scale.linesize);
+
+    // Free context
+    sws_freeContext( context );
+
+    // Get preview context
+    context = sws_getContext(rgb_width, job->height, PIX_FMT_YUV420P,
+                              rgb_width, job->height, PIX_FMT_RGBA32,
+                              swsflags, NULL, NULL, NULL);
+
+    // Create preview
+    sws_scale(context,
+              pic_scale.data, pic_scale.linesize,
+              0, job->height,
+              pic_preview.data, pic_preview.linesize);
+
+    // Free context
+    sws_freeContext( context );
+
+    /* Gray background */
+    p32 = (uint32_t *) buffer;
+    for( i = 0; i < ( title->width + 2 ) * ( title->height + 2 ); i++ )
+    {
+        p32[i] = 0xFF808080;
+    }
+
+    /* Draw the picture, centered, and draw the cropping zone */
+    preview_size = pic_preview.linesize[0];
+    pen = buffer + ( title->height - job->height ) *
+        ( title->width + 2 ) * 2 + ( title->width - job->width ) * 2;
+    memset( pen, 0xFF, 4 * ( job->width + 2 ) );
+    pen += 4 * ( title->width + 2 );
+    for( i = 0; i < job->height; i++ )
+    {
+        uint8_t * nextLine;
+        nextLine = pen + 4 * ( title->width + 2 );
+        memset( pen, 0xFF, 4 );
+        pen += 4;
+        memcpy( pen, buf4 + preview_size * i, 4 * job->width );
+        pen += 4 * job->width;
+        memset( pen, 0xFF, 4 );
+        pen = nextLine;
+    }
+    memset( pen, 0xFF, 4 * ( job->width + 2 ) );
+
+    // Clean up
+    avpicture_free( &pic_preview );
+    avpicture_free( &pic_scale );
+    avpicture_free( &pic_deint );
+    avpicture_free( &pic_in );
+}
+
+ /**
+ * Analyzes a frame to detect interlacing artifacts
+ * and returns true if interlacing (combing) is found.
+ *
+ * Code taken from Thomas Oestreich's 32detect filter
+ * in the Transcode project, with minor formatting changes.
+ *
+ * @param buf         An hb_buffer structure holding valid frame data
+ * @param width       The frame's width in pixels
+ * @param height      The frame's height in pixels
+ * @param color_equal Sensitivity for detecting similar colors
+ * @param color_diff  Sensitivity for detecting different colors
+ * @param threshold   Sensitivity for flagging planes as combed
+ * @param prog_equal  Sensitivity for detecting similar colors on progressive frames
+ * @param prog_diff   Sensitivity for detecting different colors on progressive frames
+ * @param prog_threshold Sensitivity for flagging progressive frames as combed
+ */
+int hb_detect_comb( hb_buffer_t * buf, int width, int height, int color_equal, int color_diff, int threshold, int prog_equal, int prog_diff, int prog_threshold )
+{
+    int j, k, n, off, cc_1, cc_2, cc[3], flag[3] ;
+    uint16_t s1, s2, s3, s4;
+    cc_1 = 0; cc_2 = 0;
+
+    int offset = 0;
+    
+    if ( buf->flags & 16 )
+    {
+        /* Frame is progressive, be more discerning. */
+        color_diff = prog_diff;
+        color_equal = prog_equal;
+        threshold = prog_threshold;
+    }
+
+    /* One pas for Y, one pass for Cb, one pass for Cr */    
+    for( k = 0; k < 3; k++ )
+    {
+        if( k == 1 )
+        {
+            /* Y has already been checked, now offset by Y's dimensions
+               and divide all the other values by 2, since Cr and Cb
+               are half-size compared to Y.                               */
+            offset = width * height;
+            width >>= 1;
+            height >>= 1;
+        }
+        else if ( k == 2 )
+        {
+            /* Y and Cb are done, so the offset needs to be bumped
+               so it's width*height + (width / 2) * (height / 2)  */
+            offset *= 5/4;
+        }
+
+        for( j = 0; j < width; ++j )
+        {
+            off = 0;
+
+            for( n = 0; n < ( height - 4 ); n = n + 2 )
+            {
+                /* Look at groups of 4 sequential horizontal lines */
+                s1 = ( ( buf->data + offset )[ off + j             ] & 0xff );
+                s2 = ( ( buf->data + offset )[ off + j + width     ] & 0xff );
+                s3 = ( ( buf->data + offset )[ off + j + 2 * width ] & 0xff );
+                s4 = ( ( buf->data + offset )[ off + j + 3 * width ] & 0xff );
+
+                /* Note if the 1st and 2nd lines are more different in
+                   color than the 1st and 3rd lines are similar in color.*/
+                if ( ( abs( s1 - s3 ) < color_equal ) &&
+                     ( abs( s1 - s2 ) > color_diff ) )
+                        ++cc_1;
+
+                /* Note if the 2nd and 3rd lines are more different in
+                   color than the 2nd and 4th lines are similar in color.*/
+                if ( ( abs( s2 - s4 ) < color_equal ) &&
+                     ( abs( s2 - s3 ) > color_diff) )
+                        ++cc_2;
+
+                /* Now move down 2 horizontal lines before starting over.*/
+                off += 2 * width;
+            }
+        }
+
+        // compare results
+        /*  The final cc score for a plane is the percentage of combed pixels it contains.
+            Because sensitivity goes down to hundreths of a percent, multiply by 1000
+            so it will be easy to compare against the threhold value which is an integer. */
+        cc[k] = (int)( ( cc_1 + cc_2 ) * 1000.0 / ( width * height ) );
+    }
+
+
+    /* HandBrake is all yuv420, so weight the average percentage of all 3 planes accordingly.*/
+    int average_cc = ( 2 * cc[0] + ( cc[1] / 2 ) + ( cc[2] / 2 ) ) / 3;
+    
+    /* Now see if that average percentage of combed pixels surpasses the threshold percentage given by the user.*/
+    if( average_cc > threshold )
+    {
+#if 0
+            hb_log("Average %i combed (Threshold %i) %i/%i/%i | PTS: %lld (%fs) %s", average_cc, threshold, cc[0], cc[1], cc[2], buf->start, (float)buf->start / 90000, (buf->flags & 16) ? "Film" : "Video" );
+#endif
+        return 1;
+    }
+
+#if 0
+    hb_log("SKIPPED Average %i combed (Threshold %i) %i/%i/%i | PTS: %lld (%fs) %s", average_cc, threshold, cc[0], cc[1], cc[2], buf->start, (float)buf->start / 90000, (buf->flags & 16) ? "Film" : "Video" );
+#endif
+
+    /* Reaching this point means no combing detected. */
+    return 0;
+
+}
+
+/**
+ * Calculates job width and height for anamorphic content,
+ *
+ * @param job Handle to hb_job_t
+ * @param output_width Pointer to returned storage width
+ * @param output_height Pointer to returned storage height
+ * @param output_par_width Pointer to returned pixel width
+ @ param output_par_height Pointer to returned pixel height
+ */
+void hb_set_anamorphic_size( hb_job_t * job,
+        int *output_width, int *output_height,
+        int *output_par_width, int *output_par_height )
+{
+    /* "Loose" anamorphic.
+        - Uses mod16-compliant dimensions,
+        - Allows users to set the width
+        - Handles ITU pixel aspects
+    */
+
+    /* Set up some variables to make the math easier to follow. */
+    hb_title_t * title = job->title;
+    int cropped_width = title->width - job->crop[2] - job->crop[3] ;
+    int cropped_height = title->height - job->crop[0] - job->crop[1] ;
+    double storage_aspect = (double)cropped_width / (double)cropped_height;
+    int width = job->width;
+    int height; // Gets set later, ignore user job->height value
+    int mod = job->modulus;
+    double aspect = title->aspect;
+
+    /* Gotta handle bounding dimensions differently
+       than for non-anamorphic encodes:
+       If the width is too big, just reset it with no rescaling.
+       Instead of using the aspect-scaled job height,
+       we need to see if the job width divided by the storage aspect
+       is bigger than the max. If so, set it to the max (this is sloppy).
+       If not, set job height to job width divided by storage aspect.
+    */
+
+    if ( job->maxWidth && (job->maxWidth < job->width) )
+        width = job->maxWidth;
+
+    height = (double)width / storage_aspect;
+    if ( job->maxHeight && (job->maxHeight < height) )
+        height = job->maxHeight;
+
+    /* In case the user specified a modulus, use it */
+    if (job->modulus)
+        mod = job->modulus;
+    else
+        mod = 16;
+
+    /* Time to get picture dimensions that divide cleanly.*/
+    width  = MULTIPLE_MOD( width, mod);
+    height = MULTIPLE_MOD( height, mod);
+
+    /* Verify these new dimensions don't violate max height and width settings */
+    if ( job->maxWidth && (job->maxWidth < job->width) )
+        width = job->maxWidth;
+    if ( job->maxHeight && (job->maxHeight < height) )
+        height = job->maxHeight;
+    
+    int pixel_aspect_width = job->pixel_aspect_width;
+    int pixel_aspect_height = job->pixel_aspect_height;
+    
+    /* If a source was really 704*480 and hard matted with cropping
+       to 720*480, replace the PAR values with the ITU broadcast ones. */
+    if (title->width == 720 && cropped_width <= 706)
+    {
+        // convert aspect to a scaled integer so we can test for 16:9 & 4:3
+        // aspect ratios ignoring insignificant differences in the LSBs of
+        // the floating point representation.
+        int iaspect = aspect * 9.;
+
+        /* Handle ITU PARs */
+        if (title->height == 480)
+        {
+            /* It's NTSC */
+            if (iaspect == 16)
+            {
+                /* It's widescreen */
+                pixel_aspect_width = 40;
+                pixel_aspect_height = 33;
+            }
+            else if (iaspect == 12)
+            {
+                /* It's 4:3 */
+                pixel_aspect_width = 10;
+                pixel_aspect_height = 11;
+            }
+        }
+        else if (title->height == 576)
+        {
+            /* It's PAL */
+            if(iaspect == 16)
+            {
+                /* It's widescreen */
+                pixel_aspect_width = 16;
+                pixel_aspect_height = 11;
+            }
+            else if (iaspect == 12)
+            {
+                /* It's 4:3 */
+                pixel_aspect_width = 12;
+                pixel_aspect_height = 11;
+            }
+        }
+    }
+
+    /* Figure out what dimensions the source would display at. */
+    int source_display_width = cropped_width * (double)pixel_aspect_width /
+                               (double)pixel_aspect_height ;
+
+    /* The film AR is the source's display width / cropped source height.
+       The output display width is the output height * film AR.
+       The output PAR is the output display width / output storage width. */
+    pixel_aspect_width = height * source_display_width / cropped_height;
+    pixel_aspect_height = width;
+
+    /* Pass the results back to the caller */
+    *output_width = width;
+    *output_height = height;
+
+    /* While x264 is smart enough to reduce fractions on its own, libavcodec
+       needs some help with the math, so lose superfluous factors.            */
+    hb_reduce( output_par_width, output_par_height,
+               pixel_aspect_width, pixel_aspect_height );
+}
+
+/**
+ * Calculates job width, height, and cropping parameters.
+ * @param job Handle to hb_job_t.
+ * @param aspect Desired aspect ratio. Value of -1 uses title aspect.
+ * @param pixels Maximum desired pixel count.
+ */
+void hb_set_size( hb_job_t * job, double aspect, int pixels )
+{
+    hb_title_t * title = job->title;
+
+    int croppedWidth  = title->width - title->crop[2] - title->crop[3];
+    int croppedHeight = title->height - title->crop[0] - title->crop[1];
+    double croppedAspect = title->aspect * title->height * croppedWidth /
+                           croppedHeight / title->width;
+    int addCrop;
+    int i, w, h;
+
+    if( aspect <= 0 )
+    {
+        /* Keep the best possible aspect ratio */
+        aspect = croppedAspect;
+    }
+
+    /* Crop if necessary to obtain the desired ratio */
+    memcpy( job->crop, title->crop, 4 * sizeof( int ) );
+    if( aspect < croppedAspect )
+    {
+        /* Need to crop on the left and right */
+        addCrop = croppedWidth - aspect * croppedHeight * title->width /
+                    title->aspect / title->height;
+        if( addCrop & 3 )
+        {
+            addCrop = ( addCrop + 1 ) / 2;
+            job->crop[2] += addCrop;
+            job->crop[3] += addCrop;
+        }
+        else if( addCrop & 2 )
+        {
+            addCrop /= 2;
+            job->crop[2] += addCrop - 1;
+            job->crop[3] += addCrop + 1;
+        }
+        else
+        {
+            addCrop /= 2;
+            job->crop[2] += addCrop;
+            job->crop[3] += addCrop;
+        }
+    }
+    else if( aspect > croppedAspect )
+    {
+        /* Need to crop on the top and bottom */
+        addCrop = croppedHeight - croppedWidth * title->aspect *
+            title->height / aspect / title->width;
+        if( addCrop & 3 )
+        {
+            addCrop = ( addCrop + 1 ) / 2;
+            job->crop[0] += addCrop;
+            job->crop[1] += addCrop;
+        }
+        else if( addCrop & 2 )
+        {
+            addCrop /= 2;
+            job->crop[0] += addCrop - 1;
+            job->crop[1] += addCrop + 1;
+        }
+        else
+        {
+            addCrop /= 2;
+            job->crop[0] += addCrop;
+            job->crop[1] += addCrop;
+        }
+    }
+
+    /* Compute a resolution from the number of pixels and aspect */
+    for( i = 0;; i++ )
+    {
+        w = 16 * i;
+        h = MULTIPLE_16( (int)( (double)w / aspect ) );
+        if( w * h > pixels )
+        {
+            break;
+        }
+    }
+    i--;
+    job->width  = 16 * i;
+    job->height = MULTIPLE_16( (int)( (double)job->width / aspect ) );
+}
+
+/**
+ * Returns the number of jobs in the queue.
+ * @param h Handle to hb_handle_t.
+ * @return Number of jobs.
+ */
+int hb_count( hb_handle_t * h )
+{
+    return hb_list_count( h->jobs );
+}
+
+/**
+ * Returns handle to job at index i within the job list.
+ * @param h Handle to hb_handle_t.
+ * @param i Index of job.
+ * @returns Handle to hb_job_t of desired job.
+ */
+hb_job_t * hb_job( hb_handle_t * h, int i )
+{
+    return hb_list_item( h->jobs, i );
+}
+
+hb_job_t * hb_current_job( hb_handle_t * h )
+{
+    return( h->current_job );
+}
+
+/**
+ * Adds a job to the job list.
+ * @param h Handle to hb_handle_t.
+ * @param job Handle to hb_job_t.
+ */
+void hb_add( hb_handle_t * h, hb_job_t * job )
+{
+    hb_job_t      * job_copy;
+    hb_title_t    * title,    * title_copy;
+    hb_chapter_t  * chapter,  * chapter_copy;
+    hb_audio_t    * audio;
+    hb_subtitle_t * subtitle, * subtitle_copy;
+    int             i;
+    char            audio_lang[4];
+
+    /* Copy the title */
+    title      = job->title;
+    title_copy = malloc( sizeof( hb_title_t ) );
+    memcpy( title_copy, title, sizeof( hb_title_t ) );
+
+    title_copy->list_chapter = hb_list_init();
+    for( i = 0; i < hb_list_count( title->list_chapter ); i++ )
+    {
+        chapter      = hb_list_item( title->list_chapter, i );
+        chapter_copy = malloc( sizeof( hb_chapter_t ) );
+        memcpy( chapter_copy, chapter, sizeof( hb_chapter_t ) );
+        hb_list_add( title_copy->list_chapter, chapter_copy );
+    }
+
+    /* Copy the audio track(s) we want */
+    title_copy->list_audio = hb_list_init();
+
+    for( i = 0; i < hb_list_count(job->list_audio); i++ )
+    {
+        if( ( audio = hb_list_item( job->list_audio, i ) ) )
+        {
+            hb_list_add( title_copy->list_audio, hb_audio_copy(audio) );
+        }
+    }
+
+    title_copy->list_subtitle = hb_list_init();
+
+    /*
+     * The following code is confusing, there are three ways in which
+     * we select subtitles and it depends on whether this is single or
+     * two pass mode.
+     *
+     * subtitle_scan may be enabled, in which case the first pass
+     * scans all subtitles of that language. The second pass does not
+     * select any because they are set at the end of the first pass.
+     *
+     * native_language may have a preferred language, in which case we
+     * may be switching the language we want for the subtitles in the
+     * first pass of a single pass, or the second pass of a two pass.
+     *
+     * We may have manually selected a subtitle, in which case that is
+     * selected in the first pass of a single pass, or the second of a
+     * two pass.
+     */
+    memset( audio_lang, 0, sizeof( audio_lang ) );
+
+    if ( job->indepth_scan || job->native_language ) {
+
+        /*
+         * Find the first audio language that is being encoded
+         */
+        for( i = 0; i < hb_list_count(job->list_audio); i++ )
+        {
+            if( ( audio = hb_list_item( job->list_audio, i ) ) )
+            {
+                strncpy(audio_lang, audio->config.lang.iso639_2, sizeof(audio_lang));
+                break;
+            }
+        }
+
+        /*
+         * In all cases switch the language if we need to to our native
+         * language.
+         */
+        if( job->native_language )
+        {
+            if( strncasecmp( job->native_language, audio_lang,
+                             sizeof( audio_lang ) ) != 0 )
+            {
+
+                if( job->pass != 2 )
+                {
+                    hb_log( "Enabled subtitles in native language '%s', audio is in '%s'",
+                            job->native_language, audio_lang);
+                }
+                /*
+                 * The main audio track is not in our native language, so switch
+                 * the subtitles to use our native language instead.
+                 */
+                strncpy( audio_lang, job->native_language, sizeof( audio_lang ) );
+            } else {
+                /*
+                 * native language is irrelevent, free it.
+                 */
+                free( job->native_language );
+                job->native_language = NULL;
+            }
+        }
+    }
+
+    /*
+     * If doing a subtitle scan then add all the matching subtitles for this
+     * language.
+     */
+    if ( job->indepth_scan )
+    {
+        for( i=0; i < hb_list_count( title->list_subtitle ); i++ )
+        {
+            subtitle = hb_list_item( title->list_subtitle, i );
+            if( strcmp( subtitle->iso639_2, audio_lang ) == 0 )
+            {
+                /*
+                 * Matched subtitle language with audio language, so
+                 * add this to our list to scan.
+                 *
+                 * We will update the subtitle list on the second pass
+                 * later after the first pass has completed.
+                 */
+                subtitle_copy = malloc( sizeof( hb_subtitle_t ) );
+                memcpy( subtitle_copy, subtitle, sizeof( hb_subtitle_t ) );
+                hb_list_add( title_copy->list_subtitle, subtitle_copy );
+                if ( job->native_language ) {
+                    /*
+                     * With native language just select the
+                     * first match in our langiage, not all of
+                     * them. Subsequent ones are likely to be commentary
+                     */
+                    break;
+                }
+            }
+        }
+    } else {
+        /*
+         * Not doing a subtitle scan in this pass, but maybe we are in the
+         * first pass?
+         */
+        if( job->select_subtitle )
+        {
+            /*
+             * Don't add subtitles here, we'll add them via select_subtitle
+             * at the end of the subtitle_scan.
+             */
+        } else {
+            /*
+             * Definitely not doing a subtitle scan.
+             */
+            if( job->pass != 1 && job->native_language )
+            {
+                /*
+                 * We are not doing a subtitle scan but do want the
+                 * native langauge subtitle selected, so select it
+                 * for pass 0 or pass 2 of a two pass.
+                 */
+                for( i=0; i < hb_list_count( title->list_subtitle ); i++ )
+                {
+                    subtitle = hb_list_item( title->list_subtitle, i );
+                    if( strcmp( subtitle->iso639_2, audio_lang ) == 0 )
+                    {
+                        /*
+                         * Matched subtitle language with audio language, so
+                         * add this to our list to scan.
+                         */
+                        subtitle_copy = malloc( sizeof( hb_subtitle_t ) );
+                        memcpy( subtitle_copy, subtitle, sizeof( hb_subtitle_t ) );
+                        hb_list_add( title_copy->list_subtitle, subtitle_copy );
+                        break;
+                    }
+                }
+            } else {
+                /*
+                 * Manually selected subtitle, in which case only
+                 * bother adding them for pass 0 or pass 2 of a two
+                 * pass.
+                 */
+                if( job->pass != 1 )
+                {
+                    if( ( subtitle = hb_list_item( title->list_subtitle, job->subtitle ) ) )
+                    {
+                        subtitle_copy = malloc( sizeof( hb_subtitle_t ) );
+                        memcpy( subtitle_copy, subtitle, sizeof( hb_subtitle_t ) );
+                        hb_list_add( title_copy->list_subtitle, subtitle_copy );
+                    }
+                }
+            }
+        }
+    }
+
+    /* Copy the job */
+    job_copy        = calloc( sizeof( hb_job_t ), 1 );
+    memcpy( job_copy, job, sizeof( hb_job_t ) );
+    title_copy->job = job_copy;
+    job_copy->title = title_copy;
+    job_copy->list_audio = title_copy->list_audio;
+    job_copy->file  = strdup( job->file );
+    job_copy->h     = h;
+    job_copy->pause = h->pause_lock;
+
+    /* Copy the job filter list */
+    if( job->filters )
+    {
+        int i;
+        int filter_count = hb_list_count( job->filters );
+        job_copy->filters = hb_list_init();
+        for( i = 0; i < filter_count; i++ )
+        {
+            /*
+             * Copy the filters, since the MacGui reuses the global filter objects
+             * meaning that queued up jobs overwrite the previous filter settings.
+             * In reality, settings is probably the only field that needs duplicating
+             * since it's the only value that is ever changed. But name is duplicated
+             * as well for completeness. Not copying private_data since it gets
+             * created for each job in renderInit.
+             */
+            hb_filter_object_t * filter = hb_list_item( job->filters, i );
+            hb_filter_object_t * filter_copy = malloc( sizeof( hb_filter_object_t ) );
+            memcpy( filter_copy, filter, sizeof( hb_filter_object_t ) );
+            if( filter->name )
+                filter_copy->name = strdup( filter->name );
+            if( filter->settings )
+                filter_copy->settings = strdup( filter->settings );
+            hb_list_add( job_copy->filters, filter_copy );
+        }
+    }
+
+    /* Add the job to the list */
+    hb_list_add( h->jobs, job_copy );
+    h->job_count = hb_count(h);
+    h->job_count_permanent++;
+}
+
+/**
+ * Removes a job from the job list.
+ * @param h Handle to hb_handle_t.
+ * @param job Handle to hb_job_t.
+ */
+void hb_rem( hb_handle_t * h, hb_job_t * job )
+{
+    hb_list_rem( h->jobs, job );
+
+    h->job_count = hb_count(h);
+    if (h->job_count_permanent)
+        h->job_count_permanent--;
+
+    /* XXX free everything XXX */
+}
+
+/**
+ * Starts the conversion process.
+ * Sets state to HB_STATE_WORKING.
+ * calls hb_work_init, to launch work thread. Stores handle to work thread.
+ * @param h Handle to hb_handle_t.
+ */
+void hb_start( hb_handle_t * h )
+{
+    /* XXX Hack */
+    h->job_count = hb_list_count( h->jobs );
+    h->job_count_permanent = h->job_count;
+
+    hb_lock( h->state_lock );
+    h->state.state = HB_STATE_WORKING;
+#define p h->state.param.working
+    p.progress  = 0.0;
+    p.job_cur   = 1;
+    p.job_count = h->job_count;
+    p.rate_cur  = 0.0;
+    p.rate_avg  = 0.0;
+    p.hours     = -1;
+    p.minutes   = -1;
+    p.seconds   = -1;
+    p.sequence_id = 0;
+#undef p
+    hb_unlock( h->state_lock );
+
+    h->paused = 0;
+
+    h->work_die    = 0;
+    h->work_thread = hb_work_init( h->jobs, h->cpu_count,
+                                   &h->work_die, &h->work_error, &h->current_job );
+}
+
+/**
+ * Pauses the conversion process.
+ * @param h Handle to hb_handle_t.
+ */
+void hb_pause( hb_handle_t * h )
+{
+    if( !h->paused )
+    {
+        hb_lock( h->pause_lock );
+        h->paused = 1;
+
+        hb_lock( h->state_lock );
+        h->state.state = HB_STATE_PAUSED;
+        hb_unlock( h->state_lock );
+    }
+}
+
+/**
+ * Resumes the conversion process.
+ * @param h Handle to hb_handle_t.
+ */
+void hb_resume( hb_handle_t * h )
+{
+    if( h->paused )
+    {
+        hb_unlock( h->pause_lock );
+        h->paused = 0;
+    }
+}
+
+/**
+ * Stops the conversion process.
+ * @param h Handle to hb_handle_t.
+ */
+void hb_stop( hb_handle_t * h )
+{
+    h->work_die = 1;
+
+    h->job_count = hb_count(h);
+    h->job_count_permanent = 0;
+
+    hb_resume( h );
+}
+
+/**
+ * Returns the state of the conversion process.
+ * @param h Handle to hb_handle_t.
+ * @param s Handle to hb_state_t which to copy the state data.
+ */
+void hb_get_state( hb_handle_t * h, hb_state_t * s )
+{
+    hb_lock( h->state_lock );
+
+    memcpy( s, &h->state, sizeof( hb_state_t ) );
+    if ( h->state.state == HB_STATE_SCANDONE || h->state.state == HB_STATE_WORKDONE )
+        h->state.state = HB_STATE_IDLE;
+
+    hb_unlock( h->state_lock );
+}
+
+void hb_get_state2( hb_handle_t * h, hb_state_t * s )
+{
+    hb_lock( h->state_lock );
+
+    memcpy( s, &h->state, sizeof( hb_state_t ) );
+
+    hb_unlock( h->state_lock );
+}
+
+/**
+ * Called in MacGui in UpdateUI to check
+ *  for a new scan being completed to set a new source
+ */
+int hb_get_scancount( hb_handle_t * h)
+ {
+     return h->scanCount;
+ }
+
+/**
+ * Closes access to libhb by freeing the hb_handle_t handle ontained in hb_init_real.
+ * @param _h Pointer to handle to hb_handle_t.
+ */
+void hb_close( hb_handle_t ** _h )
+{
+    hb_handle_t * h = *_h;
+    hb_title_t * title;
+
+    h->die = 1;
+    hb_thread_close( &h->main_thread );
+
+    while( ( title = hb_list_item( h->list_title, 0 ) ) )
+    {
+        hb_list_rem( h->list_title, title );
+        if( title->job && title->job->filters )
+        {
+            hb_list_close( &title->job->filters );
+        }
+        free( title->job );
+        hb_title_close( &title );
+    }
+    hb_list_close( &h->list_title );
+
+    hb_list_close( &h->jobs );
+    hb_lock_close( &h->state_lock );
+    hb_lock_close( &h->pause_lock );
+    free( h );
+    *_h = NULL;
+
+}
+
+/**
+ * Monitors the state of the update, scan, and work threads.
+ * Sets scan done state when scan thread exits.
+ * Sets work done state when work thread exits.
+ * @param _h Handle to hb_handle_t
+ */
+static void thread_func( void * _h )
+{
+    hb_handle_t * h = (hb_handle_t *) _h;
+    char dirname[1024];
+    DIR * dir;
+    struct dirent * entry;
+
+    h->pid = getpid();
+
+    /* Create folder for temporary files */
+    memset( dirname, 0, 1024 );
+    hb_get_tempory_directory( h, dirname );
+
+    hb_mkdir( dirname );
+
+    while( !h->die )
+    {
+        /* In case the check_update thread hangs, it'll die sooner or
+           later. Then, we join it here */
+        if( h->update_thread &&
+            hb_thread_has_exited( h->update_thread ) )
+        {
+            hb_thread_close( &h->update_thread );
+        }
+
+        /* Check if the scan thread is done */
+        if( h->scan_thread &&
+            hb_thread_has_exited( h->scan_thread ) )
+        {
+            hb_thread_close( &h->scan_thread );
+
+            hb_log( "libhb: scan thread found %d valid title(s)",
+                    hb_list_count( h->list_title ) );
+            hb_lock( h->state_lock );
+            h->state.state = HB_STATE_SCANDONE; //originally state.state
+                       hb_unlock( h->state_lock );
+                       /*we increment this sessions scan count by one for the MacGui
+                       to trigger a new source being set */
+            h->scanCount++;
+        }
+
+        /* Check if the work thread is done */
+        if( h->work_thread &&
+            hb_thread_has_exited( h->work_thread ) )
+        {
+            hb_thread_close( &h->work_thread );
+
+            hb_log( "libhb: work result = %d",
+                    h->work_error );
+            hb_lock( h->state_lock );
+            h->state.state                = HB_STATE_WORKDONE;
+            h->state.param.workdone.error = h->work_error;
+
+            h->job_count = hb_count(h);
+            if (h->job_count < 1)
+                h->job_count_permanent = 0;
+            hb_unlock( h->state_lock );
+        }
+
+        hb_snooze( 50 );
+    }
+
+    if( h->work_thread )
+    {
+        hb_stop( h );
+        hb_thread_close( &h->work_thread );
+    }
+
+    /* Remove temp folder */
+    dir = opendir( dirname );
+    if (dir)
+    {
+        while( ( entry = readdir( dir ) ) )
+        {
+            char filename[1024];
+            if( entry->d_name[0] == '.' )
+            {
+                continue;
+            }
+            memset( filename, 0, 1024 );
+            snprintf( filename, 1023, "%s/%s", dirname, entry->d_name );
+            unlink( filename );
+        }
+        closedir( dir );
+        rmdir( dirname );
+    }
+}
+
+/**
+ * Returns the PID.
+ * @param h Handle to hb_handle_t
+ */
+int hb_get_pid( hb_handle_t * h )
+{
+    return h->pid;
+}
+
+/**
+ * Sets the current state.
+ * @param h Handle to hb_handle_t
+ * @param s Handle to new hb_state_t
+ */
+void hb_set_state( hb_handle_t * h, hb_state_t * s )
+{
+    hb_lock( h->pause_lock );
+    hb_lock( h->state_lock );
+    memcpy( &h->state, s, sizeof( hb_state_t ) );
+    if( h->state.state == HB_STATE_WORKING )
+    {
+        /* XXX Hack */
+        if (h->job_count < 1)
+            h->job_count_permanent = 1;
+
+        h->state.param.working.job_cur =
+            h->job_count_permanent - hb_list_count( h->jobs );
+        h->state.param.working.job_count = h->job_count_permanent;
+
+        // Set which job is being worked on
+        if (h->current_job)
+            h->state.param.working.sequence_id = h->current_job->sequence_id;
+        else
+            h->state.param.working.sequence_id = 0;
+    }
+    hb_unlock( h->state_lock );
+    hb_unlock( h->pause_lock );
+}
diff --git a/libhb/hb.h b/libhb/hb.h
new file mode 100644 (file)
index 0000000..8bfd9a1
--- /dev/null
@@ -0,0 +1,126 @@
+#ifndef HB_HB_H
+#define HB_HB_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "hbversion.h"
+#include "common.h"
+
+/* hb_init()
+   Initializes a libhb session (launches his own thread, detects CPUs,
+   etc) */
+#define HB_DEBUG_NONE 0
+#define HB_DEBUG_ALL  1
+void          hb_register( hb_work_object_t * );
+hb_handle_t * hb_init_real( int verbose, int update_check );
+hb_handle_t * hb_init_dl ( int verbose, int update_check ); // hb_init for use with dylib
+
+#define hb_init(v,u) \
+hb_init_real( v, u ); \
+hb_register( &hb_sync ); \
+hb_register( &hb_decmpeg2 ); \
+hb_register( &hb_decsub ); \
+hb_register( &hb_render ); \
+hb_register( &hb_encavcodec ); \
+hb_register( &hb_encxvid ); \
+hb_register( &hb_encx264 ); \
+hb_register( &hb_enctheora ); \
+hb_register( &hb_deca52 ); \
+hb_register( &hb_decdca ); \
+hb_register( &hb_decavcodec ); \
+hb_register( &hb_decavcodecv ); \
+hb_register( &hb_decavcodecvi ); \
+hb_register( &hb_decavcodecai ); \
+hb_register( &hb_declpcm ); \
+hb_register( &hb_encfaac ); \
+hb_register( &hb_enclame ); \
+hb_register( &hb_encvorbis ); \
+
+#define hb_init_express(v,u) \
+hb_init_real( v, u ); \
+hb_register( &hb_sync ); \
+hb_register( &hb_decmpeg2 ); \
+hb_register( &hb_decsub ); \
+hb_register( &hb_render ); \
+hb_register( &hb_encavcodec ); \
+hb_register( &hb_encx264 ); \
+hb_register( &hb_deca52 ); \
+hb_register( &hb_decdca ); \
+hb_register( &hb_decavcodec ); \
+hb_register( &hb_decavcodecv ); \
+hb_register( &hb_decavcodecvi ); \
+hb_register( &hb_decavcodecai ); \
+hb_register( &hb_declpcm ); \
+hb_register( &hb_encfaac ); \
+
+/* hb_get_version() */
+char        * hb_get_version( hb_handle_t * );
+int           hb_get_build( hb_handle_t * );
+
+/* hb_check_update()
+   Checks for an update on the website. If there is, returns the build
+   number and points 'version' to a version description. Returns a
+   negative value otherwise. */
+int           hb_check_update( hb_handle_t * h, char ** version );
+
+/* hb_set_cpu_count()
+   Force libhb to act as if you had X CPU(s).
+   Default is to use the detected count (see also hb_get_cpu_count() in
+   ports.h) */
+void          hb_set_cpu_count( hb_handle_t *, int );
+
+char *        hb_dvd_name( char * path );
+
+/* hb_scan()
+   Scan the specified path. Can be a DVD device, a VIDEO_TS folder or
+   a VOB file. If title_index is 0, scan all titles. */
+void          hb_scan( hb_handle_t *, const char * path,
+                       int title_index );
+
+/* hb_get_titles()
+   Returns the list of valid titles detected by the latest scan. */
+hb_list_t   * hb_get_titles( hb_handle_t * );
+
+/* hb_detect_comb()
+   Analyze a frame for interlacing artifacts, returns true if they're found.
+   Taken from Thomas Oestreich's 32detect filter in the Transcode project.  */
+int hb_detect_comb( hb_buffer_t * buf, int width, int height, int color_equal, int color_diff, int threshold, int prog_equal, int prog_diff, int prog_threshold );
+
+void          hb_get_preview( hb_handle_t *, hb_title_t *, int,
+                              uint8_t * );
+void          hb_set_size( hb_job_t *, double ratio, int pixels );
+void          hb_set_anamorphic_size( hb_job_t *,
+                int *output_width, int *output_height,
+                int *output_par_width, int *output_par_height);
+
+/* Handling jobs */
+int           hb_count( hb_handle_t * );
+hb_job_t *    hb_job( hb_handle_t *, int );
+void          hb_add( hb_handle_t *, hb_job_t * );
+void          hb_rem( hb_handle_t *, hb_job_t * );
+
+void          hb_start( hb_handle_t * );
+void          hb_pause( hb_handle_t * );
+void          hb_resume( hb_handle_t * );
+void          hb_stop( hb_handle_t * );
+
+/* hb_get_state()
+   Should be regularly called by the UI (like 5 or 10 times a second).
+   Look at test/test.c to see how to use it. */
+void hb_get_state( hb_handle_t *, hb_state_t * );
+void hb_get_state2( hb_handle_t *, hb_state_t * );
+/* hb_get_scancount() is called by the MacGui in UpdateUI to
+   check for a new scan during HB_STATE_WORKING phase  */
+int hb_get_scancount( hb_handle_t * );
+
+/* hb_close()
+   Aborts all current jobs if any, frees memory. */
+void          hb_close( hb_handle_t ** );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libhb/internal.h b/libhb/internal.h
new file mode 100644 (file)
index 0000000..3ae1dad
--- /dev/null
@@ -0,0 +1,277 @@
+/* $Id: internal.h,v 1.41 2005/11/25 15:05:25 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+/***********************************************************************
+ * common.c
+ **********************************************************************/
+void hb_log( char * log, ... );
+extern int global_verbosity_level; // Global variable for hb_deep_log
+typedef enum hb_debug_level_s
+{
+    HB_SUPPORT_LOG      = 1, // helpful in tech support
+    HB_HOUSEKEEPING_LOG = 2, // stuff we hate scrolling through  
+    HB_GRANULAR_LOG     = 3  // sample-by-sample
+} hb_debug_level_t;
+void hb_deep_log( hb_debug_level_t level, char * log, ... );
+void hb_error( char * fmt, ...);
+
+int  hb_list_bytes( hb_list_t * );
+void hb_list_seebytes( hb_list_t * l, uint8_t * dst, int size );
+void hb_list_getbytes( hb_list_t * l, uint8_t * dst, int size,
+                       uint64_t * pts, uint64_t * pos );
+void hb_list_empty( hb_list_t ** );
+
+hb_title_t * hb_title_init( char * dvd, int index );
+void         hb_title_close( hb_title_t ** );
+
+void         hb_filter_close( hb_filter_object_t ** );
+
+/***********************************************************************
+ * hb.c
+ **********************************************************************/
+int  hb_get_pid( hb_handle_t * );
+void hb_set_state( hb_handle_t *, hb_state_t * );
+
+/***********************************************************************
+ * fifo.c
+ **********************************************************************/
+struct hb_buffer_s
+{
+    int           size;
+    int           alloc;
+    uint8_t *     data;
+    int           cur;
+
+    int64_t       sequence;
+
+    int           id;
+    int64_t       start;
+    int64_t       stop;
+    int           new_chap;
+
+#define HB_FRAME_IDR    0x01
+#define HB_FRAME_I      0x02
+#define HB_FRAME_AUDIO  0x04
+#define HB_FRAME_P      0x10
+#define HB_FRAME_B      0x20
+#define HB_FRAME_BREF   0x40
+#define HB_FRAME_KEY    0x0F
+#define HB_FRAME_REF    0xF0
+    uint8_t       frametype;
+    uint16_t       flags;
+
+    /* Holds the output PTS from x264, for use by b-frame offsets in muxmp4.c */
+    int64_t     renderOffset;
+
+    int           x;
+    int           y;
+    int           width;
+    int           height;
+
+    hb_buffer_t * sub;
+
+    hb_buffer_t * next;
+};
+
+void hb_buffer_pool_init( void );
+void hb_buffer_pool_free( void );
+
+hb_buffer_t * hb_buffer_init( int size );
+void          hb_buffer_realloc( hb_buffer_t *, int size );
+void          hb_buffer_close( hb_buffer_t ** );
+void          hb_buffer_copy_settings( hb_buffer_t * dst,
+                                       const hb_buffer_t * src );
+
+hb_fifo_t   * hb_fifo_init();
+int           hb_fifo_size( hb_fifo_t * );
+int           hb_fifo_is_full( hb_fifo_t * );
+float         hb_fifo_percent_full( hb_fifo_t * f );
+hb_buffer_t * hb_fifo_get( hb_fifo_t * );
+hb_buffer_t * hb_fifo_see( hb_fifo_t * );
+hb_buffer_t * hb_fifo_see2( hb_fifo_t * );
+void          hb_fifo_push( hb_fifo_t *, hb_buffer_t * );
+void          hb_fifo_push_head( hb_fifo_t *, hb_buffer_t * );
+void          hb_fifo_close( hb_fifo_t ** );
+
+// this routine gets a buffer for an uncompressed YUV420 video frame
+// with dimensions width x height.
+static inline hb_buffer_t * hb_video_buffer_init( int width, int height )
+{
+    // Y requires w x h bytes. U & V each require (w+1)/2 x
+    // (h+1)/2 bytes (the "+1" is to round up). We shift rather
+    // than divide by 2 since the compiler can't know these ints
+    // are positive so it generates very expensive integer divides
+    // if we do "/2". The code here matches the calculation for
+    // PIX_FMT_YUV420P in ffmpeg's avpicture_fill() which is required
+    // for most of HB's filters to work right.
+    return hb_buffer_init( width * height + ( ( width+1 ) >> 1 ) *
+                           ( ( height+1 ) >> 1 ) * 2 );
+}
+
+/***********************************************************************
+ * Threads: update.c, scan.c, work.c, reader.c, muxcommon.c
+ **********************************************************************/
+hb_thread_t * hb_update_init( int * build, char * version );
+hb_thread_t * hb_scan_init( hb_handle_t *, const char * path,
+                            int title_index, hb_list_t * list_title );
+hb_thread_t * hb_work_init( hb_list_t * jobs, int cpu_count,
+                            volatile int * die, int * error, hb_job_t ** job );
+hb_thread_t  * hb_reader_init( hb_job_t * );
+hb_thread_t  * hb_muxer_init( hb_job_t * );
+hb_work_object_t * hb_get_work( int );
+hb_work_object_t * hb_codec_decoder( int );
+hb_work_object_t * hb_codec_encoder( int );
+
+/***********************************************************************
+ * mpegdemux.c
+ **********************************************************************/
+typedef struct {
+    int64_t last_scr;       /* unadjusted SCR from most recent pack */
+    int     scr_changes;    /* number of SCR discontinuities */
+    int     flaky_clock;    /* try to compensate for PCR drops */
+    int     dts_drops;      /* number of drops because DTS too far from SCR */
+} hb_psdemux_t;
+
+int hb_demux_ps( hb_buffer_t * ps_buf, hb_list_t * es_list, hb_psdemux_t * );
+int hb_demux_null( hb_buffer_t * ps_buf, hb_list_t * es_list, hb_psdemux_t * );
+
+/***********************************************************************
+ * dvd.c
+ **********************************************************************/
+typedef struct hb_dvd_s hb_dvd_t;
+typedef struct hb_stream_s hb_stream_t;
+
+hb_dvd_t *   hb_dvd_init( char * path );
+int          hb_dvd_title_count( hb_dvd_t * );
+hb_title_t * hb_dvd_title_scan( hb_dvd_t *, int title );
+int          hb_dvd_start( hb_dvd_t *, int title, int chapter );
+void         hb_dvd_stop( hb_dvd_t * );
+int          hb_dvd_seek( hb_dvd_t *, float );
+int          hb_dvd_read( hb_dvd_t *, hb_buffer_t * );
+int          hb_dvd_chapter( hb_dvd_t * );
+int          hb_dvd_is_break( hb_dvd_t * d );
+void         hb_dvd_close( hb_dvd_t ** );
+
+hb_stream_t * hb_stream_open( char * path, hb_title_t *title );
+void            hb_stream_close( hb_stream_t ** );
+hb_title_t * hb_stream_title_scan( hb_stream_t *);
+int          hb_stream_read( hb_stream_t *, hb_buffer_t *);
+int          hb_stream_seek( hb_stream_t *, float );
+
+void       * hb_ffmpeg_context( int codec_param );
+void       * hb_ffmpeg_avstream( int codec_param );
+
+/***********************************************************************
+ * Work objects
+ **********************************************************************/
+#define HB_CONFIG_MAX_SIZE 8192
+union hb_esconfig_u
+{
+
+    struct
+    {
+        uint8_t bytes[HB_CONFIG_MAX_SIZE];
+        int     length;
+    } mpeg4;
+
+       struct
+       {
+           uint8_t  sps[HB_CONFIG_MAX_SIZE];
+           int       sps_length;
+           uint8_t  pps[HB_CONFIG_MAX_SIZE];
+           int       pps_length;
+        uint32_t init_delay;
+       } h264;
+
+    struct
+    {
+        uint8_t headers[3][HB_CONFIG_MAX_SIZE];
+    } theora;
+
+    struct
+    {
+        uint8_t bytes[HB_CONFIG_MAX_SIZE];
+        int     length;
+    } aac;
+
+    struct
+    {
+        uint8_t headers[3][HB_CONFIG_MAX_SIZE];
+        char *language;
+    } vorbis;
+
+    struct
+    {
+       /* ac3flags stores the flags from the AC3 source, as found in scan.c */
+       int  ac3flags;
+    } a52;
+
+    struct
+    {
+       /* dcaflags stores the flags from the DCA source, as found in scan.c */
+       int  dcaflags;
+    } dca;
+
+};
+
+enum
+{
+    WORK_SYNC = 1,
+    WORK_DECMPEG2,
+    WORK_DECSUB,
+    WORK_RENDER,
+    WORK_ENCAVCODEC,
+    WORK_ENCXVID,
+    WORK_ENCX264,
+    WORK_ENCTHEORA,
+    WORK_DECA52,
+    WORK_DECDCA,
+    WORK_DECAVCODEC,
+    WORK_DECAVCODECV,
+    WORK_DECAVCODECVI,
+    WORK_DECAVCODECAI,
+    WORK_DECLPCM,
+    WORK_ENCFAAC,
+    WORK_ENCLAME,
+    WORK_ENCVORBIS
+};
+
+enum
+{
+    FILTER_DEINTERLACE = 1,
+    FILTER_DEBLOCK,
+    FILTER_DENOISE,
+    FILTER_DETELECINE,
+    FILTER_DECOMB
+};
+
+extern hb_work_object_t * hb_objects;
+
+#define HB_WORK_IDLE     0
+#define HB_WORK_OK       1
+#define HB_WORK_ERROR    2
+#define HB_WORK_DONE     3
+
+/***********************************************************************
+ * Muxers
+ **********************************************************************/
+typedef struct hb_mux_object_s hb_mux_object_t;
+typedef struct hb_mux_data_s   hb_mux_data_t;
+
+#define HB_MUX_COMMON \
+    int (*init)      ( hb_mux_object_t * ); \
+    int (*mux)       ( hb_mux_object_t *, hb_mux_data_t *, \
+                       hb_buffer_t * ); \
+    int (*end)       ( hb_mux_object_t * );
+
+#define DECLARE_MUX( a ) \
+    hb_mux_object_t  * hb_mux_##a##_init( hb_job_t * );
+
+DECLARE_MUX( mp4 );
+DECLARE_MUX( avi );
+DECLARE_MUX( ogm );
+DECLARE_MUX( mkv );
+
diff --git a/libhb/ipodutil.cpp b/libhb/ipodutil.cpp
new file mode 100644 (file)
index 0000000..ba37e47
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * MP4 library API functions
+ *
+ * These are wrapper functions that provide C linkage conventions
+ * to the library, and catch any internal errors, ensuring that
+ * a proper return value is given.
+ */
+
+#include "mp4common.h"
+
+static u_int8_t ipod_magic[] = {
+ 0x6b, 0x68, 0x40, 0xf2, 0x5f, 0x24, 0x4f, 0xc5,
+ 0xba, 0x39, 0xa5, 0x1b, 0xcf, 0x03, 0x23, 0xf3
+};
+
+class IPodUUIDAtom : public MP4Atom {
+public:
+ IPodUUIDAtom() : MP4Atom("uuid")
+ {
+ SetExtendedType(ipod_magic);
+
+ MP4Integer32Property* value = new MP4Integer32Property("value");
+ value->SetValue(1);
+ AddProperty(value);
+ }
+};
+
+extern "C" void AddIPodUUID(MP4FileHandle hFile, MP4TrackId trackId)
+{
+ MP4Track* track = ((MP4File*)hFile)->GetTrack(trackId);
+ MP4Atom* avc1 = track->GetTrakAtom()->FindChildAtom("mdia.minf.stbl.stsd.avc1");
+ avc1->AddChildAtom(new IPodUUIDAtom());
+}
+
diff --git a/libhb/lang.c b/libhb/lang.c
new file mode 100644 (file)
index 0000000..c1be7b3
--- /dev/null
@@ -0,0 +1,268 @@
+/* $Id: lang.h,v 1.1 2004/08/02 07:19:05 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "lang.h"
+#include <string.h>
+#include <ctype.h>
+
+static const iso639_lang_t languages[] =
+{ { "Unknown", "", "", "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 (Greenlandic)", "", "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 (post 1500); Provençal", "", "oc", "oci" },
+  { "Ojibwa", "", "oj", "oji" },
+  { "Oriya", "", "or", "ori" },
+  { "Oromo", "", "om", "orm" },
+  { "Ossetian; Ossetic", "", "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 (Tonga Islands)", "", "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" },
+  { NULL, NULL, NULL } };
+
+iso639_lang_t * lang_for_code( int code )
+{
+    char code_string[2];
+    iso639_lang_t * lang;
+
+    code_string[0] = tolower( ( code >> 8 ) & 0xFF );
+    code_string[1] = tolower( code & 0xFF );
+
+    for( lang = (iso639_lang_t*) languages; lang->eng_name; lang++ )
+    {
+        if( !strncmp( lang->iso639_1, code_string, 2 ) )
+        {
+            return lang;
+        }
+    }
+
+    return (iso639_lang_t*) languages;
+}
+
+iso639_lang_t * lang_for_code2( const char *code )
+{
+    char code_string[4];
+    iso639_lang_t * lang;
+
+    code_string[0] = tolower( code[0] );
+    code_string[1] = tolower( code[1] );
+    code_string[2] = tolower( code[2] );
+    code_string[3] = 0;
+
+    for( lang = (iso639_lang_t*) languages; lang->eng_name; lang++ )
+    {
+        if( !strcmp( lang->iso639_2, code_string ) )
+        {
+            return lang;
+        }
+        if( lang->iso639_2b && !strcmp( lang->iso639_2b, code_string ) )
+        {
+            return lang;
+        }
+    }
+
+    return (iso639_lang_t*) languages;
+}
+
+int lang_to_code(const iso639_lang_t *lang)
+{
+    int code = 0;
+
+    if (lang)
+        code = (lang->iso639_1[0] << 8) | lang->iso639_1[1];
+
+    return code;
+}
+
+iso639_lang_t * lang_for_english( const char * english )
+{
+    iso639_lang_t * lang;
+
+    for( lang = (iso639_lang_t*) languages; lang->eng_name; lang++ )
+    {
+        if( !strcmp( lang->eng_name, english ) )
+        {
+            return lang;
+        }
+    }
+
+    return (iso639_lang_t*) languages;
+}
+
diff --git a/libhb/lang.h b/libhb/lang.h
new file mode 100644 (file)
index 0000000..cdf39e0
--- /dev/null
@@ -0,0 +1,36 @@
+/* $Id: lang.h,v 1.1 2004/08/02 07:19:05 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#ifndef HB_LANG_H
+#define HB_LANG_H
+
+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;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/* find language associated with ISO-639-1 language code */
+iso639_lang_t * lang_for_code( int code );
+
+/* find language associated with ISO-639-2 language code */
+iso639_lang_t * lang_for_code2( const char *code2 );
+
+/* ISO-639-1 code for language */
+int lang_to_code(const iso639_lang_t *lang);
+
+iso639_lang_t * lang_for_english( const char * english );
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/libhb/muxavi.c b/libhb/muxavi.c
new file mode 100644 (file)
index 0000000..9960433
--- /dev/null
@@ -0,0 +1,640 @@
+/* $Id: muxavi.c,v 1.10 2005/03/30 18:17:29 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+#include "libavcodec/avcodec.h"
+
+#define AVIF_HASINDEX  0x10
+#define AVIIF_KEYFRAME 0x10
+#define FOURCC(a)      ((a[3]<<24)|(a[2]<<16)|(a[1]<<8)|a[0])
+
+/* Structures definitions */
+typedef struct __attribute__((__packed__))
+{
+    uint32_t FourCC;
+    uint32_t BytesCount;
+    uint32_t MicroSecPerFrame;
+    uint32_t MaxBytesPerSec;
+    uint32_t PaddingGranularity;
+    uint32_t Flags;
+    uint32_t TotalFrames;
+    uint32_t InitialFrames;
+    uint32_t Streams;
+    uint32_t SuggestedBufferSize;
+    uint32_t Width;
+    uint32_t Height;
+    uint32_t Reserved[4];
+
+} hb_avi_main_header_t;
+
+typedef struct __attribute__((__packed__))
+{
+    uint32_t FourCC;
+    uint32_t BytesCount;
+    uint32_t Type;
+    uint32_t Handler;
+    uint32_t Flags;
+    uint16_t Priority;
+    uint16_t Language;
+    uint32_t InitialFrames;
+    uint32_t Scale;
+    uint32_t Rate;
+    uint32_t Start;
+    uint32_t Length;
+    uint32_t SuggestedBufferSize;
+    uint32_t Quality;
+    uint32_t SampleSize;
+    int16_t  Left;
+    int16_t  Top;
+    int16_t  Right;
+    int16_t  Bottom;
+
+} hb_avi_stream_header_t;
+
+typedef struct __attribute__((__packed__))
+{
+    uint32_t FourCC;
+    uint32_t BytesCount;
+    uint32_t VideoFormatToken;
+    uint32_t VideoStandard;
+    uint32_t dwVerticalRefreshRate;
+    uint32_t dwHTotalInT;
+    uint32_t dwVTotalInLines;
+    uint16_t dwFrameAspectRatioDen;
+    uint16_t dwFrameAspectRatioNum;
+    uint32_t dwFrameWidthInPixels;
+    uint32_t dwFrameHeightInLines;
+    uint32_t nbFieldPerFrame;
+    uint32_t CompressedBMHeight;
+    uint32_t CompressedBMWidth;
+    uint32_t ValidBMHeight;
+    uint32_t ValidBMWidth;
+    uint32_t ValidBMXOffset;
+    uint32_t ValidBMYOffset;
+    uint32_t VideoXOffsetInT;
+    uint32_t VideoYValidStartLine;
+
+} hb_avi_vprp_info_t;
+
+typedef struct __attribute__((__packed__))
+{
+    uint32_t FourCC;
+    uint32_t BytesCount;
+    uint32_t Size;
+    uint32_t Width;
+    uint32_t Height;
+    uint16_t Planes;
+    uint16_t BitCount;
+    uint32_t Compression;
+    uint32_t SizeImage;
+    uint32_t XPelsPerMeter;
+    uint32_t YPelsPerMeter;
+    uint32_t ClrUsed;
+    uint32_t ClrImportant;
+
+} hb_bitmap_info_t;
+
+typedef struct __attribute__((__packed__))
+{
+    uint32_t FourCC;
+    uint32_t BytesCount;
+    uint16_t FormatTag;
+    uint16_t Channels;
+    uint32_t SamplesPerSec;
+    uint32_t AvgBytesPerSec;
+    uint16_t BlockAlign;
+    uint16_t BitsPerSample;
+    uint16_t Size;
+
+} hb_wave_formatex_t;
+
+typedef struct __attribute__((__packed__))
+{
+    uint16_t Id;
+    uint32_t Flags;
+    uint16_t BlockSize;
+    uint16_t FramesPerBlock;
+    uint16_t CodecDelay;
+
+} hb_wave_mp3_t;
+
+static void WriteBuffer( FILE * file, hb_buffer_t * buf )
+{
+    fwrite( buf->data, buf->size, 1, file );
+}
+
+/* Little-endian write routines */
+
+static void WriteInt8( FILE * file, uint8_t val )
+{
+    fputc( val, file );
+}
+
+static void WriteInt16( FILE * file, uint16_t val )
+{
+    fputc( val & 0xFF, file );
+    fputc( val >> 8, file );
+}
+
+static void WriteInt32( FILE * file, uint32_t val )
+{
+    fputc( val & 0xFF, file );
+    fputc( ( val >> 8 ) & 0xFF, file );
+    fputc( ( val >> 16 ) & 0xFF, file );
+    fputc( val >> 24, file );
+}
+
+static void WriteBitmapInfo( FILE * file, hb_bitmap_info_t * info )
+{
+    WriteInt32( file, info->FourCC );
+    WriteInt32( file, info->BytesCount );
+    WriteInt32( file, info->Size );
+    WriteInt32( file, info->Width );
+    WriteInt32( file, info->Height );
+    WriteInt16( file, info->Planes );
+    WriteInt16( file, info->BitCount );
+    WriteInt32( file, info->Compression );
+    WriteInt32( file, info->SizeImage );
+    WriteInt32( file, info->XPelsPerMeter );
+    WriteInt32( file, info->YPelsPerMeter );
+    WriteInt32( file, info->ClrUsed );
+    WriteInt32( file, info->ClrImportant );
+}
+
+static void WriteWaveFormatEx( FILE * file, hb_wave_formatex_t * format )
+{
+    WriteInt32( file, format->FourCC );
+    WriteInt32( file, format->BytesCount );
+    WriteInt16( file, format->FormatTag );
+    WriteInt16( file, format->Channels );
+    WriteInt32( file, format->SamplesPerSec );
+    WriteInt32( file, format->AvgBytesPerSec );
+    WriteInt16( file, format->BlockAlign );
+    WriteInt16( file, format->BitsPerSample );
+    WriteInt16( file, format->Size );
+}
+
+static void WriteWaveMp3( FILE * file, hb_wave_mp3_t * mp3 )
+{
+    WriteInt16( file, mp3->Id );
+    WriteInt32( file, mp3->Flags );
+    WriteInt16( file, mp3->BlockSize );
+    WriteInt16( file, mp3->FramesPerBlock );
+    WriteInt16( file, mp3->CodecDelay );
+}
+
+static void WriteMainHeader( FILE * file, hb_avi_main_header_t * header )
+{
+    WriteInt32( file, header->FourCC );
+    WriteInt32( file, header->BytesCount );
+    WriteInt32( file, header->MicroSecPerFrame );
+    WriteInt32( file, header->MaxBytesPerSec );
+    WriteInt32( file, header->PaddingGranularity );
+    WriteInt32( file, header->Flags );
+    WriteInt32( file, header->TotalFrames );
+    WriteInt32( file, header->InitialFrames );
+    WriteInt32( file, header->Streams );
+    WriteInt32( file, header->SuggestedBufferSize );
+    WriteInt32( file, header->Width );
+    WriteInt32( file, header->Height );
+    WriteInt32( file, header->Reserved[0] );
+    WriteInt32( file, header->Reserved[1] );
+    WriteInt32( file, header->Reserved[2] );
+    WriteInt32( file, header->Reserved[3] );
+}
+
+static void WriteStreamHeader( FILE * file, hb_avi_stream_header_t * header )
+{
+    WriteInt32( file, header->FourCC );
+    WriteInt32( file, header->BytesCount );
+    WriteInt32( file, header->Type );
+    WriteInt32( file, header->Handler );
+    WriteInt32( file, header->Flags );
+    WriteInt16( file, header->Priority );
+    WriteInt16( file, header->Language );
+    WriteInt32( file, header->InitialFrames );
+    WriteInt32( file, header->Scale );
+    WriteInt32( file, header->Rate );
+    WriteInt32( file, header->Start );
+    WriteInt32( file, header->Length );
+    WriteInt32( file, header->SuggestedBufferSize );
+    WriteInt32( file, header->Quality );
+    WriteInt32( file, header->SampleSize );
+    WriteInt16( file, header->Left );
+    WriteInt16( file, header->Top );
+    WriteInt16( file, header->Right );
+    WriteInt16( file, header->Bottom );
+}
+
+static void WriteVprpInfo( FILE * file, hb_avi_vprp_info_t * info )
+{
+    WriteInt32( file, info->FourCC );
+    WriteInt32( file, info->BytesCount );
+    WriteInt32( file, info->VideoFormatToken );
+    WriteInt32( file, info->VideoStandard );
+    WriteInt32( file, info->dwVerticalRefreshRate );
+    WriteInt32( file, info->dwHTotalInT );
+    WriteInt32( file, info->dwVTotalInLines );
+    WriteInt16( file, info->dwFrameAspectRatioDen );
+    WriteInt16( file, info->dwFrameAspectRatioNum );
+    WriteInt32( file, info->dwFrameWidthInPixels );
+    WriteInt32( file, info->dwFrameHeightInLines );
+    WriteInt32( file, info->nbFieldPerFrame );
+    WriteInt32( file, info->CompressedBMHeight );
+    WriteInt32( file, info->CompressedBMWidth );
+    WriteInt32( file, info->ValidBMHeight );
+    WriteInt32( file, info->ValidBMWidth );
+    WriteInt32( file, info->ValidBMXOffset );
+    WriteInt32( file, info->ValidBMYOffset );
+    WriteInt32( file, info->VideoXOffsetInT );
+    WriteInt32( file, info->VideoYValidStartLine );
+}
+
+static void IndexAddInt32( hb_buffer_t * b, uint32_t val )
+{
+    if( b->size + 16 > b->alloc )
+    {
+        hb_log( "muxavi: reallocing index (%d MB)",
+                1 + b->alloc / 1024 / 1024 );
+        hb_buffer_realloc( b, b->alloc + 1024 * 1024 );
+    }
+
+    b->data[b->size++] = val & 0xFF;
+    b->data[b->size++] = ( val >> 8 ) & 0xFF;
+    b->data[b->size++] = ( val >> 16 ) & 0xFF;
+    b->data[b->size++] = val >> 24;
+}
+
+struct hb_mux_object_s
+{
+    HB_MUX_COMMON;
+
+    hb_job_t * job;
+
+    /* Data size in bytes, not including headers */
+    unsigned               size;
+    FILE                 * file;
+    hb_buffer_t          * index;
+    hb_avi_main_header_t   main_header;
+};
+
+struct hb_mux_data_s
+{
+    uint32_t                           fourcc;
+    hb_avi_stream_header_t     header;
+    hb_avi_vprp_info_t         vprp_header;
+    union
+    {
+        hb_bitmap_info_t   v;
+        struct
+        {
+            hb_wave_formatex_t f;
+            hb_wave_mp3_t      m;
+        } a;
+    } format;
+};
+
+static void AddIndex( hb_mux_object_t * m )
+{
+    fseek( m->file, 0, SEEK_END );
+
+    /* Write the index at the end of the file */
+    WriteInt32( m->file, FOURCC( "idx1" ) );
+    WriteInt32( m->file, m->index->size );
+    WriteBuffer( m->file, m->index );
+
+    /* Update file size */
+    m->size += 8 + m->index->size;
+    fseek( m->file, 4, SEEK_SET );
+    WriteInt32( m->file, 2040 + m->size );
+
+    /* Update HASINDEX flag */
+    m->main_header.Flags |= AVIF_HASINDEX;
+    fseek( m->file, 24, SEEK_SET );
+    WriteMainHeader( m->file, &m->main_header );
+}
+
+
+/**********************************************************************
+ * AVIInit
+ **********************************************************************
+ * Allocates things, create file, initialize and write headers
+ *********************************************************************/
+static int AVIInit( hb_mux_object_t * m )
+{
+    hb_job_t   * job   = m->job;
+    hb_title_t * title = job->title;
+
+    hb_audio_t    * audio;
+    hb_mux_data_t * mux_data;
+
+    int audio_count = hb_list_count( title->list_audio );
+    int is_ac3      = 0;
+    int hdrl_bytes;
+    int i;
+
+    /* Allocate index */
+    m->index       = hb_buffer_init( 1024 * 1024 );
+    m->index->size = 0;
+
+    /* Open destination file */
+    hb_log( "muxavi: opening %s", job->file );
+    m->file = fopen( job->file, "wb" );
+
+#define m m->main_header
+    /* AVI main header */
+    m.FourCC           = FOURCC( "avih" );
+    m.BytesCount       = sizeof( hb_avi_main_header_t ) - 8;
+    m.MicroSecPerFrame = (uint64_t) 1000000 * job->vrate_base / job->vrate;
+    m.Streams          = 1 + audio_count;
+    m.Width            = job->width;
+    m.Height           = job->height;
+#undef m
+
+    /* Video track */
+    mux_data = calloc( sizeof( hb_mux_data_t ), 1 );
+    job->mux_data = mux_data;
+
+#define h mux_data->header
+    /* Video stream header */
+    h.FourCC     = FOURCC( "strh" );
+    h.BytesCount = sizeof( hb_avi_stream_header_t ) - 8;
+    h.Type       = FOURCC( "vids" );
+
+    if( job->vcodec == HB_VCODEC_FFMPEG )
+        h.Handler = FOURCC( "divx" );
+    else if( job->vcodec == HB_VCODEC_XVID )
+        h.Handler = FOURCC( "xvid" );
+    else if( job->vcodec == HB_VCODEC_X264 )
+        h.Handler = FOURCC( "h264" );
+
+    h.Scale      = job->vrate_base;
+    h.Rate       = job->vrate;
+#undef h
+
+#define f mux_data->format.v
+    /* Video stream format */
+    f.FourCC      = FOURCC( "strf" );
+    f.BytesCount  = sizeof( hb_bitmap_info_t ) - 8;
+    f.Size        = f.BytesCount;
+    f.Width       = job->width;
+    f.Height      = job->height;
+    f.Planes      = 1;
+    f.BitCount    = 24;
+    if( job->vcodec == HB_VCODEC_FFMPEG )
+        f.Compression = FOURCC( "DX50" );
+    else if( job->vcodec == HB_VCODEC_XVID )
+        f.Compression = FOURCC( "XVID" );
+    else if( job->vcodec == HB_VCODEC_X264 )
+        f.Compression = FOURCC( "H264" );
+#undef f
+
+#define g mux_data->vprp_header
+    /* Vprp video stream header */     
+    AVRational sample_aspect_ratio = ( AVRational ){ job->pixel_aspect_width, job->pixel_aspect_height };
+    AVRational dar = av_mul_q( sample_aspect_ratio, ( AVRational ){ job->width, job->height } );
+    int num, den;
+    av_reduce(&num, &den, dar.num, dar.den, 0xFFFF);
+
+    g.FourCC                = FOURCC( "vprp" );
+    g.BytesCount            = sizeof( hb_avi_vprp_info_t ) - 8;
+    g.VideoFormatToken      = 0;
+    g.VideoStandard         = 0;
+    g.dwVerticalRefreshRate = job->vrate / job->vrate_base;
+    g.dwHTotalInT           = job->width;
+    g.dwVTotalInLines       = job->height;
+    g.dwFrameAspectRatioDen = den;
+    g.dwFrameAspectRatioNum = num;
+    g.dwFrameWidthInPixels  = job->width;
+    g.dwFrameHeightInLines  = job->height;
+    g.nbFieldPerFrame       = 1;
+    g.CompressedBMHeight    = job->height;
+    g.CompressedBMWidth     = job->width;
+    g.ValidBMHeight         = job->height;
+    g.ValidBMWidth          = job->width;
+    g.ValidBMXOffset        = 0;
+    g.ValidBMYOffset        = 0;
+    g.VideoXOffsetInT       = 0;
+    g.VideoYValidStartLine  = 0;
+#undef g
+
+    /* Audio tracks */
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = hb_list_item( title->list_audio, i );
+
+        is_ac3 = (audio->config.out.codec == HB_ACODEC_AC3);
+
+        mux_data = calloc( sizeof( hb_mux_data_t ), 1 );
+        audio->priv.mux_data = mux_data;
+
+#define h mux_data->header
+#define f mux_data->format.a.f
+#define m mux_data->format.a.m
+        /* Audio stream header */
+        h.FourCC        = FOURCC( "strh" );
+        h.BytesCount    = sizeof( hb_avi_stream_header_t ) - 8;
+        h.Type          = FOURCC( "auds" );
+        h.InitialFrames = 1;
+        h.Scale         = 1;
+        h.Rate          = is_ac3 ? ( audio->config.in.bitrate / 8 ) :
+                                   ( audio->config.out.bitrate * 1000 / 8 );
+        h.Quality       = 0xFFFFFFFF;
+        h.SampleSize    = 1;
+
+        /* Audio stream format */
+        f.FourCC         = FOURCC( "strf" );
+        if( is_ac3 )
+        {
+            f.BytesCount     = sizeof( hb_wave_formatex_t ) - 8;
+            f.FormatTag      = 0x2000;
+            f.Channels       = HB_INPUT_CH_LAYOUT_GET_DISCRETE_COUNT(audio->config.in.channel_layout);
+            f.SamplesPerSec  = audio->config.in.samplerate;
+        }
+        else
+        {
+            f.BytesCount     = sizeof( hb_wave_formatex_t ) +
+                               sizeof( hb_wave_mp3_t ) - 8;
+            f.FormatTag      = 0x55;
+            f.Channels       = HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->config.out.mixdown);
+            f.SamplesPerSec  = audio->config.out.samplerate;
+        }
+        f.AvgBytesPerSec = h.Rate;
+        f.BlockAlign     = 1;
+        if( is_ac3 )
+        {
+            f.Size       = 0;
+        }
+        else
+        {
+            f.Size           = sizeof( hb_wave_mp3_t );
+            m.Id             = 1;
+            m.Flags          = 2;
+            m.BlockSize      = 1152 * f.AvgBytesPerSec / audio->config.out.samplerate;
+            m.FramesPerBlock = 1;
+            m.CodecDelay     = 1393;
+        }
+#undef h
+#undef f
+#undef m
+    }
+
+    hdrl_bytes =
+        /* Main header */
+        4 + sizeof( hb_avi_main_header_t ) +
+        /* strh for video + audios */
+        ( 1 + audio_count ) * ( 12 + sizeof( hb_avi_stream_header_t ) ) +
+        /* video strf */
+               sizeof( hb_bitmap_info_t ) +
+        /* video vprp */
+        ( job->pixel_ratio ? sizeof( hb_avi_vprp_info_t ) : 0 ) +
+        /* audios strf */
+        audio_count * ( sizeof( hb_wave_formatex_t ) +
+                        ( is_ac3 ? 0 : sizeof( hb_wave_mp3_t ) ) );
+
+    /* Here we really start to write into the file */
+
+    /* Main headers */
+    WriteInt32( m->file, FOURCC( "RIFF" ) );
+    WriteInt32( m->file, 2040 );
+    WriteInt32( m->file, FOURCC( "AVI " ) );
+    WriteInt32( m->file, FOURCC( "LIST" ) );
+    WriteInt32( m->file, hdrl_bytes );
+    WriteInt32( m->file, FOURCC( "hdrl" ) );
+    WriteMainHeader( m->file, &m->main_header );
+
+    /* Video track */
+    mux_data          = job->mux_data;
+    mux_data->fourcc = FOURCC( "00dc" );
+
+    WriteInt32( m->file, FOURCC( "LIST" ) );
+    WriteInt32( m->file, 4 + sizeof( hb_avi_stream_header_t ) +
+                sizeof( hb_bitmap_info_t )  +
+                ( job->pixel_ratio ? sizeof( hb_avi_vprp_info_t ) : 0 ) );
+    WriteInt32( m->file, FOURCC( "strl" ) );
+    WriteStreamHeader( m->file, &mux_data->header );
+    WriteBitmapInfo( m->file, &mux_data->format.v );
+    if( job->pixel_ratio )
+    {
+        WriteVprpInfo( m->file, &mux_data->vprp_header );
+    }
+
+    /* Audio tracks */
+    for( i = 0; i < audio_count; i++ )
+    {
+        char fourcc[4] = "00wb";
+
+        audio    = hb_list_item( title->list_audio, i );
+        mux_data = audio->priv.mux_data;
+
+        fourcc[1] = '1' + i; /* This is fine as we don't allow more
+                                than 8 tracks */
+        mux_data->fourcc = FOURCC( fourcc );
+
+        WriteInt32( m->file, FOURCC( "LIST" ) );
+        WriteInt32( m->file, 4 + sizeof( hb_avi_stream_header_t ) +
+                             sizeof( hb_wave_formatex_t ) +
+                             ( is_ac3 ? 0 : sizeof( hb_wave_mp3_t ) ) );
+        WriteInt32( m->file, FOURCC( "strl" ) );
+        WriteStreamHeader( m->file, &mux_data->header );
+        WriteWaveFormatEx( m->file, &mux_data->format.a.f );
+        if( !is_ac3 )
+        {
+            WriteWaveMp3( m->file, &mux_data->format.a.m );
+        }
+    }
+
+    WriteInt32( m->file, FOURCC( "JUNK" ) );
+    WriteInt32( m->file, 2020 - hdrl_bytes );
+    for( i = 0; i < 2020 - hdrl_bytes; i++ )
+    {
+        WriteInt8( m->file, 0 );
+    }
+    WriteInt32( m->file, FOURCC( "LIST" ) );
+    WriteInt32( m->file, 4 );
+    WriteInt32( m->file, FOURCC( "movi" ) );
+
+    return 0;
+}
+
+static int AVIMux( hb_mux_object_t * m, hb_mux_data_t * mux_data,
+                   hb_buffer_t * buf )
+{
+    hb_job_t   * job   = m->job;
+    hb_title_t * title = job->title;
+
+    hb_audio_t * audio;
+    int i;
+
+    /* Update index */
+    IndexAddInt32( m->index, mux_data->fourcc );
+    IndexAddInt32( m->index, (buf->frametype & HB_FRAME_KEY) ? AVIIF_KEYFRAME : 0 );
+    IndexAddInt32( m->index, 4 + m->size );
+    IndexAddInt32( m->index, buf->size );
+
+    /* Write the chunk to the file */
+    fseek( m->file, 0, SEEK_END );
+    WriteInt32( m->file, mux_data->fourcc );
+    WriteInt32( m->file, buf->size );
+    WriteBuffer( m->file, buf );
+
+    /* Chunks must be 2-bytes aligned */
+    if( buf->size & 1 )
+    {
+        WriteInt8( m->file, 0 );
+    }
+
+    /* Update headers */
+    m->size += 8 + EVEN( buf->size );
+    mux_data->header.Length++;
+
+    /* RIFF size */
+    fseek( m->file, 4, SEEK_SET );
+    WriteInt32( m->file, 2052 + m->size );
+
+    /* Mmmmh that's not nice */
+    fseek( m->file, 140, SEEK_SET );
+    WriteInt32( m->file, job->mux_data->header.Length );
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = hb_list_item( title->list_audio, i );
+        fseek( m->file, 264 + i *
+               ( 102 + ( ( audio->config.out.codec == HB_ACODEC_AC3 ) ? 0 :
+                 sizeof( hb_wave_mp3_t ) ) ), SEEK_SET );
+        WriteInt32( m->file, audio->priv.mux_data->header.Length );
+    }
+
+    /* movi size */
+    fseek( m->file, 2052, SEEK_SET );
+    WriteInt32( m->file, 4 + m->size );
+    return 0;
+}
+
+static int AVIEnd( hb_mux_object_t * m )
+{
+    hb_job_t * job = m->job;
+
+    hb_log( "muxavi: writing index" );
+    AddIndex( m );
+
+    hb_log( "muxavi: closing %s", job->file );
+    fclose( m->file );
+
+    hb_buffer_close( &m->index );
+
+    return 0;
+}
+
+hb_mux_object_t * hb_mux_avi_init( hb_job_t * job )
+{
+    hb_mux_object_t * m = calloc( sizeof( hb_mux_object_t ), 1 );
+    m->init      = AVIInit;
+    m->mux       = AVIMux;
+    m->end       = AVIEnd;
+    m->job       = job;
+    return m;
+}
+
diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c
new file mode 100644 (file)
index 0000000..b09c5c5
--- /dev/null
@@ -0,0 +1,245 @@
+/* $Id: muxcommon.c,v 1.23 2005/03/30 17:27:19 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+struct hb_mux_object_s
+{
+    HB_MUX_COMMON;
+};
+
+typedef struct
+{
+    hb_job_t * job;
+    uint64_t   pts;
+
+} hb_mux_t;
+
+typedef struct
+{
+    hb_fifo_t     * fifo;
+    hb_mux_data_t * mux_data;
+    uint64_t        frames;
+    uint64_t        bytes;
+    int             eof;
+} hb_track_t;
+
+static hb_track_t * GetTrack( hb_list_t * list, hb_job_t *job )
+{
+    hb_buffer_t * buf;
+    hb_track_t  * track = NULL, * track2;
+    int64_t       pts = 0;
+    int           i;
+
+    for( i = 0; i < hb_list_count( list ); i++ )
+    {
+        track2 = hb_list_item( list, i );
+        if ( ! track2->eof )
+        {
+            buf    = hb_fifo_see( track2->fifo );
+            if( !buf )
+            {
+                // XXX the libmkv muxer will produce unplayable files if the
+                // audio & video are far out of sync.  To keep them in sync we require
+                // that *all* fifos have a buffer then we take the oldest.
+                // Unfortunately this means we can hang in a deadlock with the
+                // reader process filling the fifos.
+                if ( job->mux == HB_MUX_MKV )
+                {
+                    return NULL;
+                }
+
+                // To make sure we don't camp on one fifo & prevent the others
+                // from making progress we take the earliest data of all the
+                // data that's currently available but we don't care if some
+                // fifos don't have data.
+                continue;
+            }
+            if ( buf->size <= 0 )
+            {
+                // EOF - mark this track as done
+                buf = hb_fifo_get( track2->fifo );
+                hb_buffer_close( &buf );
+                track2->eof = 1;
+                continue;
+            }
+            if( !track || buf->start < pts )
+            {
+                track = track2;
+                pts   = buf->start;
+            }
+        }
+    }
+    return track;
+}
+
+static int AllTracksDone( hb_list_t * list )
+{
+    hb_track_t  * track;
+    int           i;
+
+    for( i = 0; i < hb_list_count( list ); i++ )
+    {
+        track = hb_list_item( list, i );
+        if ( track->eof == 0 )
+        {
+            return 0;
+        }
+    }
+    return 1;
+}
+
+static void MuxerFunc( void * _mux )
+{
+    hb_mux_t    * mux = _mux;
+    hb_job_t    * job = mux->job;
+    hb_title_t  * title = job->title;
+    hb_audio_t  * audio;
+    hb_list_t   * list;
+    hb_buffer_t * buf;
+    hb_track_t  * track;
+    int           i;
+
+    hb_mux_object_t * m = NULL;
+
+    /* Get a real muxer */
+    if( job->pass == 0 || job->pass == 2)
+    {
+        switch( job->mux )
+        {
+            case HB_MUX_MP4:
+            case HB_MUX_PSP:
+                       case HB_MUX_IPOD:
+                m = hb_mux_mp4_init( job );
+                break;
+            case HB_MUX_AVI:
+                m = hb_mux_avi_init( job );
+                break;
+            case HB_MUX_OGM:
+                m = hb_mux_ogm_init( job );
+                break;
+            case HB_MUX_MKV:
+                m = hb_mux_mkv_init( job );
+        }
+    }
+
+    /* Create file, write headers */
+    if( job->pass == 0 || job->pass == 2 )
+    {
+        m->init( m );
+    }
+
+    /* Build list of fifos we're interested in */
+    list = hb_list_init();
+
+    track           = calloc( sizeof( hb_track_t ), 1 );
+    track->fifo     = job->fifo_mpeg4;
+    track->mux_data = job->mux_data;
+    hb_list_add( list, track );
+
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio           = hb_list_item( title->list_audio, i );
+        track           = calloc( sizeof( hb_track_t ), 1 );
+        track->fifo     = audio->priv.fifo_out;
+        track->mux_data = audio->priv.mux_data;
+        hb_list_add( list, track );
+    }
+
+       int thread_sleep_interval = 50;
+       while( !*job->die )
+    {
+        if( !( track = GetTrack( list, job ) ) )
+        {
+            if ( AllTracksDone( list )  )
+            {
+                // all our input fifos have signaled EOF
+                break;
+            }
+            hb_snooze( thread_sleep_interval );
+            continue;
+        }
+
+        buf = hb_fifo_get( track->fifo );
+        if( job->pass == 0 || job->pass == 2 )
+        {
+            m->mux( m, track->mux_data, buf );
+            track->frames += 1;
+            track->bytes  += buf->size;
+            mux->pts = buf->stop;
+        }
+        hb_buffer_close( &buf );
+    }
+
+    if( job->pass == 0 || job->pass == 2 )
+    {
+        struct stat sb;
+        uint64_t bytes_total, frames_total;
+
+#define p state.param.muxing
+        /* Update the UI */
+        hb_state_t state;
+        state.state   = HB_STATE_MUXING;
+               p.progress = 0;
+        hb_set_state( job->h, &state );
+#undef p
+        m->end( m );
+
+        if( !stat( job->file, &sb ) )
+        {
+            hb_deep_log( 2, "mux: file size, %lld bytes", (uint64_t) sb.st_size );
+
+            bytes_total  = 0;
+            frames_total = 0;
+            for( i = 0; i < hb_list_count( list ); i++ )
+            {
+                track = hb_list_item( list, i );
+                hb_deep_log( 2, "mux: track %d, %lld bytes, %.2f kbps",
+                        i, track->bytes,
+                        90000.0 * track->bytes / mux->pts / 125 );
+                if( !i && ( job->vquality < 0.0 || job->vquality > 1.0 ) )
+                {
+                    /* Video */
+                    hb_deep_log( 2, "mux: video bitrate error, %+lld bytes",
+                            track->bytes - mux->pts * job->vbitrate *
+                            125 / 90000 );
+                }
+                bytes_total  += track->bytes;
+                frames_total += track->frames;
+            }
+
+            if( bytes_total && frames_total )
+            {
+                hb_deep_log( 2, "mux: overhead, %.2f bytes per frame",
+                        (float) ( sb.st_size - bytes_total ) /
+                        frames_total );
+            }
+        }
+    }
+
+    free( m );
+
+    for( i = 0; i < hb_list_count( list ); i++ )
+    {
+        track = hb_list_item( list, i );
+        if( track->mux_data )
+        {
+            free( track->mux_data );
+        }
+        free( track );
+    }
+    hb_list_close( &list );
+
+    free( mux );
+}
+
+hb_thread_t * hb_muxer_init( hb_job_t * job )
+{
+    hb_mux_t * mux = calloc( sizeof( hb_mux_t ), 1 );
+    mux->job = job;
+    return hb_thread_init( "muxer", MuxerFunc, mux,
+                           HB_NORMAL_PRIORITY );
+}
diff --git a/libhb/muxmkv.c b/libhb/muxmkv.c
new file mode 100644 (file)
index 0000000..6217820
--- /dev/null
@@ -0,0 +1,385 @@
+/* $Id:  $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+/* libmkv header */
+#include "libmkv.h"
+
+#include <ogg/ogg.h>
+
+#include "hb.h"
+
+/* Scale factor to apply to timecodes to convert from HandBrake's
+ * 1/90000s to nanoseconds as expected by libmkv */
+#define TIMECODE_SCALE 1000000000 / 90000
+
+struct hb_mux_object_s
+{
+    HB_MUX_COMMON;
+
+    hb_job_t * job;
+
+    mk_Writer * file;
+};
+
+struct hb_mux_data_s
+{
+    mk_Track  * track;
+    uint64_t  prev_chapter_tc;
+    uint16_t  current_chapter;
+    int       codec;
+};
+
+/**********************************************************************
+ * MKVInit
+ **********************************************************************
+ * Allocates hb_mux_data_t structures, create file and write headers
+ *********************************************************************/
+static int MKVInit( hb_mux_object_t * m )
+{
+    hb_job_t   * job   = m->job;
+    hb_title_t * title = job->title;
+    hb_audio_t    * audio;
+    hb_mux_data_t * mux_data;
+
+    uint8_t         *avcC = NULL;
+    uint8_t         default_track_flag = 1;
+    int             avcC_len, i;
+    ogg_packet      *ogg_headers[3];
+    mk_TrackConfig *track;
+
+    track = calloc(1, sizeof(mk_TrackConfig));
+
+    m->file = mk_createWriter(job->file, 1000000, 1);
+
+    if( !m->file )
+    {
+        hb_error( "Could not create output file, Disk Full?" );
+        job->mux_data = NULL;
+        *job->die = 1;
+        return 0;
+    }
+
+    /* Video track */
+    mux_data      = calloc(1, sizeof( hb_mux_data_t ) );
+    job->mux_data = mux_data;
+
+    track->trackType = MK_TRACK_VIDEO;
+    track->flagDefault = 1;
+    track->flagEnabled = 1;
+    switch (job->vcodec)
+    {
+        case HB_VCODEC_X264:
+            track->codecID = MK_VCODEC_MP4AVC;
+            /* Taken from x264 muxers.c */
+            avcC_len = 5 + 1 + 2 + job->config.h264.sps_length + 1 + 2 + job->config.h264.pps_length;
+            avcC = malloc(avcC_len);
+            if (avcC == NULL)
+                return -1;
+
+            avcC[0] = 1;
+            avcC[1] = job->config.h264.sps[1];      /* AVCProfileIndication */
+            avcC[2] = job->config.h264.sps[2];      /* profile_compat */
+            avcC[3] = job->config.h264.sps[3];      /* AVCLevelIndication */
+            avcC[4] = 0xff; // nalu size length is four bytes
+            avcC[5] = 0xe1; // one sps
+
+            avcC[6] = job->config.h264.sps_length >> 8;
+            avcC[7] = job->config.h264.sps_length;
+
+            memcpy(avcC+8, job->config.h264.sps, job->config.h264.sps_length);
+
+            avcC[8+job->config.h264.sps_length] = 1; // one pps
+            avcC[9+job->config.h264.sps_length] = job->config.h264.pps_length >> 8;
+            avcC[10+job->config.h264.sps_length] = job->config.h264.pps_length;
+
+            memcpy( avcC+11+job->config.h264.sps_length, job->config.h264.pps, job->config.h264.pps_length );
+            track->codecPrivate = avcC;
+            track->codecPrivateSize = avcC_len;
+            if (job->areBframes)
+                track->minCache = 1;
+            break;
+        case HB_VCODEC_XVID:
+        case HB_VCODEC_FFMPEG:
+            track->codecID = MK_VCODEC_MP4ASP;
+            track->codecPrivate = job->config.mpeg4.bytes;
+            track->codecPrivateSize = job->config.mpeg4.length;
+            break;
+        case HB_VCODEC_THEORA:
+            {
+                int i;
+                uint64_t cp_size = 0;
+                track->codecID = MK_VCODEC_THEORA;
+                uint64_t  header_sizes[3];
+                for (i = 0; i < 3; ++i)
+                {
+                    ogg_headers[i] = (ogg_packet *)job->config.theora.headers[i];
+                    ogg_headers[i]->packet = (unsigned char *)&job->config.theora.headers[i] + sizeof( ogg_packet );
+                    header_sizes[i] = ogg_headers[i]->bytes;
+                }
+                track->codecPrivate = mk_laceXiph(header_sizes, 2, &cp_size);
+                track->codecPrivate = realloc(track->codecPrivate, cp_size + ogg_headers[0]->bytes + ogg_headers[1]->bytes + ogg_headers[2]->bytes);
+                for(i = 0; i < 3; ++i)
+                {
+                    memcpy(track->codecPrivate + cp_size, ogg_headers[i]->packet, ogg_headers[i]->bytes);
+                    cp_size += ogg_headers[i]->bytes;
+                }
+                track->codecPrivateSize = cp_size;
+            }
+            break;
+        default:
+            *job->die = 1;
+            hb_error("muxmkv: Unknown video codec: %x", job->vcodec);
+            return 0;
+    }
+
+    track->extra.video.pixelWidth = job->width;
+    track->extra.video.pixelHeight = job->height;
+    track->extra.video.displayHeight = job->height;
+    if(job->pixel_ratio)
+    {
+        track->extra.video.displayWidth = job->width * ((double)job->pixel_aspect_width / (double)job->pixel_aspect_height);
+    }
+    else
+    {
+        track->extra.video.displayWidth = job->width;
+    }
+
+
+    track->defaultDuration = (int64_t)(((float)job->vrate_base / (float)job->vrate) * 1000000000);
+
+    mux_data->track = mk_createTrack(m->file, track);
+
+    memset(track, 0, sizeof(mk_TrackConfig));
+
+    /* add the audio tracks */
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = hb_list_item( title->list_audio, i );
+        mux_data = malloc( sizeof( hb_mux_data_t ) );
+        audio->priv.mux_data = mux_data;
+
+        mux_data->codec = audio->config.out.codec;
+
+        switch (audio->config.out.codec)
+        {
+            case HB_ACODEC_AC3:
+                track->codecPrivate = NULL;
+                track->codecPrivateSize = 0;
+                track->codecID = MK_ACODEC_AC3;
+                break;
+            case HB_ACODEC_LAME:
+                track->codecPrivate = NULL;
+                track->codecPrivateSize = 0;
+                track->codecID = MK_ACODEC_MP3;
+                break;
+            case HB_ACODEC_VORBIS:
+                {
+                    int i;
+                    uint64_t cp_size = 0;
+                    track->codecID = MK_ACODEC_VORBIS;
+                    uint64_t  header_sizes[3];
+                    for (i = 0; i < 3; ++i)
+                    {
+                        ogg_headers[i] = (ogg_packet *)audio->priv.config.vorbis.headers[i];
+                        ogg_headers[i]->packet = (unsigned char *)&audio->priv.config.vorbis.headers[i] + sizeof( ogg_packet );
+                        header_sizes[i] = ogg_headers[i]->bytes;
+                    }
+                    track->codecPrivate = mk_laceXiph(header_sizes, 2, &cp_size);
+                    track->codecPrivate = realloc(track->codecPrivate, cp_size + ogg_headers[0]->bytes + ogg_headers[1]->bytes + ogg_headers[2]->bytes);
+                    for(i = 0; i < 3; ++i)
+                    {
+                        memcpy(track->codecPrivate + cp_size, ogg_headers[i]->packet, ogg_headers[i]->bytes);
+                        cp_size += ogg_headers[i]->bytes;
+                    }
+                    track->codecPrivateSize = cp_size;
+                }
+                break;
+            case HB_ACODEC_FAAC:
+                track->codecPrivate = audio->priv.config.aac.bytes;
+                track->codecPrivateSize = audio->priv.config.aac.length;
+                track->codecID = MK_ACODEC_AAC;
+                break;
+            default:
+                *job->die = 1;
+                hb_error("muxmkv: Unknown audio codec: %x", audio->config.out.codec);
+                return 0;
+        }
+
+        if (default_track_flag)
+        {
+            track->flagDefault = 1;
+            default_track_flag = 0;
+        }
+        track->flagEnabled = 1;
+        track->trackType = MK_TRACK_AUDIO;
+        track->language = audio->config.lang.iso639_2;
+        track->extra.audio.samplingFreq = (float)audio->config.out.samplerate;
+        track->extra.audio.channels = (audio->config.out.codec == HB_ACODEC_AC3 ) ? HB_INPUT_CH_LAYOUT_GET_DISCRETE_COUNT(audio->config.in.channel_layout) : HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->config.out.mixdown);
+//        track->defaultDuration = job->arate * 1000;
+        mux_data->track = mk_createTrack(m->file, track);
+        if (audio->config.out.codec == HB_ACODEC_VORBIS && track->codecPrivate != NULL)
+          free(track->codecPrivate);
+    }
+
+    if( mk_writeHeader( m->file, "HandBrake " HB_VERSION) < 0 )
+    {
+        hb_error( "Failed to write to output file, disk full?");
+        *job->die = 1;
+    }
+    if (track != NULL)
+        free(track);
+    if (avcC != NULL)
+        free(avcC);
+
+    return 0;
+}
+
+static int MKVMux( hb_mux_object_t * m, hb_mux_data_t * mux_data,
+                   hb_buffer_t * buf )
+{
+    ogg_packet  *op = NULL;
+    hb_job_t * job = m->job;
+    hb_title_t * title = job->title;
+    uint64_t   timecode = 0;
+    hb_chapter_t *chapter_data;
+    char tmp_buffer[1024];
+    char *string = tmp_buffer;
+
+    if (mux_data == job->mux_data)
+    {
+        /* Video */
+        timecode = buf->start * TIMECODE_SCALE;
+
+        if (job->chapter_markers && (buf->new_chap || timecode == 0))
+        {
+            /* Make sure we're not writing a chapter that has 0 length */
+            if (mux_data->prev_chapter_tc != timecode)
+            {
+                if ( buf->new_chap )
+                {
+                    mux_data->current_chapter = buf->new_chap - 2;
+                }
+                chapter_data = hb_list_item( title->list_chapter,
+                                             mux_data->current_chapter++ );
+                tmp_buffer[0] = '\0';
+
+                if( chapter_data != NULL )
+                {
+                    string = chapter_data->title;
+                }
+
+                if( strlen(string) == 0 || strlen(string) >= 1024 )
+                {
+                    snprintf( tmp_buffer, 1023, "Chapter %02i", mux_data->current_chapter );
+                    string = tmp_buffer;
+                }
+                mk_createChapterSimple(m->file, mux_data->prev_chapter_tc, mux_data->prev_chapter_tc, string);
+            }
+            mux_data->prev_chapter_tc = timecode;
+        }
+
+        if (job->vcodec == HB_VCODEC_THEORA)
+        {
+            /* ughhh, theora is a pain :( */
+            op = (ogg_packet *)buf->data;
+            op->packet = buf->data + sizeof( ogg_packet );
+            if (mk_startFrame(m->file, mux_data->track) < 0)
+            {
+                hb_error( "Failed to write frame to output file, Disk Full?" );
+                *job->die = 1;
+            }
+            mk_addFrameData(m->file, mux_data->track, op->packet, op->bytes);
+            mk_setFrameFlags(m->file, mux_data->track, timecode, 1);
+            return 0;
+        }
+    }
+    else
+    {
+        /* Audio */
+        timecode = buf->start * TIMECODE_SCALE;
+        if (mux_data->codec == HB_ACODEC_VORBIS)
+        {
+            /* ughhh, vorbis is a pain :( */
+            op = (ogg_packet *)buf->data;
+            op->packet = buf->data + sizeof( ogg_packet );
+            if (mk_startFrame(m->file, mux_data->track))
+            {
+                hb_error( "Failed to write frame to output file, Disk Full?" );
+                *job->die = 1;
+            }
+            mk_addFrameData(m->file, mux_data->track, op->packet, op->bytes);
+            mk_setFrameFlags(m->file, mux_data->track, timecode, 1);
+            return 0;
+        }
+    }
+
+    if( mk_startFrame(m->file, mux_data->track) < 0)
+    {
+        hb_error( "Failed to write frame to output file, Disk Full?" );
+        *job->die = 1;
+    }
+    mk_addFrameData(m->file, mux_data->track, buf->data, buf->size);
+    mk_setFrameFlags(m->file, mux_data->track, timecode,
+                     ((job->vcodec == HB_VCODEC_X264 && mux_data == job->mux_data) ? (buf->frametype == HB_FRAME_IDR) : ((buf->frametype & HB_FRAME_KEY) != 0)) );
+    return 0;
+}
+
+static int MKVEnd( hb_mux_object_t * m )
+{
+    hb_job_t  *job = m->job;
+    hb_mux_data_t *mux_data = job->mux_data;
+    hb_title_t  *title = job->title;
+    hb_chapter_t *chapter_data;
+    char tmp_buffer[1024];
+    char *string = tmp_buffer;
+
+    if( !job->mux_data )
+    {
+        /*
+         * We must have failed to create the file in the first place.
+         */
+        return 0;
+    }
+
+    chapter_data = hb_list_item( title->list_chapter, mux_data->current_chapter++ );
+
+    if(job->chapter_markers)
+    {
+        tmp_buffer[0] = '\0';
+
+        if( chapter_data != NULL )
+        {
+            string = chapter_data->title;
+        }
+
+        if( strlen(string) == 0 || strlen(string) >= 1024 )
+        {
+            snprintf( tmp_buffer, 1023, "Chapter %02i", mux_data->current_chapter );
+            string = tmp_buffer;
+        }
+        mk_createChapterSimple(m->file, mux_data->prev_chapter_tc, mux_data->prev_chapter_tc, string);
+    }
+
+    if( mk_close(m->file) < 0 )
+    {
+        hb_error( "Failed to flush the last frame and close the output file, Disk Full?" );
+        *job->die = 1;
+    }
+
+    // TODO: Free what we alloc'd
+
+    return 0;
+}
+
+hb_mux_object_t * hb_mux_mkv_init( hb_job_t * job )
+{
+    hb_mux_object_t * m = calloc( sizeof( hb_mux_object_t ), 1 );
+    m->init      = MKVInit;
+    m->mux       = MKVMux;
+    m->end       = MKVEnd;
+    m->job       = job;
+    return m;
+}
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
new file mode 100644 (file)
index 0000000..afc1f33
--- /dev/null
@@ -0,0 +1,677 @@
+/* $Id: muxmp4.c,v 1.24 2005/11/04 13:09:41 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "mp4v2/mp4v2.h"
+#include "a52dec/a52.h"
+
+#include "hb.h"
+
+void AddIPodUUID(MP4FileHandle, MP4TrackId);
+
+struct hb_mux_object_s
+{
+    HB_MUX_COMMON;
+
+    hb_job_t * job;
+
+    /* libmp4v2 handle */
+    MP4FileHandle file;
+
+    /* Cumulated durations so far, in output & input timescale units (see MP4Mux) */
+    int64_t sum_dur;        // duration in output timescale units
+    int64_t sum_dur_in;     // duration in input 90KHz timescale units
+
+    // bias to keep render offsets in ctts atom positive (set up by encx264)
+    int64_t init_delay;
+
+    /* Chapter state information for muxing */
+    MP4TrackId chapter_track;
+    int current_chapter;
+    uint64_t chapter_duration;
+
+    /* Sample rate of the first audio track.
+     * Used for the timescale
+     */
+    int samplerate;
+};
+
+struct hb_mux_data_s
+{
+    MP4TrackId track;
+};
+
+struct hb_text_sample_s
+{
+    uint8_t     sample[1280];
+    uint32_t    length;
+    MP4Duration duration;
+};
+
+/**********************************************************************
+ * MP4CreateTextSample
+ **********************************************************************
+ * Creates a buffer for a text track sample
+ *********************************************************************/
+static struct hb_text_sample_s *MP4CreateTextSample( char *textString, uint64_t duration )
+{
+    struct hb_text_sample_s *sample = NULL;
+    int stringLength = strlen(textString);
+    int x;
+
+    if( stringLength < 1024 )
+    {
+        sample = malloc( sizeof( struct hb_text_sample_s ) );
+
+        //textLength = (stringLength; // Account for BOM
+        sample->length = stringLength + 2 + 12; // Account for text length code and other marker
+        sample->duration = (MP4Duration)duration;
+
+        // 2-byte length marker
+        sample->sample[0] = (stringLength >> 8) & 0xff;
+        sample->sample[1] = stringLength & 0xff;
+
+        strncpy( (char *)&(sample->sample[2]), textString, stringLength );
+
+        x = 2 + stringLength;
+
+        // Modifier Length Marker
+        sample->sample[x] = 0x00;
+        sample->sample[x+1] = 0x00;
+        sample->sample[x+2] = 0x00;
+        sample->sample[x+3] = 0x0C;
+
+        // Modifier Type Code
+        sample->sample[x+4] = 'e';
+        sample->sample[x+5] = 'n';
+        sample->sample[x+6] = 'c';
+        sample->sample[x+7] = 'd';
+
+        // Modifier Value
+        sample->sample[x+8] = 0x00;
+        sample->sample[x+9] = 0x00;
+        sample->sample[x+10] = (256 >> 8) & 0xff;
+        sample->sample[x+11] = 256 & 0xff;
+    }
+
+    return sample;
+}
+
+/**********************************************************************
+ * MP4GenerateChapterSample
+ **********************************************************************
+ * Creates a buffer for a text track sample
+ *********************************************************************/
+static struct hb_text_sample_s *MP4GenerateChapterSample( hb_mux_object_t * m,
+                                                          uint64_t duration,
+                                                          int chapter )
+{
+    // We substract 1 from the chapter number because the chapters start at
+    // 1 but our name array starts at 0. We substract another 1 because we're
+    // writing the text of the previous chapter mark (when we get the start
+    // of chapter 2 we know the duration of chapter 1 & can write its mark).
+    hb_chapter_t *chapter_data = hb_list_item( m->job->title->list_chapter,
+                                               chapter - 2 );
+    char tmp_buffer[1024];
+    char *string = tmp_buffer;
+
+    tmp_buffer[0] = '\0';
+
+    if( chapter_data != NULL )
+    {
+        string = chapter_data->title;
+    }
+
+    if( strlen(string) == 0 || strlen(string) >= 1024 )
+    {
+        snprintf( tmp_buffer, 1023, "Chapter %03i", chapter - 2 );
+        string = tmp_buffer;
+    }
+
+    return MP4CreateTextSample( string, duration );
+}
+
+
+/**********************************************************************
+ * MP4Init
+ **********************************************************************
+ * Allocates hb_mux_data_t structures, create file and write headers
+ *********************************************************************/
+static int MP4Init( hb_mux_object_t * m )
+{
+    hb_job_t   * job   = m->job;
+    hb_title_t * title = job->title;
+
+    hb_audio_t    * audio;
+    hb_mux_data_t * mux_data;
+    int i;
+    uint16_t language_code;
+
+    /* Flags for enabling/disabling tracks in an MP4. */
+    typedef enum { TRACK_DISABLED = 0x0, TRACK_ENABLED = 0x1, TRACK_IN_MOVIE = 0x2, TRACK_IN_PREVIEW = 0x4, TRACK_IN_POSTER = 0x8}  track_header_flags;
+
+    if( (audio = hb_list_item(title->list_audio, 0)) != NULL )
+    {
+        /* Need the sample rate of the first audio track to use as the timescale. */
+        m->samplerate = audio->config.out.samplerate;
+        audio = NULL;
+    }
+    else
+    {
+        m->samplerate = 90000;
+    }
+
+    /* Create an empty mp4 file */
+    if (job->largeFileSize)
+    /* Use 64-bit MP4 file */
+    {
+        m->file = MP4Create( job->file, MP4_DETAILS_ERROR, MP4_CREATE_64BIT_DATA );
+        hb_deep_log( 2, "muxmp4: using 64-bit MP4 formatting.");
+    }
+    else
+    /* Limit MP4s to less than 4 GB */
+    {
+        m->file = MP4Create( job->file, MP4_DETAILS_ERROR, 0 );
+    }
+
+    if (m->file == MP4_INVALID_FILE_HANDLE)
+    {
+        hb_error("muxmp4.c: MP4Create failed!");
+        *job->die = 1;
+        return 0;
+    }
+
+    /* Video track */
+    mux_data      = malloc( sizeof( hb_mux_data_t ) );
+    job->mux_data = mux_data;
+
+    /* When using the standard 90000 timescale, QuickTime tends to have
+       synchronization issues (audio not playing at the correct speed).
+       To workaround this, we use the audio samplerate as the
+       timescale */
+    if (!(MP4SetTimeScale( m->file, m->samplerate )))
+    {
+        hb_error("muxmp4.c: MP4SetTimeScale failed!");
+        *job->die = 1;
+        return 0;
+    }
+
+    if( job->vcodec == HB_VCODEC_X264 )
+    {
+        /* Stolen from mp4creator */
+        MP4SetVideoProfileLevel( m->file, 0x7F );
+               mux_data->track = MP4AddH264VideoTrack( m->file, m->samplerate,
+                       MP4_INVALID_DURATION, job->width, job->height,
+                       job->config.h264.sps[1], /* AVCProfileIndication */
+                       job->config.h264.sps[2], /* profile_compat */
+                       job->config.h264.sps[3], /* AVCLevelIndication */
+                       3 );      /* 4 bytes length before each NAL unit */
+
+
+        MP4AddH264SequenceParameterSet( m->file, mux_data->track,
+                job->config.h264.sps, job->config.h264.sps_length );
+        MP4AddH264PictureParameterSet( m->file, mux_data->track,
+                job->config.h264.pps, job->config.h264.pps_length );
+
+               if( job->h264_level == 30 || job->ipod_atom)
+               {
+                       hb_deep_log( 2, "muxmp4: adding iPod atom");
+                       MP4AddIPodUUID(m->file, mux_data->track);
+               }
+
+        m->init_delay = job->config.h264.init_delay;
+    }
+    else /* FFmpeg or XviD */
+    {
+        MP4SetVideoProfileLevel( m->file, MPEG4_SP_L3 );
+        mux_data->track = MP4AddVideoTrack( m->file, m->samplerate,
+                MP4_INVALID_DURATION, job->width, job->height,
+                MP4_MPEG4_VIDEO_TYPE );
+        if (mux_data->track == MP4_INVALID_TRACK_ID)
+        {
+            hb_error("muxmp4.c: MP4AddVideoTrack failed!");
+            *job->die = 1;
+            return 0;
+        }
+
+
+        /* VOL from FFmpeg or XviD */
+        if (!(MP4SetTrackESConfiguration( m->file, mux_data->track,
+                job->config.mpeg4.bytes, job->config.mpeg4.length )))
+        {
+            hb_error("muxmp4.c: MP4SetTrackESConfiguration failed!");
+            *job->die = 1;
+            return 0;
+        }
+    }
+
+    // COLR atom for color and gamma correction.
+    // Per the notes at:
+    //   http://developer.apple.com/quicktime/icefloe/dispatch019.html#colr
+    //   http://forum.doom9.org/showthread.php?t=133982#post1090068
+    // the user can set it from job->color_matrix, otherwise by default
+    // we say anything that's likely to be HD content is ITU BT.709 and
+    // DVD, SD TV & other content is ITU BT.601.  We look at the title height
+    // rather than the job height here to get uncropped input dimensions.
+    if( job->color_matrix == 1 )
+    {
+        // ITU BT.601 DVD or SD TV content
+        MP4AddColr(m->file, mux_data->track, 6, 1, 6);
+    }
+    else if( job->color_matrix == 2 )
+    {
+        // ITU BT.709 HD content
+        MP4AddColr(m->file, mux_data->track, 1, 1, 1);        
+    }
+    else if ( job->title->width >= 1280 || job->title->height >= 720 )
+    {
+        // we guess that 720p or above is ITU BT.709 HD content
+        MP4AddColr(m->file, mux_data->track, 1, 1, 1);
+    }
+    else
+    {
+        // ITU BT.601 DVD or SD TV content
+        MP4AddColr(m->file, mux_data->track, 6, 1, 6);
+    }
+
+    if( job->pixel_ratio )
+    {
+        /* PASP atom for anamorphic video */
+        float width, height;
+
+        width = job->pixel_aspect_width;
+
+        height = job->pixel_aspect_height;
+
+        MP4AddPixelAspectRatio(m->file, mux_data->track, (uint32_t)width, (uint32_t)height);
+
+        MP4SetTrackFloatProperty(m->file, mux_data->track, "tkhd.width", job->width * (width / height));
+    }
+
+       /* add the audio tracks */
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+       static uint8_t reserved2[16] = {
+               0x00, 0x00, 0x00, 0x00,
+               0x00, 0x00, 0x00, 0x00,
+               0x00, 0x02, 0x00, 0x10,
+               0x00, 0x00, 0x00, 0x00,
+           };
+
+        audio = hb_list_item( title->list_audio, i );
+        mux_data = malloc( sizeof( hb_mux_data_t ) );
+        audio->priv.mux_data = mux_data;
+
+        if( audio->config.out.codec == HB_ACODEC_AC3 )
+        {
+            uint8_t fscod = 0;
+            uint8_t bsid = audio->config.in.version;
+            uint8_t bsmod = audio->config.in.mode;
+            uint8_t acmod = audio->config.flags.ac3 & 0x7;
+            uint8_t lfeon = (audio->config.flags.ac3 & A52_LFE) ? 1 : 0;
+            uint8_t bit_rate_code = 0;
+
+            /*
+             * Rewrite AC3 information into correct format for dac3 atom
+             */
+            switch( audio->config.in.samplerate )
+            {
+            case 48000:
+                fscod = 0;
+                break;
+            case 44100:
+                fscod = 1;
+                break;
+            case 32000:
+                fscod = 2;
+                break;
+            default:
+                /*
+                 * Error value, tells decoder to not decode this audio.
+                 */
+                fscod = 3;
+                break;
+            }
+
+            switch( audio->config.in.bitrate )
+            {
+            case 32000:
+                bit_rate_code = 0;
+                break;
+            case 40000:
+                bit_rate_code = 1;
+                break;
+            case 48000:
+                bit_rate_code = 2;
+                break;
+            case 56000:
+                bit_rate_code = 3;
+                break;
+            case 64000:
+                bit_rate_code = 4;
+                break;
+            case 80000:
+                bit_rate_code = 5;
+                break;
+            case 96000:
+                bit_rate_code = 6;
+                break;
+            case 112000:
+                bit_rate_code = 7;
+                break;
+            case 128000:
+                bit_rate_code = 8;
+                break;
+            case 160000:
+                bit_rate_code = 9;
+                break;
+            case 192000:
+                bit_rate_code = 10;
+                break;
+            case 224000:
+                bit_rate_code = 11;
+                break;
+            case 256000:
+                bit_rate_code = 12;
+                break;
+            case 320000:
+                bit_rate_code = 13;
+                break;
+            case 384000:
+                bit_rate_code = 14;
+                break;
+            case 448000:
+                bit_rate_code = 15;
+                break;
+            case 512000:
+                bit_rate_code = 16;
+                break;
+            case 576000:
+                bit_rate_code = 17;
+                break;
+            case 640000:
+                bit_rate_code = 18;
+                break;
+            default:
+                hb_error("Unknown AC3 bitrate");
+                bit_rate_code = 0;
+                break;
+            }
+
+            mux_data->track = MP4AddAC3AudioTrack(
+                m->file,
+                m->samplerate, 
+                fscod,
+                bsid,
+                bsmod,
+                acmod,
+                lfeon,
+                bit_rate_code);
+
+            if (audio->config.out.name == NULL) {
+                MP4SetTrackBytesProperty(
+                    m->file, mux_data->track,
+                    "udta.name.value",
+                    (const uint8_t*)"Surround", strlen("Surround"));
+            }
+            else {
+                MP4SetTrackBytesProperty(
+                    m->file, mux_data->track,
+                    "udta.name.value",
+                    (const uint8_t*)(audio->config.out.name),
+                    strlen(audio->config.out.name));
+            }
+        } else {
+            mux_data->track = MP4AddAudioTrack(
+                m->file,
+                m->samplerate, 1024, MP4_MPEG4_AUDIO_TYPE );
+            if (audio->config.out.name == NULL) {
+                MP4SetTrackBytesProperty(
+                    m->file, mux_data->track,
+                    "udta.name.value",
+                    (const uint8_t*)"Stereo", strlen("Stereo"));
+            }
+            else {
+                MP4SetTrackBytesProperty(
+                    m->file, mux_data->track,
+                    "udta.name.value",
+                    (const uint8_t*)(audio->config.out.name),
+                    strlen(audio->config.out.name));
+            }
+
+            MP4SetAudioProfileLevel( m->file, 0x0F );
+            MP4SetTrackESConfiguration(
+                m->file, mux_data->track,
+                audio->priv.config.aac.bytes, audio->priv.config.aac.length );
+
+            /* Set the correct number of channels for this track */
+             MP4SetTrackIntegerProperty(m->file, mux_data->track, "mdia.minf.stbl.stsd.mp4a.channels", (uint16_t)HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->config.out.mixdown));
+        }
+
+        /* Set the language for this track */
+        /* The language is stored as 5-bit text - 0x60 */
+        language_code = audio->config.lang.iso639_2[0] - 0x60;   language_code <<= 5;
+        language_code |= audio->config.lang.iso639_2[1] - 0x60;  language_code <<= 5;
+        language_code |= audio->config.lang.iso639_2[2] - 0x60;
+        MP4SetTrackIntegerProperty(m->file, mux_data->track, "mdia.mdhd.language", language_code);
+
+        if( hb_list_count( title->list_audio ) > 1 )
+        {
+            /* Set the audio track alternate group */
+            MP4SetTrackIntegerProperty(m->file, mux_data->track, "tkhd.alternate_group", 1);
+        }
+
+        if (i == 0) {
+            /* Enable the first audio track */
+            MP4SetTrackIntegerProperty(m->file, mux_data->track, "tkhd.flags", (TRACK_ENABLED | TRACK_IN_MOVIE));
+        }
+        else
+            /* Disable the other audio tracks so QuickTime doesn't play
+               them all at once. */
+        {
+            MP4SetTrackIntegerProperty(m->file, mux_data->track, "tkhd.flags", (TRACK_DISABLED | TRACK_IN_MOVIE));
+            hb_deep_log( 2, "muxp4: disabled extra audio track %i", mux_data->track-1);
+        }
+
+    }
+
+       if (job->chapter_markers)
+    {
+        /* add a text track for the chapters. We add the 'chap' atom to track
+           one which is usually the video track & should never be disabled.
+           The Quicktime spec says it doesn't matter which media track the
+           chap atom is on but it has to be an enabled track. */
+        MP4TrackId textTrack;
+        textTrack = MP4AddChapterTextTrack(m->file, 1);
+
+        m->chapter_track = textTrack;
+        m->chapter_duration = 0;
+        m->current_chapter = job->chapter_start;
+    }
+
+    /* Add encoded-by metadata listing version and build date */
+    char *tool_string;
+    tool_string = (char *)malloc(80);
+    snprintf( tool_string, 80, "HandBrake %s %i", HB_VERSION, HB_BUILD);
+    MP4SetMetadataTool(m->file, tool_string);
+    free(tool_string);
+
+    return 0;
+}
+
+static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data,
+                   hb_buffer_t * buf )
+{
+    hb_job_t * job = m->job;
+    int64_t duration;
+    int64_t offset = 0;
+
+    if( mux_data == job->mux_data )
+    {
+        /* Video */
+
+        // if there are b-frames compute the render offset
+        // (we'll need it for both the video frame & the chapter track)
+        if ( m->init_delay )
+        {
+            offset = ( buf->start + m->init_delay ) * m->samplerate / 90000 -
+                     m->sum_dur;
+        }
+        /* Add the sample before the new frame.
+           It is important that this be calculated prior to the duration
+           of the new video sample, as we want to sync to right after it.
+           (This is because of how durations for text tracks work in QT) */
+        if( job->chapter_markers && buf->new_chap )
+        {
+            struct hb_text_sample_s *sample;
+
+            // this chapter is postioned by writing out the previous chapter.
+            // the duration of the previous chapter is the duration up to but
+            // not including the current frame minus the duration of all
+            // chapters up to the previous.
+            duration = m->sum_dur - m->chapter_duration + offset;
+            if ( duration <= 0 )
+            {
+                /* The initial & final chapters can have very short durations
+                 * (less than the error in our total duration estimate) so
+                 * the duration calc above can result in a negative number.
+                 * when this happens give the chapter a short duration (1/3
+                 * of an ntsc frame time). */
+                duration = 1000 * m->samplerate / 90000;
+            }
+
+            sample = MP4GenerateChapterSample( m, duration, buf->new_chap );
+
+            if( !MP4WriteSample(m->file,
+                                m->chapter_track,
+                                sample->sample,
+                                sample->length,
+                                sample->duration,
+                                0, true) )
+            {
+                hb_error("Failed to write to output file, disk full?");
+                *job->die = 1;
+            }
+            free(sample);
+            m->current_chapter = buf->new_chap;
+            m->chapter_duration += duration;
+        }
+
+        // since we're changing the sample rate we need to keep track of
+        // the truncation bias so that the audio and video don't go out
+        // of sync. m->sum_dur_in is the sum of the input durations so far.
+        // m->sum_dur is the sum of the output durations. Their difference
+        // (in output sample rate units) is the accumulated truncation bias.
+        int64_t bias = ( m->sum_dur_in * m->samplerate / 90000 ) - m->sum_dur;
+        int64_t dur_in = buf->stop - buf->start;
+        duration = dur_in * m->samplerate / 90000 + bias;
+        if ( duration <= 0 )
+        {
+            /* We got an illegal mp4/h264 duration. This shouldn't
+               be possible and usually indicates a bug in the upstream code.
+               Complain in the hope that someone will go find the bug but
+               try to fix the error so that the file will still be playable. */
+            hb_log("MP4Mux: illegal duration %lld, bias %lld, start %lld (%lld),"
+                   "stop %lld (%lld), sum_dur %lld",
+                   duration, bias, buf->start * m->samplerate / 90000, buf->start,
+                   buf->stop * m->samplerate / 90000, buf->stop, m->sum_dur );
+            /* we don't know when the next frame starts so we can't pick a
+               valid duration for this one so we pick something "short"
+               (roughly 1/3 of an NTSC frame time) and rely on the bias calc
+               for the next frame to correct things (a duration underestimate
+               just results in a large bias on the next frame). */
+            duration = 1000 * m->samplerate / 90000;
+        }
+        m->sum_dur += duration;
+        m->sum_dur_in += dur_in;
+    }
+    else
+    {
+        /* Audio */
+        duration = MP4_INVALID_DURATION;
+    }
+
+    // Here's where the sample actually gets muxed.
+    if( !MP4WriteSample( m->file,
+                         mux_data->track,
+                         buf->data,
+                         buf->size,
+                         duration,
+                         offset,
+                         ((buf->frametype & HB_FRAME_KEY) != 0) ) )
+    {
+        hb_error("Failed to write to output file, disk full?");
+        *job->die = 1;
+    }
+
+    return 0;
+}
+
+static int MP4End( hb_mux_object_t * m )
+{
+    hb_job_t   * job   = m->job;
+
+    /* Write our final chapter marker */
+    if( m->job->chapter_markers )
+    {
+        int64_t duration = m->sum_dur - m->chapter_duration;
+        /* The final chapter can have a very short duration - if it's less
+         * than a second just skip it. */
+        if ( duration >= m->samplerate )
+        {
+
+            struct hb_text_sample_s *sample = MP4GenerateChapterSample( m, duration,
+                                                    m->current_chapter + 1 );
+            if( ! MP4WriteSample(m->file, m->chapter_track, sample->sample,
+                                 sample->length, sample->duration, 0, true) )
+            {
+                hb_error("Failed to write to output file, disk full?");
+                *job->die = 1;
+            }
+            free(sample);
+        }
+    }
+
+    if (job->areBframes)
+    {
+           // Insert track edit to get A/V back in sync.  The edit amount is
+           // the init_delay.
+           int64_t edit_amt = m->init_delay * m->samplerate / 90000;
+           MP4AddTrackEdit(m->file, 1, MP4_INVALID_EDIT_ID, edit_amt,
+                           MP4GetTrackDuration(m->file, 1), 0);
+            if ( m->job->chapter_markers )
+            {
+                // apply same edit to chapter track to keep it in sync with video
+                MP4AddTrackEdit(m->file, m->chapter_track, MP4_INVALID_EDIT_ID,
+                                edit_amt,
+                                MP4GetTrackDuration(m->file, m->chapter_track), 0);
+            }
+     }
+
+    MP4Close( m->file );
+
+    if ( job->mp4_optimize )
+    {
+        hb_log( "muxmp4: optimizing file" );
+        char filename[1024]; memset( filename, 0, 1024 );
+        snprintf( filename, 1024, "%s.tmp", job->file );
+        MP4Optimize( job->file, filename, MP4_DETAILS_ERROR );
+        remove( job->file );
+        rename( filename, job->file );
+    }
+
+    return 0;
+}
+
+hb_mux_object_t * hb_mux_mp4_init( hb_job_t * job )
+{
+    hb_mux_object_t * m = calloc( sizeof( hb_mux_object_t ), 1 );
+    m->init      = MP4Init;
+    m->mux       = MP4Mux;
+    m->end       = MP4End;
+    m->job       = job;
+    return m;
+}
+
diff --git a/libhb/muxogm.c b/libhb/muxogm.c
new file mode 100644 (file)
index 0000000..ccb1051
--- /dev/null
@@ -0,0 +1,413 @@
+/* $Id: muxogm.c,v 1.4 2005/02/20 00:41:56 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+#include <ogg/ogg.h>
+
+struct hb_mux_object_s
+{
+    HB_MUX_COMMON;
+
+    hb_job_t * job;
+
+    FILE * file;
+};
+
+struct hb_mux_data_s
+{
+    int              codec;
+    ogg_stream_state os;
+    int              i_packet_no;
+};
+
+typedef struct __attribute__((__packed__))
+{
+    uint8_t i_packet_type;
+
+    char stream_type[8];
+    char sub_type[4];
+
+    int32_t i_size;
+
+    int64_t i_time_unit;
+    int64_t i_samples_per_unit;
+    int32_t i_default_len;
+
+    int32_t i_buffer_size;
+    int16_t i_bits_per_sample;
+    int16_t i_padding_0;            // hum hum
+    union
+    {
+        struct
+        {
+            int32_t i_width;
+            int32_t i_height;
+
+        } video;
+        struct
+        {
+            int16_t i_channels;
+            int16_t i_block_align;
+            int32_t i_avgbytespersec;
+        } audio;
+    } header;
+
+} ogg_stream_header_t;
+
+#define SetWLE( p, v ) _SetWLE( (uint8_t*)p, v)
+static void _SetWLE( uint8_t *p, uint16_t i_dw )
+{
+    p[1] = ( i_dw >>  8 )&0xff;
+    p[0] = ( i_dw       )&0xff;
+}
+
+#define SetDWLE( p, v ) _SetDWLE( (uint8_t*)p, v)
+static void _SetDWLE( uint8_t *p, uint32_t i_dw )
+{
+    p[3] = ( i_dw >> 24 )&0xff;
+    p[2] = ( i_dw >> 16 )&0xff;
+    p[1] = ( i_dw >>  8 )&0xff;
+    p[0] = ( i_dw       )&0xff;
+}
+#define SetQWLE( p, v ) _SetQWLE( (uint8_t*)p, v)
+static void _SetQWLE( uint8_t *p, uint64_t i_qw )
+{
+    SetDWLE( p,   i_qw&0xffffffff );
+    SetDWLE( p+4, ( i_qw >> 32)&0xffffffff );
+}
+
+static int OGMFlush( hb_mux_object_t * m, hb_mux_data_t * mux_data )
+{
+    for( ;; )
+    {
+        ogg_page og;
+        if( ogg_stream_flush( &mux_data->os, &og ) == 0 )
+        {
+            break;
+        }
+        if( fwrite( og.header, og.header_len, 1, m->file ) <= 0 ||
+            fwrite( og.body, og.body_len, 1, m->file ) <= 0 )
+        {
+            return -1;
+        }
+    }
+    return 0;
+}
+
+/**********************************************************************
+ * OGMInit
+ **********************************************************************
+ * Allocates hb_mux_data_t structures, create file and write headers
+ *********************************************************************/
+static int OGMInit( hb_mux_object_t * m )
+{
+    hb_job_t   * job   = m->job;
+    hb_title_t * title = job->title;
+
+    hb_audio_t    * audio;
+    hb_mux_data_t * mux_data;
+    int i;
+
+    ogg_packet          op;
+    ogg_stream_header_t h;
+
+    /* Open output file */
+    if( ( m->file = fopen( job->file, "wb" ) ) == NULL )
+    {
+        hb_log( "muxogm: failed to open `%s'", job->file );
+        return -1;
+    }
+    hb_log( "muxogm: `%s' opened", job->file );
+
+    /* Video track */
+    mux_data              = malloc( sizeof( hb_mux_data_t ) );
+    mux_data->codec       = job->vcodec;
+    mux_data->i_packet_no = 0;
+    job->mux_data         = mux_data;
+    ogg_stream_init( &mux_data->os, 0 );
+
+    /* Audio */
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio                 = hb_list_item( title->list_audio, i );
+        mux_data              = malloc( sizeof( hb_mux_data_t ) );
+        mux_data->codec       = audio->config.out.codec;
+        mux_data->i_packet_no = 0;
+        audio->priv.mux_data       = mux_data;
+        ogg_stream_init( &mux_data->os, i + 1 );
+    }
+
+
+    /* First pass: all b_o_s packets */
+    hb_log("muxogm: Writing b_o_s header packets");
+    /* Video */
+    mux_data = job->mux_data;
+    switch( job->vcodec )
+    {
+        case HB_VCODEC_THEORA:
+            memcpy(&op, job->config.theora.headers[0], sizeof(op));
+            op.packet = job->config.theora.headers[0] + sizeof(op);
+            ogg_stream_packetin( &mux_data->os, &op );
+            break;
+        case HB_VCODEC_XVID:
+        case HB_VCODEC_X264:
+        case HB_VCODEC_FFMPEG:
+        {
+                memset( &h, 0, sizeof( ogg_stream_header_t ) );
+                h.i_packet_type = 0x01;
+                memcpy( h.stream_type, "video    ", 8 );
+                if( mux_data->codec == HB_VCODEC_X264 )
+                {
+                    memcpy( h.sub_type, "H264", 4 );
+                }
+                else if( mux_data->codec == HB_VCODEC_XVID )
+                {
+                    memcpy( h.sub_type, "XVID", 4 );
+                }
+                else
+                {
+                    memcpy( h.sub_type, "DX50", 4 );
+                }
+                SetDWLE( &h.i_size, sizeof( ogg_stream_header_t ) - 1);
+                SetQWLE( &h.i_time_unit, (int64_t) 10 * 1000 * 1000 *
+                         (int64_t) job->vrate_base / (int64_t) job->vrate );
+                SetQWLE( &h.i_samples_per_unit, 1 );
+                SetDWLE( &h.i_default_len, 0 );
+                SetDWLE( &h.i_buffer_size, 1024*1024 );
+                SetWLE ( &h.i_bits_per_sample, 0 );
+                SetDWLE( &h.header.video.i_width,  job->width );
+                SetDWLE( &h.header.video.i_height, job->height );
+                op.packet   = (unsigned char*)&h;
+                op.bytes    = sizeof( ogg_stream_header_t );
+                op.b_o_s    = 1;
+                op.e_o_s    = 0;
+                op.granulepos = 0;
+                op.packetno = mux_data->i_packet_no++;
+                ogg_stream_packetin( &mux_data->os, &op );
+                break;
+            }
+        default:
+            hb_error( "muxogm: unhandled video codec" );
+            *job->die = 1;
+    }
+    OGMFlush( m, mux_data );
+
+    /* Audio */
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio   = hb_list_item( title->list_audio, i );
+        mux_data = audio->priv.mux_data;
+        memset( &h, 0, sizeof( ogg_stream_header_t ) );
+        switch( audio->config.out.codec )
+        {
+            case HB_ACODEC_LAME:
+            {
+                h.i_packet_type = 0x01;
+                memcpy( h.stream_type, "audio    ", 8 );
+                memcpy( h.sub_type, "55  ", 4 );
+
+                SetDWLE( &h.i_size, sizeof( ogg_stream_header_t ) - 1);
+                SetQWLE( &h.i_time_unit, 0 );
+                SetQWLE( &h.i_samples_per_unit, audio->config.out.samplerate );
+                SetDWLE( &h.i_default_len, 1 );
+                SetDWLE( &h.i_buffer_size, 30 * 1024 );
+                SetWLE ( &h.i_bits_per_sample, 0 );
+
+                SetDWLE( &h.header.audio.i_channels, 2 );
+                SetDWLE( &h.header.audio.i_block_align, 0 );
+                SetDWLE( &h.header.audio.i_avgbytespersec,
+                         audio->config.out.bitrate / 8 );
+
+                op.packet   = (unsigned char*) &h;
+                op.bytes    = sizeof( ogg_stream_header_t );
+                op.b_o_s    = 1;
+                op.e_o_s    = 0;
+                op.granulepos = 0;
+                op.packetno = mux_data->i_packet_no++;
+                ogg_stream_packetin( &mux_data->os, &op );
+                break;
+            }
+            case HB_ACODEC_VORBIS:
+            {
+                memcpy( &op, audio->priv.config.vorbis.headers[0],
+                        sizeof( ogg_packet ) );
+                op.packet = audio->priv.config.vorbis.headers[0] +
+                                sizeof( ogg_packet );
+                ogg_stream_packetin( &mux_data->os, &op );
+                break;
+            }
+            default:
+                hb_log( "muxogm: unhandled codec" );
+                break;
+        }
+        OGMFlush( m, mux_data );
+    }
+
+    /* second pass: all non b_o_s packets */
+    hb_log("muxogm: Writing non b_o_s header packets");
+    /* Video */
+    mux_data = job->mux_data;
+    switch( job->vcodec )
+    {
+        case HB_VCODEC_THEORA:
+            for (i = 1; i < 3; i++)
+            {
+                memcpy(&op, job->config.theora.headers[i], sizeof(op));
+                op.packet = job->config.theora.headers[i] + sizeof(op);
+                ogg_stream_packetin( &mux_data->os, &op );
+                OGMFlush( m, mux_data );
+            }
+            break;
+        case HB_VCODEC_XVID:
+        case HB_VCODEC_X264:
+        case HB_VCODEC_FFMPEG:
+            break;
+        default:
+            hb_error( "muxogm: unhandled video codec" );
+            *job->die = 1;
+    }
+
+    /* Audio */
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = hb_list_item( title->list_audio, i );
+        if( audio->config.out.codec == HB_ACODEC_VORBIS )
+        {
+            int       j;
+            mux_data = audio->priv.mux_data;
+
+            for( j = 1; j < 3; j++ )
+            {
+                memcpy( &op, audio->priv.config.vorbis.headers[j],
+                        sizeof( ogg_packet ) );
+                op.packet = audio->priv.config.vorbis.headers[j] +
+                                sizeof( ogg_packet );
+                ogg_stream_packetin( &mux_data->os, &op );
+
+                OGMFlush( m, mux_data );
+            }
+        }
+    }
+    hb_log( "muxogm: headers written" );
+
+    return 0;
+}
+
+static int OGMMux( hb_mux_object_t * m, hb_mux_data_t * mux_data,
+                   hb_buffer_t * buf )
+{
+    ogg_packet   op;
+
+    switch( mux_data->codec )
+    {
+        case HB_VCODEC_THEORA:
+            memcpy( &op, buf->data, sizeof( ogg_packet ) );
+            op.packet = malloc( op.bytes );
+            memcpy( op.packet, buf->data + sizeof( ogg_packet ), op.bytes );
+            break;
+        case HB_VCODEC_FFMPEG:
+        case HB_VCODEC_XVID:
+        case HB_VCODEC_X264:
+            op.bytes  = buf->size + 1;
+            op.packet = malloc( op.bytes );
+            op.packet[0] = (buf->frametype & HB_FRAME_KEY) ? 0x08 : 0x00;
+            memcpy( &op.packet[1], buf->data, buf->size );
+            op.b_o_s       = 0;
+            op.e_o_s       = 0;
+            op.granulepos  = mux_data->i_packet_no;
+            op.packetno    = mux_data->i_packet_no++;
+            break;
+        case HB_ACODEC_LAME:
+            op.bytes  = buf->size + 1;
+            op.packet = malloc( op.bytes );
+            op.packet[0] = 0x08;
+            memcpy( &op.packet[1], buf->data, buf->size );
+            op.b_o_s       = 0;
+            op.e_o_s       = 0;
+            op.granulepos  = mux_data->i_packet_no * 1152;
+            op.packetno    = mux_data->i_packet_no++;
+            break;
+        case HB_ACODEC_VORBIS:
+            memcpy( &op, buf->data, sizeof( ogg_packet ) );
+            op.packet = malloc( op.bytes );
+            memcpy( op.packet, buf->data + sizeof( ogg_packet ), op.bytes );
+            break;
+
+        default:
+            hb_log( "muxogm: unhandled codec" );
+            op.bytes = 0;
+            op.packet = NULL;
+            break;
+    }
+
+    if( op.packet )
+    {
+        ogg_stream_packetin( &mux_data->os, &op );
+
+        for( ;; )
+        {
+            ogg_page og;
+            if( ogg_stream_pageout( &mux_data->os, &og ) == 0 )
+            {
+                break;
+            }
+
+            if( fwrite( og.header, og.header_len, 1, m->file ) <= 0 ||
+                fwrite( og.body, og.body_len, 1, m->file ) <= 0 )
+            {
+                hb_log( "muxogm: write failed" );
+                break;
+            }
+        }
+        free( op.packet );
+    }
+    return 0;
+}
+
+static int OGMEnd( hb_mux_object_t * m )
+{
+    hb_job_t * job = m->job;
+
+    hb_title_t * title = job->title;
+    hb_audio_t    * audio;
+    hb_mux_data_t * mux_data;
+    int          i;
+
+    mux_data = job->mux_data;
+    if( OGMFlush( m, mux_data ) < 0 )
+    {
+        return -1;
+    }
+    ogg_stream_clear( &mux_data->os );
+
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = hb_list_item( title->list_audio, i );
+        mux_data = audio->priv.mux_data;
+        if( OGMFlush( m, mux_data ) < 0 )
+        {
+            return -1;
+        }
+        ogg_stream_clear( &mux_data->os );
+    }
+
+    fclose( m->file );
+    hb_log( "muxogm: `%s' closed", job->file );
+
+    return 0;
+}
+
+hb_mux_object_t * hb_mux_ogm_init( hb_job_t * job )
+{
+    hb_mux_object_t * m = calloc( sizeof( hb_mux_object_t ), 1 );
+    m->init      = OGMInit;
+    m->mux       = OGMMux;
+    m->end       = OGMEnd;
+    m->job       = job;
+    return m;
+}
+
diff --git a/libhb/ports.c b/libhb/ports.c
new file mode 100644 (file)
index 0000000..3754a45
--- /dev/null
@@ -0,0 +1,623 @@
+/* $Id: ports.c,v 1.15 2005/10/15 18:05:03 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include <time.h>
+#include <sys/time.h>
+
+#if defined( SYS_BEOS )
+#include <OS.h>
+#include <signal.h>
+#elif defined( SYS_CYGWIN )
+#include <windows.h>
+#elif defined( SYS_SunOS )
+#include <sys/processor.h>
+#endif
+
+#if USE_PTHREAD
+#include <pthread.h>
+#endif
+
+//#ifdef SYS_CYGWIN
+//#include <winsock2.h>
+//#include <ws2tcpip.h>
+//#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+//#endif
+
+#include "hb.h"
+
+/************************************************************************
+ * hb_get_date()
+ ************************************************************************
+ * Returns the current date in milliseconds.
+ * On Win32, we implement a gettimeofday emulation here because
+ * libdvdread and libmp4v2 use it without checking.
+ ************************************************************************/
+/*
+#ifdef SYS_CYGWIN
+struct timezone
+{
+};
+
+int gettimeofday( struct timeval * tv, struct timezone * tz )
+{
+    int tick;
+    tick        = GetTickCount();
+    tv->tv_sec  = tick / 1000;
+    tv->tv_usec = ( tick % 1000 ) * 1000;
+    return 0;
+}
+#endif
+*/
+
+uint64_t hb_get_date()
+{
+    struct timeval tv;
+    gettimeofday( &tv, NULL );
+    return( (uint64_t) tv.tv_sec * 1000 + (uint64_t) tv.tv_usec / 1000 );
+}
+
+/************************************************************************
+ * hb_snooze()
+ ************************************************************************
+ * Waits <delay> milliseconds.
+ ************************************************************************/
+void hb_snooze( int delay )
+{
+    if( delay < 1 )
+    {
+        return;
+    }
+#if defined( SYS_BEOS )
+    snooze( 1000 * delay );
+#elif defined( SYS_DARWIN ) || defined( SYS_LINUX ) || defined( SYS_FREEBSD) || defined( SYS_SunOS )
+    usleep( 1000 * delay );
+#elif defined( SYS_CYGWIN )
+    Sleep( delay );
+#endif
+}
+
+/************************************************************************
+ * hb_get_cpu_count()
+ ************************************************************************
+ * Whenever possible, returns the number of CPUs on the current
+ * computer. Returns 1 otherwise.
+ * The detection is actually only performed on the first call.
+ ************************************************************************/
+int hb_get_cpu_count()
+{
+    static int cpu_count = 0;
+
+    if( cpu_count )
+    {
+        return cpu_count;
+    }
+    cpu_count = 1;
+
+#if defined( SYS_BEOS )
+    {
+        system_info info;
+        get_system_info( &info );
+        cpu_count = info.cpu_count;
+    }
+
+#elif defined( SYS_DARWIN ) || defined( SYS_FREEBSD )
+    FILE * info;
+    char   buffer[16];
+
+    if( ( info = popen( "/usr/sbin/sysctl hw.ncpu", "r" ) ) )
+    {
+        memset( buffer, 0, 16 );
+        if( fgets( buffer, 15, info ) )
+        {
+            if( sscanf( buffer, "hw.ncpu: %d", &cpu_count ) != 1 )
+            {
+                cpu_count = 1;
+            }
+        }
+        fclose( info );
+    }
+
+#elif defined( SYS_LINUX )
+    {
+        FILE * info;
+        char   buffer[8];
+
+        if( ( info = popen( "grep -c '^processor' /proc/cpuinfo",
+                            "r" ) ) )
+        {
+            memset( buffer, 0, 8 );
+            if( fgets( buffer, 7, info ) )
+            {
+                if( sscanf( buffer, "%d", &cpu_count ) != 1 )
+                {
+                    cpu_count = 1;
+                }
+            }
+            fclose( info );
+        }
+    }
+
+#elif defined( SYS_CYGWIN )
+    SYSTEM_INFO cpuinfo;
+    GetSystemInfo( &cpuinfo );
+    cpu_count = cpuinfo.dwNumberOfProcessors;
+#elif defined( SYS_SunOS )
+    {
+        processorid_t cpumax;
+        int i,j=0;
+
+        cpumax = sysconf(_SC_CPUID_MAX);
+
+        for(i = 0; i <= cpumax; i++ )
+        {
+            if(p_online(i, P_STATUS) != -1)
+            {
+                j++;
+            }
+        }
+        cpu_count=j;
+    }
+#endif
+
+    cpu_count = MAX( 1, cpu_count );
+    cpu_count = MIN( cpu_count, 8 );
+
+    return cpu_count;
+}
+
+/************************************************************************
+ * Get a tempory directory for HB
+ ***********************************************************************/
+void hb_get_tempory_directory( hb_handle_t * h, char path[512] )
+{
+    char base[512];
+
+    /* Create the base */
+#ifdef SYS_CYGWIN
+    char *p;
+    int i_size = GetTempPath( 512, base );
+    if( i_size <= 0 || i_size >= 512 )
+    {
+        if( getcwd( base, 512 ) == NULL )
+            strcpy( base, "c:" ); /* Bad fallback but ... */
+    }
+
+    /* c:/path/ works like a charm under cygwin(win32?) so use it */
+    while( ( p = strchr( base, '\\' ) ) )
+        *p = '/';
+#else
+    strcpy( base, "/tmp" );
+#endif
+    /* I prefer to remove evntual last '/' (for cygwin) */
+    if( base[strlen(base)-1] == '/' )
+        base[strlen(base)-1] = '\0';
+
+    snprintf( path, 512, "%s/hb.%d", base, hb_get_pid( h ) );
+}
+
+/************************************************************************
+ * Get a tempory filename for HB
+ ***********************************************************************/
+void hb_get_tempory_filename( hb_handle_t * h, char name[1024],
+                              char *fmt, ... )
+{
+    va_list args;
+
+    hb_get_tempory_directory( h, name );
+    strcat( name, "/" );
+
+    va_start( args, fmt );
+    vsnprintf( &name[strlen(name)], 1024 - strlen(name), fmt, args );
+    va_end( args );
+}
+
+/************************************************************************
+ * hb_mkdir
+ ************************************************************************
+ * Wrapper to the real mkdir, needed only because it doesn't take a
+ * second argument on Win32. Grrr.
+ ***********************************************************************/
+void hb_mkdir( char * name )
+{
+//#ifdef SYS_CYGWIN
+//    mkdir( name );
+//#else
+    mkdir( name, 0755 );
+//#endif
+}
+
+/************************************************************************
+ * Portable thread implementation
+ ***********************************************************************/
+struct hb_thread_s
+{
+    char       * name;
+    int          priority;
+    void      (* function) ( void * );
+    void       * arg;
+
+    hb_lock_t  * lock;
+    int          exited;
+
+#if defined( SYS_BEOS )
+    thread_id    thread;
+#elif USE_PTHREAD
+    pthread_t    thread;
+//#elif defined( SYS_CYGWIN )
+//    HANDLE       thread;
+#endif
+};
+
+/************************************************************************
+ * hb_thread_func()
+ ************************************************************************
+ * We use it as the root routine for any thread, for two reasons:
+ *  + To set the thread priority on OS X (pthread_setschedparam() could
+ *    be called from hb_thread_init(), but it's nicer to do it as we
+ *    are sure it is done before the real routine starts)
+ *  + Get informed when the thread exits, so we know whether
+ *    hb_thread_close() will block or not.
+ ***********************************************************************/
+static void hb_thread_func( void * _t )
+{
+    hb_thread_t * t = (hb_thread_t *) _t;
+
+#if defined( SYS_DARWIN )
+    /* Set the thread priority */
+    struct sched_param param;
+    memset( &param, 0, sizeof( struct sched_param ) );
+    param.sched_priority = t->priority;
+    pthread_setschedparam( pthread_self(), SCHED_OTHER, &param );
+#endif
+
+#if defined( SYS_BEOS )
+    signal( SIGINT, SIG_IGN );
+#endif
+
+    /* Start the actual routine */
+    t->function( t->arg );
+
+    /* Inform that the thread can be joined now */
+    hb_deep_log( 2, "thread %x exited (\"%s\")", t->thread, t->name );
+    hb_lock( t->lock );
+    t->exited = 1;
+    hb_unlock( t->lock );
+}
+
+/************************************************************************
+ * hb_thread_init()
+ ************************************************************************
+ * name:     user-friendly name
+ * function: the thread routine
+ * arg:      argument of the routine
+ * priority: HB_LOW_PRIORITY or HB_NORMAL_PRIORITY
+ ***********************************************************************/
+hb_thread_t * hb_thread_init( char * name, void (* function)(void *),
+                              void * arg, int priority )
+{
+    hb_thread_t * t = calloc( sizeof( hb_thread_t ), 1 );
+
+    t->name     = strdup( name );
+    t->function = function;
+    t->arg      = arg;
+    t->priority = priority;
+
+    t->lock     = hb_lock_init();
+
+    /* Create and start the thread */
+#if defined( SYS_BEOS )
+    t->thread = spawn_thread( (thread_func) hb_thread_func,
+                              name, priority, t );
+    resume_thread( t->thread );
+
+#elif USE_PTHREAD
+    pthread_create( &t->thread, NULL,
+                    (void * (*)( void * )) hb_thread_func, t );
+
+//#elif defined( SYS_CYGWIN )
+//    t->thread = CreateThread( NULL, 0,
+//        (LPTHREAD_START_ROUTINE) hb_thread_func, t, 0, NULL );
+//
+//    /* Maybe use THREAD_PRIORITY_LOWEST instead */
+//    if( priority == HB_LOW_PRIORITY )
+//        SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL );
+#endif
+
+    hb_deep_log( 2, "thread %x started (\"%s\")", t->thread, t->name );
+    return t;
+}
+
+/************************************************************************
+ * hb_thread_close()
+ ************************************************************************
+ * Joins the thread and frees memory.
+ ***********************************************************************/
+void hb_thread_close( hb_thread_t ** _t )
+{
+    hb_thread_t * t = *_t;
+
+    /* Join the thread */
+#if defined( SYS_BEOS )
+    long exit_value;
+    wait_for_thread( t->thread, &exit_value );
+
+#elif USE_PTHREAD
+    pthread_join( t->thread, NULL );
+
+//#elif defined( SYS_CYGWIN )
+//    WaitForSingleObject( t->thread, INFINITE );
+#endif
+
+    hb_deep_log( 2, "thread %x joined (\"%s\")",
+            t->thread, t->name );
+
+    hb_lock_close( &t->lock );
+    free( t->name );
+    free( t );
+    *_t = NULL;
+}
+
+/************************************************************************
+ * hb_thread_has_exited()
+ ************************************************************************
+ * Returns 1 if the thread can be joined right away, 0 otherwise.
+ ***********************************************************************/
+int hb_thread_has_exited( hb_thread_t * t )
+{
+    int exited;
+
+    hb_lock( t->lock );
+    exited = t->exited;
+    hb_unlock( t->lock );
+
+    return exited;
+}
+
+/************************************************************************
+ * Portable mutex implementation
+ ***********************************************************************/
+struct hb_lock_s
+{
+#if defined( SYS_BEOS )
+    sem_id          sem;
+#elif USE_PTHREAD
+    pthread_mutex_t mutex;
+//#elif defined( SYS_CYGWIN )
+//    HANDLE          mutex;
+#endif
+};
+
+/************************************************************************
+ * hb_lock_init()
+ * hb_lock_close()
+ * hb_lock()
+ * hb_unlock()
+ ************************************************************************
+ * Basic wrappers to OS-specific semaphore or mutex functions.
+ ***********************************************************************/
+hb_lock_t * hb_lock_init()
+{
+    hb_lock_t * l = calloc( sizeof( hb_lock_t ), 1 );
+
+#if defined( SYS_BEOS )
+    l->sem = create_sem( 1, "sem" );
+#elif USE_PTHREAD
+    pthread_mutexattr_t mta;
+
+    pthread_mutexattr_init(&mta);
+
+#if defined( SYS_CYGWIN )
+    pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_NORMAL);
+#endif
+
+    pthread_mutex_init( &l->mutex, &mta );
+//#elif defined( SYS_CYGWIN )
+//    l->mutex = CreateMutex( 0, FALSE, 0 );
+#endif
+
+    return l;
+}
+
+void hb_lock_close( hb_lock_t ** _l )
+{
+    hb_lock_t * l = *_l;
+
+#if defined( SYS_BEOS )
+    delete_sem( l->sem );
+#elif USE_PTHREAD
+    pthread_mutex_destroy( &l->mutex );
+//#elif defined( SYS_CYGWIN )
+//    CloseHandle( l->mutex );
+#endif
+    free( l );
+
+    *_l = NULL;
+}
+
+void hb_lock( hb_lock_t * l )
+{
+#if defined( SYS_BEOS )
+    acquire_sem( l->sem );
+#elif USE_PTHREAD
+    pthread_mutex_lock( &l->mutex );
+//#elif defined( SYS_CYGWIN )
+//    WaitForSingleObject( l->mutex, INFINITE );
+#endif
+}
+
+void hb_unlock( hb_lock_t * l )
+{
+#if defined( SYS_BEOS )
+    release_sem( l->sem );
+#elif USE_PTHREAD
+    pthread_mutex_unlock( &l->mutex );
+//#elif defined( SYS_CYGWIN )
+//    ReleaseMutex( l->mutex );
+#endif
+}
+
+/************************************************************************
+ * Portable condition variable implementation
+ ***********************************************************************/
+struct hb_cond_s
+{
+#if defined( SYS_BEOS )
+    int                 thread;
+#elif USE_PTHREAD
+    pthread_cond_t      cond;
+//#elif defined( SYS_CYGWIN )
+//    HANDLE              event;
+#endif
+};
+
+/************************************************************************
+ * hb_cond_init()
+ * hb_cond_close()
+ * hb_cond_wait()
+ * hb_cond_signal()
+ ************************************************************************
+ * Win9x is not supported by this implementation (SignalObjectAndWait()
+ * only available on Windows 2000/XP).
+ ***********************************************************************/
+hb_cond_t * hb_cond_init()
+{
+    hb_cond_t * c = calloc( sizeof( hb_cond_t ), 1 );
+
+#if defined( SYS_BEOS )
+    c->thread = -1;
+#elif USE_PTHREAD
+    pthread_cond_init( &c->cond, NULL );
+//#elif defined( SYS_CYGWIN )
+//    c->event = CreateEvent( NULL, FALSE, FALSE, NULL );
+#endif
+
+    return c;
+}
+
+void hb_cond_close( hb_cond_t ** _c )
+{
+    hb_cond_t * c = *_c;
+
+#if defined( SYS_BEOS )
+#elif USE_PTHREAD
+    pthread_cond_destroy( &c->cond );
+//#elif defined( SYS_CYGWIN )
+//    CloseHandle( c->event );
+#endif
+    free( c );
+
+    *_c = NULL;
+}
+
+void hb_cond_wait( hb_cond_t * c, hb_lock_t * lock )
+{
+#if defined( SYS_BEOS )
+    c->thread = find_thread( NULL );
+    release_sem( lock->sem );
+    suspend_thread( c->thread );
+    acquire_sem( lock->sem );
+    c->thread = -1;
+#elif USE_PTHREAD
+    pthread_cond_wait( &c->cond, &lock->mutex );
+//#elif defined( SYS_CYGWIN )
+//    SignalObjectAndWait( lock->mutex, c->event, INFINITE, FALSE );
+//    WaitForSingleObject( lock->mutex, INFINITE );
+#endif
+}
+
+void hb_cond_signal( hb_cond_t * c )
+{
+#if defined( SYS_BEOS )
+    while( c->thread != -1 )
+    {
+        thread_info info;
+        get_thread_info( c->thread, &info );
+        if( info.state == B_THREAD_SUSPENDED )
+        {
+            resume_thread( c->thread );
+            break;
+        }
+        /* Looks like we have been called between hb_cond_wait's
+           release_sem() and suspend_thread() lines. Wait until the
+           thread is actually suspended before we resume it */
+        snooze( 5000 );
+    }
+#elif USE_PTHREAD
+    pthread_cond_signal( &c->cond );
+//#elif defined( SYS_CYGWIN )
+//    PulseEvent( c->event );
+#endif
+}
+
+/************************************************************************
+ * Network
+ ***********************************************************************/
+
+struct hb_net_s
+{
+    int socket;
+};
+
+hb_net_t * hb_net_open( char * address, int port )
+{
+    hb_net_t * n = calloc( sizeof( hb_net_t ), 1 );
+
+    struct sockaddr_in   sock;
+    struct hostent     * host;
+
+    /* TODO: find out why this doesn't work on Win32 */
+    if( !( host = gethostbyname( address ) ) )
+    {
+        hb_log( "gethostbyname failed (%s)", address );
+        free( n );
+        return NULL;
+    }
+
+    memset( &sock, 0, sizeof( struct sockaddr_in ) );
+    sock.sin_family = host->h_addrtype;
+    sock.sin_port   = htons( port );
+    memcpy( &sock.sin_addr, host->h_addr, host->h_length );
+
+    if( ( n->socket = socket( host->h_addrtype, SOCK_STREAM, 0 ) ) < 0 )
+    {
+        hb_log( "socket failed" );
+        free( n );
+        return NULL;
+    }
+
+    if( connect( n->socket, (struct sockaddr *) &sock,
+                 sizeof( struct sockaddr_in ) ) < 0 )
+    {
+        hb_log( "connect failed" );
+        free( n );
+        return NULL;
+    }
+
+    return n;
+}
+
+int hb_net_send( hb_net_t * n, char * buffer )
+{
+    return send( n->socket, buffer, strlen( buffer ), 0 );
+}
+
+int hb_net_recv( hb_net_t * n, char * buffer, int size )
+{
+    return recv( n->socket, buffer, size - 1, 0 );
+}
+
+void hb_net_close( hb_net_t ** _n )
+{
+    hb_net_t * n = (hb_net_t *) *_n;
+    close( n->socket );
+    free( n );
+    *_n = NULL;
+}
+
diff --git a/libhb/ports.h b/libhb/ports.h
new file mode 100644 (file)
index 0000000..9c21439
--- /dev/null
@@ -0,0 +1,85 @@
+/* $Id: ports.h,v 1.7 2005/10/15 18:05:03 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#ifndef HB_PORTS_H
+#define HB_PORTS_H
+
+/************************************************************************
+ * Utils
+ ***********************************************************************/
+uint64_t hb_get_date();
+void     hb_snooze( int delay );
+int      hb_get_cpu_count();
+
+#ifdef __LIBHB__
+
+/* Everything from now is only used internally and hidden to the UI */
+
+/************************************************************************
+ * Files utils
+ ***********************************************************************/
+void hb_get_tempory_directory( hb_handle_t * h, char path[512] );
+void hb_get_tempory_filename( hb_handle_t *, char name[1024],
+                              char * fmt, ... );
+void hb_mkdir( char * name );
+
+/************************************************************************
+ * Threads
+ ***********************************************************************/
+typedef struct hb_thread_s hb_thread_t;
+
+#if defined( SYS_BEOS )
+#  define HB_LOW_PRIORITY    5
+#  define HB_NORMAL_PRIORITY 10
+#elif defined( SYS_DARWIN )
+#  define HB_LOW_PRIORITY    0
+#  define HB_NORMAL_PRIORITY 31
+#elif defined( SYS_LINUX ) || defined( SYS_FREEBSD ) || defined ( SYS_SunOS )
+#  define HB_LOW_PRIORITY    0
+#  define HB_NORMAL_PRIORITY 0
+#elif defined( SYS_CYGWIN )
+#  define HB_LOW_PRIORITY    0
+#  define HB_NORMAL_PRIORITY 1
+#endif
+
+hb_thread_t * hb_thread_init( char * name, void (* function)(void *),
+                              void * arg, int priority );
+void          hb_thread_close( hb_thread_t ** );
+int           hb_thread_has_exited( hb_thread_t * );
+
+/************************************************************************
+ * Mutexes
+ ***********************************************************************/
+
+hb_lock_t * hb_lock_init();
+void        hb_lock_close( hb_lock_t ** );
+void        hb_lock( hb_lock_t * );
+void        hb_unlock( hb_lock_t * );
+
+/************************************************************************
+ * Condition variables
+ ***********************************************************************/
+typedef struct hb_cond_s hb_cond_t;
+
+hb_cond_t * hb_cond_init();
+void        hb_cond_wait( hb_cond_t *, hb_lock_t * );
+void        hb_cond_signal( hb_cond_t * );
+void        hb_cond_close( hb_cond_t ** );
+
+/************************************************************************
+ * Network
+ ***********************************************************************/
+typedef struct hb_net_s hb_net_t;
+
+hb_net_t * hb_net_open( char * address, int port );
+int        hb_net_send( hb_net_t *, char * );
+int        hb_net_recv( hb_net_t *, char *, int );
+void       hb_net_close( hb_net_t ** );
+
+#endif /* __LIBHB__ */
+
+#endif
+
diff --git a/libhb/reader.c b/libhb/reader.c
new file mode 100644 (file)
index 0000000..9dfd915
--- /dev/null
@@ -0,0 +1,518 @@
+/* $Id: reader.c,v 1.21 2005/11/25 15:05:25 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+typedef struct
+{
+    double average; // average time between packets
+    int64_t last;   // last timestamp seen on this stream
+    int id;         // stream id
+} stream_timing_t;
+
+typedef struct
+{
+    hb_job_t     * job;
+    hb_title_t   * title;
+    volatile int * die;
+
+    hb_dvd_t     * dvd;
+    hb_stream_t  * stream;
+
+    stream_timing_t *stream_timing;
+    int64_t        scr_offset;
+    hb_psdemux_t   demux;
+    int            scr_changes;
+    uint           sequence;
+    int            saw_video;
+    int            st_slots;            // size (in slots) of stream_timing array
+} hb_reader_t;
+
+/***********************************************************************
+ * Local prototypes
+ **********************************************************************/
+static void        ReaderFunc( void * );
+static hb_fifo_t ** GetFifoForId( hb_job_t * job, int id );
+
+/***********************************************************************
+ * hb_reader_init
+ ***********************************************************************
+ *
+ **********************************************************************/
+hb_thread_t * hb_reader_init( hb_job_t * job )
+{
+    hb_reader_t * r;
+
+    r = calloc( sizeof( hb_reader_t ), 1 );
+
+    r->job   = job;
+    r->title = job->title;
+    r->die   = job->die;
+    r->sequence = 0;
+
+    r->st_slots = 4;
+    r->stream_timing = calloc( sizeof(stream_timing_t), r->st_slots );
+    r->stream_timing[0].id = r->title->video_id;
+    r->stream_timing[0].average = 90000. * (double)job->vrate_base /
+                                           (double)job->vrate;
+    r->stream_timing[0].last = -r->stream_timing[0].average;
+    r->stream_timing[1].id = -1;
+
+    return hb_thread_init( "reader", ReaderFunc, r,
+                           HB_NORMAL_PRIORITY );
+}
+
+static void push_buf( const hb_reader_t *r, hb_fifo_t *fifo, hb_buffer_t *buf )
+{
+    while( !*r->die && !r->job->done && hb_fifo_is_full( fifo ) )
+    {
+        /*
+         * Loop until the incoming fifo is ready to receive
+         * this buffer.
+         */
+        hb_snooze( 50 );
+    }
+    hb_fifo_push( fifo, buf );
+}
+
+// The MPEG STD (Standard Target Decoder) essentially requires that we keep
+// per-stream timing so that when there's a timing discontinuity we can
+// seemlessly join packets on either side of the discontinuity. This join
+// requires that we know the timestamp of the previous packet and the
+// average inter-packet time (since we position the new packet at the end
+// of the previous packet). The next four routines keep track of this
+// per-stream timing.
+
+// find the per-stream timing state for 'buf'
+
+static stream_timing_t *find_st( hb_reader_t *r, const hb_buffer_t *buf )
+{
+    stream_timing_t *st = r->stream_timing;
+    for ( ; st->id != -1; ++st )
+    {
+        if ( st->id == buf->id )
+            return st;
+    }
+    return NULL;
+}
+
+// find or create the per-stream timing state for 'buf'
+
+static stream_timing_t *id_to_st( hb_reader_t *r, const hb_buffer_t *buf )
+{
+    stream_timing_t *st = r->stream_timing;
+    while ( st->id != buf->id && st->id != -1)
+    {
+        ++st;
+    }
+    // if we haven't seen this stream add it.
+    if ( st->id == -1 )
+    {
+        // we keep the steam timing info in an array with some power-of-two
+        // number of slots. If we don't have two slots left (one for our new
+        // entry plus one for the "-1" eol) we need to expand the array.
+        int slot = st - r->stream_timing;
+        if ( slot + 1 >= r->st_slots )
+        {
+            r->st_slots *= 2;
+            r->stream_timing = realloc( r->stream_timing, r->st_slots *
+                                        sizeof(*r->stream_timing) );
+            st = r->stream_timing + slot;
+        }
+        st->id = buf->id;
+        st->average = 30.*90.;
+        st->last = buf->renderOffset - st->average;
+
+        st[1].id = -1;
+    }
+    return st;
+}
+
+// update the average inter-packet time of the stream associated with 'buf'
+// using a recursive low-pass filter with a 16 packet time constant.
+
+static void update_ipt( hb_reader_t *r, const hb_buffer_t *buf )
+{
+    stream_timing_t *st = id_to_st( r, buf );
+    double dt = buf->renderOffset - st->last;
+    st->average += ( dt - st->average ) * (1./32.);
+    st->last = buf->renderOffset;
+}
+
+// use the per-stream state associated with 'buf' to compute a new scr_offset
+// such that 'buf' will follow the previous packet of this stream separated
+// by the average packet time of the stream.
+
+static void new_scr_offset( hb_reader_t *r, hb_buffer_t *buf )
+{
+    stream_timing_t *st = id_to_st( r, buf );
+    int64_t nxt = st->last + st->average;
+    r->scr_offset = buf->renderOffset - nxt;
+    buf->renderOffset = nxt;
+    r->scr_changes = r->demux.scr_changes;
+    st->last = buf->renderOffset;
+}
+
+/***********************************************************************
+ * ReaderFunc
+ ***********************************************************************
+ *
+ **********************************************************************/
+static void ReaderFunc( void * _r )
+{
+    hb_reader_t  * r = _r;
+    hb_fifo_t   ** fifos;
+    hb_buffer_t  * buf;
+    hb_list_t    * list;
+    int            n;
+    int            chapter = -1;
+    int            chapter_end = r->job->chapter_end;
+
+    if( !( r->dvd = hb_dvd_init( r->title->dvd ) ) )
+    {
+        if ( !( r->stream = hb_stream_open( r->title->dvd, r->title ) ) )
+        {
+          return;
+        }
+    }
+
+    if (r->dvd)
+    {
+        /*
+         * XXX this code is a temporary hack that should go away if/when
+         *     chapter merging goes away in libhb/dvd.c
+         * map the start and end chapter numbers to on-media chapter
+         * numbers since chapter merging could cause the handbrake numbers
+         * to diverge from the media numbers and, if our chapter_end is after
+         * a media chapter that got merged, we'll stop ripping too early.
+         */
+        int start = r->job->chapter_start;
+        hb_chapter_t *chap = hb_list_item( r->title->list_chapter, chapter_end - 1 );
+
+        chapter_end = chap->index;
+        if (start > 1)
+        {
+           chap = hb_list_item( r->title->list_chapter, start - 1 );
+           start = chap->index;
+        }
+        /* end chapter mapping XXX */
+
+        if( !hb_dvd_start( r->dvd, r->title->index, start ) )
+        {
+            hb_dvd_close( &r->dvd );
+            return;
+        }
+
+        if ( r->job->start_at_preview )
+        {
+            // XXX code from DecodePreviews - should go into its own routine
+            hb_dvd_seek( r->dvd, (float)r->job->start_at_preview / 11. );
+        }
+    }
+    else if ( r->stream && r->job->start_at_preview )
+    {
+        // XXX code from DecodePreviews - should go into its own routine
+        hb_stream_seek( r->stream, (float)( r->job->start_at_preview - 1 ) / 11. );
+    }
+
+    list  = hb_list_init();
+    hb_buffer_t *ps = hb_buffer_init( HB_DVD_READ_BUFFER_SIZE );
+    r->demux.flaky_clock = r->title->flaky_clock;
+
+    while( !*r->die && !r->job->done )
+    {
+        if (r->dvd)
+          chapter = hb_dvd_chapter( r->dvd );
+        else if (r->stream)
+          chapter = 1;
+
+        if( chapter < 0 )
+        {
+            hb_log( "reader: end of the title reached" );
+            break;
+        }
+        if( chapter > chapter_end )
+        {
+            hb_log( "reader: end of chapter %d (media %d) reached at media chapter %d",
+                    r->job->chapter_end, chapter_end, chapter );
+            break;
+        }
+
+        if (r->dvd)
+        {
+          if( !hb_dvd_read( r->dvd, ps ) )
+          {
+              break;
+          }
+        }
+        else if (r->stream)
+        {
+          if ( !hb_stream_read( r->stream, ps ) )
+          {
+            break;
+          }
+        }
+
+        if( r->job->indepth_scan )
+        {
+            /*
+             * Need to update the progress during a subtitle scan
+             */
+            hb_state_t state;
+
+#define p state.param.working
+
+            state.state = HB_STATE_WORKING;
+            p.progress = (double)chapter / (double)r->job->chapter_end;
+            if( p.progress > 1.0 )
+            {
+                p.progress = 1.0;
+            }
+            p.rate_avg = 0.0;
+            p.hours    = -1;
+            p.minutes  = -1;
+            p.seconds  = -1;
+            hb_set_state( r->job->h, &state );
+        }
+
+        if ( r->title->demuxer == HB_NULL_DEMUXER )
+        {
+            hb_demux_null( ps, list, &r->demux );
+        }
+        else
+        {
+            hb_demux_ps( ps, list, &r->demux );
+        }
+
+        while( ( buf = hb_list_item( list, 0 ) ) )
+        {
+            hb_list_rem( list, buf );
+            fifos = GetFifoForId( r->job, buf->id );
+
+            if ( ! r->saw_video )
+            {
+                /* The first video packet defines 'time zero' so discard
+                   data until we get a video packet with a PTS & DTS */
+                if ( buf->id == r->title->video_id && buf->start != -1 &&
+                     buf->renderOffset != -1 )
+                {
+                    // force a new scr offset computation
+                    r->scr_changes = r->demux.scr_changes - 1;
+                    r->saw_video = 1;
+                    hb_log( "reader: first SCR %lld", r->demux.last_scr );
+                }
+                else
+                {
+                    fifos = NULL;
+                }
+            }
+            if( fifos )
+            {
+                if ( buf->renderOffset != -1 )
+                {
+                    if ( r->scr_changes == r->demux.scr_changes )
+                    {
+                        // This packet is referenced to the same SCR as the last.
+                        // Adjust timestamp to remove the System Clock Reference
+                        // offset then update the average inter-packet time
+                        // for this stream.
+                        buf->renderOffset -= r->scr_offset;
+                        update_ipt( r, buf );
+                    }
+                    else
+                    {
+                        // This is the first audio or video packet after an SCR
+                        // change. Compute a new scr offset that would make this
+                        // packet follow the last of this stream with the correct
+                        // average spacing.
+                        stream_timing_t *st = find_st( r, buf );
+
+                        if ( st )
+                        {
+                            // if this isn't the video stream or we don't
+                            // have audio yet then generate a new scr
+                            if ( st != r->stream_timing ||
+                                 r->stream_timing[1].id == -1 )
+                            {
+                                new_scr_offset( r, buf );
+                            }
+                            else
+                            {
+                                // defer the scr change until we get some
+                                // audio since audio has a timestamp per
+                                // frame but video doesn't. Clear the timestamps
+                                // so the decoder will regenerate them from
+                                // the frame durations.
+                                buf->start = -1;
+                                buf->renderOffset = -1;
+                            }
+                        }
+                        else
+                        {
+                            // we got a new scr at the same time as the first
+                            // packet of a stream we've never seen before. We
+                            // have no idea what the timing should be so toss
+                            // this buffer & wait for a stream we've already seen.
+                            hb_buffer_close( &buf );
+                            continue;
+                        }
+                    }
+                }
+                if ( buf->start != -1 )
+                {
+                    buf->start -= r->scr_offset;
+                    if ( r->job->pts_to_stop && buf->start > r->job->pts_to_stop )
+                    {
+                        // we're doing a subset of the input and we've hit the
+                        // stopping point.
+                        hb_buffer_close( &buf );
+                        goto done;
+                    }
+                }
+
+                buf->sequence = r->sequence++;
+                /* if there are mutiple output fifos, send a copy of the
+                 * buffer down all but the first (we have to not ship the
+                 * original buffer or we'll race with the thread that's
+                 * consuming the buffer & inject garbage into the data stream). */
+                for( n = 1; fifos[n] != NULL; n++)
+                {
+                    hb_buffer_t *buf_copy = hb_buffer_init( buf->size );
+                    hb_buffer_copy_settings( buf_copy, buf );
+                    memcpy( buf_copy->data, buf->data, buf->size );
+                    push_buf( r, fifos[n], buf_copy );
+                }
+                push_buf( r, fifos[0], buf );
+            }
+            else
+            {
+                hb_buffer_close( &buf );
+            }
+        }
+    }
+
+  done:
+    // send empty buffers downstream to video & audio decoders to signal we're done.
+    push_buf( r, r->job->fifo_mpeg2, hb_buffer_init(0) );
+
+    hb_audio_t *audio;
+    for( n = 0; ( audio = hb_list_item( r->job->title->list_audio, n ) ); ++n )
+    {
+        if ( audio->priv.fifo_in )
+            push_buf( r, audio->priv.fifo_in, hb_buffer_init(0) );
+    }
+
+    hb_list_empty( &list );
+    hb_buffer_close( &ps );
+    if (r->dvd)
+    {
+        hb_dvd_stop( r->dvd );
+        hb_dvd_close( &r->dvd );
+    }
+    else if (r->stream)
+    {
+        hb_stream_close(&r->stream);
+    }
+
+    if ( r->stream_timing )
+    {
+        free( r->stream_timing );
+    }
+
+    hb_log( "reader: done. %d scr changes", r->demux.scr_changes );
+    if ( r->demux.dts_drops )
+    {
+        hb_log( "reader: %d drops because DTS out of range", r->demux.dts_drops );
+    }
+
+    free( r );
+    _r = NULL;
+}
+
+/***********************************************************************
+ * GetFifoForId
+ ***********************************************************************
+ *
+ **********************************************************************/
+static hb_fifo_t ** GetFifoForId( hb_job_t * job, int id )
+{
+    hb_title_t    * title = job->title;
+    hb_audio_t    * audio;
+    hb_subtitle_t * subtitle;
+    int             i, n;
+    static hb_fifo_t * fifos[8];
+
+    memset(fifos, 0, sizeof(fifos));
+
+    if( id == title->video_id )
+    {
+        if( job->indepth_scan )
+        {
+            /*
+             * Ditch the video here during the indepth scan until
+             * we can improve the MPEG2 decode performance.
+             */
+            return NULL;
+        }
+        else
+        {
+            fifos[0] = job->fifo_mpeg2;
+            return fifos;
+        }
+    }
+
+    if( job->indepth_scan ) {
+        /*
+         * Count the occurances of the subtitles, don't actually
+         * return any to encode unless we are looking fro forced
+         * subtitles in which case we need to look in the sub picture
+         * to see if it has the forced flag enabled.
+         */
+        for (i=0; i < hb_list_count(title->list_subtitle); i++) {
+            subtitle =  hb_list_item( title->list_subtitle, i);
+            if (id == subtitle->id) {
+                /*
+                 * A hit, count it.
+                 */
+                subtitle->hits++;
+                if( job->subtitle_force )
+                {
+
+                    fifos[0] = subtitle->fifo_in;
+                    return fifos;
+                }
+                break;
+            }
+        }
+    } else {
+        if( ( subtitle = hb_list_item( title->list_subtitle, 0 ) ) &&
+            id == subtitle->id )
+        {
+            fifos[0] = subtitle->fifo_in;
+            return fifos;
+        }
+    }
+    if( !job->indepth_scan )
+    {
+        n = 0;
+        for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+        {
+            audio = hb_list_item( title->list_audio, i );
+            if( id == audio->id )
+            {
+                fifos[n++] = audio->priv.fifo_in;
+            }
+        }
+
+        if( n != 0 )
+        {
+            return fifos;
+        }
+    }
+
+    return NULL;
+}
+
diff --git a/libhb/render.c b/libhb/render.c
new file mode 100644 (file)
index 0000000..5ca6a4c
--- /dev/null
@@ -0,0 +1,596 @@
+/* $Id: render.c,v 1.17 2005/04/14 17:37:54 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+#include "libavcodec/avcodec.h"
+#include "libswscale/swscale.h"
+
+struct hb_work_private_s
+{
+    hb_job_t * job;
+
+    struct SwsContext  * context;
+    AVPicture            pic_tmp_in;
+    AVPicture            pic_tmp_crop;
+    AVPicture            pic_tmp_out;
+    hb_buffer_t        * buf_scale;
+    hb_fifo_t          * subtitle_queue;
+    hb_fifo_t          * delay_queue;
+    int                  dropped_frames;
+    int                  extended_frames;
+    uint64_t             last_start[4];
+    uint64_t             last_stop[4];
+    uint64_t             lost_time[4];
+    uint64_t             total_lost_time;
+    uint64_t             total_gained_time;
+    int64_t              chapter_time;
+    int                  chapter_val;
+};
+
+int  renderInit( hb_work_object_t *, hb_job_t * );
+int  renderWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
+void renderClose( hb_work_object_t * );
+
+hb_work_object_t hb_render =
+{
+    WORK_RENDER,
+    "Renderer",
+    renderInit,
+    renderWork,
+    renderClose
+};
+
+/*
+ * getU() & getV()
+ *
+ * Utility function that finds where the U is in the YUV sub-picture
+ *
+ * The Y data is at the top, followed by U and V, but the U and V
+ * are half the width of the Y, i.e. each chroma element covers 2x2
+ * of the Y's.
+ */
+static uint8_t *getU(uint8_t *data, int width, int height, int x, int y)
+{
+    return(&data[(y>>1) * ((width+1)>>1) + (x>>1) + width*height]);
+}
+
+static uint8_t *getV(uint8_t *data, int width, int height, int x, int y)
+{
+    int w2 = (width+1) >> 1, h2 = (height+1) >> 1;
+    return(&data[(y>>1) * w2 + (x>>1) + width*height + w2*h2]);
+}
+
+static void ApplySub( hb_job_t * job, hb_buffer_t * buf,
+                      hb_buffer_t ** _sub )
+{
+    hb_buffer_t * sub = *_sub;
+    hb_title_t * title = job->title;
+    int i, j, offset_top, offset_left, margin_top, margin_percent;
+    uint8_t * lum, * alpha, * out, * sub_chromaU, * sub_chromaV;
+
+    /*
+     * Percent of height of picture that form a margin that subtitles
+     * should not be displayed within.
+     */
+    margin_percent = 2;
+
+    if( !sub )
+    {
+        return;
+    }
+
+    /*
+     * If necessary, move the subtitle so it is not in a cropped zone.
+     * When it won't fit, we center it so we lose as much on both ends.
+     * Otherwise we try to leave a 20px or 2% margin around it.
+     */
+    margin_top = ( ( title->height - job->crop[0] - job->crop[1] ) *
+                   margin_percent ) / 100;
+
+    if( margin_top > 20 )
+    {
+        /*
+         * A maximum margin of 20px regardless of height of the picture.
+         */
+        margin_top = 20;
+    }
+
+    if( sub->height > title->height - job->crop[0] - job->crop[1] -
+        ( margin_top * 2 ) )
+    {
+        /*
+         * The subtitle won't fit in the cropped zone, so center
+         * it vertically so we fit in as much as we can.
+         */
+        offset_top = job->crop[0] + ( title->height - job->crop[0] -
+                                      job->crop[1] - sub->height ) / 2;
+    }
+    else if( sub->y < job->crop[0] + margin_top )
+    {
+        /*
+         * The subtitle fits in the cropped zone, but is currently positioned
+         * within our top margin, so move it outside of our margin.
+         */
+        offset_top = job->crop[0] + margin_top;
+    }
+    else if( sub->y > title->height - job->crop[1] - margin_top - sub->height )
+    {
+        /*
+         * The subtitle fits in the cropped zone, and is not within the top
+         * margin but is within the bottom margin, so move it to be above
+         * the margin.
+         */
+        offset_top = title->height - job->crop[1] - margin_top - sub->height;
+    }
+    else
+    {
+        /*
+         * The subtitle is fine where it is.
+         */
+        offset_top = sub->y;
+    }
+
+    if( sub->width > title->width - job->crop[2] - job->crop[3] - 40 )
+        offset_left = job->crop[2] + ( title->width - job->crop[2] -
+                job->crop[3] - sub->width ) / 2;
+    else if( sub->x < job->crop[2] + 20 )
+        offset_left = job->crop[2] + 20;
+    else if( sub->x > title->width - job->crop[3] - 20 - sub->width )
+        offset_left = title->width - job->crop[3] - 20 - sub->width;
+    else
+        offset_left = sub->x;
+
+    lum   = sub->data;
+    alpha = lum + sub->width * sub->height;
+    sub_chromaU = alpha + sub->width * sub->height;
+    sub_chromaV = sub_chromaU + sub->width * sub->height;
+
+    out   = buf->data + offset_top * title->width + offset_left;
+
+    for( i = 0; i < sub->height; i++ )
+    {
+        if( offset_top + i >= 0 && offset_top + i < title->height )
+        {
+            for( j = 0; j < sub->width; j++ )
+            {
+                if( offset_left + j >= 0 && offset_left + j < title->width )
+                {
+                    uint8_t *chromaU, *chromaV;
+
+                    /*
+                     * Merge the luminance and alpha with the picture
+                     */
+                    out[j] = ( (uint16_t) out[j] * ( 16 - (uint16_t) alpha[j] ) +
+                               (uint16_t) lum[j] * (uint16_t) alpha[j] ) >> 4;
+                    /*
+                     * Set the chroma (colour) based on whether there is
+                     * any alpha at all. Don't try to blend with the picture.
+                     */
+                    chromaU = getU(buf->data, title->width, title->height,
+                                   offset_left+j, offset_top+i);
+
+                    chromaV = getV(buf->data, title->width, title->height,
+                                   offset_left+j, offset_top+i);
+
+                    if( alpha[j] > 0 )
+                    {
+                        /*
+                         * Add the chroma from the sub-picture, as this is
+                         * not a transparent element.
+                         */
+                        *chromaU = sub_chromaU[j];
+                        *chromaV = sub_chromaV[j];
+                    }
+                }
+            }
+        }
+
+        lum   += sub->width;
+        alpha += sub->width;
+        sub_chromaU += sub->width;
+        sub_chromaV += sub->width;
+        out   += title->width;
+    }
+
+    hb_buffer_close( _sub );
+}
+
+int renderWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+                hb_buffer_t ** buf_out )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_job_t   * job   = pv->job;
+    hb_title_t * title = job->title;
+    hb_buffer_t * in = *buf_in, * buf_tmp_in = *buf_in;
+    hb_buffer_t * ivtc_buffer = NULL;
+
+    if( in->size <= 0 )
+    {
+        /* If the input buffer is end of stream, send out an empty one
+         * to the next stage as well. Note that this will result in us
+         * losing the current contents of the delay queue.
+         */
+        *buf_out = in;
+        *buf_in = NULL;
+        return HB_WORK_DONE;
+    }
+
+    /*
+     * During the indepth_scan ditch the buffers here before applying filters or attempting to
+     * use the subtitles.
+     */
+    if( job->indepth_scan )
+    {
+        *buf_out = NULL;
+        return HB_WORK_OK;
+    }
+
+    /* Push subtitles onto queue just in case we need to delay a frame */
+    if( in->sub )
+    {
+        hb_fifo_push( pv->subtitle_queue, in->sub );
+    }
+    else
+    {
+        hb_fifo_push( pv->subtitle_queue,  hb_buffer_init(0) );
+    }
+
+    /* If there's a chapter mark remember it in case we delay or drop its frame */
+    if( in->new_chap && job->vfr )
+    {
+        pv->chapter_time = in->start;
+        pv->chapter_val = in->new_chap;
+        in->new_chap = 0;
+    }
+
+    /* Setup render buffer */
+    hb_buffer_t * buf_render = hb_video_buffer_init( job->width, job->height );
+
+    /* Apply filters */
+    if( job->filters )
+    {
+        int filter_count = hb_list_count( job->filters );
+        int i;
+
+        for( i = 0; i < filter_count; i++ )
+        {
+            hb_filter_object_t * filter = hb_list_item( job->filters, i );
+
+            if( !filter )
+            {
+                continue;
+            }
+
+            hb_buffer_t * buf_tmp_out = NULL;
+
+            int result = filter->work( buf_tmp_in,
+                                       &buf_tmp_out,
+                                       PIX_FMT_YUV420P,
+                                       title->width,
+                                       title->height,
+                                       filter->private_data );
+
+            /*
+             * FILTER_OK:      set temp buffer to filter buffer, continue
+             * FILTER_DELAY:   set temp buffer to NULL, abort
+             * FILTER_DROP:    set temp buffer to NULL, pop subtitle, abort
+             * FILTER_FAILED:  leave temp buffer alone, continue
+             */
+            if( result == FILTER_OK )
+            {
+                buf_tmp_in = buf_tmp_out;
+            }
+            else if( result == FILTER_DELAY )
+            {
+                buf_tmp_in = NULL;
+                break;
+            }
+            else if( result == FILTER_DROP )
+            {
+                if( job->vfr )
+                {
+                    /* We need to compensate for the time lost by dropping this frame.
+                       Spread its duration out in quarters, because usually dropped frames
+                       maintain a 1-out-of-5 pattern and this spreads it out amongst the remaining ones.
+                       Store these in the lost_time array, which has 4 slots in it.
+                       Because not every frame duration divides evenly by 4, and we can't lose the
+                       remainder, we have to go through an awkward process to preserve it in the 4th array index. */
+                    uint64_t temp_duration = buf_tmp_out->stop - buf_tmp_out->start;
+                    pv->lost_time[0] += (temp_duration / 4);
+                    pv->lost_time[1] += (temp_duration / 4);
+                    pv->lost_time[2] += (temp_duration / 4);
+                    pv->lost_time[3] += ( temp_duration - (temp_duration / 4) - (temp_duration / 4) - (temp_duration / 4) );
+
+                    pv->total_lost_time += temp_duration;
+                    pv->dropped_frames++;
+
+                    /* Pop the frame's subtitle and dispose of it. */
+                    hb_buffer_t * subtitles = hb_fifo_get( pv->subtitle_queue );
+                    hb_buffer_close( &subtitles );
+                    buf_tmp_in = NULL;
+                    break;
+                }
+                else
+                {
+                    buf_tmp_in = buf_tmp_out;
+                }
+            }
+        }
+    }
+
+    if( buf_tmp_in )
+    {
+        /* Cache frame start and stop times, so we can renumber
+           time stamps if dropping frames for VFR.              */
+        int i;
+        for( i = 3; i >= 1; i-- )
+        {
+            pv->last_start[i] = pv->last_start[i-1];
+            pv->last_stop[i] = pv->last_stop[i-1];
+        }
+
+        /* In order to make sure we have continuous time stamps, store
+           the current frame's duration as starting when the last one stopped. */
+        pv->last_start[0] = pv->last_stop[1];
+        pv->last_stop[0] = pv->last_start[0] + (in->stop - in->start);
+    }
+
+    /* Apply subtitles */
+    if( buf_tmp_in )
+    {
+        hb_buffer_t * subtitles = hb_fifo_get( pv->subtitle_queue );
+        if( subtitles )
+        {
+            ApplySub( job, buf_tmp_in, &subtitles );
+        }
+    }
+
+    /* Apply crop/scale if specified */
+    if( buf_tmp_in && pv->context )
+    {
+        avpicture_fill( &pv->pic_tmp_in, buf_tmp_in->data,
+                        PIX_FMT_YUV420P,
+                        title->width, title->height );
+
+        avpicture_fill( &pv->pic_tmp_out, buf_render->data,
+                        PIX_FMT_YUV420P,
+                        job->width, job->height );
+
+        // Crop; this alters the pointer to the data to point to the correct place for cropped frame
+        av_picture_crop( &pv->pic_tmp_crop, &pv->pic_tmp_in, PIX_FMT_YUV420P,
+                         job->crop[0], job->crop[2] );
+
+        // Scale pic_crop into pic_render according to the context set up in renderInit
+        sws_scale(pv->context,
+                  pv->pic_tmp_crop.data, pv->pic_tmp_crop.linesize,
+                  0, title->height - (job->crop[0] + job->crop[1]),
+                  pv->pic_tmp_out.data,  pv->pic_tmp_out.linesize);
+
+        hb_buffer_copy_settings( buf_render, buf_tmp_in );
+
+        buf_tmp_in = buf_render;
+    }
+
+    /* Set output to render buffer */
+    (*buf_out) = buf_render;
+
+    if( buf_tmp_in == NULL )
+    {
+        /* Teardown and cleanup buffers if we are emitting NULL */
+        if( buf_in && *buf_in )
+        {
+            hb_buffer_close( buf_in );
+            *buf_in = NULL;
+        }
+        if( buf_out && *buf_out )
+        {
+            hb_buffer_close( buf_out );
+            *buf_out = NULL;
+        }
+    }
+    else if( buf_tmp_in != buf_render )
+    {
+        /* Copy temporary results and settings into render buffer */
+        memcpy( buf_render->data, buf_tmp_in->data, buf_render->size );
+        hb_buffer_copy_settings( buf_render, buf_tmp_in );
+    }
+
+    if (*buf_out && job->vfr)
+    {
+        hb_fifo_push( pv->delay_queue, *buf_out );
+        *buf_out = NULL;
+    }
+
+    /*
+     * Keep the last three frames in our queue, this ensures that we have the last
+     * two always in there should we need to rewrite the durations on them.
+     */
+
+    if( job->vfr )
+    {
+        if( hb_fifo_size( pv->delay_queue ) >= 4 )
+        {
+            *buf_out = hb_fifo_get( pv->delay_queue );
+        }
+    }
+
+    if( *buf_out && job->vfr)
+    {
+        /* The current frame exists. That means it hasn't been dropped by a filter.
+           Make it accessible as ivtc_buffer so we can edit its duration if needed. */
+        ivtc_buffer = *buf_out;
+
+        if( pv->lost_time[3] > 0 )
+        {
+            /*
+             * A frame's been dropped earlier by VFR detelecine.
+             * Gotta make up the lost time. This will also
+             * slow down the video.
+             * The dropped frame's has to be accounted for, so
+             * divvy it up amongst the 4 frames left behind.
+             * This is what the delay_queue is for;
+             * telecined sequences start 2 frames before
+             * the dropped frame, so to slow down the right
+             * ones you need a 2 frame delay between
+             * reading input and writing output.
+             */
+
+            /* We want to extend the outputted frame's duration by the value
+              stored in the 4th slot of the lost_time array. Because we need
+              to adjust all the values in the array so they're contiguous,
+              extend the duration inside the array first, before applying
+              it to the current frame buffer. */
+            pv->last_stop[3] += pv->lost_time[3];
+
+            /* Log how much time has been added back in to the video. */
+            pv->total_gained_time += pv->lost_time[3];
+
+            /* We've pulled the 4th value from the lost_time array
+               and added it to the last_stop array's 4th slot. Now, rotate the
+                lost_time array so the 4th slot now holds the 3rd's value, and
+               so on down the line, and set the 0 index to a value of 0. */
+            int i;
+            for( i=2; i >=  0; i--)
+            {
+                pv->lost_time[i+1] = pv->lost_time[i];
+            }
+            pv->lost_time[0] = 0;
+
+            /* Log how many frames have had their durations extended. */
+            pv->extended_frames++;
+        }
+
+        /* We can't use the given time stamps. Previous frames
+           might already have been extended, throwing off the
+           raw values fed to render.c. Instead, their
+           stop and start times are stored in arrays.
+           The 4th cached frame will be the to use.
+           If it needed its duration extended to make up
+           lost time, it will have happened above. */
+        ivtc_buffer->start = pv->last_start[3];
+        ivtc_buffer->stop = pv->last_stop[3];
+
+        /* Set the 3rd cached frame to start when this one stops,
+           and so on down the line. If any of them need to be
+           extended as well to make up lost time, it'll be handled
+           on the next loop through the renderer.  */
+        int i;
+        for (i = 2; i >= 0; i--)
+        {
+            int temp_duration = pv->last_stop[i] - pv->last_start[i];
+            pv->last_start[i] = pv->last_stop[i+1];
+            pv->last_stop[i] = pv->last_start[i] + temp_duration;
+        }
+
+        /* If we have a pending chapter mark and this frame is at
+           or after the time of the mark, mark this frame & clear
+           our pending mark. */
+        if( pv->chapter_time && pv->chapter_time <= ivtc_buffer->start )
+        {
+            ivtc_buffer->new_chap = pv->chapter_val;
+            pv->chapter_time = 0;
+        }
+
+    }
+
+    return HB_WORK_OK;
+}
+
+void renderClose( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+
+    hb_log("render: lost time: %lld (%i frames)", pv->total_lost_time, pv->dropped_frames);
+    hb_log("render: gained time: %lld (%i frames) (%lld not accounted for)", pv->total_gained_time, pv->extended_frames, pv->total_lost_time - pv->total_gained_time);
+    if (pv->dropped_frames)
+        hb_log("render: average dropped frame duration: %lld", (pv->total_lost_time / pv->dropped_frames) );
+
+    /* Cleanup subtitle queue */
+    if( pv->subtitle_queue )
+    {
+        hb_fifo_close( &pv->subtitle_queue );
+    }
+
+    if( pv->delay_queue )
+    {
+        hb_fifo_close( &pv->delay_queue );
+    }
+
+    /* Cleanup render work structure */
+    free( pv );
+    w->private_data = NULL;
+}
+
+int renderInit( hb_work_object_t * w, hb_job_t * job )
+{
+    /* Allocate new private work object */
+    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
+    pv->job = job;
+    w->private_data = pv;
+    uint32_t    swsflags;
+
+    swsflags = SWS_LANCZOS;
+#ifndef __x86_64__
+    swsflags |= SWS_ACCURATE_RND;
+#endif  /* __x86_64__ */
+
+    /* Get title and title size */
+    hb_title_t * title = job->title;
+
+    /* If crop or scale is specified, setup rescale context */
+    if( job->crop[0] || job->crop[1] || job->crop[2] || job->crop[3] ||
+        job->width != title->width || job->height != title->height )
+    {
+        pv->context = sws_getContext(title->width  - (job->crop[2] + job->crop[3]),
+                                     title->height - (job->crop[0] + job->crop[1]),
+                                     PIX_FMT_YUV420P,
+                                     job->width, job->height, PIX_FMT_YUV420P,
+                                     swsflags, NULL, NULL, NULL);
+    }
+
+    /* Setup FIFO queue for subtitle cache */
+    pv->subtitle_queue = hb_fifo_init( 8 );
+    pv->delay_queue = hb_fifo_init( 8 );
+
+    /* VFR IVTC needs a bunch of time-keeping variables to track
+      how many frames are dropped, how many are extended, what the
+      last 4 start and stop times were (so they can be modified),
+      how much time has been lost and gained overall, how much time
+      the latest 4 frames should be extended by, and where chapter
+      markers are (so they can be saved if their frames are dropped.) */
+    pv->dropped_frames = 0;
+    pv->extended_frames = 0;
+    pv->last_start[0] = 0;
+    pv->last_stop[0] = 0;
+    pv->total_lost_time = 0;
+    pv->total_gained_time = 0;
+    pv->lost_time[0] = 0; pv->lost_time[1] = 0; pv->lost_time[2] = 0; pv->lost_time[3] = 0;
+    pv->chapter_time = 0;
+    pv->chapter_val  = 0;
+
+    /* Setup filters */
+    /* TODO: Move to work.c? */
+    if( job->filters )
+    {
+        int filter_count = hb_list_count( job->filters );
+        int i;
+
+        for( i = 0; i < filter_count; i++ )
+        {
+            hb_filter_object_t * filter = hb_list_item( job->filters, i );
+
+            if( !filter ) continue;
+
+            filter->private_data = filter->init( PIX_FMT_YUV420P,
+                                                 title->width,
+                                                 title->height,
+                                                 filter->settings );
+        }
+    }
+
+    return 0;
+}
diff --git a/libhb/scan.c b/libhb/scan.c
new file mode 100644 (file)
index 0000000..388caa2
--- /dev/null
@@ -0,0 +1,875 @@
+/* $Id: scan.c,v 1.52 2005/11/25 15:05:25 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+#include "a52dec/a52.h"
+#include "dca.h"
+
+typedef struct
+{
+    hb_handle_t * h;
+
+    char        * path;
+    int           title_index;
+    hb_list_t   * list_title;
+
+    hb_dvd_t    * dvd;
+       hb_stream_t * stream;
+
+} hb_scan_t;
+
+static void ScanFunc( void * );
+static int  DecodePreviews( hb_scan_t *, hb_title_t * title );
+static void LookForAudio( hb_title_t * title, hb_buffer_t * b );
+static int  AllAudioOK( hb_title_t * title );
+
+static const char *aspect_to_string( double aspect )
+{
+    switch ( (int)(aspect * 9.) )
+    {
+        case 9 * 4 / 3:    return "4:3";
+        case 9 * 16 / 9:   return "16:9";
+    }
+    static char arstr[32];
+    sprintf( arstr, aspect >= 1.? "%.2f:1" : "1:%.2f", aspect );
+    return arstr;
+}
+
+hb_thread_t * hb_scan_init( hb_handle_t * handle, const char * path,
+                            int title_index, hb_list_t * list_title )
+{
+    hb_scan_t * data = calloc( sizeof( hb_scan_t ), 1 );
+
+    data->h            = handle;
+    data->path         = strdup( path );
+    data->title_index  = title_index;
+    data->list_title   = list_title;
+
+    return hb_thread_init( "scan", ScanFunc, data, HB_NORMAL_PRIORITY );
+}
+
+static void ScanFunc( void * _data )
+{
+    hb_scan_t  * data = (hb_scan_t *) _data;
+    hb_title_t * title;
+    int          i;
+
+       data->dvd = NULL;
+       data->stream = NULL;
+
+    /* Try to open the path as a DVD. If it fails, try as a file */
+    hb_log( "scan: trying to open with libdvdread" );
+    if( ( data->dvd = hb_dvd_init( data->path ) ) )
+    {
+        hb_log( "scan: DVD has %d title(s)",
+                hb_dvd_title_count( data->dvd ) );
+        if( data->title_index )
+        {
+            /* Scan this title only */
+            hb_list_add( data->list_title, hb_dvd_title_scan( data->dvd,
+                            data->title_index ) );
+        }
+        else
+        {
+            /* Scan all titles */
+            for( i = 0; i < hb_dvd_title_count( data->dvd ); i++ )
+            {
+                hb_list_add( data->list_title,
+                             hb_dvd_title_scan( data->dvd, i + 1 ) );
+            }
+        }
+    }
+    else if ( (data->stream = hb_stream_open( data->path, 0 ) ) != NULL )
+    {
+        hb_list_add( data->list_title, hb_stream_title_scan( data->stream ) );
+    }
+    else
+    {
+        hb_log( "scan: unrecognized file type" );
+        return;
+    }
+
+    for( i = 0; i < hb_list_count( data->list_title ); )
+    {
+        int j;
+        hb_state_t state;
+        hb_audio_t * audio;
+        hb_title_t * title_tmp = NULL;
+
+        title = hb_list_item( data->list_title, i );
+
+        /* I've seen a DVD with strictly identical titles. Check this
+           here and ignore it if redundant */
+        for( j = 0; j < i; j++ )
+        {
+            title_tmp = hb_list_item( data->list_title, j );
+            if( title->vts         == title_tmp->vts &&
+                title->block_start == title_tmp->block_start &&
+                title->block_end   == title_tmp->block_end &&
+                title->block_count == title_tmp->block_count )
+            {
+                break;
+            }
+            else
+            {
+                title_tmp = NULL;
+            }
+        }
+        if( title_tmp )
+        {
+            hb_log( "scan: title %d is duplicate with title %d",
+                    title->index, title_tmp->index );
+            hb_list_rem( data->list_title, title );
+            free( title );      /* This _will_ leak! */
+            continue;
+        }
+
+#define p state.param.scanning
+        /* Update the UI */
+        state.state   = HB_STATE_SCANNING;
+        p.title_cur   = title->index;
+        p.title_count = data->dvd ? hb_dvd_title_count( data->dvd ) : hb_list_count(data->list_title);
+        hb_set_state( data->h, &state );
+#undef p
+
+        /* Decode previews */
+        /* this will also detect more AC3 / DTS information */
+        if( !DecodePreviews( data, title ) )
+        {
+            /* TODO: free things */
+            hb_list_rem( data->list_title, title );
+            continue;
+        }
+
+        /* Make sure we found audio rates and bitrates */
+        for( j = 0; j < hb_list_count( title->list_audio ); )
+        {
+            audio = hb_list_item( title->list_audio, j );
+            if( !audio->config.in.bitrate )
+            {
+                hb_log( "scan: removing audio 0x%x because no bitrate found",
+                        audio->id );
+                hb_list_rem( title->list_audio, audio );
+                free( audio );
+                continue;
+            }
+            j++;
+        }
+
+        /* If we don't have any audio streams left, remove the title */
+        if( !hb_list_count( title->list_audio ) )
+        {
+            hb_log("scan: ignoring title %i, no audio tracks found", title->index );
+            hb_list_rem( data->list_title, title );
+            free( title );
+            continue;
+        }
+
+        i++;
+    }
+
+    /* Init jobs templates */
+    for( i = 0; i < hb_list_count( data->list_title ); i++ )
+    {
+        hb_job_t * job;
+
+        title      = hb_list_item( data->list_title, i );
+        job        = calloc( sizeof( hb_job_t ), 1 );
+        title->job = job;
+
+        job->title = title;
+
+        /* Set defaults settings */
+        job->chapter_start = 1;
+        job->chapter_end   = hb_list_count( title->list_chapter );
+
+        /* Autocrop by default. Gnark gnark */
+        memcpy( job->crop, title->crop, 4 * sizeof( int ) );
+
+        /* Preserve a source's pixel aspect, if it's available. */
+        if( title->pixel_aspect_width && title->pixel_aspect_height )
+        {
+            job->pixel_aspect_width  = title->pixel_aspect_width;
+            job->pixel_aspect_height = title->pixel_aspect_height;
+        }
+
+        if( title->aspect != 0 && title->aspect != 1. &&
+            !job->pixel_aspect_width && !job->pixel_aspect_height)
+        {
+            hb_reduce( &job->pixel_aspect_width, &job->pixel_aspect_height,
+                       (int)(title->aspect * title->height), title->width );
+        }
+
+        job->width = title->width - job->crop[2] - job->crop[3];
+        hb_fix_aspect( job, HB_KEEP_WIDTH );
+        if( job->height > title->height - job->crop[0] - job->crop[1] )
+        {
+            job->height = title->height - job->crop[0] - job->crop[1];
+            hb_fix_aspect( job, HB_KEEP_HEIGHT );
+        }
+
+        hb_log( "scan: title (%d) job->width:%d, job->height:%d",
+                i, job->width, job->height );
+
+        job->keep_ratio = 1;
+
+        job->vcodec     = HB_VCODEC_FFMPEG;
+        job->vquality   = -1.0;
+        job->vbitrate   = 1000;
+        job->pass       = 0;
+        job->vrate      = title->rate;
+        job->vrate_base = title->rate_base;
+
+        job->list_audio = hb_list_init();
+
+        job->subtitle = -1;
+
+        job->mux = HB_MUX_MP4;
+    }
+
+    if( data->dvd )
+    {
+        hb_dvd_close( &data->dvd );
+    }
+       if (data->stream)
+       {
+               hb_stream_close(&data->stream);
+       }
+    free( data->path );
+    free( data );
+    _data = NULL;
+}
+
+// -----------------------------------------------
+// stuff related to cropping
+
+#define DARK 32
+
+static inline int absdiff( int x, int y )
+{
+    return x < y ? y - x : x - y;
+}
+
+static inline int clampBlack( int x ) 
+{
+    // luma 'black' is 16 and anything less should be clamped at 16
+    return x < 16 ? 16 : x;
+}
+
+static int row_all_dark( hb_title_t *title, uint8_t* luma, int row )
+{
+    luma += title->width * row;
+
+    // compute the average luma value of the row
+    int i, avg = 0;
+    for ( i = 0; i < title->width; ++i )
+    {
+        avg += clampBlack( luma[i] );
+    }
+    avg /= title->width;
+    if ( avg >= DARK )
+        return 0;
+
+    // since we're trying to detect smooth borders, only take the row if
+    // all pixels are within +-16 of the average (this range is fairly coarse
+    // but there's a lot of quantization noise for luma values near black
+    // so anything less will fail to crop because of the noise).
+    for ( i = 0; i < title->width; ++i )
+    {
+        if ( absdiff( avg, clampBlack( luma[i] ) ) > 16 )
+            return 0;
+    }
+    return 1;
+}
+
+static int column_all_dark( hb_title_t *title, uint8_t* luma, int top, int bottom,
+                            int col )
+{
+    int stride = title->width;
+    int height = title->height - top - bottom;
+    luma += stride * top + col;
+
+    // compute the average value of the column
+    int i = height, avg = 0, row = 0;
+    for ( ; --i >= 0; row += stride )
+    {
+        avg += clampBlack( luma[row] );
+    }
+    avg /= height;
+    if ( avg >= DARK )
+        return 0;
+
+    // since we're trying to detect smooth borders, only take the column if
+    // all pixels are within +-16 of the average.
+    i = height, row = 0;
+    for ( ; --i >= 0; row += stride )
+    {
+        if ( absdiff( avg, clampBlack( luma[row] ) ) > 16 )
+            return 0;
+    }
+    return 1;
+}
+#undef DARK
+
+typedef struct {
+    int n;
+    int t[10];
+    int b[10];
+    int l[10];
+    int r[10];
+} crop_record_t;
+
+static void record_crop( crop_record_t *crops, int t, int b, int l, int r )
+{
+    crops->t[crops->n] = t;
+    crops->b[crops->n] = b;
+    crops->l[crops->n] = l;
+    crops->r[crops->n] = r;
+    ++crops->n;
+}
+
+static int compare_int( const void *a, const void *b )
+{
+    return *(const int *)a - *(const int *)b;
+}
+
+static void sort_crops( crop_record_t *crops )
+{
+    qsort( crops->t, crops->n, sizeof(crops->t[0]), compare_int );
+    qsort( crops->b, crops->n, sizeof(crops->t[0]), compare_int );
+    qsort( crops->l, crops->n, sizeof(crops->t[0]), compare_int );
+    qsort( crops->r, crops->n, sizeof(crops->t[0]), compare_int );
+}
+
+// -----------------------------------------------
+// stuff related to title width/height/aspect info
+
+typedef struct {
+    int count;              /* number of times we've seen this info entry */
+    hb_work_info_t info;    /* copy of info entry */
+} info_list_t;
+
+static void remember_info( info_list_t *info_list, hb_work_info_t *info )
+{
+    for ( ; info_list->count; ++info_list )
+    {
+        if ( memcmp( &info_list->info, info, sizeof(*info) ) == 0 )
+        {
+            // we found a match - bump its count
+            ++info_list->count;
+            return;
+        }
+    }
+    // no match found - add new entry to list (info_list points to
+    // the first free slot). NB - we assume that info_list was allocated
+    // so that it's big enough even if there are no dups. I.e., 10 slots
+    // allocated if there are 10 previews.
+    info_list->count = 1;
+    info_list->info = *info;
+}
+
+static void most_common_info( info_list_t *info_list, hb_work_info_t *info )
+{
+    int i, biggest = 0;
+    for ( i = 1; info_list[i].count; ++i )
+    {
+        if ( info_list[i].count > info_list[biggest].count )
+            biggest = i;
+    }
+    *info = info_list[biggest].info;
+    free( info_list );
+}
+
+/***********************************************************************
+ * DecodePreviews
+ ***********************************************************************
+ * Decode 10 pictures for the given title.
+ * It assumes that data->reader and data->vts have successfully been
+ * DVDOpen()ed and ifoOpen()ed.
+ **********************************************************************/
+static int DecodePreviews( hb_scan_t * data, hb_title_t * title )
+{
+    int             i, npreviews = 0;
+    hb_buffer_t   * buf_ps, * buf_es;
+    hb_list_t     * list_es;
+    int progressive_count = 0;
+    int interlaced_preview_count = 0;
+    info_list_t * info_list = calloc( 10+1, sizeof(*info_list) );
+    crop_record_t *crops = calloc( 1, sizeof(*crops) );
+
+    buf_ps   = hb_buffer_init( HB_DVD_READ_BUFFER_SIZE );
+    list_es  = hb_list_init();
+
+    hb_log( "scan: decoding previews for title %d", title->index );
+
+    if (data->dvd)
+      hb_dvd_start( data->dvd, title->index, 1 );
+
+    for( i = 0; i < 10; i++ )
+    {
+        int j;
+        FILE * file_preview;
+        char   filename[1024];
+
+        if (data->dvd)
+        {
+          if( !hb_dvd_seek( data->dvd, (float) ( i + 1 ) / 11.0 ) )
+          {
+              continue;
+          }
+        }
+        else if (data->stream)
+        {
+          /* we start reading streams at zero rather than 1/11 because
+           * short streams may have only one sequence header in the entire
+           * file and we need it to decode any previews. */
+          if (!hb_stream_seek(data->stream, (float) i / 11.0 ) )
+          {
+              continue;
+          }
+        }
+
+        hb_deep_log( 2, "scan: preview %d", i + 1 );
+
+        int vcodec = title->video_codec? title->video_codec : WORK_DECMPEG2;
+        hb_work_object_t *vid_decoder = hb_get_work( vcodec );
+        vid_decoder->codec_param = title->video_codec_param;
+        vid_decoder->init( vid_decoder, NULL );
+        hb_buffer_t * vid_buf = NULL;
+
+        for( j = 0; j < 10240 ; j++ )
+        {
+            if (data->dvd)
+            {
+              if( !hb_dvd_read( data->dvd, buf_ps ) )
+              {
+                  hb_log( "Warning: Could not read data for preview %d, skipped", i + 1 );
+                  goto skip_preview;
+              }
+            }
+            else if (data->stream)
+            {
+              if ( !hb_stream_read(data->stream,buf_ps) )
+              {
+                  hb_log( "Warning: Could not read data for preview %d, skipped", i + 1 );
+                  goto skip_preview;
+              }
+            }
+            if ( title->demuxer == HB_NULL_DEMUXER )
+            {
+                hb_demux_null( buf_ps, list_es, 0 );
+            }
+            else
+            {
+                hb_demux_ps( buf_ps, list_es, 0 );
+            }
+
+            while( ( buf_es = hb_list_item( list_es, 0 ) ) )
+            {
+                hb_list_rem( list_es, buf_es );
+                if( buf_es->id == title->video_id && vid_buf == NULL )
+                {
+                    vid_decoder->work( vid_decoder, &buf_es, &vid_buf );
+                }
+                else if( ! AllAudioOK( title ) )
+                {
+                    LookForAudio( title, buf_es );
+                }
+                if ( buf_es )
+                    hb_buffer_close( &buf_es );
+            }
+
+            if( vid_buf && AllAudioOK( title ) )
+                break;
+        }
+
+        if( ! vid_buf )
+        {
+            hb_log( "scan: could not get a decoded picture" );
+            continue;
+        }
+
+        /* Get size and rate infos */
+
+        hb_work_info_t vid_info;
+        if( !vid_decoder->info( vid_decoder, &vid_info ) )
+        {
+            /*
+             * Could not fill vid_info, don't continue and try to use vid_info
+             * in this case.
+             */
+            vid_decoder->close( vid_decoder );
+            free( vid_decoder );
+            continue;
+        }
+        vid_decoder->close( vid_decoder );
+        free( vid_decoder );
+
+        remember_info( info_list, &vid_info );
+
+        title->video_codec_name = strdup( vid_info.name );
+        title->width = vid_info.width;
+        title->height = vid_info.height;
+        title->rate = vid_info.rate;
+        title->rate_base = vid_info.rate_base;
+        title->video_bitrate = vid_info.bitrate;
+
+        if( title->rate_base == 1126125 )
+        {
+            /* Frame FPS is 23.976 (meaning it's progressive), so
+               start keeping track of how many are reporting at
+               that speed. When enough show up that way, we want
+               to make that the overall title FPS.
+            */
+            progressive_count++;
+
+            if( progressive_count < 6 )
+            {
+                /* Not enough frames are reporting as progressive,
+                   which means we should be conservative and use
+                   29.97 as the title's FPS for now.
+                */
+                title->rate_base = 900900;
+            }
+            else
+            {
+                /* A majority of the scan frames are progressive. Make that
+                    the title's FPS, and announce it once to the log.
+                */
+                if( progressive_count == 6 )
+                {
+                    hb_deep_log( 2, "Title's mostly NTSC Film, setting fps to 23.976");
+                }
+                title->rate_base = 1126125;
+            }
+        }
+        else if( title->rate_base == 900900 && progressive_count >= 6 )
+        {
+            /*
+             * We've already deduced that the frame rate is 23.976, so set it
+             * back again.
+             */
+            title->rate_base = 1126125;
+        }
+
+        while( ( buf_es = hb_list_item( list_es, 0 ) ) )
+        {
+            hb_list_rem( list_es, buf_es );
+            hb_buffer_close( &buf_es );
+        }
+
+        /* Check preview for interlacing artifacts */
+        if( hb_detect_comb( vid_buf, title->width, title->height, 10, 30, 9, 10, 30, 9 ) )
+        {
+            hb_deep_log( 2, "Interlacing detected in preview frame %i", i+1);
+            interlaced_preview_count++;
+        }
+
+        hb_get_tempory_filename( data->h, filename, "%x%d",
+                                 (intptr_t)title, i );
+
+        file_preview = fopen( filename, "w" );
+        if( file_preview )
+        {
+            fwrite( vid_buf->data, title->width * title->height * 3 / 2,
+                    1, file_preview );
+            fclose( file_preview );
+        }
+        else
+        {
+            hb_log( "scan: fopen failed (%s)", filename );
+        }
+
+        /* Detect black borders */
+
+#define Y    vid_buf->data
+        int top, bottom, left, right;
+        int h4 = title->height / 4, w4 = title->width / 4;
+
+        // When widescreen content is matted to 16:9 or 4:3 there's sometimes
+        // a thin border on the outer edge of the matte. On TV content it can be
+        // "line 21" VBI data that's normally hidden in the overscan. For HD
+        // content it can just be a diagnostic added in post production so that
+        // the frame borders are visible. We try to ignore these borders so
+        // we can crop the matte. The border width depends on the resolution
+        // (12 pixels on 1080i looks visually the same as 4 pixels on 480i)
+        // so we allow the border to be up to 1% of the frame height.
+        const int border = title->height / 100;
+
+        for ( top = border; top < h4; ++top )
+        {
+            if ( ! row_all_dark( title, Y, top ) )
+                break;
+        }
+        if ( top <= border )
+        {
+            // we never made it past the border region - see if the rows we
+            // didn't check are dark or if we shouldn't crop at all.
+            for ( top = 0; top < border; ++top )
+            {
+                if ( ! row_all_dark( title, Y, top ) )
+                    break;
+            }
+            if ( top >= border )
+            {
+                top = 0;
+            }
+        }
+        for ( bottom = border; bottom < h4; ++bottom )
+        {
+            if ( ! row_all_dark( title, Y, title->height - 1 - bottom ) )
+                break;
+        }
+        if ( bottom <= border )
+        {
+            for ( bottom = 0; bottom < border; ++bottom )
+            {
+                if ( ! row_all_dark( title, Y, title->height - 1 - bottom ) )
+                    break;
+            }
+            if ( bottom >= border )
+            {
+                bottom = 0;
+            }
+        }
+        for ( left = 0; left < w4; ++left )
+        {
+            if ( ! column_all_dark( title, Y, top, bottom, left ) )
+                break;
+        }
+        for ( right = 0; right < w4; ++right )
+        {
+            if ( ! column_all_dark( title, Y, top, bottom, title->width - 1 - right ) )
+                break;
+        }
+
+        // only record the result if all the crops are less than a quarter of
+        // the frame otherwise we can get fooled by frames with a lot of black
+        // like titles, credits & fade-thru-black transitions.
+        if ( top < h4 && bottom < h4 && left < w4 && right < w4 )
+        {
+            record_crop( crops, top, bottom, left, right );
+        }
+        ++npreviews;
+
+skip_preview:
+        if ( vid_buf )
+            hb_buffer_close( &vid_buf );
+    }
+
+    if ( npreviews )
+    {
+        // use the most common frame info for our final title dimensions
+        hb_work_info_t vid_info;
+        most_common_info( info_list, &vid_info );
+
+        title->width = vid_info.width;
+        title->height = vid_info.height;
+        title->pixel_aspect_width = vid_info.pixel_aspect_width;
+        title->pixel_aspect_height = vid_info.pixel_aspect_height;
+
+        // compute the aspect ratio based on the storage dimensions and the
+        // pixel aspect ratio (if supplied) or just storage dimensions if no PAR.
+        title->aspect = (double)title->width / (double)title->height;
+        if( title->pixel_aspect_width && title->pixel_aspect_height )
+        {
+            title->aspect *= (double)title->pixel_aspect_width /
+                             (double)title->pixel_aspect_height;
+
+            // For unknown reasons some French PAL DVDs put the original
+            // content's aspect ratio into the mpeg PAR even though it's
+            // the wrong PAR for the DVD. Apparently they rely on the fact
+            // that DVD players ignore the content PAR and just use the
+            // aspect ratio from the DVD metadata. So, if the aspect computed
+            // from the PAR is different from the container's aspect we use
+            // the container's aspect & recompute the PAR from it.
+            if( title->container_aspect && title->aspect != title->container_aspect )
+            {
+                hb_log("scan: content PAR gives wrong aspect %.2f; "
+                       "using container aspect %.2f", title->aspect,
+                       title->container_aspect );
+                title->aspect = title->container_aspect;
+                hb_reduce( &title->pixel_aspect_width, &title->pixel_aspect_height,
+                           (int)(title->aspect * title->height), title->width );
+            }
+        }
+
+        // don't try to crop unless we got at least 3 previews
+        if ( crops->n > 2 )
+        {
+            sort_crops( crops );
+            // The next line selects median cropping - at least
+            // 50% of the frames will have their borders removed.
+            // Other possible choices are loose cropping (i = 0) where 
+            // no non-black pixels will be cropped from any frame and a
+            // tight cropping (i = crops->n - (crops->n >> 2)) where at
+            // least 75% of the frames will have their borders removed.
+            i = crops->n >> 1;
+            title->crop[0] = EVEN( crops->t[i] );
+            title->crop[1] = EVEN( crops->b[i] );
+            title->crop[2] = EVEN( crops->l[i] );
+            title->crop[3] = EVEN( crops->r[i] );
+        }
+        free( crops );
+
+        hb_log( "scan: %d previews, %dx%d, %.3f fps, autocrop = %d/%d/%d/%d, "
+                "aspect %s, PAR %d:%d",
+                npreviews, title->width, title->height, (float) title->rate /
+                (float) title->rate_base,
+                title->crop[0], title->crop[1], title->crop[2], title->crop[3],
+                aspect_to_string( title->aspect ), title->pixel_aspect_width,
+                title->pixel_aspect_height );
+
+        if( interlaced_preview_count >= ( npreviews / 2 ) )
+        {
+            hb_log("Title is likely interlaced or telecined (%i out of %i previews). You should do something about that.",
+                   interlaced_preview_count, npreviews);
+            title->detected_interlacing = 1;
+        }
+        else
+        {
+            title->detected_interlacing = 0;
+        }
+    }
+
+    hb_buffer_close( &buf_ps );
+    while( ( buf_es = hb_list_item( list_es, 0 ) ) )
+    {
+        hb_list_rem( list_es, buf_es );
+        hb_buffer_close( &buf_es );
+    }
+    hb_list_close( &list_es );
+    if (data->dvd)
+      hb_dvd_stop( data->dvd );
+
+    return npreviews;
+}
+
+/*
+ * This routine is called for every frame from a non-video elementary stream.
+ * These are a mix of audio & subtitle streams, some of which we want & some
+ * we're ignoring. This routine checks the frame against all our audio streams
+ * to see if it's one we want and haven't identified yet. If yes, it passes the
+ * frame to a codec-specific id routine which is responsible for filling in
+ * the sample rate, bit rate, channels & other audio parameters.
+ *
+ * Since a sample rate is essential for further audio processing, any audio
+ * stream which isn't successfully id'd by is deleted at the end of the scan.
+ * This is necessary to avoid ambiguities where things that might be audio
+ * aren't (e.g., some European DVD Teletext streams use the same IDs as US ATSC
+ * AC-3 audio).
+ */
+static void LookForAudio( hb_title_t * title, hb_buffer_t * b )
+{
+    int i;
+
+    hb_audio_t * audio = NULL;
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = hb_list_item( title->list_audio, i );
+        /* check if this elementary stream is one we want */
+        if ( audio->id == b->id )
+        {
+            break;
+        }
+        else
+        {
+            audio = NULL;
+        }
+    }
+    if( !audio || audio->config.in.bitrate != 0 )
+    {
+        /* not found or already done */
+        return;
+    }
+
+    hb_work_object_t *w = hb_codec_decoder( audio->config.in.codec );
+
+    if ( w == NULL || w->bsinfo == NULL )
+    {
+        hb_log( "Internal error in scan: unhandled audio type %d for id 0x%x",
+                audio->config.in.codec, audio->id );
+        goto drop_audio;
+    }
+
+    hb_work_info_t info;
+    w->audio = audio;
+    w->codec_param = audio->config.in.codec_param;
+    int ret = w->bsinfo( w, b, &info );
+    if ( ret < 0 )
+    {
+        hb_log( "no info on audio type %d/0x%x for id 0x%x",
+                audio->config.in.codec, audio->config.in.codec_param,
+                audio->id );
+        goto drop_audio;
+    }
+    if ( !info.bitrate )
+    {
+        /* didn't find any info */
+        return;
+    }
+    audio->config.in.samplerate = info.rate;
+    audio->config.in.bitrate = info.bitrate;
+    audio->config.in.channel_layout = info.channel_layout;
+    audio->config.in.version = info.version;
+    audio->config.in.mode = info.mode;
+    audio->config.flags.ac3 = info.flags;
+
+    // update the audio description string based on the info we found
+    if ( audio->config.flags.ac3 & AUDIO_F_DOLBY )
+    {
+        strcat( audio->config.lang.description, " (Dolby Surround)" );
+    }
+    else
+    {
+        int layout = audio->config.in.channel_layout;
+        char *desc = audio->config.lang.description +
+                        strlen( audio->config.lang.description );
+        sprintf( desc, " (%d.%d ch)",
+                 HB_INPUT_CH_LAYOUT_GET_DISCRETE_FRONT_COUNT(layout) +
+                     HB_INPUT_CH_LAYOUT_GET_DISCRETE_REAR_COUNT(layout),
+                 HB_INPUT_CH_LAYOUT_GET_DISCRETE_LFE_COUNT(layout) );
+    }
+
+    hb_log( "scan: audio 0x%x: %s, rate=%dHz, bitrate=%d %s", audio->id,
+            info.name, audio->config.in.samplerate, audio->config.in.bitrate,
+            audio->config.lang.description );
+    free( w );
+    return;
+
+    // We get here if there's no hope of finding info on an audio bitstream,
+    // either because we don't have a decoder (or a decoder with a bitstream
+    // info proc) or because the decoder's info proc said that the stream
+    // wasn't something it could handle. Delete the item from the title's
+    // audio list so we won't keep reading packets while trying to get its
+    // bitstream info.
+ drop_audio:
+    if ( w )
+        free( w );
+
+    hb_list_rem( title->list_audio, audio );
+}
+
+/*
+ * This routine checks to see if we've ID'd all the audio streams associated
+ * with a title. It returns 0 if there are more to ID & 1 if all are done.
+ */
+static int  AllAudioOK( hb_title_t * title )
+{
+    int i;
+    hb_audio_t * audio;
+
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = hb_list_item( title->list_audio, i );
+        if( audio->config.in.bitrate == 0 )
+        {
+            return 0;
+        }
+    }
+    return 1;
+}
diff --git a/libhb/stream.c b/libhb/stream.c
new file mode 100755 (executable)
index 0000000..156fe99
--- /dev/null
@@ -0,0 +1,2755 @@
+/* $Id$
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include "hb.h"
+#include "lang.h"
+#include "a52dec/a52.h"
+#include "libavcodec/avcodec.h"
+#include "libavformat/avformat.h"
+
+#define min(a, b) a < b ? a : b
+
+/*
+ * This table defines how ISO MPEG stream type codes map to HandBrake
+ * codecs. It is indexed by the 8 bit stream type and contains the codec
+ * worker object id and a parameter for that worker proc (ignored except
+ * for the ffmpeg-based codecs in which case it is the ffmpeg codec id).
+ *
+ * Entries with a worker proc id of 0 or a kind of 'U' indicate that HB
+ * doesn't handle the stream type.
+ */
+typedef struct {
+    enum { U, A, V } kind; /* unknown / audio / video */
+    int codec;          /* HB worker object id of codec */
+    int codec_param;    /* param for codec (usually ffmpeg codec id) */
+    const char* name;   /* description of type */
+    int extra_hdr;      /* needs a substream header added to PS pack */
+} stream2codec_t;
+
+#define st(id, kind, codec, codec_param, name) \
+ [id] = { kind, codec, codec_param, name, 0 }
+#define se(id, kind, codec, codec_param, name) \
+ [id] = { kind, codec, codec_param, name, 1 }
+
+static const stream2codec_t st2codec[256] = {
+    st(0x01, V, WORK_DECMPEG2,     0,              "MPEG1"),
+    st(0x02, V, WORK_DECMPEG2,     0,              "MPEG2"),
+    st(0x03, A, HB_ACODEC_MPGA,    CODEC_ID_MP2,   "MPEG1"),
+    st(0x04, A, HB_ACODEC_MPGA,    CODEC_ID_MP2,   "MPEG2"),
+    st(0x05, U, 0,                 0,              "ISO 13818-1 private section"),
+    st(0x06, U, 0,                 0,              "ISO 13818-1 PES private data"),
+    st(0x07, U, 0,                 0,              "ISO 13522 MHEG"),
+    st(0x08, U, 0,                 0,              "ISO 13818-1 DSM-CC"),
+    st(0x09, U, 0,                 0,              "ISO 13818-1 auxiliary"),
+    st(0x0a, U, 0,                 0,              "ISO 13818-6 encap"),
+    st(0x0b, U, 0,                 0,              "ISO 13818-6 DSM-CC U-N msgs"),
+    st(0x0c, U, 0,                 0,              "ISO 13818-6 Stream descriptors"),
+    st(0x0d, U, 0,                 0,              "ISO 13818-6 Sections"),
+    st(0x0e, U, 0,                 0,              "ISO 13818-1 auxiliary"),
+    st(0x0f, A, HB_ACODEC_MPGA,    CODEC_ID_AAC,   "ISO 13818-7 AAC Audio"),
+    st(0x10, V, WORK_DECAVCODECV,  CODEC_ID_MPEG4, "MPEG4"),
+    st(0x11, A, HB_ACODEC_MPGA,    CODEC_ID_AAC_LATM, "MPEG4 LATM AAC"),
+    st(0x12, U, 0,                 0,              "MPEG4 generic"),
+
+    st(0x14, U, 0,                 0,              "ISO 13818-6 DSM-CC download"),
+
+    st(0x1b, V, WORK_DECAVCODECV,  CODEC_ID_H264,  "H.264"),
+
+    //st(0x80, U, 0,                 0,              "DigiCipher II Video"),
+    se(0x81, A, HB_ACODEC_AC3,     0,              "AC-3"),
+    se(0x82, A, HB_ACODEC_DCA,     0,              "HDMV DTS"),
+    st(0x83, A, HB_ACODEC_LPCM,    0,              "LPCM"),
+    st(0x84, A, 0,                 0,              "SDDS"),
+    st(0x85, U, 0,                 0,              "ATSC Program ID"),
+    st(0x86, U, 0,                 0,              "SCTE 35 splice info"),
+    st(0x87, A, 0,                 0,              "E-AC-3"),
+
+    se(0x8a, A, HB_ACODEC_DCA,     0,              "DTS"),
+
+    se(0x91, A, HB_ACODEC_AC3,     0,              "AC-3"),
+    st(0x92, U, 0,                 0,              "Subtitle"),
+
+    st(0x94, A, 0,                 0,              "SDDS"),
+    st(0xa0, V, 0,                 0,              "MSCODEC"),
+
+    st(0xea, V, WORK_DECAVCODECV,  CODEC_ID_VC1,   "VC1"),
+};
+#undef st
+
+typedef enum {
+    hb_stream_type_unknown = 0,
+    transport,
+    program,
+    dvd_program,
+    ffmpeg
+} hb_stream_type_t;
+
+#define kMaxNumberVideoPIDS 1
+#define kMaxNumberAudioPIDS 15
+#define kMaxNumberDecodeStreams (kMaxNumberVideoPIDS+kMaxNumberAudioPIDS)
+#define kMaxNumberPMTStreams 32
+
+
+struct hb_stream_s
+{
+    int     frames;             /* video frames so far */
+    int     errors;             /* total errors so far */
+    int     last_error_frame;   /* frame # at last error message */
+    int     last_error_count;   /* # errors at last error message */
+    int     packetsize;         /* Transport Stream packet size */
+
+    int64_t ts_lastpcr;         /* the last pcr we found in the TS stream */
+    int64_t ts_nextpcr;         /* the next pcr to put in a PS packet */
+
+    uint8_t *ts_packet;         /* buffer for one TS packet */
+    uint8_t *ts_buf[kMaxNumberDecodeStreams];
+    int     ts_pos[kMaxNumberDecodeStreams];
+    int8_t  ts_foundfirst[kMaxNumberDecodeStreams];
+    int8_t  ts_skipbad[kMaxNumberDecodeStreams];
+    int8_t  ts_streamcont[kMaxNumberDecodeStreams];
+    int8_t  ts_start[kMaxNumberDecodeStreams];
+
+    uint8_t *fwrite_buf;        /* PS buffer (set by hb_ts_stream_decode) */
+    uint8_t *fwrite_buf_orig;   /* PS buffer start (set by hb_ts_stream_decode) */
+
+    uint8_t need_keyframe;
+
+    /*
+     * Stuff before this point is dynamic state updated as we read the
+     * stream. Stuff after this point is stream description state that
+     * we learn during the initial scan but cache so it can be
+     * reused during the conversion read.
+     */
+    uint8_t ts_number_video_pids;
+    uint8_t ts_number_audio_pids;
+
+    int16_t ts_video_pids[kMaxNumberVideoPIDS];
+    int16_t ts_audio_pids[kMaxNumberAudioPIDS];
+
+    uint8_t ts_streamid[kMaxNumberDecodeStreams];
+    uint8_t ts_stream_type[kMaxNumberDecodeStreams];
+    uint8_t ts_extra_hdr[kMaxNumberDecodeStreams];
+
+    char    *path;
+    FILE    *file_handle;
+    hb_stream_type_t hb_stream_type;
+    hb_title_t *title;
+
+    AVFormatContext *ffmpeg_ic;
+    AVPacket *ffmpeg_pkt;
+    double ffmpeg_tsconv[MAX_STREAMS];
+    uint8_t ffmpeg_video_id;
+
+    struct {
+        int lang_code;
+        int flags;
+        int rate;
+        int bitrate;
+    } a52_info[kMaxNumberAudioPIDS];
+
+    struct
+    {
+        unsigned short program_number;
+        unsigned short program_map_PID;
+    } pat_info[kMaxNumberPMTStreams];
+    int     ts_number_pat_entries;
+
+    struct
+    {
+        int reading;
+        unsigned char *tablebuf;
+        unsigned int tablepos;
+        unsigned char current_continuity_counter;
+
+        int section_length;
+        int program_number;
+        unsigned int PCR_PID;
+        int program_info_length;
+        unsigned char *progam_info_descriptor_data;
+        struct
+        {
+            unsigned char stream_type;
+            unsigned short elementary_PID;
+            unsigned short ES_info_length;
+            unsigned char *es_info_descriptor_data;
+        } pmt_stream_info[kMaxNumberPMTStreams];
+    } pmt_info;
+};
+
+/***********************************************************************
+ * Local prototypes
+ **********************************************************************/
+static void hb_stream_duration(hb_stream_t *stream, hb_title_t *inTitle);
+static void hb_ts_stream_init(hb_stream_t *stream);
+static void hb_ts_stream_find_pids(hb_stream_t *stream);
+static int hb_ts_stream_decode(hb_stream_t *stream, uint8_t *obuf);
+static void hb_ts_stream_reset(hb_stream_t *stream);
+static hb_audio_t *hb_ts_stream_set_audio_id_and_codec(hb_stream_t *stream,
+                                                       int aud_pid_index);
+static void hb_ps_stream_find_audio_ids(hb_stream_t *stream, hb_title_t *title);
+static off_t align_to_next_packet(hb_stream_t *stream);
+
+static int ffmpeg_open( hb_stream_t *stream, hb_title_t *title );
+static void ffmpeg_close( hb_stream_t *d );
+static hb_title_t *ffmpeg_title_scan( hb_stream_t *stream );
+static int ffmpeg_read( hb_stream_t *stream, hb_buffer_t *buf );
+static int ffmpeg_seek( hb_stream_t *stream, float frac );
+
+/*
+ * streams have a bunch of state that's learned during the scan. We don't
+ * want to throw away the state when scan does a close then relearn
+ * everything when reader does an open. So we save the stream state on
+ * the close following a scan and reuse it when 'reader' does an open.
+ */
+static hb_list_t *stream_state_list;
+
+static hb_stream_t *hb_stream_lookup( const char *path )
+{
+    if ( stream_state_list == NULL )
+        return NULL;
+
+    hb_stream_t *ss;
+    int i = 0;
+
+    while ( ( ss = hb_list_item( stream_state_list, i++ ) ) != NULL )
+    {
+        if ( strcmp( path, ss->path ) == 0 )
+        {
+            break;
+        }
+    }
+    return ss;
+}
+
+static void hb_stream_state_delete( hb_stream_t *ss )
+{
+    hb_list_rem( stream_state_list, ss );
+    free( ss->path );
+    free( ss );
+}
+
+/*
+ * logging routines.
+ * these frontend hb_log because transport streams can have a lot of errors
+ * so we want to rate limit messages. this routine limits the number of
+ * messages to at most one per minute of video. other errors that occur
+ * during the minute are counted & the count is output with the next
+ * error msg we print.
+ */
+static void ts_warn_helper( hb_stream_t *stream, char *log, va_list args )
+{
+    // limit error printing to at most one per minute of video (at 30fps)
+    ++stream->errors;
+    if ( stream->frames - stream->last_error_frame >= 30*60 )
+    {
+        char msg[256];
+
+        vsnprintf( msg, sizeof(msg), log, args );
+
+        if ( stream->errors - stream->last_error_count < 10 )
+        {
+            hb_log( "stream: error near frame %d: %s", stream->frames, msg );
+        }
+        else
+        {
+            int Edelta = stream->errors - stream->last_error_count;
+            double Epcnt = (double)Edelta * 100. /
+                            (stream->frames - stream->last_error_frame);
+            hb_log( "stream: %d new errors (%.0f%%) up to frame %d: %s",
+                    Edelta, Epcnt, stream->frames, msg );
+        }
+        stream->last_error_frame = stream->frames;
+        stream->last_error_count = stream->errors;
+    }
+}
+
+static void ts_warn( hb_stream_t *stream, char *log, ... )
+{
+    va_list     args;
+    va_start( args, log );
+    ts_warn_helper( stream, log, args );
+    va_end( args );
+}
+
+static void ts_err( hb_stream_t *stream, int curstream, char *log, ... )
+{
+    va_list     args;
+    va_start( args, log );
+    ts_warn_helper( stream, log, args );
+    va_end( args );
+
+    stream->ts_skipbad[curstream] = 1;
+    stream->ts_pos[curstream] = 0;
+    stream->ts_streamcont[curstream] = -1;
+}
+
+static int check_ps_sync(const uint8_t *buf)
+{
+    // a legal MPEG program stream must start with a Pack header in the
+    // first four bytes.
+    return (buf[0] == 0x00) && (buf[1] == 0x00) &&
+           (buf[2] == 0x01) && (buf[3] == 0xba);
+}
+
+static int check_ps_sys(const uint8_t *buf)
+{
+    // a legal MPEG program stream must start with a Pack followed by a
+    // SYS. If we've already verified the pack, this skips over it and checks
+    // for the sys header.
+    int pos = 14 + ( buf[13] & 0x7 );   // skip over the PACK
+    return (buf[pos+0] == 0x00) && (buf[pos+1] == 0x00) &&
+           (buf[pos+2] == 0x01) && (buf[pos+3] == 0xbb);
+}
+
+static int check_ts_sync(const uint8_t *buf)
+{
+    // must have initial sync byte, no scrambling & a legal adaptation ctrl
+    return (buf[0] == 0x47) && ((buf[3] >> 6) == 0) && ((buf[3] >> 4) > 0);
+}
+
+static int have_ts_sync(const uint8_t *buf, int psize)
+{
+    return check_ts_sync(&buf[0*psize]) && check_ts_sync(&buf[1*psize]) &&
+           check_ts_sync(&buf[2*psize]) && check_ts_sync(&buf[3*psize]) &&
+           check_ts_sync(&buf[4*psize]) && check_ts_sync(&buf[5*psize]) &&
+           check_ts_sync(&buf[6*psize]) && check_ts_sync(&buf[7*psize]);
+}
+
+static int hb_stream_check_for_ts(const uint8_t *buf)
+{
+    // transport streams should have a sync byte every 188 bytes.
+    // search the first 8KB of buf looking for at least 8 consecutive
+    // correctly located sync patterns.
+    int offset = 0;
+
+    for ( offset = 0; offset < 8*1024-8*188; ++offset )
+    {
+        if ( have_ts_sync( &buf[offset], 188) )
+            return 188 | (offset << 8);
+        if ( have_ts_sync( &buf[offset], 192) )
+            return 192 | (offset << 8);
+        if ( have_ts_sync( &buf[offset], 204) )
+            return 204 | (offset << 8);
+        if ( have_ts_sync( &buf[offset], 208) )
+            return 208 | (offset << 8);
+    }
+    return 0;
+}
+
+static int hb_stream_check_for_ps(const uint8_t *buf)
+{
+    // program streams should start with a PACK then a SYS header.
+    return check_ps_sync(buf) && check_ps_sys(buf);
+}
+
+static int hb_stream_check_for_dvd_ps(const uint8_t *buf)
+{
+    // DVD program streams should have a Pack header every 2048 bytes.
+    // check that we have 4 of these in a row.
+    return check_ps_sync(&buf[0*2048]) && check_ps_sync(&buf[1*2048]) &&
+           check_ps_sync(&buf[2*2048]) && check_ps_sync(&buf[3*2048]);
+}
+
+static int hb_stream_get_type(hb_stream_t *stream)
+{
+    uint8_t buf[2048*4];
+
+    if ( fread(buf, 1, sizeof(buf), stream->file_handle) == sizeof(buf) )
+    {
+        int psize;
+        if ( ( psize = hb_stream_check_for_ts(buf) ) != 0 )
+        {
+            int offset = psize >> 8;
+            psize &= 0xff;
+            hb_log("file is MPEG Transport Stream with %d byte packets"
+                   " offset %d bytes", psize, offset);
+            stream->packetsize = psize;
+            stream->hb_stream_type = transport;
+            hb_ts_stream_init(stream);
+            if ( !stream->ts_number_video_pids || !stream->ts_number_audio_pids )
+            {
+                return 0;
+            }
+            return 1;
+        }
+        if ( hb_stream_check_for_dvd_ps(buf) != 0 )
+        {
+            hb_log("file is MPEG DVD Program Stream");
+            stream->hb_stream_type = dvd_program;
+            return 1;
+        }
+        if ( hb_stream_check_for_ps(buf) != 0 )
+        {
+            hb_log("file is MPEG Program Stream");
+            stream->hb_stream_type = program;
+            return 1;
+        }
+    }
+    return 0;
+}
+
+static void hb_stream_delete_dynamic( hb_stream_t *d )
+{
+    if( d->file_handle )
+    {
+        fclose( d->file_handle );
+               d->file_handle = NULL;
+    }
+
+       int i=0;
+
+    if ( d->ts_packet )
+    {
+        free( d->ts_packet );
+        d->ts_packet = NULL;
+    }
+       for (i = 0; i < kMaxNumberDecodeStreams; i++)
+       {
+               if (d->ts_buf[i])
+               {
+                       free(d->ts_buf[i]);
+                       d->ts_buf[i] = NULL;
+               }
+       }
+}
+
+static void hb_stream_delete( hb_stream_t *d )
+{
+    hb_stream_delete_dynamic( d );
+    free( d->path );
+    free( d );
+}
+
+/***********************************************************************
+ * hb_stream_open
+ ***********************************************************************
+ *
+ **********************************************************************/
+hb_stream_t * hb_stream_open( char *path, hb_title_t *title )
+{
+    FILE *f = fopen( path, "r" );
+    if ( f == NULL )
+    {
+        hb_log( "hb_stream_open: open %s failed", path );
+        return NULL;
+    }
+
+    hb_stream_t *d = calloc( sizeof( hb_stream_t ), 1 );
+    if ( d == NULL )
+    {
+        fclose( f );
+        hb_log( "hb_stream_open: can't allocate space for %s stream state", path );
+        return NULL;
+    }
+
+    /*
+     * if we're opening the stream to read & convert, we need
+     * the state we saved when we scanned the stream. if we're
+     * opening the stream to scan it we want to rebuild the state
+     * (even if we have saved state, the stream may have changed).
+     */
+    hb_stream_t *ss = hb_stream_lookup( path );
+    if ( title && ss && ss->hb_stream_type != ffmpeg )
+    {
+        /*
+         * copy the saved state since we might be encoding the same stream
+         * multiple times.
+         */
+        memcpy( d, ss, sizeof(*d) );
+        d->file_handle = f;
+        d->title = title;
+        d->path = strdup( path );
+
+        if ( d->hb_stream_type == transport )
+        {
+            d->ts_packet = malloc( d->packetsize );
+
+            int i = 0;
+            for ( ; i < d->ts_number_video_pids + d->ts_number_audio_pids; i++)
+            {
+                d->ts_buf[i] = malloc( HB_DVD_READ_BUFFER_SIZE );
+            }
+            hb_stream_seek( d, 0. );
+
+            if ( d->packetsize == 188 )
+            {
+                // Assume that an over-the-air transport stream can lose PCR
+                // packets and try to filter out the timing inconsistencies.
+                title->flaky_clock = 1;
+            }
+        }
+        return d;
+    }
+
+    /*
+     * opening for scan - delete any saved state then (re)scan the stream.
+     * If it's something we can deal with (MPEG2 PS or TS) return a stream
+     * reference structure & null otherwise.
+     */
+    if ( ss != NULL )
+    {
+        hb_stream_state_delete( ss );
+    }
+    d->file_handle = f;
+    d->title = title;
+    d->path = strdup( path );
+    if (d->path != NULL )
+    {
+        if ( hb_stream_get_type( d ) != 0 )
+        {
+            return d;
+        }
+        fclose( d->file_handle );
+               d->file_handle = NULL;
+        if ( ffmpeg_open( d, title ) )
+        {
+            return d;
+        }
+    }
+    if ( d->file_handle )
+    {
+        fclose( d->file_handle );
+    }
+    if (d->path)
+    {
+        free( d->path );
+    }
+    hb_log( "hb_stream_open: open %s failed", path );
+    free( d );
+    return NULL;
+}
+
+/***********************************************************************
+ * hb_stream_close
+ ***********************************************************************
+ * Closes and frees everything
+ **********************************************************************/
+void hb_stream_close( hb_stream_t ** _d )
+{
+    hb_stream_t *stream = * _d;
+
+    if ( stream->hb_stream_type == ffmpeg )
+    {
+        ffmpeg_close( stream );
+        hb_stream_delete( stream );
+        *_d = NULL;
+        return;
+    }
+
+    if ( stream->frames )
+    {
+        hb_log( "stream: %d good frames, %d errors (%.0f%%)", stream->frames,
+                stream->errors, (double)stream->errors * 100. /
+                (double)stream->frames );
+    }
+
+    /*
+     * if the stream was opened for a scan, cache the result, otherwise delete
+     * the state.
+     */
+    if ( stream->title == NULL )
+    {
+        hb_stream_delete_dynamic( stream );
+        if ( stream_state_list == NULL )
+        {
+            stream_state_list = hb_list_init();
+        }
+        hb_list_add( stream_state_list, stream );
+    }
+    else
+    {
+        hb_stream_delete( stream );
+    }
+    *_d = NULL;
+}
+
+/* when the file was first opened we made entries for all the audio elementary
+ * streams we found in it. Streams that were later found during the preview scan
+ * now have an audio codec, type, rate, etc., associated with them. At the end
+ * of the scan we delete all the audio entries that weren't found by the scan
+ * or don't have a format we support. This routine deletes audio entry 'indx'
+ * by copying all later entries down one slot. */
+static void hb_stream_delete_audio_entry(hb_stream_t *stream, int indx)
+{
+    int i;
+
+    for (i = indx+1; i < stream->ts_number_audio_pids; ++i)
+    {
+        stream->ts_audio_pids[indx] = stream->ts_audio_pids[i];
+        stream->ts_stream_type[1 + indx] = stream->ts_stream_type[1+i];
+        stream->ts_extra_hdr[1 + indx] = stream->ts_extra_hdr[1+i];
+        stream->ts_streamid[1 + indx] = stream->ts_streamid[1 + i];
+        ++indx;
+    }
+    --stream->ts_number_audio_pids;
+}
+
+static int index_of_pid(int pid, hb_stream_t *stream)
+{
+    int i;
+
+    if ( pid == stream->ts_video_pids[0] )
+        return 0;
+
+    for ( i = 0; i < stream->ts_number_audio_pids; ++i )
+        if ( pid == stream->ts_audio_pids[i] )
+            return i + 1;
+
+    return -1;
+}
+
+/***********************************************************************
+ * hb_ps_stream_title_scan
+ ***********************************************************************
+ *
+ **********************************************************************/
+hb_title_t * hb_stream_title_scan(hb_stream_t *stream)
+{
+       if ( stream->hb_stream_type == ffmpeg )
+        return ffmpeg_title_scan( stream );
+
+    // 'Barebones Title'
+    hb_title_t *aTitle = hb_title_init( stream->path, 0 );
+    aTitle->index = 1;
+
+       // Copy part of the stream path to the title name
+       char *sep = strrchr(stream->path, '/');
+       if (sep)
+               strcpy(aTitle->name, sep+1);
+       char *dot_term = strrchr(aTitle->name, '.');
+       if (dot_term)
+               *dot_term = '\0';
+
+    // Height, width,  rate and aspect ratio information is filled in when the previews are built
+
+    hb_stream_duration(stream, aTitle);
+
+    // One Chapter
+    hb_chapter_t * chapter;
+    chapter = calloc( sizeof( hb_chapter_t ), 1 );
+    chapter->index = 1;
+    chapter->duration = aTitle->duration;
+    chapter->hours = aTitle->hours;
+    chapter->minutes = aTitle->minutes;
+    chapter->seconds = aTitle->seconds;
+    hb_list_add( aTitle->list_chapter, chapter );
+
+    // Figure out how many audio streams we really have:
+    // - For transport streams, for each PID listed in the PMT (whether
+    //   or not it was an audio stream type) read the bitstream until we
+    //   find an packet from that PID containing a PES header and see if
+    //   the elementary stream is an audio type.
+    // - For program streams read the first 4MB and take every unique
+    //   audio stream we find.
+       if (stream->hb_stream_type == transport)
+       {
+        int i;
+
+        for (i=0; i < stream->ts_number_audio_pids; i++)
+        {
+            hb_audio_t *audio = hb_ts_stream_set_audio_id_and_codec(stream, i);
+            if (audio->config.in.codec)
+                hb_list_add( aTitle->list_audio, audio );
+            else
+            {
+                free(audio);
+                hb_stream_delete_audio_entry(stream, i);
+                --i;
+            }
+        }
+
+        // add the PCR PID if we don't already have it
+        if ( index_of_pid( stream->pmt_info.PCR_PID, stream ) < 0 )
+        {
+            stream->ts_audio_pids[stream->ts_number_audio_pids++] =
+                stream->pmt_info.PCR_PID;
+        }
+
+        // set up the video codec to use for this title
+        aTitle->video_codec = st2codec[stream->ts_stream_type[0]].codec;
+        aTitle->video_codec_param = st2codec[stream->ts_stream_type[0]].codec_param;
+       }
+    else
+    {
+        hb_ps_stream_find_audio_ids(stream, aTitle);
+    }
+
+  return aTitle;
+}
+
+/*
+ * read the next transport stream packet from 'stream'. Return NULL if
+ * we hit eof & a pointer to the sync byte otherwise.
+ */
+static const uint8_t *next_packet( hb_stream_t *stream )
+{
+    uint8_t *buf = stream->ts_packet + stream->packetsize - 188;
+
+    while ( 1 )
+    {
+        if ( fread(stream->ts_packet, 1, stream->packetsize, stream->file_handle) !=
+             stream->packetsize )
+        {
+            return NULL;
+        }
+        if (buf[0] == 0x47)
+        {
+            return buf;
+        }
+        // lost sync - back up to where we started then try to re-establish.
+        off_t pos = ftello(stream->file_handle) - stream->packetsize;
+        off_t pos2 = align_to_next_packet(stream);
+        if ( pos2 == 0 )
+        {
+            hb_log( "next_packet: eof while re-establishing sync @ %lld", pos );
+            return NULL;
+        }
+        ts_warn( stream, "next_packet: sync lost @ %lld, regained after %lld bytes",
+                 pos, pos2 );
+    }
+}
+
+/*
+ * skip to the start of the next PACK header in program stream src_stream.
+ */
+static void skip_to_next_pack( hb_stream_t *src_stream )
+{
+    // scan forward until we find the start of the next pack
+    uint32_t strt_code = -1;
+    int c;
+
+    flockfile( src_stream->file_handle );
+    while ( ( c = getc_unlocked( src_stream->file_handle ) ) != EOF )
+    {
+        strt_code = ( strt_code << 8 ) | c;
+        if ( strt_code == 0x000001ba )
+            // we found the start of the next pack
+            break;
+    }
+    funlockfile( src_stream->file_handle );
+
+    // if we didn't terminate on an eof back up so the next read
+    // starts on the pack boundary.
+    if ( c != EOF )
+    {
+        fseeko( src_stream->file_handle, -4, SEEK_CUR );
+    }
+}
+
+/*
+ * scan the next MB of 'stream' to find the next start packet for
+ * the Packetized Elementary Stream associated with TS PID 'pid'.
+ */
+static const uint8_t *hb_ts_stream_getPEStype(hb_stream_t *stream, uint32_t pid)
+{
+    int npack = 300000; // max packets to read
+
+    while (--npack >= 0)
+    {
+        const uint8_t *buf = next_packet( stream );
+        if ( buf == NULL )
+        {
+            hb_log("hb_ts_stream_getPEStype: EOF while searching for PID 0x%x", pid);
+            return 0;
+        }
+
+        /*
+         * The PES header is only in TS packets with 'start' set so we check
+         * that first then check for the right PID.
+         */
+        if ((buf[1] & 0x40) == 0 || (buf[1] & 0x1f) != (pid >> 8) ||
+            buf[2] != (pid & 0xff))
+        {
+            // not a start packet or not the pid we want
+            continue;
+        }
+
+        /* skip over the TS hdr to return a pointer to the PES hdr */
+        int udata = 4;
+        switch (buf[3] & 0x30)
+        {
+            case 0x00: // illegal
+            case 0x20: // fill packet
+                continue;
+
+            case 0x30: // adaptation
+                if (buf[4] > 182)
+                {
+                    hb_log("hb_ts_stream_getPEStype: invalid adaptation field length %d for PID 0x%x", buf[4], pid);
+                    continue;
+                }
+                udata += buf[4] + 1;
+                break;
+        }
+        /* PES hdr has to begin with an mpeg start code */
+        if (buf[udata+0] == 0x00 && buf[udata+1] == 0x00 && buf[udata+2] == 0x01)
+        {
+            return &buf[udata];
+        }
+    }
+
+    /* didn't find it */
+    return 0;
+}
+
+static uint64_t hb_ps_stream_getVideoPTS(hb_stream_t *stream)
+{
+    hb_buffer_t *buf  = hb_buffer_init(HB_DVD_READ_BUFFER_SIZE);
+    hb_list_t *list = hb_list_init();
+    // how many blocks we read while searching for a video PES header
+    int blksleft = 1024;
+    uint64_t pts = 0;
+
+    while (--blksleft >= 0 && hb_stream_read(stream, buf) == 1)
+    {
+        hb_buffer_t *es;
+
+        // 'buf' contains an MPEG2 PACK - get a list of all it's elementary streams
+        hb_demux_ps( buf, list, 0 );
+
+        while ( ( es = hb_list_item( list, 0 ) ) )
+        {
+            hb_list_rem( list, es );
+            if ( es->id == 0xe0 )
+            {
+                // this PES contains video - if there's a PTS we're done
+                // hb_demux_ps left the PTS in buf_es->start.
+                if ( es->start != ~0 )
+                {
+                    pts = es->start;
+                    blksleft = 0;
+                    break;
+                }
+            }
+            hb_buffer_close( &es );
+        }
+    }
+    hb_list_empty( &list );
+    hb_buffer_close(&buf);
+    return pts;
+}
+
+/***********************************************************************
+ * hb_stream_duration
+ ***********************************************************************
+ *
+ * Finding stream duration is difficult.  One issue is that the video file
+ * may have chunks from several different program fragments (main feature,
+ * commercials, station id, trailers, etc.) all with their own base pts
+ * value.  We can't find the piece boundaries without reading the entire
+ * file but if we compute a rate based on time stamps from two different
+ * pieces the result will be meaningless.  The second issue is that the
+ * data rate of compressed video normally varies by 5-10x over the length
+ * of the video. This says that we want to compute the rate over relatively
+ * long segments to get a representative average but long segments increase
+ * the likelihood that we'll cross a piece boundary.
+ *
+ * What we do is take time stamp samples at several places in the file
+ * (currently 16) then compute the average rate (i.e., ticks of video per
+ * byte of the file) for all pairs of samples (N^2 rates computed for N
+ * samples). Some of those rates will be absurd because the samples came
+ * from different segments. Some will be way low or high because the
+ * samples came from a low or high motion part of the segment. But given
+ * that we're comparing *all* pairs the majority of the computed rates
+ * should be near the overall average.  So we median filter the computed
+ * rates to pick the most representative value.
+ *
+ **********************************************************************/
+struct pts_pos {
+    uint64_t pos;   /* file position of this PTS sample */
+    uint64_t pts;   /* PTS from video stream */
+};
+
+#define NDURSAMPLES 16
+
+// get one (position, timestamp) sampple from a transport or program
+// stream.
+static struct pts_pos hb_sample_pts(hb_stream_t *stream, uint64_t fpos)
+{
+    struct pts_pos pp = { 0, 0 };
+
+    if ( stream->hb_stream_type == transport )
+    {
+        const uint8_t *buf;
+        fseeko( stream->file_handle, fpos, SEEK_SET );
+        align_to_next_packet( stream );
+        buf = hb_ts_stream_getPEStype( stream, stream->ts_video_pids[0] );
+        if ( buf == NULL )
+        {
+            hb_log("hb_sample_pts: couldn't find video packet near %llu", fpos);
+            return pp;
+        }
+        if ( ( buf[7] >> 7 ) != 1 )
+        {
+            hb_log("hb_sample_pts: no PTS in video packet near %llu", fpos);
+            return pp;
+        }
+        pp.pts = ( ( (uint64_t)buf[9] >> 1 ) & 7 << 30 ) |
+                 ( (uint64_t)buf[10] << 22 ) |
+                 ( ( (uint64_t)buf[11] >> 1 ) << 15 ) |
+                 ( (uint64_t)buf[12] << 7 ) |
+                 ( (uint64_t)buf[13] >> 1 );
+    }
+    else
+    {
+        // round address down to nearest dvd sector start
+        fpos &=~ ( HB_DVD_READ_BUFFER_SIZE - 1 );
+        fseeko( stream->file_handle, fpos, SEEK_SET );
+        if ( stream->hb_stream_type == program )
+        {
+            skip_to_next_pack( stream );
+        }
+        pp.pts = hb_ps_stream_getVideoPTS( stream );
+    }
+    pp.pos = ftello(stream->file_handle);
+    return pp;
+}
+
+static int dur_compare( const void *a, const void *b )
+{
+    const double *aval = a, *bval = b;
+    return ( *aval < *bval ? -1 : ( *aval == *bval ? 0 : 1 ) );
+}
+
+// given an array of (position, time) samples, compute a max-likelihood
+// estimate of the average rate by computing the rate between all pairs
+// of samples then taking the median of those rates.
+static double compute_stream_rate( struct pts_pos *pp, int n )
+{
+    int i, j;
+    double rates[NDURSAMPLES * NDURSAMPLES / 2];
+    double *rp = rates;
+
+    // the following nested loops compute the rates between all pairs.
+    *rp = 0;
+    for ( i = 0; i < n-1; ++i )
+    {
+        // Bias the median filter by not including pairs that are "far"
+        // from one another. This is to handle cases where the file is
+        // made of roughly equal size pieces where a symmetric choice of
+        // pairs results in having the same number of intra-piece &
+        // inter-piece rate estimates. This would mean that the median
+        // could easily fall in the inter-piece part of the data which
+        // would give a bogus estimate. The 'ns' index creates an
+        // asymmetry that favors locality.
+        int ns = i + ( n >> 1 );
+        if ( ns > n )
+            ns = n;
+        for ( j = i+1; j < ns; ++j )
+        {
+            if ( pp[j].pts != pp[i].pts && pp[j].pos > pp[i].pos )
+            {
+                *rp = ((double)( pp[j].pts - pp[i].pts )) /
+                      ((double)( pp[j].pos - pp[i].pos ));
+                               ++rp;
+            }
+        }
+    }
+    // now compute and return the median of all the (n*n/2) rates we computed
+    // above.
+    int nrates = rp - rates;
+    qsort( rates, nrates, sizeof (rates[0] ), dur_compare );
+    return rates[nrates >> 1];
+}
+
+static void hb_stream_duration(hb_stream_t *stream, hb_title_t *inTitle)
+{
+    struct pts_pos ptspos[NDURSAMPLES];
+    struct pts_pos *pp = ptspos;
+    int i;
+
+    fseeko(stream->file_handle, 0, SEEK_END);
+    uint64_t fsize = ftello(stream->file_handle);
+    uint64_t fincr = fsize / NDURSAMPLES;
+    uint64_t fpos = fincr / 2;
+    for ( i = NDURSAMPLES; --i >= 0; fpos += fincr )
+    {
+        *pp++ = hb_sample_pts(stream, fpos);
+    }
+    uint64_t dur = compute_stream_rate( ptspos, pp - ptspos ) * (double)fsize;
+    inTitle->duration = dur;
+    dur /= 90000;
+    inTitle->hours    = dur / 3600;
+    inTitle->minutes  = ( dur % 3600 ) / 60;
+    inTitle->seconds  = dur % 60;
+
+    rewind(stream->file_handle);
+}
+
+/***********************************************************************
+ * hb_stream_read
+ ***********************************************************************
+ *
+ **********************************************************************/
+int hb_stream_read( hb_stream_t * src_stream, hb_buffer_t * b )
+{
+       if ( src_stream->hb_stream_type == ffmpeg )
+    {
+        return ffmpeg_read( src_stream, b );
+    }
+    if ( src_stream->hb_stream_type == dvd_program )
+    {
+        size_t amt_read = fread(b->data, HB_DVD_READ_BUFFER_SIZE, 1,
+                                src_stream->file_handle);
+        return (amt_read > 0);
+    }
+    if ( src_stream->hb_stream_type == program )
+    {
+        // a general program stream has arbitrary sized pack's. we're
+        // currently positioned at the start of a pack so read up to but
+        // not including the start of the next, expanding the buffer
+        // as necessary.
+        uint8_t *cp = b->data;
+        uint8_t *ep = cp + b->alloc;
+        uint32_t strt_code = -1;
+        int c;
+
+        // consume the first byte of the initial pack so we don't match on
+        // it in the loop below.
+        if ( ( c = getc( src_stream->file_handle ) ) == EOF )
+            return 0;
+
+        *cp++ = c;
+
+        flockfile( src_stream->file_handle );
+        while ( ( c = getc_unlocked( src_stream->file_handle ) ) != EOF )
+        {
+            strt_code = ( strt_code << 8 ) | c;
+            if ( strt_code == 0x000001ba )
+                // we found the start of the next pack
+                break;
+            if ( cp >= ep )
+            {
+                // need to expand the buffer
+                int curSize = cp - b->data;
+                hb_buffer_realloc( b, curSize * 2 );
+                cp = b->data + curSize;
+                ep = b->data + b->alloc;
+            }
+            *cp++ = c;
+        }
+        funlockfile( src_stream->file_handle );
+
+        // if we didn't terminate on an eof back up so the next read
+        // starts on the pack boundary.
+        b->size = cp - b->data;
+        if ( c != EOF )
+        {
+            fseeko( src_stream->file_handle, -4, SEEK_CUR );
+            b->size -= 4;
+        }
+        return 1;
+    }
+    return hb_ts_stream_decode( src_stream, b->data );
+}
+
+/***********************************************************************
+ * hb_stream_seek
+ ***********************************************************************
+ *
+ **********************************************************************/
+int hb_stream_seek( hb_stream_t * src_stream, float f )
+{
+       if ( src_stream->hb_stream_type == ffmpeg )
+    {
+        return ffmpeg_seek( src_stream, f );
+    }
+    off_t stream_size, cur_pos, new_pos;
+    double pos_ratio = f;
+    cur_pos = ftello( src_stream->file_handle );
+    fseeko( src_stream->file_handle, 0, SEEK_END );
+    stream_size = ftello( src_stream->file_handle );
+    new_pos = (off_t) ((double) (stream_size) * pos_ratio);
+    new_pos &=~ (HB_DVD_READ_BUFFER_SIZE - 1);
+
+    int r = fseeko( src_stream->file_handle, new_pos, SEEK_SET );
+    if (r == -1)
+    {
+        fseeko( src_stream->file_handle, cur_pos, SEEK_SET );
+        return 0;
+    }
+
+    if ( src_stream->hb_stream_type == transport )
+    {
+        // We need to drop the current decoder output and move
+        // forwards to the next transport stream packet.
+        hb_ts_stream_reset(src_stream);
+        src_stream->need_keyframe = ( f != 0 );
+    }
+    else if ( src_stream->hb_stream_type == program )
+    {
+        skip_to_next_pack( src_stream );
+    }
+
+    return 1;
+}
+
+static const char* make_upper( const char* s )
+{
+    static char name[8];
+    char *cp = name;
+    char *ep = cp + sizeof(name)-1;
+
+    while ( *s && cp < ep )
+    {
+        *cp++ = islower(*s)? toupper(*s) : *s;
+        ++s;
+    }
+    *cp = 0;
+    return name;
+}
+
+static void set_audio_description( hb_audio_t *audio, iso639_lang_t *lang )
+{
+    /* XXX
+     * This is a duplicate of code in dvd.c - it should get factored out
+     * into a common routine. We probably should only be putting the lang
+     * code or a lang pointer into the audio config & let the common description
+     * formatting routine in scan.c do all the stuff below.
+     */
+    const char *codec_name;
+    AVCodecContext *cc;
+
+    if ( audio->config.in.codec == HB_ACODEC_FFMPEG &&
+         ( cc = hb_ffmpeg_context( audio->config.in.codec_param ) ) &&
+         avcodec_find_decoder( cc->codec_id ) )
+    {
+        codec_name = make_upper( avcodec_find_decoder( cc->codec_id )->name );
+        if ( !strcmp( codec_name, "LIBFAAD" ) )
+        {
+            codec_name = "AAC";
+        }
+    }
+    else if ( audio->config.in.codec == HB_ACODEC_MPGA &&
+              avcodec_find_decoder( audio->config.in.codec_param ) )
+    {
+        codec_name = avcodec_find_decoder( audio->config.in.codec_param )->name;
+    }
+    else
+    {
+        codec_name = audio->config.in.codec == HB_ACODEC_AC3 ? "AC3" :
+                     audio->config.in.codec == HB_ACODEC_DCA ? "DTS" :
+                     audio->config.in.codec == HB_ACODEC_MPGA ? "MPEG" : 
+                     audio->config.in.codec == HB_ACODEC_LPCM ? "LPCM" : 
+                     audio->config.in.codec == HB_ACODEC_FFMPEG ? "FFMPEG" :
+                     "Unknown";
+    }
+    snprintf( audio->config.lang.description,
+              sizeof( audio->config.lang.description ), "%s (%s)",
+              strlen(lang->native_name) ? lang->native_name : lang->eng_name,
+              codec_name );
+    snprintf( audio->config.lang.simple, sizeof( audio->config.lang.simple ), "%s",
+              strlen(lang->native_name) ? lang->native_name : lang->eng_name );
+    snprintf( audio->config.lang.iso639_2, sizeof( audio->config.lang.iso639_2 ),
+              "%s", lang->iso639_2);
+}
+
+static hb_audio_t *hb_ts_stream_set_audio_id_and_codec(hb_stream_t *stream,
+                                                       int aud_pid_index)
+{
+    off_t cur_pos = ftello(stream->file_handle);
+    hb_audio_t *audio = calloc( sizeof( hb_audio_t ), 1 );
+    const uint8_t *buf;
+
+    fseeko(stream->file_handle, 0, SEEK_SET);
+    align_to_next_packet(stream);
+    buf = hb_ts_stream_getPEStype(stream, stream->ts_audio_pids[aud_pid_index]);
+
+    /* check that we found a PES header */
+    uint8_t stype = 0;
+    if (buf && buf[0] == 0x00 && buf[1] == 0x00 && buf[2] == 0x01)
+    {
+        // 0xbd is the normal container for AC3/DCA/PCM/etc. 0xfd indicates an
+        // extended stream id (ISO 13818-1(2007)). If we cared about the
+        // real id we'd have to look inside the PES extension to find it.
+        // But since we remap stream id's when we generate PS packets from
+        // the TS packets we can just ignore the actual id.
+        if ( buf[3] == 0xbd || buf[3] == 0xfd )
+        {
+            audio->id = 0x80bd | (aud_pid_index << 8);
+            stype = stream->ts_stream_type[1 + aud_pid_index];
+            if ( st2codec[stype].kind == U )
+            {
+                // XXX assume unknown stream types are AC-3 (if they're not
+                // audio we'll find that out during the scan but if they're
+                // some other type of audio we'll end up ignoring them).
+                stype = 0x81;
+                stream->ts_stream_type[1 + aud_pid_index] = 0x81;
+            }
+            stream->ts_streamid[1 + aud_pid_index] = 0xbd;
+        }
+        else if ((buf[3] & 0xe0) == 0xc0)
+        {
+            audio->id = 0xc0 | aud_pid_index;
+            stype = stream->ts_stream_type[1 + aud_pid_index];
+            if ( st2codec[stype].kind == U )
+            {
+                // XXX assume unknown stream types are MPEG audio
+                stype = 0x03;
+                stream->ts_stream_type[1 + aud_pid_index] = 0x03;
+            }
+        }
+    }
+    // if we found an audio stream type & HB has a codec that can decode it
+    // finish configuring the audio so we'll add it to the title's list.
+    if ( st2codec[stype].kind == A && st2codec[stype].codec )
+    {
+        stream->ts_streamid[1 + aud_pid_index] = audio->id;
+        stream->ts_extra_hdr[1 + aud_pid_index] = st2codec[stype].extra_hdr;
+        audio->config.in.codec = st2codec[stype].codec;
+        audio->config.in.codec_param = st2codec[stype].codec_param;
+               set_audio_description( audio,
+                  lang_for_code( stream->a52_info[aud_pid_index].lang_code ) );
+        hb_log("transport stream pid 0x%x (type 0x%x) is %s audio id 0x%x",
+               stream->ts_audio_pids[aud_pid_index],
+               stype, st2codec[stype].name, audio->id);
+    }
+    else
+    {
+        if ( buf )
+        {
+            hb_log("transport stream pid 0x%x (type 0x%x, substream 0x%x) "
+                    "isn't audio", stream->ts_audio_pids[aud_pid_index],
+                    stream->ts_stream_type[1 + aud_pid_index], buf[3]);
+        }
+        else
+        {
+            hb_log("transport stream pid 0x%x (type 0x%x) isn't audio",
+                    stream->ts_audio_pids[aud_pid_index],
+                    stream->ts_stream_type[1 + aud_pid_index]);
+        }
+       }
+    fseeko(stream->file_handle, cur_pos, SEEK_SET);
+    return audio;
+}
+
+static void add_audio_to_title(hb_title_t *title, int id)
+{
+    hb_audio_t *audio = calloc( sizeof( hb_audio_t ), 1 );
+
+    audio->id = id;
+    switch ( id >> 12 )
+    {
+        case 0x0:
+            audio->config.in.codec = HB_ACODEC_MPGA;
+            hb_log("add_audio_to_title: added MPEG audio stream 0x%x", id);
+            break;
+        case 0x2:
+            // type 2 is a DVD subtitle stream - just ignore it */
+            free( audio );
+            return;
+        case 0x8:
+            audio->config.in.codec = HB_ACODEC_AC3;
+            hb_log("add_audio_to_title: added AC3 audio stream 0x%x", id);
+            break;
+        case 0xa:
+            audio->config.in.codec = HB_ACODEC_LPCM;
+            hb_log("add_audio_to_title: added LPCM audio stream 0x%x", id);
+            break;
+        default:
+            hb_log("add_audio_to_title: unknown audio stream type 0x%x", id);
+            free( audio );
+            return;
+
+    }
+    set_audio_description( audio, lang_for_code( 0 ) );
+    hb_list_add( title->list_audio, audio );
+}
+
+static void hb_ps_stream_find_audio_ids(hb_stream_t *stream, hb_title_t *title)
+{
+    off_t cur_pos = ftello(stream->file_handle);
+    hb_buffer_t *buf  = hb_buffer_init(HB_DVD_READ_BUFFER_SIZE);
+    hb_list_t *list = hb_list_init();
+    // how many blocks we read while searching for audio streams
+    int blksleft = 4096;
+    // there can be at most 16 unique streams in an MPEG PS (8 in a DVD)
+    // so we use a bitmap to keep track of the ones we've already seen.
+    // Bit 'i' of smap is set if we've already added the audio for
+    // audio substream id 'i' to the title's audio list.
+    uint32_t smap = 0;
+
+    // start looking 20% into the file since there's occasionally no
+    // audio at the beginning (particularly for vobs).
+    hb_stream_seek(stream, 0.2f);
+
+    while (--blksleft >= 0 && hb_stream_read(stream, buf) == 1)
+    {
+        hb_buffer_t *es;
+
+        // 'buf' contains an MPEG2 PACK - get a list of all it's elementary streams
+        hb_demux_ps( buf, list, 0 );
+
+        while ( ( es = hb_list_item( list, 0 ) ) )
+        {
+            hb_list_rem( list, es );
+            if ( (es->id & 0xff) == 0xbd || (es->id & 0xe0) == 0xc0 )
+            {
+                // this PES contains some kind of audio - get the substream id
+                // and check if we've seen it already.
+                int ssid = (es->id > 0xff ? es->id >> 8 : es->id) & 0xf;
+                if ( (smap & (1 << ssid)) == 0 )
+                {
+                    // we haven't seen this stream before - add it to the
+                    // title's list of audio streams.
+                    smap |= (1 << ssid);
+                    add_audio_to_title(title, es->id);
+                }
+            }
+            hb_buffer_close( &es );
+        }
+    }
+    hb_list_empty( &list );
+    hb_buffer_close(&buf);
+    fseeko(stream->file_handle, cur_pos, SEEK_SET);
+}
+
+/***********************************************************************
+ * hb_ts_stream_init
+ ***********************************************************************
+ *
+ **********************************************************************/
+
+static void hb_ts_stream_init(hb_stream_t *stream)
+{
+       int i;
+
+       for (i=0; i < kMaxNumberDecodeStreams; i++)
+       {
+               stream->ts_streamcont[i] = -1;
+       }
+       stream->ts_video_pids[0] = -1;
+    for ( i = 0; i < stream->ts_number_audio_pids; i++ )
+    {
+        stream-> ts_audio_pids[i] = -1;
+    }
+
+    stream->ts_packet = malloc( stream->packetsize );
+
+       // Find the audio and video pids in the stream
+       hb_ts_stream_find_pids(stream);
+
+       for (i = 0; i < stream->ts_number_video_pids + stream->ts_number_audio_pids; i++)
+       {
+        // demuxing buffer for TS to PS conversion
+               stream->ts_buf[i] = malloc( HB_DVD_READ_BUFFER_SIZE );
+       }
+
+    stream->ts_streamid[0] = 0xE0;             // stream 0 must be video
+}
+
+#define MAX_HOLE 208*80
+
+static off_t align_to_next_packet(hb_stream_t *stream)
+{
+    uint8_t buf[MAX_HOLE];
+       off_t pos = 0;
+    off_t start = ftello(stream->file_handle);
+
+    if ( start >= stream->packetsize ) {
+        start -= stream->packetsize;
+        fseeko(stream->file_handle, start, SEEK_SET);
+    }
+
+    if (fread(buf, sizeof(buf), 1, stream->file_handle) == 1)
+       {
+        const uint8_t *bp = buf;
+        int i;
+
+        for ( i = sizeof(buf); --i >= 0; ++bp )
+        {
+            if ( have_ts_sync( bp, stream->packetsize ) )
+            {
+                break;
+            }
+        }
+        if ( i >= 0 )
+        {
+            pos = ( bp - buf ) - stream->packetsize + 188;
+            if ( pos < 0 )
+                pos = 0;
+        }
+       }
+    fseeko(stream->file_handle, start+pos, SEEK_SET);
+       return pos;
+}
+
+
+typedef struct {
+    uint8_t *buf;
+    uint32_t val;
+    int pos;
+} bitbuf_t;
+
+static const unsigned int bitmask[] = {
+       0x0,0x1,0x3,0x7,0xf,0x1f,0x3f,0x7f,0xff,
+       0x1ff,0x3ff,0x7ff,0xfff,0x1fff,0x3fff,0x7fff,0xffff,
+       0x1ffff,0x3ffff,0x7ffff,0xfffff,0x1fffff,0x3fffff,0x7fffff,0xffffff,
+       0x1ffffff,0x3ffffff,0x7ffffff,0xfffffff,0x1fffffff,0x3fffffff,0x7fffffff,0xffffffff};
+
+static inline void set_buf(bitbuf_t *bb, uint8_t* buf, int bufsize, int clear)
+{
+       bb->pos = 0;
+       bb->buf = buf;
+       bb->val = (bb->buf[0] << 24) | (bb->buf[1] << 16) |
+              (bb->buf[2] << 8) | bb->buf[3];
+       if (clear)
+               memset(bb->buf, 0, bufsize);
+}
+
+static inline int buf_size(bitbuf_t *bb)
+{
+       return bb->pos >> 3;
+}
+
+static inline unsigned int get_bits(bitbuf_t *bb, int bits)
+{
+       unsigned int val;
+       int left = 32 - (bb->pos & 31);
+
+       if (bits < left)
+       {
+               val = (bb->val >> (left - bits)) & bitmask[bits];
+               bb->pos += bits;
+       }
+       else
+       {
+               val = (bb->val & bitmask[left]) << (bits - left);
+               bb->pos += left;
+               bits -= left;
+
+               int pos = bb->pos >> 3;
+               bb->val = (bb->buf[pos] << 24) | (bb->buf[pos + 1] << 16) | (bb->buf[pos + 2] << 8) | bb->buf[pos + 3];
+
+               if (bits > 0)
+               {
+                       val |= (bb->val >> (32 - bits)) & bitmask[bits];
+                       bb->pos += bits;
+               }
+       }
+
+       return val;
+}
+
+// extract what useful information we can from the elementary stream
+// descriptor list at 'dp' and add it to the stream at 'esindx'.
+// Descriptors with info we don't currently use are ignored.
+// The descriptor list & descriptor item formats are defined in
+// ISO 13818-1 (2000E) section 2.6 (pg. 62).
+static void decode_element_descriptors(hb_stream_t* stream, int esindx,
+                                       const uint8_t *dp, uint8_t dlen)
+{
+    const uint8_t *ep = dp + dlen;
+
+    while (dp < ep)
+    {
+        switch (dp[0])
+        {
+            case 10:    // ISO_639_language descriptor
+                stream->a52_info[esindx].lang_code = lang_to_code(lang_for_code2((const char *)&dp[2]));
+                break;
+
+            default:
+                break;
+        }
+        dp += dp[1] + 2;
+    }
+}
+
+static const char *stream_type_name (uint8_t stream_type)
+{
+    return st2codec[stream_type].name? st2codec[stream_type].name : "Unknown";
+}
+
+int decode_program_map(hb_stream_t* stream)
+{
+    bitbuf_t bb;
+       set_buf(&bb, stream->pmt_info.tablebuf, stream->pmt_info.tablepos, 0);
+
+    get_bits(&bb, 8);  // table_id
+    get_bits(&bb, 4);
+    unsigned int section_length = get_bits(&bb, 12);
+    stream->pmt_info.section_length = section_length;
+
+    unsigned int program_number = get_bits(&bb, 16);
+    stream->pmt_info.program_number = program_number;
+    get_bits(&bb, 2);
+    get_bits(&bb, 5);  // version_number
+    get_bits(&bb, 1);
+    get_bits(&bb, 8);  // section_number
+    get_bits(&bb, 8);  // last_section_number
+    get_bits(&bb, 3);
+    unsigned int PCR_PID = get_bits(&bb, 13);
+    stream->pmt_info.PCR_PID = PCR_PID;
+    get_bits(&bb, 4);
+    unsigned int program_info_length = get_bits(&bb, 12);
+    stream->pmt_info.program_info_length = program_info_length;
+
+       int i=0;
+       unsigned char *descriptor_buf = (unsigned char *) malloc(program_info_length);
+       for (i = 0; i < program_info_length; i++)
+       {
+         descriptor_buf[i] = get_bits(&bb, 8);
+       }
+
+       int cur_pos =  9 /* data after the section length field*/ + program_info_length;
+       int done_reading_stream_types = 0;
+       while (!done_reading_stream_types)
+    {
+        unsigned char stream_type = get_bits(&bb, 8);
+        get_bits(&bb, 3);
+        unsigned int elementary_PID = get_bits(&bb, 13);
+        get_bits(&bb, 4);
+        unsigned int ES_info_length = get_bits(&bb, 12);
+
+        int i=0;
+        unsigned char *ES_info_buf = (unsigned char *) malloc(ES_info_length);
+        for (i=0; i < ES_info_length; i++)
+        {
+            ES_info_buf[i] = get_bits(&bb, 8);
+        }
+
+
+        if ( index_of_pid( elementary_PID, stream ) < 0 )
+        {
+            // already have this pid - do nothing
+        }
+        if (stream->ts_number_video_pids == 0 && st2codec[stream_type].kind == V )
+        {
+            stream->ts_video_pids[0] = elementary_PID;
+            stream->ts_stream_type[0] = stream_type;
+            stream->ts_number_video_pids = 1;
+        }
+        else
+        {
+            // Defined audio stream types are 0x81 for AC-3/A52 audio and 0x03
+            // for mpeg audio. But content producers seem to use other
+            // values (0x04 and 0x06 have both been observed) so at this point
+            // we say everything that isn't a video pid is audio then at the end
+            // of hb_stream_title_scan we'll figure out which are really audio
+            // by looking at the PES headers.
+            i = stream->ts_number_audio_pids;
+            if (i < kMaxNumberAudioPIDS)
+            {
+                stream->ts_audio_pids[i] = elementary_PID;
+                stream->ts_stream_type[1 + i] = stream_type;
+                if (ES_info_length > 0)
+                {
+                    decode_element_descriptors(stream, i, ES_info_buf,
+                                               ES_info_length);
+                }
+                ++stream->ts_number_audio_pids;
+            }
+        }
+
+        cur_pos += 5 /* stream header */ + ES_info_length;
+
+        free(ES_info_buf);
+
+        if (cur_pos >= section_length - 4 /* stop before the CRC */)
+        done_reading_stream_types = 1;
+    }
+
+       free(descriptor_buf);
+       return 1;
+}
+
+static int build_program_map(const uint8_t *buf, hb_stream_t *stream)
+{
+    // Get adaption header info
+    int adapt_len = 0;
+    int adaption = (buf[3] & 0x30) >> 4;
+    if (adaption == 0)
+            return 0;
+    else if (adaption == 0x2)
+            adapt_len = 184;
+    else if (adaption == 0x3)
+            adapt_len = buf[4] + 1;
+    if (adapt_len > 184)
+            return 0;
+
+    // Get payload start indicator
+    int start;
+    start = (buf[1] & 0x40) != 0;
+
+    // Get pointer length - only valid in packets with a start flag
+    int pointer_len = 0;
+
+       if (start)
+       {
+               pointer_len = buf[4 + adapt_len] + 1;
+               stream->pmt_info.tablepos = 0;
+       }
+       // Get Continuity Counter
+       int continuity_counter = buf[3] & 0x0f;
+       if (!start && (stream->pmt_info.current_continuity_counter + 1 != continuity_counter))
+       {
+               hb_log("build_program_map - Continuity Counter %d out of sequence - expected %d", continuity_counter, stream->pmt_info.current_continuity_counter+1);
+               return 0;
+       }
+       stream->pmt_info.current_continuity_counter = continuity_counter;
+       stream->pmt_info.reading |= start;
+
+    // Add the payload for this packet to the current buffer
+       int amount_to_copy = 184 - adapt_len - pointer_len;
+    if (stream->pmt_info.reading && (amount_to_copy > 0))
+    {
+                       stream->pmt_info.tablebuf = realloc(stream->pmt_info.tablebuf, stream->pmt_info.tablepos + amount_to_copy);
+
+            memcpy(stream->pmt_info.tablebuf + stream->pmt_info.tablepos, buf + 4 + adapt_len + pointer_len, amount_to_copy);
+            stream->pmt_info.tablepos += amount_to_copy;
+    }
+    if (stream->pmt_info.tablepos > 3)
+    {
+        // We have enough to check the section length
+        int length;
+        length = ((stream->pmt_info.tablebuf[1] << 8) + 
+                  stream->pmt_info.tablebuf[2]) & 0xFFF;
+        if (stream->pmt_info.tablepos > length + 1)
+        {
+            // We just finished a bunch of packets - parse the program map details
+            int decode_ok = 0;
+            if (stream->pmt_info.tablebuf[0] == 0x02)
+                decode_ok = decode_program_map(stream);
+            free(stream->pmt_info.tablebuf);
+            stream->pmt_info.tablebuf = NULL;
+            stream->pmt_info.tablepos = 0;
+            stream->pmt_info.reading = 0;
+            if (decode_ok)
+                return decode_ok;
+        }
+
+    }
+
+    return 0;
+}
+
+static int decode_PAT(const uint8_t *buf, hb_stream_t *stream)
+{
+    unsigned char tablebuf[1024];
+    unsigned int tablepos = 0;
+
+    int reading = 0;
+
+
+    // Get adaption header info
+    int adapt_len = 0;
+    int adaption = (buf[3] & 0x30) >> 4;
+    if (adaption == 0)
+            return 0;
+    else if (adaption == 0x2)
+            adapt_len = 184;
+    else if (adaption == 0x3)
+            adapt_len = buf[4] + 1;
+    if (adapt_len > 184)
+            return 0;
+
+    // Get pointer length
+    int pointer_len = buf[4 + adapt_len] + 1;
+
+    // Get payload start indicator
+    int start;
+    start = (buf[1] & 0x40) != 0;
+
+    if (start)
+            reading = 1;
+
+    // Add the payload for this packet to the current buffer
+    if (reading && (184 - adapt_len) > 0)
+    {
+            if (tablepos + 184 - adapt_len - pointer_len > 1024)
+            {
+                    hb_log("decode_PAT - Bad program section length (> 1024)");
+                    return 0;
+            }
+            memcpy(tablebuf + tablepos, buf + 4 + adapt_len + pointer_len, 184 - adapt_len - pointer_len);
+            tablepos += 184 - adapt_len - pointer_len;
+    }
+
+    if (start && reading)
+    {
+            memcpy(tablebuf + tablepos, buf + 4 + adapt_len + 1, pointer_len - 1);
+
+
+            unsigned int pos = 0;
+            //while (pos < tablepos)
+            {
+                    bitbuf_t bb;
+                    set_buf(&bb, tablebuf + pos, tablepos - pos, 0);
+
+                    unsigned char section_id   = get_bits(&bb, 8);
+                    get_bits(&bb, 4);
+                    unsigned int section_len   = get_bits(&bb, 12);
+                    get_bits(&bb, 16); // transport_id
+                    get_bits(&bb, 2);
+                    get_bits(&bb, 5);  // version_num
+                    get_bits(&bb, 1);  // current_next
+                    get_bits(&bb, 8);  // section_num
+                    get_bits(&bb, 8);  // last_section
+
+                    switch (section_id)
+                    {
+                      case 0x00:
+                        {
+                          // Program Association Section
+                          section_len -= 5;    // Already read transport stream ID, version num, section num, and last section num
+                          section_len -= 4;   // Ignore the CRC
+                          int curr_pos = 0;
+                                                 stream->ts_number_pat_entries = 0;
+                          while ((curr_pos < section_len) && (stream->ts_number_pat_entries < kMaxNumberPMTStreams))
+                          {
+                            unsigned int pkt_program_num = get_bits(&bb, 16);
+                                                       stream->pat_info[stream->ts_number_pat_entries].program_number = pkt_program_num;
+
+                            get_bits(&bb, 3);  // Reserved
+                            if (pkt_program_num == 0)
+                            {
+                              get_bits(&bb, 13); // pkt_network_id
+                            }
+                            else
+                            {
+                              unsigned int pkt_program_map_PID = get_bits(&bb, 13);
+                                stream->pat_info[stream->ts_number_pat_entries].program_map_PID = pkt_program_map_PID;
+                            }
+                            curr_pos += 4;
+                                                       stream->ts_number_pat_entries++;
+                          }
+                        }
+                        break;
+                      case 0xC7:
+                            {
+                                    break;
+                            }
+                      case 0xC8:
+                            {
+                                    break;
+                            }
+                    }
+
+                    pos += 3 + section_len;
+            }
+
+            tablepos = 0;
+    }
+    return 1;
+}
+
+static void hb_ts_stream_find_pids(hb_stream_t *stream)
+{
+       // align to first packet
+    align_to_next_packet(stream);
+
+       // Read the Transport Stream Packets (188 bytes each) looking at first for PID 0 (the PAT PID), then decode that
+       // to find the program map PID and then decode that to get the list of audio and video PIDs
+
+       for (;;)
+       {
+        const uint8_t *buf = next_packet( stream );
+
+        if ( buf == NULL )
+        {
+                       hb_log("hb_ts_stream_find_pids - end of file");
+                       break;
+               }
+
+               // Get pid
+               int pid = (((buf[1] & 0x1F) << 8) | buf[2]) & 0x1FFF;
+
+        if ((pid == 0x0000) && (stream->ts_number_pat_entries == 0))
+               {
+                 decode_PAT(buf, stream);
+                 continue;
+               }
+
+               int pat_index = 0;
+               for (pat_index = 0; pat_index < stream->ts_number_pat_entries; pat_index++)
+               {
+                       // There are some streams where the PAT table has multiple entries as if their are
+                       // multiple programs in the same transport stream, and yet there's actually only one
+                       // program really in the stream. This seems to be true for transport streams that
+                       // originate in the HDHomeRun but have been output by EyeTV's export utility. What I think
+                       // is happening is that the HDHomeRun is sending the entire transport stream as broadcast,
+                       // but the EyeTV is only recording a single (selected) program number and not rewriting the
+                       // PAT info on export to match what's actually on the stream.
+                       // Until we have a way of handling multiple programs per transport stream elegantly we'll match
+                       // on the first pat entry for which we find a matching program map PID.  The ideal solution would
+                       // be to build a title choice popup from the PAT program number details and then select from
+                       // their - but right now the API's not capable of that.
+            if (stream->pat_info[pat_index].program_number != 0 &&
+                pid == stream->pat_info[pat_index].program_map_PID)
+                       {
+                         if (build_program_map(buf, stream) > 0)
+                               break;
+                       }
+               }
+               // Keep going  until we have a complete set of PIDs
+               if ((stream->ts_number_video_pids > 0) && (stream->ts_number_audio_pids > 0))
+                 break;
+       }
+    // XXX - until we figure out how to handle VC1 just bail when we find it so
+    // that ffmpeg will claim the input stream.
+    if ( stream->ts_stream_type[0] == 0xea )
+    {
+        stream->ts_number_video_pids = 0;
+        stream->ts_number_audio_pids = 0;
+        return;
+    }
+
+       hb_log("hb_ts_stream_find_pids - found the following PIDS");
+       hb_log("    Video PIDS : ");
+    int i;
+       for (i=0; i < stream->ts_number_video_pids; i++)
+       {
+        hb_log( "      0x%x type %s (0x%x)", 
+                stream->ts_video_pids[i],
+                stream_type_name(stream->ts_stream_type[i]),
+                stream->ts_stream_type[i]);
+       }
+       hb_log("    Audio PIDS : ");
+       for (i = 0; i < stream->ts_number_audio_pids; i++)
+       {
+        hb_log( "      0x%x type %s (0x%x)", 
+                stream->ts_audio_pids[i],
+                stream_type_name(stream->ts_stream_type[i+1]),
+                stream->ts_stream_type[i+1] );
+       }
+ }
+
+
+static void fwrite64( hb_stream_t *stream, void *buf, int size )
+{
+    if ( (stream->fwrite_buf - stream->fwrite_buf_orig) + size > 2048 )
+    {
+        hb_log( "steam fwrite64 buffer overflow - writing %d with %d already",
+                size, stream->fwrite_buf - stream->fwrite_buf_orig );
+        return;
+    }
+    memcpy( stream->fwrite_buf, buf, size );
+    stream->fwrite_buf += size;
+}
+
+static void write_pack(hb_stream_t* stream, uint64_t time, int stuffing)
+{
+       uint8_t buf[24];
+
+    buf[0] = 0x00;      // pack id
+    buf[1] = 0x00;
+    buf[2] = 0x01;
+    buf[3] = 0xba;
+
+    buf[4] = 0x44 |     // SCR
+             ( ( ( time >> 30 ) & 7 ) << 3 ) |
+             ( ( time >> 28 ) & 3 );
+    buf[5] = time >> 20;
+    buf[6] = 0x04 |
+             ( ( ( time >> 15 ) & 0x1f ) << 3 ) |
+             ( ( time >> 13 ) & 3 );
+    buf[7] = time >> 5;
+    buf[8] = 0x04 | ( time << 3 );
+
+    buf[9] = 0x01;      // SCR extension
+
+    buf[10] = 384000 >> (22 - 8);     // program mux rate
+    buf[11] = (uint8_t)( 384000 >> (22 - 16) );
+    buf[12] = (uint8_t)( 384000 << 2 ) | 0x03;
+
+    buf[13] = 0xf8 | stuffing;
+
+    int i;
+    for (i = 0; i < stuffing; ++i )
+        buf[14+i] = 0xff;
+
+       fwrite64(stream, buf, 14 + stuffing );
+}
+
+static void pad_buffer(hb_stream_t* stream, int pad)
+{
+       pad -= 6;
+
+       uint8_t buf[6];
+       buf[0] = 0;
+    buf[1] = 0;
+    buf[2] = 0;
+    buf[3] = 0xbe;
+       buf[4] = pad >> 8;
+    buf[5] = pad;
+
+       fwrite64(stream, buf, 6);
+
+       buf[0] = 0xff;
+    while ( --pad >= 0 )
+    {
+               fwrite64(stream, buf, 1);
+       }
+}
+
+static void make_pes_header(hb_stream_t* stream, int len, uint8_t streamid)
+{
+       uint8_t buf[9];
+
+    memset(buf, 0, sizeof(buf) );
+    buf[2] = 1;
+    buf[3] = streamid;
+    buf[4] = ( len + 3 ) >> 8;
+    buf[5] = len + 3;
+    buf[6] = 0x88;
+
+    fwrite64(stream, buf, 9);
+}
+
+static void generate_output_data(hb_stream_t *stream, int curstream)
+{
+    uint8_t *tdat = stream->ts_buf[curstream];
+    int len;
+
+    // we always ship a PACK header plus all the data in our demux buf.
+    // AC3 audio also always needs its substream header.
+    len = 14 + stream->ts_pos[curstream];
+    if ( stream->ts_extra_hdr[curstream] )
+    {
+        len += 4;
+    }
+
+    if ( ! stream->ts_start[curstream] )
+    {
+        // we're in the middle of a chunk of PES data - we need to add
+        // a 'continuation' PES header after the PACK header.
+        len += 9;
+    }
+
+    // Write out pack header
+    // If we don't have 2048 bytes we need to pad to 2048. We can
+    // add a padding frame after our data but we need at least 7
+    // bytes of space to do it (6 bytes of header & 1 of pad). If
+    // we have fewer than 7 bytes left we need to fill the excess
+    // space with stuffing bytes added to the pack header.
+    int stuffing = 0;
+    if ( len > HB_DVD_READ_BUFFER_SIZE )
+    {
+        hb_log( "stream ts length botch %d", len );
+    }
+    if ( HB_DVD_READ_BUFFER_SIZE - len < 8)
+    {
+        stuffing = HB_DVD_READ_BUFFER_SIZE - len;
+    }
+    write_pack(stream, stream->ts_nextpcr, stuffing );
+    stream->ts_nextpcr += 10;
+
+    if ( stream->ts_start[curstream] )
+    {
+        // Start frames already have a PES header but we have modify it
+        // to map from TS PID to PS stream id. Also, if the stream is AC3
+        // audio we have to insert an AC3 stream header between the end of
+        // the PES header and the start of the stream data.
+
+        stream->ts_start[curstream] = 0;
+        tdat[3] = stream->ts_streamid[curstream];
+
+        uint16_t plen = stream->ts_pos[curstream] - 6;
+        if ( stream->ts_extra_hdr[curstream] )
+        {
+            // We have to add an AC3 header in front of the data. Add its
+            // size to the PES packet length.
+            plen += 4;
+            tdat[4] = plen >> 8;
+            tdat[5] = plen;
+
+            // Write out the PES header
+            int hdrsize = 9 + tdat[8];
+            fwrite64(stream, tdat, hdrsize);
+
+            // add a four byte DVD ac3 stream header
+            uint8_t ac3_substream_id[4];
+            int ssid = (curstream - stream->ts_number_video_pids) & 0xf;
+            ac3_substream_id[0] = 0x80 | ssid;  // substream id
+            ac3_substream_id[1] = 0x01;         // number of sync words
+            ac3_substream_id[2] = 0x00;         // first offset (16 bits)
+            ac3_substream_id[3] = 0x02;
+            fwrite64(stream, ac3_substream_id, 4);
+
+            // add the rest of the data
+            fwrite64(stream, tdat + hdrsize, stream->ts_pos[curstream] - hdrsize);
+        }
+        else
+        {
+            // not audio - don't need to modify the stream so write what we've got
+            tdat[4] = plen >> 8;
+            tdat[5] = plen;
+            fwrite64( stream,  tdat, stream->ts_pos[curstream] );
+        }
+    }
+    else
+    {
+        // data without a PES start header needs a simple 'continuation'
+        // PES header. AC3 audio also needs its substream header.
+        if ( stream->ts_extra_hdr[curstream] == 0 )
+        {
+            make_pes_header(stream, stream->ts_pos[curstream],
+                            stream->ts_streamid[curstream]);
+        }
+        else
+        {
+            make_pes_header(stream, stream->ts_pos[curstream] + 4,
+                            stream->ts_streamid[curstream]);
+
+            // add a four byte DVD ac3 stream header
+            uint8_t ac3_substream_id[4];
+            int ssid = (curstream - stream->ts_number_video_pids) & 0xf;
+            ac3_substream_id[0] = 0x80 | ssid;  // substream id
+            ac3_substream_id[1] = 0x01;         // number of sync words
+            ac3_substream_id[2] = 0x00;         // first offset (16 bits)
+            ac3_substream_id[3] = 0x02;
+            fwrite64(stream, ac3_substream_id, 4);
+        }
+        fwrite64( stream, tdat, stream->ts_pos[curstream] );
+    }
+
+    // Write padding
+    int left = HB_DVD_READ_BUFFER_SIZE - len;
+    if ( left >= 8 )
+    {
+        pad_buffer(stream, left);
+    }
+
+    stream->ts_pos[curstream] = 0;
+}
+
+static int isIframe( hb_stream_t *stream, const uint8_t *buf, int adapt_len )
+{
+    // For mpeg2: look for a gop start or i-frame picture start
+    // for h.264: look for idr nal type or a slice header for an i-frame
+    // for vc1:   ???
+    int i;
+    uint32_t strid = 0;
+
+
+    if ( stream->ts_stream_type[0] <= 2 )
+    {
+        // This section of the code handles MPEG-1 and MPEG-2 video streams
+        for (i = 13 + adapt_len; i < 188; i++)
+        {
+            strid = (strid << 8) | buf[i];
+            if ( ( strid >> 8 ) == 1 )
+            {
+                // we found a start code
+                uint8_t id = strid;
+                switch ( id )
+                {
+                    case 0xB8: // group_start_code (GOP header)
+                    case 0xB3: // sequence_header code
+                        return 1;
+
+                    case 0x00: // picture_start_code
+                        // picture_header, let's see if it's an I-frame
+                        if (i<185)
+                        {
+                            // check if picture_coding_type == 1
+                            if ((buf[i+2] & (0x7 << 3)) == (1 << 3))
+                            {
+                                // found an I-frame picture
+                                return 1;
+                            }
+                        }
+                        break;
+                }
+            }
+        }
+        // didn't find an I-frame
+        return 0;
+    }
+    if ( stream->ts_stream_type[0] == 0x1b )
+    {
+        // we have an h.264 stream 
+        for (i = 13 + adapt_len; i < 188; i++)
+        {
+            strid = (strid << 8) | buf[i];
+            if ( ( strid >> 8 ) == 1 )
+            {
+                // we found a start code - remove the ref_idc from the nal type
+                uint8_t nal_type = strid & 0x1f;
+                if ( nal_type == 0x05 )
+                    // h.264 IDR picture start
+                    return 1;
+
+                if ( stream->packetsize == 192 )
+                {
+                    // m2ts files have idr frames so keep looking for one
+                    continue;
+                }
+
+                // h226 in ts files (ATSC or DVB video) often seem to be
+                // missing IDR frames so look for at least an I
+                if ( nal_type == 0x01 )
+                {
+                    // h.264 slice: has to be start MB 0 & type I (2, 4, 7 or 9)
+                    uint8_t id = buf[i+1];
+                    if ( ( id >> 4 ) == 0x0b || ( id >> 2 ) == 0x25 ||
+                         id == 0x88 || id == 0x8a )
+                    {
+                        return 1;
+                    }
+                }
+            }
+        }
+        // didn't find an I-frame
+        return 0;
+    }
+
+    // we don't understand the stream type so just say "yes" otherwise
+    // we'll discard all the video.
+    return 1;
+}
+
+/***********************************************************************
+ * hb_ts_stream_decode
+ ***********************************************************************
+ *
+ **********************************************************************/
+static int hb_ts_stream_decode( hb_stream_t *stream, uint8_t *obuf )
+{
+    /*
+     * stash the output buffer pointer in our stream so we don't have to
+     * pass it & its original value to everything we call.
+     */
+    stream->fwrite_buf = obuf;
+    stream->fwrite_buf_orig = obuf;
+
+       // spin until we get a packet of data from some stream or hit eof
+       while ( 1 )
+       {
+        int64_t pcr = stream->ts_lastpcr;
+        int curstream;
+
+        const uint8_t *buf = next_packet(stream);
+        if ( buf == NULL )
+        {
+            // end of file - we didn't finish filling our ps write buffer
+            // so just discard the remainder (the partial buffer is useless)
+            hb_log("hb_ts_stream_decode - eof");
+            return 0;
+               }
+
+        /* This next section validates the packet */
+
+               // Get pid and use it to find stream state.
+               int pid = ((buf[1] & 0x1F) << 8) | buf[2];
+        if ( ( curstream = index_of_pid( pid, stream ) ) < 0 )
+            continue;
+
+               // Get error
+               int errorbit = (buf[1] & 0x80) != 0;
+               if (errorbit)
+               {
+                       ts_err( stream, curstream,  "packet error bit set");
+                       continue;
+               }
+
+               // Get adaption header info
+               int adaption = (buf[3] & 0x30) >> 4;
+               int adapt_len = 0;
+               if (adaption == 0)
+               {
+                       ts_err( stream, curstream,  "adaptation code 0");
+                       continue;
+               }
+               else if (adaption == 0x2)
+                       adapt_len = 184;
+               else if (adaption == 0x3)
+               {
+                       adapt_len = buf[4] + 1;
+                       if (adapt_len > 184)
+                       {
+                               ts_err( stream, curstream,  "invalid adapt len %d", adapt_len);
+                continue;
+                       }
+               }
+
+        // if there's an adaptation header & PCR_flag is set
+        // get the PCR (Program Clock Reference)
+        if ( adapt_len > 7 && ( buf[5] & 0x10 ) != 0 )
+        {
+            pcr = ( (uint64_t)buf[6] << (33 - 8) ) |
+                  ( (uint64_t)buf[7] << (33 - 16) ) |
+                  ( (uint64_t)buf[8] << (33 - 24) ) |
+                  ( (uint64_t)buf[9] << (33 - 32) ) |
+                  ( buf[10] >> 7 );
+            stream->ts_nextpcr = pcr;
+
+            // remember the pcr across calls to this routine
+            stream->ts_lastpcr = pcr;
+        }
+
+        // If we don't have a pcr yet, the right thing to do here would
+        // be a 'continue' so we don't process anything until we have a
+        // clock reference. Unfortunately the HD Home Run appears to null
+        // out the pcr field of some streams so we keep going & substitute
+        // the video stream dts for the pcr when there's no pcr.
+
+               // Get continuity
+        // Continuity only increments for adaption values of 0x3 or 0x01
+        // and is not checked for start packets.
+
+               int start = (buf[1] & 0x40) != 0;
+
+        if ( (adaption & 0x01) != 0 )
+               {
+            int continuity = (buf[3] & 0xF);
+            if ( continuity == stream->ts_streamcont[curstream] )
+            {
+                // we got a duplicate packet (usually used to introduce
+                // a PCR when one is needed). The only thing that can
+                // change in the dup is the PCR which we grabbed above
+                // so ignore the rest.
+                continue;
+            }
+            if ( !start && (stream->ts_streamcont[curstream] != -1) &&
+                 stream->ts_foundfirst[curstream] &&
+                 (continuity != ( (stream->ts_streamcont[curstream] + 1) & 0xf ) ) )
+                       {
+                               ts_err( stream, curstream,  "continuity error: got %d expected %d",
+                        (int)continuity,
+                        (stream->ts_streamcont[curstream] + 1) & 0xf );
+                stream->ts_streamcont[curstream] = continuity;
+                               continue;
+                       }
+                       stream->ts_streamcont[curstream] = continuity;
+               }
+
+        /* If we get here the packet is valid - process its data */
+
+        if ( start )
+        {
+            // Found a random access point (now we can start a frame/audio packet..)
+
+                       // If we were skipping a bad packet, start fresh on this new PES packet..
+                       if (stream->ts_skipbad[curstream] == 1)
+                       {
+                // video skips to an iframe after a bad packet to minimize
+                // screen corruption
+                if ( curstream == 0 && !isIframe( stream, buf, adapt_len ) )
+                {
+                    continue;
+                }
+                               stream->ts_skipbad[curstream] = 0;
+                       }
+
+                       // If we don't have video yet, check to see if this is an
+            // i_frame (group of picture start)
+                       if ( curstream == 0 )
+            {
+                if ( !stream->ts_foundfirst[0] )
+                {
+                    if ( stream->need_keyframe )
+                    {
+                        if ( !isIframe( stream, buf, adapt_len ) )
+                        {
+                            // didn't find an I frame
+                            continue;
+                        }
+                        stream->need_keyframe = 0;
+                    }
+                    stream->ts_foundfirst[0] = 1;
+                }
+                ++stream->frames;
+
+                // if we don't have a pcr yet use the dts from this frame
+                if ( pcr == -1 )
+                {
+                    // PES must begin with an mpeg start code & contain
+                    // a DTS or PTS.
+                    const uint8_t *pes = buf + adapt_len + 4;
+                    if ( pes[0] != 0x00 || pes[1] != 0x00 || pes[2] != 0x01 ||
+                         ( pes[7] >> 6 ) == 0 )
+                    {
+                        continue;
+                    }
+                    // if we have a dts use it otherwise use the pts
+                    pes += (pes[7] & 0x40)? 14 : 9;
+
+                    pcr = ( (uint64_t)(pes[0] & 0xe ) << 29 );
+                    pcr |= ( pes[1] << 22 ) |
+                           ( ( pes[2] >> 1 ) << 15 ) |
+                           ( pes[3] << 7 ) |
+                           ( pes[4] >> 1 );
+                    stream->ts_nextpcr = pcr;
+                }
+            }
+            else if ( ! stream->ts_foundfirst[curstream] )
+            {
+                // start other streams only after first video frame found.
+                if ( ! stream->ts_foundfirst[0] )
+                {
+                    continue;
+                }
+                stream->ts_foundfirst[curstream] = 1;
+                       }
+
+            // If we have some data already on this stream, turn it into
+            // a program stream packet. Then add the payload for this
+            // packet to the current pid's buffer.
+            if ( stream->ts_pos[curstream] )
+            {
+                generate_output_data(stream, curstream);
+                stream->ts_start[curstream] = 1;
+                memcpy(stream->ts_buf[curstream],
+                       buf + 4 + adapt_len, 184 - adapt_len);
+                stream->ts_pos[curstream] = 184 - adapt_len;
+                return 1;
+            }
+            stream->ts_start[curstream] = 1;
+        }
+
+               // Add the payload for this packet to the current buffer
+               if (!stream->ts_skipbad[curstream] && stream->ts_foundfirst[curstream] &&
+            (184 - adapt_len) > 0)
+               {
+                       memcpy(stream->ts_buf[curstream] + stream->ts_pos[curstream],
+                   buf + 4 + adapt_len, 184 - adapt_len);
+                       stream->ts_pos[curstream] += 184 - adapt_len;
+
+            // if the next TS packet could possibly overflow our 2K output buffer
+            // we need to generate a packet now. Overflow would be 184 bytes of
+            // data + the 9 byte PES hdr + the 14 byte PACK hdr = 211 bytes.
+            if ( stream->ts_pos[curstream] >= (HB_DVD_READ_BUFFER_SIZE - 216) )
+            {
+                // we have enough data to make a PS packet
+                generate_output_data(stream, curstream);
+                return 1;
+            }
+               }
+       }
+}
+
+static void hb_ts_stream_reset(hb_stream_t *stream)
+{
+       int i;
+
+       for (i=0; i < kMaxNumberDecodeStreams; i++)
+       {
+               stream->ts_pos[i] = 0;
+               stream->ts_foundfirst[i] = 0;
+               stream->ts_skipbad[i] = 0;
+               stream->ts_streamcont[i] = -1;
+               stream->ts_start[i] = 0;
+       }
+
+    stream->ts_lastpcr = -1;
+    stream->ts_nextpcr = -1;
+
+    stream->frames = 0;
+    stream->errors = 0;
+    stream->need_keyframe = 0;
+    stream->last_error_frame = -10000;
+    stream->last_error_count = 0;
+
+    align_to_next_packet(stream);
+}
+
+// ------------------------------------------------------------------
+// Support for reading media files via the ffmpeg libraries.
+
+static void ffmpeg_add_codec( hb_stream_t *stream, int stream_index )
+{
+    // add a codec to the context here so it will be there when we
+    // read the first packet.
+    AVCodecContext *context = stream->ffmpeg_ic->streams[stream_index]->codec;
+    context->workaround_bugs = FF_BUG_AUTODETECT;
+    context->error_recognition = 1;
+    context->error_concealment = FF_EC_GUESS_MVS|FF_EC_DEBLOCK;
+    AVCodec *codec = avcodec_find_decoder( context->codec_id );
+    avcodec_open( context, codec );
+}
+
+// The ffmpeg stream reader / parser shares a lot of state with the 
+// decoder via a codec context kept in the AVStream of the reader's
+// AVFormatContext. Since decoding is done in a different thread we
+// have to somehow pass this codec context to the decoder and we have
+// to do it before the first packet is read (so we can't put the info
+// in the buf we'll send downstream). Decoders don't have any way to
+// get to the stream directly (they're not passed the title or job
+// pointers during a scan) so this is a back door for the decoder to
+// get the codec context. We just stick the stream pointer in the next
+// slot an array of pointers maintained as a circular list then return
+// the index into the list combined with the ffmpeg stream index as the
+// codec_param that will be passed to the decoder init routine. We make
+// the list 'big' (enough for 1024 simultaneously open ffmpeg streams)
+// so that we don't have to do a complicated allocator or worry about
+// deleting entries on close. 
+//
+// Entries can only be added to this list during a scan and are never
+// deleted so the list access doesn't require locking.
+static hb_stream_t **ffmpeg_streams;    // circular list of stream pointers
+static int ffmpeg_stream_cur;           // where we put the last stream pointer
+#define ffmpeg_sl_bits (10)             // log2 stream list size (in entries)
+#define ffmpeg_sl_size (1 << ffmpeg_sl_bits)
+
+// add a stream to the list & return the appropriate codec_param to access it
+static int ffmpeg_codec_param( hb_stream_t *stream, int stream_index )
+{
+    if ( !ffmpeg_streams )
+    {
+        ffmpeg_streams = calloc( ffmpeg_sl_size, sizeof(stream) );
+    }
+
+    // the title scan adds all the ffmpeg media streams at once so we
+    // only add a new entry to our stream list if the stream is different
+    // than last time.
+    int slot = ffmpeg_stream_cur;
+    if ( ffmpeg_streams[slot] != stream )
+    {
+        // new stream - put it in the next slot of the stream list
+        slot = ++ffmpeg_stream_cur & (ffmpeg_sl_size - 1);
+        ffmpeg_streams[slot] = stream;
+    }
+
+    ffmpeg_add_codec( stream, stream_index );
+
+    return ( stream_index << ffmpeg_sl_bits ) | slot;
+}
+
+// we're about to open 'title' to convert it - remap the stream associated
+// with the video & audio codec params of the title to refer to 'stream'
+// (the original scan stream was closed and no longer exists).
+static void ffmpeg_remap_stream( hb_stream_t *stream, hb_title_t *title )
+{
+    // tell ffmpeg we want a pts on every frame it returns
+    stream->ffmpeg_ic->flags |= AVFMT_FLAG_GENPTS;
+
+    // all the video & audio came from the same stream so remapping
+    // the video's stream slot takes care of everything.
+    int slot = title->video_codec_param & (ffmpeg_sl_size - 1);
+    ffmpeg_streams[slot] = stream;
+
+    // add codecs for all the streams used by the title
+    ffmpeg_add_codec( stream, title->video_codec_param >> ffmpeg_sl_bits );
+
+    int i;
+    hb_audio_t *audio;
+    for ( i = 0; ( audio = hb_list_item( title->list_audio, i ) ); ++i )
+    {
+        if ( audio->config.in.codec == HB_ACODEC_FFMPEG )
+        {
+            ffmpeg_add_codec( stream,
+                              audio->config.in.codec_param >> ffmpeg_sl_bits );
+        }
+    }
+}
+
+void *hb_ffmpeg_context( int codec_param )
+{
+    int slot = codec_param & (ffmpeg_sl_size - 1);
+    int stream_index = codec_param >> ffmpeg_sl_bits;
+    return ffmpeg_streams[slot]->ffmpeg_ic->streams[stream_index]->codec;
+}
+
+void *hb_ffmpeg_avstream( int codec_param )
+{
+    int slot = codec_param & (ffmpeg_sl_size - 1);
+    int stream_index = codec_param >> ffmpeg_sl_bits;
+    return ffmpeg_streams[slot]->ffmpeg_ic->streams[stream_index];
+}
+
+static AVFormatContext *ffmpeg_deferred_close;
+
+static int ffmpeg_open( hb_stream_t *stream, hb_title_t *title )
+{
+    if ( ffmpeg_deferred_close )
+    {
+        av_close_input_file( ffmpeg_deferred_close );
+        ffmpeg_deferred_close = NULL;
+    }
+    AVFormatContext *ic;
+
+    av_log_set_level( AV_LOG_ERROR );
+    if ( av_open_input_file( &ic, stream->path, NULL, 0, NULL ) < 0 )
+    {
+        return 0;
+    }
+    if ( av_find_stream_info( ic ) < 0 )
+        goto fail;
+
+    stream->ffmpeg_ic = ic;
+    stream->hb_stream_type = ffmpeg;
+    stream->ffmpeg_pkt = malloc(sizeof(*stream->ffmpeg_pkt));
+    av_init_packet( stream->ffmpeg_pkt );
+
+    if ( title )
+    {
+        // we're opening for read. scan passed out codec params that
+        // indexed its stream so we need to remap them so they point
+        // to this stream.
+        ffmpeg_remap_stream( stream, title );
+        av_log_set_level( AV_LOG_ERROR );
+    }
+    else
+    {
+        // we're opening for scan. let ffmpeg put some info into the
+        // log about what we've got.
+        av_log_set_level( AV_LOG_INFO );
+        dump_format( ic, 0, stream->path, 0 );
+        av_log_set_level( AV_LOG_ERROR );
+
+        // accept this file if it has at least one video stream we can decode
+        int i;
+        for (i = 0; i < ic->nb_streams; ++i )
+        {
+            if ( ic->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO )
+            {
+                break;
+            }
+        }
+        if ( i >= ic->nb_streams )
+            goto fail;
+    }
+    return 1;
+
+  fail:
+    av_close_input_file( ic );
+    return 0;
+}
+
+static void ffmpeg_close( hb_stream_t *d )
+{
+    // XXX since we're sharing the CodecContext with the downstream
+    // decoder proc we can't close the stream. We need to reference count
+    // this so we can close it when both are done with their instance but
+    // for now just defer the close until the next stream open or close.
+    if ( ffmpeg_deferred_close )
+    {
+        av_close_input_file( ffmpeg_deferred_close );
+    }
+    ffmpeg_deferred_close = d->ffmpeg_ic;
+    if ( d->ffmpeg_pkt != NULL )
+    {
+        free( d->ffmpeg_pkt );
+        d->ffmpeg_pkt = NULL;
+    }
+}
+
+static void add_ffmpeg_audio( hb_title_t *title, hb_stream_t *stream, int id )
+{
+    AVStream *st = stream->ffmpeg_ic->streams[id];
+    AVCodecContext *codec = st->codec;
+
+    // scan will ignore any audio without a bitrate. Since we've already
+    // typed the audio in order to determine its codec we set up the audio
+    // paramters here.
+    if ( codec->bit_rate || codec->sample_rate )
+    {
+        static const int chan2layout[] = {
+            HB_INPUT_CH_LAYOUT_MONO,  // We should allow no audio really.
+            HB_INPUT_CH_LAYOUT_MONO,   
+            HB_INPUT_CH_LAYOUT_STEREO,
+            HB_INPUT_CH_LAYOUT_2F1R,   
+            HB_INPUT_CH_LAYOUT_2F2R,
+            HB_INPUT_CH_LAYOUT_3F2R,   
+            HB_INPUT_CH_LAYOUT_4F2R,
+            HB_INPUT_CH_LAYOUT_STEREO, 
+            HB_INPUT_CH_LAYOUT_STEREO,
+        };
+
+        hb_audio_t *audio = calloc( 1, sizeof(*audio) );;
+
+        audio->id = id;
+        if ( codec->codec_id == CODEC_ID_AC3 )
+        {
+            audio->config.in.codec = HB_ACODEC_AC3;
+        }
+        else if ( codec->codec_id == CODEC_ID_DTS )
+        {
+            audio->config.in.codec = HB_ACODEC_DCA;
+        }
+        else
+        {
+            audio->config.in.codec = HB_ACODEC_FFMPEG;
+            audio->config.in.codec_param = ffmpeg_codec_param( stream, id );
+
+            audio->config.in.bitrate = codec->bit_rate? codec->bit_rate : 1;
+            audio->config.in.samplerate = codec->sample_rate;
+            audio->config.in.channel_layout = chan2layout[codec->channels & 7];
+        }
+
+        set_audio_description( audio, lang_for_code2( st->language ) );
+
+        hb_list_add( title->list_audio, audio );
+    }
+}
+
+static hb_title_t *ffmpeg_title_scan( hb_stream_t *stream )
+{
+    AVFormatContext *ic = stream->ffmpeg_ic;
+
+    // 'Barebones Title'
+    hb_title_t *title = hb_title_init( stream->path, 0 );
+    title->index = 1;
+
+       // Copy part of the stream path to the title name
+       char *sep = strrchr(stream->path, '/');
+       if (sep)
+               strcpy(title->name, sep+1);
+       char *dot_term = strrchr(title->name, '.');
+       if (dot_term)
+               *dot_term = '\0';
+
+    uint64_t dur = ic->duration * 90000 / AV_TIME_BASE;
+    title->duration = dur;
+    dur /= 90000;
+    title->hours    = dur / 3600;
+    title->minutes  = ( dur % 3600 ) / 60;
+    title->seconds  = dur % 60;
+
+    // One Chapter
+    hb_chapter_t * chapter;
+    chapter = calloc( sizeof( hb_chapter_t ), 1 );
+    chapter->index = 1;
+    chapter->duration = title->duration;
+    chapter->hours = title->hours;
+    chapter->minutes = title->minutes;
+    chapter->seconds = title->seconds;
+    hb_list_add( title->list_chapter, chapter );
+
+    // set the title to decode the first video stream in the file
+    title->demuxer = HB_NULL_DEMUXER;
+    title->video_codec = 0;
+    int i;
+    for (i = 0; i < ic->nb_streams; ++i )
+    {
+        if ( ic->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO &&
+             avcodec_find_decoder( ic->streams[i]->codec->codec_id ) &&
+             title->video_codec == 0 )
+        {
+            title->video_id = i;
+            stream->ffmpeg_video_id = i;
+
+            // We have to use the 'internal' avcodec decoder because
+            // it needs to share the codec context from this video
+            // stream. The parser internal to av_read_frame
+            // passes a bunch of state info to the decoder via the context.
+            title->video_codec = WORK_DECAVCODECVI;
+            title->video_codec_param = ffmpeg_codec_param( stream, i );
+        }
+        else if ( ic->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO &&
+                  avcodec_find_decoder( ic->streams[i]->codec->codec_id ) )
+        {
+            add_ffmpeg_audio( title, stream, i );
+        }
+    }
+
+    title->container_name = strdup( ic->iformat->name );
+    title->data_rate = ic->bit_rate;
+
+    return title;
+}
+
+static int64_t av_to_hb_pts( int64_t pts, double conv_factor )
+{
+    if ( pts == AV_NOPTS_VALUE )
+        return -1;
+    return (int64_t)( (double)pts * conv_factor );
+}
+
+static int ffmpeg_read( hb_stream_t *stream, hb_buffer_t *buf )
+{
+    int err;
+  again:
+    if ( ( err = av_read_frame( stream->ffmpeg_ic, stream->ffmpeg_pkt )) < 0 )
+    {
+        // XXX the following conditional is to handle avi files that
+        // use M$ 'packed b-frames' and occasionally have negative
+        // sizes for the null frames these require.
+        if ( err != AVERROR_NOMEM || stream->ffmpeg_pkt->size >= 0 )
+            // eof
+            return 0;
+    }
+    if ( stream->ffmpeg_pkt->size <= 0 )
+    {
+        // M$ "invalid and inefficient" packed b-frames require 'null frames'
+        // following them to preserve the timing (since the packing puts two
+        // or more frames in what looks like one avi frame). The contents and
+        // size of these null frames are ignored by the ff_h263_decode_frame
+        // as long as they're < 20 bytes. We need a positive size so we use
+        // one byte if we're given a zero or negative size. We don't know
+        // if the pkt data points anywhere reasonable so we just stick a
+        // byte of zero in our outbound buf.
+        buf->size = 1;
+        *buf->data = 0;
+    }
+    else
+    {
+        if ( stream->ffmpeg_pkt->size > buf->alloc )
+        {
+            // sometimes we get absurd sizes from ffmpeg
+            if ( stream->ffmpeg_pkt->size >= (1 << 25) )
+            {
+                hb_log( "ffmpeg_read: pkt too big: %d bytes", stream->ffmpeg_pkt->size );
+                av_free_packet( stream->ffmpeg_pkt );
+                return ffmpeg_read( stream, buf );
+            }
+            // need to expand buffer
+            hb_buffer_realloc( buf, stream->ffmpeg_pkt->size );
+        }
+        memcpy( buf->data, stream->ffmpeg_pkt->data, stream->ffmpeg_pkt->size );
+        buf->size = stream->ffmpeg_pkt->size;
+    }
+    buf->id = stream->ffmpeg_pkt->stream_index;
+    if ( buf->id == stream->ffmpeg_video_id )
+    {
+        if ( stream->need_keyframe &&
+             stream->ffmpeg_ic->streams[stream->ffmpeg_video_id]->codec->codec_id == 
+               CODEC_ID_VC1 )
+        {
+            // XXX the VC1 codec doesn't seek to key frames so to get previews
+            // we do it ourselves here. The decoder gets messed up if it
+            // doesn't get a SEQ header first so we consider that to be a key frame.
+            uint8_t *pkt = stream->ffmpeg_pkt->data;
+            if ( pkt[0] || pkt[1] || pkt[2] != 1 || pkt[3] != 0x0f )
+            {
+                goto again;
+            }
+            stream->need_keyframe = 0;
+        }
+        ++stream->frames;
+    }
+
+    // if we haven't done it already, compute a conversion factor to go
+    // from the ffmpeg timebase for the stream to HB's 90KHz timebase.
+    double tsconv = stream->ffmpeg_tsconv[stream->ffmpeg_pkt->stream_index];
+    if ( ! tsconv )
+    {
+        AVStream *s = stream->ffmpeg_ic->streams[stream->ffmpeg_pkt->stream_index];
+        tsconv = 90000. * (double)s->time_base.num / (double)s->time_base.den;
+        stream->ffmpeg_tsconv[stream->ffmpeg_pkt->stream_index] = tsconv;
+    }
+
+    buf->start = av_to_hb_pts( stream->ffmpeg_pkt->pts, tsconv );
+    buf->renderOffset = av_to_hb_pts( stream->ffmpeg_pkt->dts, tsconv );
+    if ( buf->renderOffset >= 0 && buf->start == -1 )
+    {
+        buf->start = buf->renderOffset;
+    }
+    av_free_packet( stream->ffmpeg_pkt );
+    return 1;
+}
+
+static int ffmpeg_seek( hb_stream_t *stream, float frac )
+{
+    AVFormatContext *ic = stream->ffmpeg_ic;
+    int64_t pos = (double)ic->duration * (double)frac;
+    if ( pos )
+    {
+        av_seek_frame( ic, -1, pos, 0 );
+        stream->need_keyframe = 1;
+    }
+    else
+    {
+        av_seek_frame( ic, -1, pos, AVSEEK_FLAG_BACKWARD );
+    }
+    return 1;
+}
diff --git a/libhb/sync.c b/libhb/sync.c
new file mode 100644 (file)
index 0000000..03de54c
--- /dev/null
@@ -0,0 +1,894 @@
+/* $Id: sync.c,v 1.38 2005/04/14 21:57:58 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+#include <stdio.h>
+
+#include "samplerate.h"
+#include "libavcodec/avcodec.h"
+
+#ifdef INT64_MIN
+#undef INT64_MIN /* Because it isn't defined correctly in Zeta */
+#endif
+#define INT64_MIN (-9223372036854775807LL-1)
+
+#define AC3_SAMPLES_PER_FRAME 1536
+
+typedef struct
+{
+    hb_audio_t * audio;
+
+    int64_t      next_start;    /* start time of next output frame */
+    int64_t      next_pts;      /* start time of next input frame */
+    int64_t      first_drop;    /* PTS of first 'went backwards' frame dropped */
+    int          drop_count;    /* count of 'time went backwards' drops */
+
+    /* Raw */
+    SRC_STATE  * state;
+    SRC_DATA     data;
+
+    /* AC-3 */
+    int          ac3_size;
+    uint8_t    * ac3_buf;
+
+} hb_sync_audio_t;
+
+struct hb_work_private_s
+{
+    hb_job_t * job;
+    int        busy;            // bitmask with one bit for each active input
+                                // (bit 0 = video; 1 = audio 0, 2 = audio 1, ...
+                                // appropriate bit is cleared when input gets
+                                // an eof buf. syncWork returns done when all
+                                // bits are clear.
+    /* Video */
+    hb_subtitle_t * subtitle;
+    int64_t pts_offset;
+    int64_t next_start;         /* start time of next output frame */
+    int64_t next_pts;           /* start time of next input frame */
+    int64_t first_drop;         /* PTS of first 'went backwards' frame dropped */
+    int drop_count;             /* count of 'time went backwards' drops */
+    int drops;                  /* frames dropped to make a cbr video stream */
+    int dups;                   /* frames duplicated to make a cbr video stream */
+    int video_sequence;
+    int count_frames;
+    int count_frames_max;
+    int chap_mark;              /* to propagate chapter mark across a drop */
+    hb_buffer_t * cur; /* The next picture to process */
+
+    /* Audio */
+    hb_sync_audio_t sync_audio[8];
+
+    /* Statistics */
+    uint64_t st_counts[4];
+    uint64_t st_dates[4];
+    uint64_t st_first;
+};
+
+/***********************************************************************
+ * Local prototypes
+ **********************************************************************/
+static void InitAudio( hb_work_object_t * w, int i );
+static void SyncVideo( hb_work_object_t * w );
+static void SyncAudio( hb_work_object_t * w, int i );
+static void InsertSilence( hb_work_object_t * w, int i, int64_t d );
+static void UpdateState( hb_work_object_t * w );
+
+/***********************************************************************
+ * hb_work_sync_init
+ ***********************************************************************
+ * Initialize the work object
+ **********************************************************************/
+int syncInit( hb_work_object_t * w, hb_job_t * job )
+{
+    hb_title_t       * title = job->title;
+    hb_chapter_t     * chapter;
+    int                i;
+    uint64_t           duration;
+    hb_work_private_t * pv;
+
+    pv = calloc( 1, sizeof( hb_work_private_t ) );
+    w->private_data = pv;
+
+    pv->job            = job;
+    pv->pts_offset     = INT64_MIN;
+
+    /* Calculate how many video frames we are expecting */
+    if (job->pts_to_stop)
+    {
+        duration = job->pts_to_stop + 90000;
+    }
+    else
+    {
+        duration = 0;
+        for( i = job->chapter_start; i <= job->chapter_end; i++ )
+        {
+            chapter   = hb_list_item( title->list_chapter, i - 1 );
+            duration += chapter->duration;
+        }
+        duration += 90000;
+        /* 1 second safety so we're sure we won't miss anything */
+    }
+    pv->count_frames_max = duration * job->vrate / job->vrate_base / 90000;
+
+    hb_log( "sync: expecting %d video frames", pv->count_frames_max );
+    pv->busy |= 1;
+
+    /* Initialize libsamplerate for every audio track we have */
+    if ( ! job->indepth_scan )
+    {
+        for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+        {
+            pv->busy |= ( 1 << (i + 1) );
+            InitAudio( w, i );
+        }
+    }
+
+    /* Get subtitle info, if any */
+    pv->subtitle = hb_list_item( title->list_subtitle, 0 );
+
+    return 0;
+}
+
+/***********************************************************************
+ * Close
+ ***********************************************************************
+ *
+ **********************************************************************/
+void syncClose( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_job_t          * job   = pv->job;
+    hb_title_t        * title = job->title;
+    hb_audio_t        * audio = NULL;
+    int i;
+
+    if( pv->cur )
+    {
+        hb_buffer_close( &pv->cur );
+    }
+
+    hb_log( "sync: got %d frames, %d expected",
+            pv->count_frames, pv->count_frames_max );
+
+    if (pv->drops || pv->dups )
+    {
+        hb_log( "sync: %d frames dropped, %d duplicated", pv->drops, pv->dups );
+    }
+
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = hb_list_item( title->list_audio, i );
+        if( audio->config.out.codec == HB_ACODEC_AC3 )
+        {
+            free( pv->sync_audio[i].ac3_buf );
+        }
+        else
+        {
+            src_delete( pv->sync_audio[i].state );
+        }
+    }
+
+    free( pv );
+    w->private_data = NULL;
+}
+
+/***********************************************************************
+ * Work
+ ***********************************************************************
+ * The root routine of this work abject
+ *
+ * The way this works is that we are syncing the audio to the PTS of
+ * the last video that we processed. That's why we skip the audio sync
+ * if we haven't got a valid PTS from the video yet.
+ *
+ **********************************************************************/
+int syncWork( hb_work_object_t * w, hb_buffer_t ** unused1,
+              hb_buffer_t ** unused2 )
+{
+    hb_work_private_t * pv = w->private_data;
+    int i;
+
+    if ( pv->busy & 1 )
+        SyncVideo( w );
+
+    for( i = 0; i < hb_list_count( pv->job->title->list_audio ); i++ )
+    {
+        if ( pv->busy & ( 1 << (i + 1) ) )
+            SyncAudio( w, i );
+    }
+
+    return ( pv->busy? HB_WORK_OK : HB_WORK_DONE );
+}
+
+hb_work_object_t hb_sync =
+{
+    WORK_SYNC,
+    "Synchronization",
+    syncInit,
+    syncWork,
+    syncClose
+};
+
+static void InitAudio( hb_work_object_t * w, int i )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_job_t        * job   = pv->job;
+    hb_title_t      * title = job->title;
+    hb_sync_audio_t * sync;
+
+    sync        = &pv->sync_audio[i];
+    sync->audio = hb_list_item( title->list_audio, i );
+
+    if( sync->audio->config.out.codec == HB_ACODEC_AC3 )
+    {
+        /* Have a silent AC-3 frame ready in case we have to fill a
+           gap */
+        AVCodec        * codec;
+        AVCodecContext * c;
+        short          * zeros;
+
+        codec = avcodec_find_encoder( CODEC_ID_AC3 );
+        c     = avcodec_alloc_context();
+
+        c->bit_rate    = sync->audio->config.in.bitrate;
+        c->sample_rate = sync->audio->config.in.samplerate;
+        c->channels    = HB_INPUT_CH_LAYOUT_GET_DISCRETE_COUNT( sync->audio->config.in.channel_layout );
+
+        if( avcodec_open( c, codec ) < 0 )
+        {
+            hb_log( "sync: avcodec_open failed" );
+            return;
+        }
+
+        zeros          = calloc( AC3_SAMPLES_PER_FRAME *
+                                 sizeof( short ) * c->channels, 1 );
+        sync->ac3_size = sync->audio->config.in.bitrate * AC3_SAMPLES_PER_FRAME /
+                             sync->audio->config.in.samplerate / 8;
+        sync->ac3_buf  = malloc( sync->ac3_size );
+
+        if( avcodec_encode_audio( c, sync->ac3_buf, sync->ac3_size,
+                                  zeros ) != sync->ac3_size )
+        {
+            hb_log( "sync: avcodec_encode_audio failed" );
+        }
+
+        free( zeros );
+        avcodec_close( c );
+        av_free( c );
+    }
+    else
+    {
+        /* Initialize libsamplerate */
+        int error;
+        sync->state             = src_new( SRC_SINC_MEDIUM_QUALITY, HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(sync->audio->config.out.mixdown), &error );
+        sync->data.end_of_input = 0;
+    }
+}
+
+/***********************************************************************
+ * SyncVideo
+ ***********************************************************************
+ *
+ **********************************************************************/
+static void SyncVideo( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_buffer_t * cur, * next, * sub = NULL;
+    hb_job_t * job = pv->job;
+
+    if( !pv->cur && !( pv->cur = hb_fifo_get( job->fifo_raw ) ) )
+    {
+        /* We haven't even got a frame yet */
+        return;
+    }
+    cur = pv->cur;
+    if( cur->size == 0 )
+    {
+        /* we got an end-of-stream. Feed it downstream & signal that we're done. */
+        hb_fifo_push( job->fifo_sync, hb_buffer_init( 0 ) );
+        pv->busy &=~ 1;
+        return;
+    }
+
+    /* At this point we have a frame to process. Let's check
+        1) if we will be able to push into the fifo ahead
+        2) if the next frame is there already, since we need it to
+           compute the duration of the current frame*/
+    while( !hb_fifo_is_full( job->fifo_sync ) &&
+           ( next = hb_fifo_see( job->fifo_raw ) ) )
+    {
+        hb_buffer_t * buf_tmp;
+
+        if( next->size == 0 )
+        {
+            /* we got an end-of-stream. Feed it downstream & signal that
+             * we're done. Note that this means we drop the final frame of
+             * video (we don't know its duration). On DVDs the final frame
+             * is often strange and dropping it seems to be a good idea. */
+            hb_fifo_push( job->fifo_sync, hb_buffer_init( 0 ) );
+            pv->busy &=~ 1;
+            return;
+        }
+        if( pv->pts_offset == INT64_MIN )
+        {
+            /* This is our first frame */
+            pv->pts_offset = 0;
+            if ( cur->start != 0 )
+            {
+                /*
+                 * The first pts from a dvd should always be zero but
+                 * can be non-zero with a transport or program stream since
+                 * we're not guaranteed to start on an IDR frame. If we get
+                 * a non-zero initial PTS extend its duration so it behaves
+                 * as if it started at zero so that our audio timing will
+                 * be in sync.
+                 */
+                hb_log( "sync: first pts is %lld", cur->start );
+                cur->start = 0;
+            }
+        }
+
+        /*
+         * since the first frame is always 0 and the upstream reader code
+         * is taking care of adjusting for pts discontinuities, we just have
+         * to deal with the next frame's start being in the past. This can
+         * happen when the PTS is adjusted after data loss but video frame
+         * reordering causes some frames with the old clock to appear after
+         * the clock change. This creates frames that overlap in time which
+         * looks to us like time going backward. The downstream muxing code
+         * can deal with overlaps of up to a frame time but anything larger
+         * we handle by dropping frames here.
+         */
+        if ( (int64_t)( next->start - cur->start ) <= 0 )
+        {
+            if ( pv->first_drop == 0 )
+            {
+                pv->first_drop = next->start;
+            }
+            ++pv->drop_count;
+            buf_tmp = hb_fifo_get( job->fifo_raw );
+            if ( buf_tmp->new_chap )
+            {
+                // don't drop a chapter mark when we drop the buffer
+                pv->chap_mark = buf_tmp->new_chap;
+            }
+            hb_buffer_close( &buf_tmp );
+            continue;
+        }
+        if ( pv->first_drop )
+        {
+            hb_log( "sync: video time didn't advance - dropped %d frames "
+                    "(delta %d ms, current %lld, next %lld, dur %d)",
+                    pv->drop_count, (int)( cur->start - pv->first_drop ) / 90,
+                    cur->start, next->start, (int)( next->start - cur->start ) );
+            pv->first_drop = 0;
+            pv->drop_count = 0;
+        }
+
+        /*
+         * Track the video sequence number localy so that we can sync the audio
+         * to it using the sequence number as well as the PTS.
+         */
+        pv->video_sequence = cur->sequence;
+
+        /* Look for a subtitle for this frame */
+        if( pv->subtitle )
+        {
+            hb_buffer_t * sub2;
+            while( ( sub = hb_fifo_see( pv->subtitle->fifo_raw ) ) )
+            {
+                /* If two subtitles overlap, make the first one stop
+                   when the second one starts */
+                sub2 = hb_fifo_see2( pv->subtitle->fifo_raw );
+                if( sub2 && sub->stop > sub2->start )
+                    sub->stop = sub2->start;
+
+                // hb_log("0x%x: video seq: %lld  subtitle sequence: %lld",
+                //       sub, cur->sequence, sub->sequence);
+
+                if( sub->sequence > cur->sequence )
+                {
+                    /*
+                     * The video is behind where we are, so wait until
+                     * it catches up to the same reader point on the
+                     * DVD. Then our PTS should be in the same region
+                     * as the video.
+                     */
+                    sub = NULL;
+                    break;
+                }
+
+                if( sub->stop > cur->start ) {
+                    /*
+                     * The stop time is in the future, so fall through
+                     * and we'll deal with it in the next block of
+                     * code.
+                     */
+                    break;
+                }
+
+                /*
+                 * The subtitle is older than this picture, trash it
+                 */
+                sub = hb_fifo_get( pv->subtitle->fifo_raw );
+                hb_buffer_close( &sub );
+            }
+
+            /*
+             * There is a valid subtitle, is it time to display it?
+             */
+            if( sub )
+            {
+                if( sub->stop > sub->start)
+                {
+                    /*
+                     * Normal subtitle which ends after it starts, check to
+                     * see that the current video is between the start and end.
+                     */
+                    if( cur->start > sub->start &&
+                        cur->start < sub->stop )
+                    {
+                        /*
+                         * We should be playing this, so leave the
+                         * subtitle in place.
+                         *
+                         * fall through to display
+                         */
+                        if( ( sub->stop - sub->start ) < ( 3 * 90000 ) )
+                        {
+                            /*
+                             * Subtitle is on for less than three seconds, extend
+                             * the time that it is displayed to make it easier
+                             * to read. Make it 3 seconds or until the next
+                             * subtitle is displayed.
+                             *
+                             * This is in response to Indochine which only
+                             * displays subs for 1 second - too fast to read.
+                             */
+                            sub->stop = sub->start + ( 3 * 90000 );
+
+                            sub2 = hb_fifo_see2( pv->subtitle->fifo_raw );
+
+                            if( sub2 && sub->stop > sub2->start )
+                            {
+                                sub->stop = sub2->start;
+                            }
+                        }
+                    }
+                    else
+                    {
+                        /*
+                         * Defer until the play point is within the subtitle
+                         */
+                        sub = NULL;
+                    }
+                }
+                else
+                {
+                    /*
+                     * The end of the subtitle is less than the start, this is a
+                     * sign of a PTS discontinuity.
+                     */
+                    if( sub->start > cur->start )
+                    {
+                        /*
+                         * we haven't reached the start time yet, or
+                         * we have jumped backwards after having
+                         * already started this subtitle.
+                         */
+                        if( cur->start < sub->stop )
+                        {
+                            /*
+                             * We have jumped backwards and so should
+                             * continue displaying this subtitle.
+                             *
+                             * fall through to display.
+                             */
+                        }
+                        else
+                        {
+                            /*
+                             * Defer until the play point is within the subtitle
+                             */
+                            sub = NULL;
+                        }
+                    } else {
+                        /*
+                         * Play this subtitle as the start is greater than our
+                         * video point.
+                         *
+                         * fall through to display/
+                         */
+                    }
+                }
+            }
+        }
+
+        int64_t duration;
+        if ( job->mux & HB_MUX_AVI || job->cfr )
+        {
+            /*
+             * The concept of variable frame rate video was a bit too advanced
+             * for Microsoft so AVI doesn't support it. Since almost all dvd
+             * video is VFR we have to convert it to constant frame rate to
+             * put it in an AVI container. So here we duplicate, drop and
+             * otherwise trash video frames to appease the gods of Redmond.
+             */
+
+            /* mpeg durations are exact when expressed in ticks of the
+             * 27MHz System clock but not in HB's 90KHz PTS clock. To avoid
+             * a truncation bias that will eventually cause the audio to desync
+             * we compute the duration of the next frame using 27MHz ticks
+             * then truncate it to 90KHz. */
+            duration = ( (int64_t)(pv->count_frames + 1 ) * job->vrate_base ) / 300 -
+                       pv->next_start;
+
+            /* We don't want the input & output clocks to be exactly in phase
+             * otherwise small variations in the time will cause us to think
+             * we're a full frame off & there will be lots of drops and dups.
+             * We offset the input clock by half the duration so it's maximally
+             * out of phase with the output clock. */
+            if( cur->start < pv->next_start  - ( duration >> 1 ) )
+            {
+                /* current frame too old - drop it */
+                if ( cur->new_chap )
+                {
+                    pv->chap_mark = cur->new_chap;
+                }
+                hb_buffer_close( &cur );
+                pv->cur = cur = hb_fifo_get( job->fifo_raw );
+                pv->next_pts = next->start;
+                ++pv->drops;
+                continue;
+            }
+
+            if( next->start > pv->next_start + duration + ( duration >> 1 ) )
+            {
+                /* next frame too far ahead - dup current frame */
+                buf_tmp = hb_buffer_init( cur->size );
+                hb_buffer_copy_settings( buf_tmp, cur );
+                memcpy( buf_tmp->data, cur->data, cur->size );
+                buf_tmp->sequence = cur->sequence;
+                ++pv->dups;
+            }
+            else
+            {
+                /* this frame in our time window & doesn't need to be duped */
+                buf_tmp = cur;
+                pv->cur = cur = hb_fifo_get( job->fifo_raw );
+                pv->next_pts = next->start;
+            }
+        }
+        else
+        {
+            /*
+             * Adjust the pts of the current frame so that it's contiguous
+             * with the previous frame. The start time of the current frame
+             * has to be the end time of the previous frame and the stop
+             * time has to be the start of the next frame.  We don't
+             * make any adjustments to the source timestamps other than removing
+             * the clock offsets (which also removes pts discontinuities).
+             * This means we automatically encode at the source's frame rate.
+             * MP2 uses an implicit duration (frames end when the next frame
+             * starts) but more advanced containers like MP4 use an explicit
+             * duration. Since we're looking ahead one frame we set the
+             * explicit stop time from the start time of the next frame.
+             */
+            buf_tmp = cur;
+            pv->cur = cur = hb_fifo_get( job->fifo_raw );
+            pv->next_pts = cur->start;
+            duration = cur->start - buf_tmp->start;
+            if ( duration <= 0 )
+            {
+                hb_log( "sync: invalid video duration %lld, start %lld, next %lld",
+                        duration, buf_tmp->start, next->start );
+            }
+        }
+
+        buf_tmp->start = pv->next_start;
+        pv->next_start += duration;
+        buf_tmp->stop = pv->next_start;
+
+        if ( pv->chap_mark )
+        {
+            // we have a pending chapter mark from a recent drop - put it on this
+            // buffer (this may make it one frame late but we can't do any better).
+            buf_tmp->new_chap = pv->chap_mark;
+            pv->chap_mark = 0;
+        }
+
+        /* If we have a subtitle for this picture, copy it */
+        /* FIXME: we should avoid this memcpy */
+        if( sub )
+        {
+            buf_tmp->sub         = hb_buffer_init( sub->size );
+            buf_tmp->sub->x      = sub->x;
+            buf_tmp->sub->y      = sub->y;
+            buf_tmp->sub->width  = sub->width;
+            buf_tmp->sub->height = sub->height;
+            memcpy( buf_tmp->sub->data, sub->data, sub->size );
+        }
+
+        /* Push the frame to the renderer */
+        hb_fifo_push( job->fifo_sync, buf_tmp );
+
+        /* Update UI */
+        UpdateState( w );
+
+        /* Make sure we won't get more frames then expected */
+        if( pv->count_frames >= pv->count_frames_max * 2)
+        {
+            hb_log( "sync: got too many frames (%d), exiting early",
+                    pv->count_frames );
+
+            // Drop an empty buffer into our output to ensure that things
+            // get flushed all the way out.
+            hb_fifo_push( job->fifo_sync, hb_buffer_init( 0 ) );
+            pv->busy &=~ 1;
+            return;
+        }
+    }
+}
+
+static void OutputAudioFrame( hb_job_t *job, hb_audio_t *audio, hb_buffer_t *buf,
+                              hb_sync_audio_t *sync, hb_fifo_t *fifo, int i )
+{
+    int64_t start = sync->next_start;
+    int64_t duration = buf->stop - buf->start;
+
+    sync->next_pts += duration;
+
+    if( audio->config.in.samplerate == audio->config.out.samplerate ||
+        audio->config.out.codec == HB_ACODEC_AC3 ||
+        audio->config.out.codec == HB_ACODEC_DCA )
+    {
+        /*
+         * If we don't have to do sample rate conversion or this audio is 
+         * pass-thru just send the input buffer downstream after adjusting
+         * its timestamps to make the output stream continuous.
+         */
+    }
+    else
+    {
+        /* Not pass-thru - do sample rate conversion */
+        int count_in, count_out;
+        hb_buffer_t * buf_raw = buf;
+        int channel_count = HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->config.out.mixdown) *
+                            sizeof( float );
+
+        count_in  = buf_raw->size / channel_count;
+        /*
+         * When using stupid rates like 44.1 there will always be some
+         * truncation error. E.g., a 1536 sample AC3 frame will turn into a
+         * 1536*44.1/48.0 = 1411.2 sample frame. If we just truncate the .2
+         * the error will build up over time and eventually the audio will
+         * substantially lag the video. libsamplerate will keep track of the
+         * fractional sample & give it to us when appropriate if we give it
+         * an extra sample of space in the output buffer.
+         */
+        count_out = ( duration * audio->config.out.samplerate ) / 90000 + 1;
+
+        sync->data.input_frames = count_in;
+        sync->data.output_frames = count_out;
+        sync->data.src_ratio = (double)audio->config.out.samplerate /
+                               (double)audio->config.in.samplerate;
+
+        buf = hb_buffer_init( count_out * channel_count );
+        sync->data.data_in  = (float *) buf_raw->data;
+        sync->data.data_out = (float *) buf->data;
+        if( src_process( sync->state, &sync->data ) )
+        {
+            /* XXX If this happens, we're screwed */
+            hb_log( "sync: audio %d src_process failed", i );
+        }
+        hb_buffer_close( &buf_raw );
+
+        buf->size = sync->data.output_frames_gen * channel_count;
+        duration = ( sync->data.output_frames_gen * 90000 ) /
+                   audio->config.out.samplerate;
+    }
+    buf->frametype = HB_FRAME_AUDIO;
+    buf->start = start;
+    buf->stop  = start + duration;
+    sync->next_start = start + duration;
+    hb_fifo_push( fifo, buf );
+}
+
+/***********************************************************************
+ * SyncAudio
+ ***********************************************************************
+ *
+ **********************************************************************/
+static void SyncAudio( hb_work_object_t * w, int i )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_job_t        * job = pv->job;
+    hb_sync_audio_t * sync = &pv->sync_audio[i];
+    hb_audio_t      * audio = sync->audio;
+    hb_buffer_t     * buf;
+    hb_fifo_t       * fifo;
+
+    if( audio->config.out.codec == HB_ACODEC_AC3 )
+    {
+        fifo = audio->priv.fifo_out;
+    }
+    else
+    {
+        fifo = audio->priv.fifo_sync;
+    }
+
+    while( !hb_fifo_is_full( fifo ) && ( buf = hb_fifo_see( audio->priv.fifo_raw ) ) )
+    {
+        /* if the next buffer is an eof send it downstream */
+        if ( buf->size <= 0 )
+        {
+            buf = hb_fifo_get( audio->priv.fifo_raw );
+            hb_fifo_push( fifo, buf );
+            pv->busy &=~ (1 << (i + 1) );
+            return;
+        }
+        if ( (int64_t)( buf->start - sync->next_pts ) < 0 )
+        {
+            // audio time went backwards.
+            // If our output clock is more than a half frame ahead of the
+            // input clock drop this frame to move closer to sync.
+            // Otherwise drop frames until the input clock matches the output clock.
+            if ( sync->first_drop || sync->next_start - buf->start > 90*15 )
+            {
+                // Discard data that's in the past.
+                if ( sync->first_drop == 0 )
+                {
+                    sync->first_drop = sync->next_pts;
+                }
+                ++sync->drop_count;
+                buf = hb_fifo_get( audio->priv.fifo_raw );
+                hb_buffer_close( &buf );
+                continue;
+            }
+            sync->next_pts = buf->start;
+        }
+        if ( sync->first_drop )
+        {
+            // we were dropping old data but input buf time is now current
+            hb_log( "sync: audio %d time went backwards %d ms, dropped %d frames "
+                    "(next %lld, current %lld)", i,
+                    (int)( sync->next_pts - sync->first_drop ) / 90,
+                    sync->drop_count, sync->first_drop, sync->next_pts );
+            sync->first_drop = 0;
+            sync->drop_count = 0;
+            sync->next_pts = buf->start;
+        }
+        if ( buf->start - sync->next_pts >= (90 * 70) )
+        {
+            if ( buf->start - sync->next_pts > (90000LL * 60) )
+            {
+                // there's a gap of more than a minute between the last
+                // frame and this. assume we got a corrupted timestamp
+                // and just drop the next buf.
+                hb_log( "sync: %d minute time gap in audio %d - dropping buf"
+                        "  start %lld, next %lld",
+                        (int)((buf->start - sync->next_pts) / (90000*60)),
+                        i, buf->start, sync->next_pts );
+                buf = hb_fifo_get( audio->priv.fifo_raw );
+                hb_buffer_close( &buf );
+                continue;
+            }
+            /*
+             * there's a gap of at least 70ms between the last
+             * frame we processed & the next. Fill it with silence.
+             */
+            hb_log( "sync: adding %d ms of silence to audio %d"
+                    "  start %lld, next %lld",
+                    (int)((buf->start - sync->next_pts) / 90),
+                    i, buf->start, sync->next_pts );
+            InsertSilence( w, i, buf->start - sync->next_pts );
+            return;
+        }
+
+        /*
+         * When we get here we've taken care of all the dups and gaps in the
+         * audio stream and are ready to inject the next input frame into
+         * the output stream.
+         */
+        buf = hb_fifo_get( audio->priv.fifo_raw );
+        OutputAudioFrame( job, audio, buf, sync, fifo, i );
+    }
+}
+
+static void InsertSilence( hb_work_object_t * w, int i, int64_t duration )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_job_t        *job = pv->job;
+    hb_sync_audio_t *sync = &pv->sync_audio[i];
+    hb_buffer_t     *buf;
+    hb_fifo_t       *fifo;
+
+    // to keep pass-thru and regular audio in sync we generate silence in
+    // AC3 frame-sized units. If the silence duration isn't an integer multiple
+    // of the AC3 frame duration we will truncate or round up depending on
+    // which minimizes the timing error.
+    const int frame_dur = ( 90000 * AC3_SAMPLES_PER_FRAME ) /
+                          sync->audio->config.in.samplerate;
+    int frame_count = ( duration + (frame_dur >> 1) ) / frame_dur;
+
+    while ( --frame_count >= 0 )
+    {
+        if( sync->audio->config.out.codec == HB_ACODEC_AC3 )
+        {
+            buf        = hb_buffer_init( sync->ac3_size );
+            buf->start = sync->next_pts;
+            buf->stop  = buf->start + frame_dur;
+            memcpy( buf->data, sync->ac3_buf, buf->size );
+            fifo = sync->audio->priv.fifo_out;
+        }
+        else
+        {
+            buf = hb_buffer_init( AC3_SAMPLES_PER_FRAME * sizeof( float ) *
+                                     HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(
+                                         sync->audio->config.out.mixdown) );
+            buf->start = sync->next_pts;
+            buf->stop  = buf->start + frame_dur;
+            memset( buf->data, 0, buf->size );
+            fifo = sync->audio->priv.fifo_sync;
+        }
+        OutputAudioFrame( job, sync->audio, buf, sync, fifo, i );
+    }
+}
+
+static void UpdateState( hb_work_object_t * w )
+{
+    hb_work_private_t * pv = w->private_data;
+    hb_state_t state;
+
+    if( !pv->count_frames )
+    {
+        pv->st_first = hb_get_date();
+    }
+    pv->count_frames++;
+
+    if( hb_get_date() > pv->st_dates[3] + 1000 )
+    {
+        memmove( &pv->st_dates[0], &pv->st_dates[1],
+                 3 * sizeof( uint64_t ) );
+        memmove( &pv->st_counts[0], &pv->st_counts[1],
+                 3 * sizeof( uint64_t ) );
+        pv->st_dates[3]  = hb_get_date();
+        pv->st_counts[3] = pv->count_frames;
+    }
+
+#define p state.param.working
+    state.state = HB_STATE_WORKING;
+    p.progress  = (float) pv->count_frames / (float) pv->count_frames_max;
+    if( p.progress > 1.0 )
+    {
+        p.progress = 1.0;
+    }
+    p.rate_cur   = 1000.0 *
+        (float) ( pv->st_counts[3] - pv->st_counts[0] ) /
+        (float) ( pv->st_dates[3] - pv->st_dates[0] );
+    if( hb_get_date() > pv->st_first + 4000 )
+    {
+        int eta;
+        p.rate_avg = 1000.0 * (float) pv->st_counts[3] /
+            (float) ( pv->st_dates[3] - pv->st_first );
+        eta = (float) ( pv->count_frames_max - pv->st_counts[3] ) /
+            p.rate_avg;
+        p.hours   = eta / 3600;
+        p.minutes = ( eta % 3600 ) / 60;
+        p.seconds = eta % 60;
+    }
+    else
+    {
+        p.rate_avg = 0.0;
+        p.hours    = -1;
+        p.minutes  = -1;
+        p.seconds  = -1;
+    }
+#undef p
+
+    hb_set_state( pv->job->h, &state );
+}
diff --git a/libhb/update.c b/libhb/update.c
new file mode 100644 (file)
index 0000000..599d82e
--- /dev/null
@@ -0,0 +1,348 @@
+/* $Id: update.c,v 1.7 2005/03/26 23:04:14 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+
+static void UpdateFunc( void * );
+
+typedef struct
+{
+    int  * build;
+    char * version;
+
+} hb_update_t;
+
+hb_thread_t * hb_update_init( int * build, char * version )
+{
+    hb_update_t * data = calloc( sizeof( hb_update_t ), 1 );
+    data->build   = build;
+    data->version = version;
+
+    return hb_thread_init( "update", UpdateFunc, data,
+                           HB_NORMAL_PRIORITY );
+}
+
+
+static void UpdateFunc( void * _data )
+{
+
+    hb_update_t * data = (hb_update_t *) _data;
+       
+       char     * hb_query, * hb_query_two;
+       hb_net_t * net;
+    int        ret;
+    char       buf[4096];
+    char     * cur, * end;
+    int        size;
+    int        stable, unstable;
+    char       stable_str[16], unstable_str[16];
+    int        i;
+       
+    /* Setup hb_query and hb_query_two with the correct appcast file */
+    if( HB_BUILD % 100 )
+    {  
+        hb_log("Using http://handbrake.fr/appcast_unstable.xml (primary)");
+        hb_log("Using http://handbrake.fr/appcast.xml (secondary)");
+    }
+       else 
+       {
+        hb_log("Using http://handbrake.fr/appcast.xml (primary)");
+        hb_log("Using http://handbrake.fr/appcast_unstable.xml (secondary)");
+    }
+       
+       hb_query = "GET /appcast.xml HTTP/1.0\r\nHost: handbrake.fr\r\n\r\n";
+    hb_query_two = "GET /appcast_unstable.xml HTTP/1.0\r\nHost: handbrake.fr\r\n\r\n";
+
+       /* Grab the data from the web server */
+    if( !( net = hb_net_open( "handbrake.fr", 80 ) ) )
+    {
+        goto error;
+    }
+
+    if( hb_net_send( net, hb_query ) < 0 )
+    {
+        hb_log("Error: Unable to connect to server");
+        hb_net_close( &net );
+        goto error;
+    }
+
+    size = 0;
+    memset( buf, 0, 4096 );
+    for( ;; )
+    {
+        ret = hb_net_recv( net, &buf[size], sizeof( buf ) - size );
+        if( ret < 1 )
+        {
+            hb_net_close( &net );
+            break;
+        }
+        size += ret;
+    }
+
+    cur = buf;
+    end = &buf[sizeof( buf )];
+       
+    /* Make sure we got it */
+    cur += 9;
+    if( size < 15 || strncmp( cur, "200 OK", 6 ) )
+    {
+        hb_log("Error: We did not get a 200 OK from the server. \n");
+        goto error;
+    }
+    cur += 6;
+
+    /* Find the end of the headers and the beginning of the content */
+    for( ; &cur[3] < end; cur++ )
+    {
+        if( cur[0] == '\r' && cur[1] == '\n' &&
+            cur[2] == '\r' && cur[3] == '\n' )
+        {
+            cur += 4;
+            break;
+        }
+    }
+
+    if( cur >= end )
+    {
+        hb_log("Error: Found the end of the buffer before the end of the HTTP header information! \n");
+        goto error;
+    }
+       
+    /*
+     * Find the <cli> tag
+     * Scan though each character of the buffer until we find that the first 4 characters of "cur" are "<cli"
+     */
+    for(i=0 ; &cur[3] < end; i++, cur++ )
+    {
+        if( cur[0] == 'c' && cur[1] == 'l' && cur[2] == 'i' && cur[3] == '>' )
+        {
+            cur += 1;
+            break;
+        }
+                
+        /* If the CLI tag has not been found in the first 768 characters, or the end is reached, something bad happened.*/
+        if (( i > 768) || ( cur >= end ))
+               {
+            hb_log("Error: Did not find the <cli> tag in the expected maximum amount of characters into the file. \n");
+            goto error;
+               }
+    }
+        
+    if( cur >= end )
+    {
+        goto error;
+    }
+       
+    /*
+     * Ok, The above code didn't position cur, it only found <cli so we need to shift cur along 3 places.
+     * After which, the next 10 characters are the build number
+     */
+    cur += 3;
+       
+    if( cur >= end )
+    {
+        hb_log("Error: Unexpected end of buffer! Could not find the build information. \n");
+        goto error;
+    }
+       
+       /* Stable HB_BUILD */
+    stable = strtol( cur, &cur, 10 );
+               
+    if( cur >= end )
+    {
+     hb_log("Error: Unexpected end of buffer! \n");
+        goto error;
+    }
+       
+    /*
+     * The Version number is 2 places after the build, so shift cur, 2 places.
+     * Get all the characters in cur until the point where " is found.
+     */
+    cur += 2;
+       
+    if( cur >= end )
+    {
+        hb_log("Error: Unexpected end of buffer! Could not get version number. \n");
+        goto error;
+    }
+    memset( stable_str, 0, sizeof( stable_str ) );
+    for( i = 0;   i < sizeof( stable_str ) - 1 && cur < end && *cur != '"'; i++, cur++ )
+    {
+        stable_str[i] = *cur;
+               
+        /* If the CLI tag has not been found in the first 768 characters, or the end is reached, something bad happened.*/
+        if (( i > 7) || ( cur >= end ))
+        {
+            hb_log("Error: Version number too long, or end of buffer reached. \n");
+            goto error;
+        }
+    }
+       
+    if( cur >= end )
+    {
+        goto error;
+    }
+       
+       /* HANDLE THE SECOND APPCAST FILE NOW */
+    /* Grab the data from the web server */
+    if( !( net = hb_net_open( "handbrake.fr", 80 ) ) )
+    {
+        goto error;
+    }
+       
+       if( hb_net_send( net, hb_query_two ) < 0 )
+    {
+        hb_log("Error: Unable to connect to server");
+        hb_net_close( &net );
+        goto error;
+    }
+
+    size = 0;
+    memset( buf, 0, 4096 );
+    for( ;; )
+    {
+        ret = hb_net_recv( net, &buf[size], sizeof( buf ) - size );
+        if( ret < 1 )
+        {
+            hb_net_close( &net );
+            break;
+        }
+        size += ret;
+    }
+
+    cur = buf;
+    end = &buf[sizeof( buf )];
+       
+    /* Make sure we got it */
+    cur += 9;
+    if( size < 15 || strncmp( cur, "200 OK", 6 ) )
+    {
+        /* Something went wrong */
+        hb_log("Error: We did not get a 200 OK from the server. \n");
+        goto error;
+    }
+    cur += 6;
+
+    /* Find the end of the headers and the beginning of the content */
+    for( ; &cur[3] < end; cur++ )
+    {
+        if( cur[0] == '\r' && cur[1] == '\n' &&
+            cur[2] == '\r' && cur[3] == '\n' )
+        {
+            cur += 4;
+            break;
+        }
+    }
+
+    if( cur >= end )
+    {
+        hb_log("Error: Found the end of the buffer before the end of the HTTP header information! \n");
+        goto error;
+    }
+       
+    /*
+     * Find the <cli> tag
+     * Scan though each character of the buffer until we find that the first 4 characters of "cur" are "<cli"
+     */
+    for(i=0 ; &cur[3] < end; i++, cur++ )
+    {
+        if( cur[0] == 'c' && cur[1] == 'l' && cur[2] == 'i' && cur[3] == '>' )
+        {
+            cur += 1;
+            break;
+        }
+                
+        // If the CLI tag has not been found in the first 768 characters, or the end is reached, something bad happened.
+        if (( i > 768) || ( cur >= end ))
+               {
+            hb_log("Error: Did not find the <cli> tag in the expected maximum amount of characters into the file. \n");
+            goto error;
+               }
+    }
+        
+    if( cur >= end )
+    {
+        goto error;
+    }
+       
+    /*
+     * Ok, The above code didn't position cur, it only found <cli so we need to shift cur along 3 places.
+     * After which, the next 10 characters are the build number
+     */
+    cur += 3;
+       
+    if( cur >= end )
+    {
+        hb_log("Error: Unexpected end of buffer! Could not find the build information. \n");
+        goto error;
+    }
+       
+       /* UnStable HB_BUILD */
+    unstable = strtol( cur, &cur, 10 );
+               
+    if( cur >= end )
+    {
+     hb_log("Error: Unexpected end of buffer! \n");
+        goto error;
+    }
+       
+    /*
+     * The Version number is 2 places after the build, so shift cur, 2 places.
+     * Get all the characters in cur until the point where " is found.
+     */
+    cur += 2;
+       
+    if( cur >= end )
+    {
+        hb_log("Error: Unexpected end of buffer! Could not get version number. \n");
+        goto error;
+    }
+    memset( unstable_str, 0, sizeof( unstable_str ) );
+    for( i = 0;   i < sizeof( unstable_str ) - 1 && cur < end && *cur != '"'; i++, cur++ )
+    {
+        unstable_str[i] = *cur;
+               
+        // If the version number is longer than 7 characters, or the end is reached, something has gone wrong.
+        if (( i > 7) || ( cur >= end ))
+        {
+            hb_log("Error: Version number too long, or end of buffer reached. \n");
+            goto error;
+        }
+    }
+       
+    if( cur >= end )
+    {
+        goto error;
+    }
+       
+    /* Print the version information */
+    hb_log( "latest stable: %s, build %d", stable_str, stable );
+       hb_log( "latest unstable: %s, build %d", unstable_str, unstable );
+       
+    /* Return the build information */
+       if( HB_BUILD % 100 )
+    {
+        /* We are runnning an unstable build */
+        if( unstable > HB_BUILD )
+        {
+            memcpy( data->version, unstable_str, sizeof( unstable_str ) );
+            *(data->build) = unstable;
+        }
+    }
+    else
+    {
+        /* We are runnning an stable build */
+        if( stable > HB_BUILD )
+        {
+            memcpy( data->version, stable_str, sizeof( stable_str ) );
+            *(data->build) = stable;
+        }
+    }
+
+error:
+    free( data );
+    return;
+}
diff --git a/libhb/work.c b/libhb/work.c
new file mode 100644 (file)
index 0000000..2538f41
--- /dev/null
@@ -0,0 +1,1026 @@
+/* $Id: work.c,v 1.43 2005/03/17 16:38:49 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include "hb.h"
+#include "a52dec/a52.h"
+#include "dca.h"
+
+typedef struct
+{
+    hb_list_t * jobs;
+    hb_job_t  ** current_job;
+    int         cpu_count;
+    int       * error;
+    volatile int * die;
+
+} hb_work_t;
+
+static void work_func();
+static void do_job( hb_job_t *, int cpu_count );
+static void work_loop( void * );
+
+#define FIFO_CPU_MULT 8
+
+/**
+ * Allocates work object and launches work thread with work_func.
+ * @param jobs Handle to hb_list_t.
+ * @param cpu_count Humber of CPUs found in system.
+ * @param die Handle to user inititated exit indicator.
+ * @param error Handle to error indicator.
+ */
+hb_thread_t * hb_work_init( hb_list_t * jobs, int cpu_count,
+                            volatile int * die, int * error, hb_job_t ** job )
+{
+    hb_work_t * work = calloc( sizeof( hb_work_t ), 1 );
+
+    work->jobs      = jobs;
+    work->current_job = job;
+    work->cpu_count = cpu_count;
+    work->die       = die;
+    work->error     = error;
+
+    return hb_thread_init( "work", work_func, work, HB_LOW_PRIORITY );
+}
+
+/**
+ * Iterates through job list and calls do_job for each job.
+ * @param _work Handle work object.
+ */
+static void work_func( void * _work )
+{
+    hb_work_t  * work = _work;
+    hb_job_t   * job;
+
+    hb_log( "%d job(s) to process", hb_list_count( work->jobs ) );
+
+    while( !*work->die && ( job = hb_list_item( work->jobs, 0 ) ) )
+    {
+        hb_list_rem( work->jobs, job );
+        job->die = work->die;
+        *(work->current_job) = job;
+        do_job( job, work->cpu_count );
+        *(work->current_job) = NULL;
+    }
+
+    *(work->error) = HB_ERROR_NONE;
+
+    free( work );
+}
+
+hb_work_object_t * hb_get_work( int id )
+{
+    hb_work_object_t * w;
+    for( w = hb_objects; w; w = w->next )
+    {
+        if( w->id == id )
+        {
+            hb_work_object_t *wc = malloc( sizeof(*w) );
+            *wc = *w;
+            return wc;
+        }
+    }
+    return NULL;
+}
+
+hb_work_object_t * hb_codec_decoder( int codec )
+{
+    switch( codec )
+    {
+        case HB_ACODEC_AC3:  return hb_get_work( WORK_DECA52 );
+        case HB_ACODEC_DCA:  return hb_get_work( WORK_DECDCA );
+        case HB_ACODEC_MPGA: return hb_get_work( WORK_DECAVCODEC );
+        case HB_ACODEC_LPCM: return hb_get_work( WORK_DECLPCM );
+        case HB_ACODEC_FFMPEG: return hb_get_work( WORK_DECAVCODECAI );
+    }
+    return NULL;
+}
+
+hb_work_object_t * hb_codec_encoder( int codec )
+{
+    switch( codec )
+    {
+        case HB_ACODEC_FAAC:   return hb_get_work( WORK_ENCFAAC );
+        case HB_ACODEC_LAME:   return hb_get_work( WORK_ENCLAME );
+        case HB_ACODEC_VORBIS: return hb_get_work( WORK_ENCVORBIS );
+    }
+    return NULL;
+}
+
+/**
+ * Displays job parameters in the debug log.
+ * @param job Handle work hb_job_t.
+ */
+hb_display_job_info( hb_job_t * job )
+{
+    hb_title_t * title = job->title;
+    hb_audio_t   * audio;
+    hb_subtitle_t * subtitle;
+    int             i, j;
+    
+    hb_log("job configuration:");
+    hb_log( " * source");
+    
+    hb_log( "   + %s", title->dvd );
+
+    hb_log( "   + title %d, chapter(s) %d to %d", title->index,
+            job->chapter_start, job->chapter_end );
+
+    if( title->container_name != NULL )
+        hb_log( "   + container: %s", title->container_name);
+
+    if( title->data_rate )
+    {
+        hb_log( "   + data rate: %d kbps", title->data_rate / 1000 );
+    }
+    
+    hb_log( " * destination");
+
+    hb_log( "   + %s", job->file );
+
+    switch( job->mux )
+    {
+        case HB_MUX_MP4:
+            hb_log("   + container: MPEG-4 (.mp4 and .m4v)");
+            
+            if( job->ipod_atom )
+                hb_log( "     + compatibility atom for iPod 5G");
+
+            if( job->largeFileSize )
+                hb_log( "     + 64-bit formatting");
+
+            if( job->mp4_optimize )
+                hb_log( "     + optimized for progressive web downloads");
+            
+            if( job->color_matrix )
+                hb_log( "     + custom color matrix: %s", job->color_matrix == 1 ? "ITU Bt.601 (SD)" : "ITU Bt.709 (HD)");
+            break;
+
+        case HB_MUX_AVI:
+            hb_log("   + container: AVI");
+            break;
+
+        case HB_MUX_MKV:
+            hb_log("   + container: Matroska (.mkv)");
+            break;
+
+        case HB_MUX_OGM:
+            hb_log("   + conttainer: Ogg Media (.ogm)");
+            break;
+    }
+
+    if( job->chapter_markers )
+    {
+        hb_log( "     + chapter markers" );
+    }
+    
+    hb_log(" * video track");
+    
+    hb_log("   + decoder: %s", title->video_codec_name );
+    
+    if( title->video_bitrate )
+    {
+        hb_log( "     + bitrate %d kbps", title->video_bitrate / 1000 );
+    }
+    
+    if( job->vfr)
+    {
+        hb_log( "   + frame rate: %.3f fps -> variable fps",
+            (float) title->rate / (float) title->rate_base );
+    }
+    else if( !job->cfr )
+    {
+        hb_log( "   + frame rate: same as source (around %.3f fps)",
+            (float) title->rate / (float) title->rate_base );
+    }
+    else
+    {
+        hb_log( "   + frame rate: %.3f fps -> constant %.3f fps",
+            (float) title->rate / (float) title->rate_base, (float) job->vrate / (float) job->vrate_base );
+    }
+
+    if( job->pixel_ratio )
+    {
+        hb_log( "   + %s anamorphic", job->pixel_ratio == 1 ? "strict" : "loose" );
+        hb_log( "     + storage dimensions: %d * %d -> %d * %d, crop %d/%d/%d/%d",
+                    title->width, title->height, job->width, job->height,
+                    job->crop[0], job->crop[1], job->crop[2], job->crop[3] );
+        hb_log( "     + pixel aspect ratio: %i / %i", job->pixel_aspect_width, job->pixel_aspect_height );
+        hb_log( "     + display dimensions: %.0f * %i",
+            (float)( job->width * job->pixel_aspect_width / job->pixel_aspect_height ), job->height );
+    }
+    else
+    {
+        hb_log( "   + dimensions: %d * %d -> %d * %d, crop %d/%d/%d/%d",
+                title->width, title->height, job->width, job->height,
+                job->crop[0], job->crop[1], job->crop[2], job->crop[3] );
+    }
+
+    if ( job->grayscale )
+        hb_log( "   + grayscale mode" );
+
+    if( hb_list_count( job->filters ) )
+    {
+        hb_log("   + %s", hb_list_count( job->filters) > 1 ? "filters" : "filter" );
+        for( i = 0; i < hb_list_count( job->filters ); i++ )
+        {
+            hb_filter_object_t * filter = hb_list_item( job->filters, i );
+            if (filter->settings)
+                hb_log("     + %s (%s)", filter->name, filter->settings);
+            else
+                hb_log("     + %s (default settings)", filter->name);
+        }
+    }
+    
+    if( !job->indepth_scan )
+    {
+        /* Video encoder */
+        switch( job->vcodec )
+        {
+            case HB_VCODEC_FFMPEG:
+                hb_log( "   + encoder: FFmpeg" );
+                break;
+
+            case HB_VCODEC_XVID:
+                hb_log( "   + encoder: XviD" );
+                break;
+
+            case HB_VCODEC_X264:
+                hb_log( "   + encoder: x264" );
+                if( job->x264opts != NULL && *job->x264opts != '\0' )
+                    hb_log( "     + options: %s", job->x264opts);
+                break;
+
+            case HB_VCODEC_THEORA:
+                hb_log( "   + encoder: Theora" );
+                break;
+        }
+
+        if( job->vquality >= 0.0 && job->vquality <= 1.0 )
+        {
+            hb_log( "     + quality: %.2f", job->vquality );
+        }
+        else if( job->vquality > 1 )
+        {
+            hb_log( "     + quality: %.0f %s", job->vquality, job->crf && job->vcodec == HB_VCODEC_X264 ? "(RF)" : "(QP)" ); 
+        }
+        else
+        {
+            hb_log( "     + bitrate: %d kbps, pass: %d", job->vbitrate, job->pass );
+        }
+    }
+
+    for( i=0; i < hb_list_count(title->list_subtitle); i++ )
+    {
+        subtitle =  hb_list_item( title->list_subtitle, i );
+
+        if( subtitle )
+        {
+            hb_log( " * subtitle track %i, %s (id %x)", job->subtitle+1, subtitle->lang, subtitle->id);
+        }
+    }
+
+    if( !job->indepth_scan )
+    {
+        for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+        {
+            audio = hb_list_item( title->list_audio, i );
+
+            hb_log( " * audio track %d", audio->config.out.track );
+            
+            if( audio->config.out.name )
+                hb_log( "   + name: %s", audio->config.out.name );
+
+            hb_log( "   + decoder: %s (track %d, id %x)", audio->config.lang.description, audio->config.in.track + 1, audio->id );
+
+            if( ( audio->config.in.codec == HB_ACODEC_AC3 ) || ( audio->config.in.codec == HB_ACODEC_DCA) )
+            {
+                hb_log( "     + bitrate: %d kbps, samplerate: %d Hz", audio->config.in.bitrate / 1000, audio->config.in.samplerate );
+            }
+
+            if( (audio->config.out.codec != HB_ACODEC_AC3) && (audio->config.out.codec != HB_ACODEC_DCA) )
+            {
+                for (j = 0; j < hb_audio_mixdowns_count; j++)
+                {
+                    if (hb_audio_mixdowns[j].amixdown == audio->config.out.mixdown) {
+                        hb_log( "   + mixdown: %s", hb_audio_mixdowns[j].human_readable_name );
+                        break;
+                    }
+                }
+            }
+
+            if ( audio->config.out.dynamic_range_compression > 1 && (audio->config.out.codec != HB_ACODEC_AC3) && (audio->config.out.codec != HB_ACODEC_DCA))
+            {
+                hb_log("   + dynamic range compression: %f", audio->config.out.dynamic_range_compression);
+            }
+            
+            if( (audio->config.out.codec == HB_ACODEC_AC3) || (audio->config.out.codec == HB_ACODEC_DCA) )
+            {
+                hb_log( "   + %s passthrough", (audio->config.out.codec == HB_ACODEC_AC3) ?
+                    "AC3" : "DCA" );
+            }
+            else
+            {
+                hb_log( "   + encoder: %s", ( audio->config.out.codec == HB_ACODEC_FAAC ) ?
+                    "faac" : ( ( audio->config.out.codec == HB_ACODEC_LAME ) ? "lame" :
+                    "vorbis" ) );
+                hb_log( "     + bitrate: %d kbps, samplerate: %d Hz", audio->config.out.bitrate, audio->config.out.samplerate );            
+            }
+        }
+    }
+}
+
+/**
+ * Job initialization rountine.
+ * Initializes fifos.
+ * Creates work objects for synchronizer, video decoder, video renderer, video decoder, audio decoder, audio encoder, reader, muxer.
+ * Launches thread for each work object with work_loop.
+ * Loops while monitoring status of work threads and fifos.
+ * Exits loop when conversion is done and fifos are empty.
+ * Closes threads and frees fifos.
+ * @param job Handle work hb_job_t.
+ * @param cpu_count number of CPUs found in system.
+ */
+static void do_job( hb_job_t * job, int cpu_count )
+{
+    hb_title_t    * title;
+    int             i, j;
+    hb_work_object_t * w;
+
+    hb_audio_t   * audio;
+    hb_subtitle_t * subtitle;
+    unsigned int subtitle_highest = 0;
+    unsigned int subtitle_highest_id = 0;
+    unsigned int subtitle_lowest = -1;
+    unsigned int subtitle_lowest_id = 0;
+    unsigned int subtitle_forced_id = 0;
+    unsigned int subtitle_hit = 0;
+
+    title = job->title;
+
+    job->list_work = hb_list_init();
+
+    hb_log( "starting job" );
+
+    if ( job->pixel_ratio == 1 )
+    {
+       /* Correct the geometry of the output movie when using PixelRatio */
+       job->height=title->height-job->crop[0]-job->crop[1];
+       job->width=title->width-job->crop[2]-job->crop[3];
+    }
+    else if ( job->pixel_ratio == 2 )
+    {
+
+        /* While keeping the DVD storage aspect, resize the job width and height
+           so they fit into the user's specified dimensions. */
+        hb_set_anamorphic_size(job, &job->width, &job->height, &job->pixel_aspect_width, &job->pixel_aspect_height);
+    }
+
+    if( job->pixel_ratio && job->vcodec == HB_VCODEC_FFMPEG)
+    {
+        /* Just to make working with ffmpeg even more fun,
+           lavc's MPEG-4 encoder can't handle PAR values >= 255,
+           even though AVRational does. Adjusting downwards
+           distorts the display aspect slightly, but such is life. */
+        while ((job->pixel_aspect_width & ~0xFF) ||
+               (job->pixel_aspect_height & ~0xFF))
+        {
+            job->pixel_aspect_width >>= 1;
+            job->pixel_aspect_height >>= 1;
+        }
+    }
+
+    /* Keep width and height within these boundaries,
+       but ignore for anamorphic. For "loose" anamorphic encodes,
+       this stuff is covered in the pixel_ratio section above.    */
+    if ( job->maxHeight && ( job->height > job->maxHeight ) && ( !job->pixel_ratio ) )
+    {
+        job->height = job->maxHeight;
+        hb_fix_aspect( job, HB_KEEP_HEIGHT );
+        hb_log( "Height out of bounds, scaling down to %i", job->maxHeight );
+        hb_log( "New dimensions %i * %i", job->width, job->height );
+    }
+    if ( job->maxWidth && ( job->width > job->maxWidth ) && ( !job->pixel_ratio ) )
+    {
+        job->width = job->maxWidth;
+        hb_fix_aspect( job, HB_KEEP_WIDTH );
+        hb_log( "Width out of bounds, scaling down to %i", job->maxWidth );
+        hb_log( "New dimensions %i * %i", job->width, job->height );
+    }
+
+    if( ( job->mux & HB_MUX_AVI ) || job->cfr )
+    {
+        /* VFR detelecine is not compatible with AVI or constant frame rates. */
+        job->vfr = 0;
+    }
+
+    if ( job->vfr )
+    {
+        /* Ensure we're using "Same as source" FPS,
+           aka VFR, if we're doing VFR detelecine. */
+        job->vrate_base = title->rate_base;
+    }
+
+    job->fifo_mpeg2  = hb_fifo_init( 256 );
+    job->fifo_raw    = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+    job->fifo_sync   = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+    job->fifo_render = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+    job->fifo_mpeg4  = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+
+    /* Synchronization */
+    hb_list_add( job->list_work, ( w = hb_get_work( WORK_SYNC ) ) );
+    w->fifo_in  = NULL;
+    w->fifo_out = NULL;
+
+    /* Video decoder */
+    int vcodec = title->video_codec? title->video_codec : WORK_DECMPEG2;
+    hb_list_add( job->list_work, ( w = hb_get_work( vcodec ) ) );
+    w->codec_param = title->video_codec_param;
+    w->fifo_in  = job->fifo_mpeg2;
+    w->fifo_out = job->fifo_raw;
+
+    /* Video renderer */
+    hb_list_add( job->list_work, ( w = hb_get_work( WORK_RENDER ) ) );
+    w->fifo_in  = job->fifo_sync;
+    w->fifo_out = job->fifo_render;
+
+    if( !job->indepth_scan )
+    {
+
+        /* Video encoder */
+        switch( job->vcodec )
+        {
+        case HB_VCODEC_FFMPEG:
+            w = hb_get_work( WORK_ENCAVCODEC );
+            break;
+        case HB_VCODEC_XVID:
+            w = hb_get_work( WORK_ENCXVID );
+            break;
+        case HB_VCODEC_X264:
+            w = hb_get_work( WORK_ENCX264 );
+            break;
+        case HB_VCODEC_THEORA:
+            w = hb_get_work( WORK_ENCTHEORA );
+            break;
+        }
+        w->fifo_in  = job->fifo_render;
+        w->fifo_out = job->fifo_mpeg4;
+        w->config   = &job->config;
+
+        hb_list_add( job->list_work, w );
+    }
+
+    if( job->select_subtitle && !job->indepth_scan )
+    {
+        /*
+         * Must be second pass of a two pass with subtitle scan enabled, so
+         * add the subtitle that we found on the first pass for use in this
+         * pass.
+         */
+        if (*(job->select_subtitle))
+        {
+            hb_list_add( title->list_subtitle, *( job->select_subtitle ) );
+        }
+    }
+
+    for( i=0; i < hb_list_count(title->list_subtitle); i++ )
+    {
+        subtitle =  hb_list_item( title->list_subtitle, i );
+
+        if( subtitle )
+        {
+            subtitle->fifo_in  = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+            subtitle->fifo_raw = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+
+            /*
+             * Disable forced subtitles if we didn't find any in the scan
+             * so that we display normal subtitles instead.
+             *
+             * select_subtitle implies that we did a scan.
+             */
+            if( !job->indepth_scan && job->subtitle_force &&
+                job->select_subtitle )
+            {
+                if( subtitle->forced_hits == 0 )
+                {
+                    job->subtitle_force = 0;
+                }
+            }
+
+            if (!job->indepth_scan || job->subtitle_force) {
+                /*
+                 * Don't add threads for subtitles when we are scanning, unless
+                 * looking for forced subtitles.
+                 */
+                w = hb_get_work( WORK_DECSUB );
+                w->fifo_in  = subtitle->fifo_in;
+                w->fifo_out = subtitle->fifo_raw;
+                hb_list_add( job->list_work, w );
+            }
+        }
+    }
+
+    if( !job->indepth_scan )
+    {
+    /* if we are doing passthru, and the input codec is not the same as the output
+     * codec, then remove this audio from the job */
+    /* otherwise, Bad Things will happen */
+    for( i = 0; i < hb_list_count( title->list_audio ); )
+    {
+        audio = hb_list_item( title->list_audio, i );
+        if( ( ( audio->config.out.codec == HB_ACODEC_AC3 ) && ( audio->config.in.codec != HB_ACODEC_AC3 ) ) ||
+            ( ( audio->config.out.codec == HB_ACODEC_DCA ) && ( audio->config.in.codec != HB_ACODEC_DCA ) ) )
+        {
+            hb_log( "Passthru requested and input codec is not the same as output codec for track %d",
+                    audio->config.out.track );
+            hb_list_rem( title->list_audio, audio );
+            free( audio );
+            continue;
+        }
+        /* Adjust output track number, in case we removed one.
+         * Output tracks sadly still need to be in sequential order.
+         */
+        audio->config.out.track = i++;
+    }
+
+    int requested_mixdown = 0;
+    int requested_mixdown_index = 0;
+
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = hb_list_item( title->list_audio, i );
+
+        if( audio->config.out.codec != audio->config.in.codec )
+        {
+            /* sense-check the current mixdown options */
+
+            /* log the requested mixdown */
+            for (j = 0; j < hb_audio_mixdowns_count; j++) {
+                if (hb_audio_mixdowns[j].amixdown == audio->config.out.mixdown) {
+                    requested_mixdown = audio->config.out.mixdown;
+                    requested_mixdown_index = j;
+                }
+            }
+
+            /* sense-check the requested mixdown */
+
+            if( audio->config.out.mixdown == 0 &&
+                audio->config.out.codec != HB_ACODEC_AC3 )
+            {
+                /*
+                 * Mixdown wasn't specified and this is not pass-through,
+                 * set a default mixdown of stereo.
+                 */
+                audio->config.out.mixdown = HB_AMIXDOWN_STEREO;
+            }
+
+            // Here we try to sanitize the audio input to output mapping.
+            // Constraints are:
+            //   1. only the AC3 & DCA decoder libraries currently support mixdown
+            //   2. the lame encoder library only supports stereo.
+            // So if the encoder is lame we need the output to be stereo (or multichannel
+            // matrixed into stereo like dpl). If the decoder is not AC3 or DCA the
+            // encoder has to handle the input format since we can't do a mixdown.
+#define CAN_MIXDOWN(a) ( a->config.in.codec & (HB_ACODEC_AC3|HB_ACODEC_DCA) )
+#define STEREO_ONLY(a) ( a->config.out.codec & HB_ACODEC_LAME )
+
+            switch (audio->config.in.channel_layout & HB_INPUT_CH_LAYOUT_DISCRETE_NO_LFE_MASK)
+            {
+                // stereo input or something not handled below
+                default:
+                case HB_INPUT_CH_LAYOUT_STEREO:
+                    // mono gets mixed up to stereo & more than stereo gets mixed down
+                    if ( STEREO_ONLY( audio ) ||
+                         audio->config.out.mixdown > HB_AMIXDOWN_STEREO)
+                    {
+                        audio->config.out.mixdown = HB_AMIXDOWN_STEREO;
+                    }
+                    break;
+
+                // mono input
+                case HB_INPUT_CH_LAYOUT_MONO:
+                    if ( STEREO_ONLY( audio ) )
+                    {
+                        if ( !CAN_MIXDOWN( audio ) )
+                        {
+                            // XXX we're hosed - we can't mix up & lame can't handle
+                            // the input format. The user shouldn't be able to make
+                            // this choice. It's too late to do anything about it now
+                            // so complain in the log & let things abort in lame.
+                            hb_log( "ERROR - can't use lame mp3 audio output with "
+                                    "mono audio stream %x - output will be messed up",
+                                    audio->id );
+                        }
+                        audio->config.out.mixdown = HB_AMIXDOWN_STEREO;
+                    }
+                    else
+                    {
+                        // everything else passes through
+                        audio->config.out.mixdown = HB_AMIXDOWN_MONO;
+                    }
+                    break;
+
+                // dolby (DPL1 aka Dolby Surround = 4.0 matrix-encoded) input
+                // the A52 flags don't allow for a way to distinguish between DPL1 and
+                // DPL2 on a DVD so we always assume a DPL1 source for A52_DOLBY.
+                case HB_INPUT_CH_LAYOUT_DOLBY:
+                    if ( STEREO_ONLY( audio ) || !CAN_MIXDOWN( audio ) ||
+                         audio->config.out.mixdown > HB_AMIXDOWN_DOLBY )
+                    {
+                        audio->config.out.mixdown = HB_AMIXDOWN_DOLBY;
+                    }
+                    break;
+
+                // 4 channel discrete
+                case HB_INPUT_CH_LAYOUT_2F2R:
+                case HB_INPUT_CH_LAYOUT_3F1R:
+                    if ( CAN_MIXDOWN( audio ) )
+                    {
+                        if ( STEREO_ONLY( audio ) ||
+                             audio->config.out.mixdown > HB_AMIXDOWN_DOLBY )
+                        {
+                            audio->config.out.mixdown = HB_AMIXDOWN_DOLBY;
+                        }
+                    }
+                    else
+                    {
+                        // XXX we can't mixdown & don't have any way to specify
+                        // 4 channel discrete output so we're hosed.
+                        hb_log( "ERROR - can't handle 4 channel discrete audio stream "
+                                "%x - output will be messed up", audio->id );
+                    }
+                    break;
+
+                // 5 or 6 channel discrete
+                case HB_INPUT_CH_LAYOUT_3F2R:
+                    if ( CAN_MIXDOWN( audio ) )
+                    {
+                        if ( STEREO_ONLY( audio ) )
+                        {
+                            if ( audio->config.out.mixdown < HB_AMIXDOWN_STEREO )
+                            {
+                                audio->config.out.mixdown = HB_AMIXDOWN_STEREO;
+                            }
+                            else if ( audio->config.out.mixdown > HB_AMIXDOWN_DOLBYPLII )
+                            {
+                                audio->config.out.mixdown = HB_AMIXDOWN_DOLBYPLII;
+                            }
+                        }
+                        else if ( ! ( audio->config.in.channel_layout &
+                                        HB_INPUT_CH_LAYOUT_HAS_LFE ) )
+                        {
+                            // we don't do 5 channel discrete so mixdown to DPLII
+                            audio->config.out.mixdown = HB_AMIXDOWN_DOLBYPLII;
+                        }
+                    }
+                    else if ( ! ( audio->config.in.channel_layout &
+                                        HB_INPUT_CH_LAYOUT_HAS_LFE ) )
+                    {
+                        // XXX we can't mixdown & don't have any way to specify
+                        // 5 channel discrete output so we're hosed.
+                        hb_log( "ERROR - can't handle 5 channel discrete audio stream "
+                                "%x - output will be messed up", audio->id );
+                    }
+                    else
+                    {
+                        // we can't mixdown so force 6 channel discrete
+                        audio->config.out.mixdown = HB_AMIXDOWN_6CH;
+                    }
+                    break;
+            }
+
+            /* log the output mixdown */
+            for (j = 0; j < hb_audio_mixdowns_count; j++) {
+                if (hb_audio_mixdowns[j].amixdown == audio->config.out.mixdown) {
+                    if ( audio->config.out.mixdown != requested_mixdown )
+                    {
+                        hb_log("work: sanitizing track %i mixdown %s to %s", i, hb_audio_mixdowns[requested_mixdown_index].human_readable_name, hb_audio_mixdowns[j].human_readable_name);
+                    }
+                    break;
+                }
+            }
+        }
+
+        if (audio->config.out.codec == HB_ACODEC_VORBIS)
+            audio->priv.config.vorbis.language = audio->config.lang.simple;
+
+        /* set up the audio work structures */
+        audio->priv.fifo_in   = hb_fifo_init( 32 );
+        audio->priv.fifo_raw  = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+        audio->priv.fifo_sync = hb_fifo_init( 32 );
+        audio->priv.fifo_out  = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+
+
+        /*
+         * Audio Decoder Thread
+         */
+        if ( ( w = hb_codec_decoder( audio->config.in.codec ) ) == NULL )
+        {
+            hb_error("Invalid input codec: %d", audio->config.in.codec);
+            *job->die = 1;
+            goto cleanup;
+        }
+        w->fifo_in  = audio->priv.fifo_in;
+        w->fifo_out = audio->priv.fifo_raw;
+        w->config   = &audio->priv.config;
+        w->audio    = audio;
+        w->codec_param = audio->config.in.codec_param;
+
+        hb_list_add( job->list_work, w );
+
+        /*
+         * Audio Encoder Thread
+         */
+        if( audio->config.out.codec != HB_ACODEC_AC3 )
+        {
+            /*
+             * Add the encoder thread if not doing AC-3 pass through
+             */
+            if ( ( w = hb_codec_encoder( audio->config.out.codec ) ) == NULL )
+            {
+                hb_error("Invalid audio codec: %#x", audio->config.out.codec);
+                w = NULL;
+                *job->die = 1;
+                goto cleanup;
+            }
+            w->fifo_in  = audio->priv.fifo_sync;
+            w->fifo_out = audio->priv.fifo_out;
+            w->config   = &audio->priv.config;
+            w->audio    = audio;
+
+            hb_list_add( job->list_work, w );
+        }
+    }
+
+    }
+
+    /* Display settings */
+    hb_display_job_info( job );
+
+    /* Init read & write threads */
+    job->reader = hb_reader_init( job );
+
+
+    job->done = 0;
+
+    /* Launch processing threads */
+    for( i = 1; i < hb_list_count( job->list_work ); i++ )
+    {
+        w = hb_list_item( job->list_work, i );
+        w->done = &job->done;
+        w->thread_sleep_interval = 10;
+        if( w->init( w, job ) )
+        {
+            hb_error( "Failure to initialise thread '%s'", w->name );
+            *job->die = 1;
+            goto cleanup;
+        }
+        w->thread = hb_thread_init( w->name, work_loop, w,
+                                    HB_LOW_PRIORITY );
+    }
+
+    // The muxer requires track information that's set up by the encoder
+    // init routines so we have to init the muxer last.
+    job->muxer = job->indepth_scan? NULL : hb_muxer_init( job );
+
+    w = hb_list_item( job->list_work, 0 );
+    w->thread_sleep_interval = 10;
+    w->init( w, job );
+    while( !*job->die )
+    {
+        if ( ( w->status = w->work( w, NULL, NULL ) ) == HB_WORK_DONE )
+        {
+            break;
+        }
+        hb_snooze( w->thread_sleep_interval );
+    }
+    hb_list_rem( job->list_work, w );
+    w->close( w );
+    free( w );
+
+    hb_handle_t * h = job->h;
+    hb_state_t state;
+    hb_get_state( h, &state );
+    
+    hb_log("work: average encoding speed for job is %f fps", state.param.working.rate_avg);
+
+cleanup:
+    /* Stop the write thread (thread_close will block until the muxer finishes) */
+    if( job->muxer != NULL )
+        hb_thread_close( &job->muxer );
+
+    job->done = 1;
+
+    /* Close work objects */
+    while( ( w = hb_list_item( job->list_work, 0 ) ) )
+    {
+        hb_list_rem( job->list_work, w );
+        if( w->thread != NULL )
+        {
+            hb_thread_close( &w->thread );
+            w->close( w );
+        }
+        free( w );
+    }
+
+    hb_list_close( &job->list_work );
+
+    /* Stop the read thread */
+    if( job->reader != NULL )
+        hb_thread_close( &job->reader );
+
+    /* Close fifos */
+    hb_fifo_close( &job->fifo_mpeg2 );
+    hb_fifo_close( &job->fifo_raw );
+    hb_fifo_close( &job->fifo_sync );
+    hb_fifo_close( &job->fifo_render );
+    hb_fifo_close( &job->fifo_mpeg4 );
+
+    for (i=0; i < hb_list_count(title->list_subtitle); i++) {
+        subtitle =  hb_list_item( title->list_subtitle, i);
+        if( subtitle )
+        {
+            hb_fifo_close( &subtitle->fifo_in );
+            hb_fifo_close( &subtitle->fifo_raw );
+        }
+    }
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = hb_list_item( title->list_audio, i );
+        if( audio->priv.fifo_in != NULL )
+            hb_fifo_close( &audio->priv.fifo_in );
+        if( audio->priv.fifo_raw != NULL )
+            hb_fifo_close( &audio->priv.fifo_raw );
+        if( audio->priv.fifo_sync != NULL )
+            hb_fifo_close( &audio->priv.fifo_sync );
+        if( audio->priv.fifo_out != NULL )
+            hb_fifo_close( &audio->priv.fifo_out );
+    }
+
+    if( job->indepth_scan )
+    {
+        /*
+         * Before closing the title print out our subtitle stats if we need to
+         * Find the highest and lowest.
+         */
+        for( i=0; i < hb_list_count( title->list_subtitle ); i++ )
+        {
+            subtitle =  hb_list_item( title->list_subtitle, i );
+            hb_log( "Subtitle stream 0x%x '%s': %d hits (%d forced)",
+                    subtitle->id, subtitle->lang, subtitle->hits,
+                    subtitle->forced_hits );
+            if( subtitle->hits > subtitle_highest )
+            {
+                subtitle_highest = subtitle->hits;
+                subtitle_highest_id = subtitle->id;
+            }
+
+            if( subtitle->hits < subtitle_lowest )
+            {
+                subtitle_lowest = subtitle->hits;
+                subtitle_lowest_id = subtitle->id;
+            }
+
+            if( subtitle->forced_hits > 0 )
+            {
+                if( subtitle_forced_id == 0 )
+                {
+                    subtitle_forced_id = subtitle->id;
+                }
+            }
+        }
+
+        if( job->native_language ) {
+            /*
+             * We still have a native_language, so the audio and subtitles are
+             * different, so in this case it is a foreign film and we want to
+             * select the subtitle with the highest hits in our language.
+             */
+            subtitle_hit = subtitle_highest_id;
+            hb_log( "Found a native-language subtitle id 0x%x", subtitle_hit);
+        } else {
+            if( subtitle_forced_id )
+            {
+                /*
+                 * If there are any subtitle streams with forced subtitles
+                 * then select it in preference to the lowest.
+                 */
+                subtitle_hit = subtitle_forced_id;
+                hb_log("Found a subtitle candidate id 0x%x (contains forced subs)",
+                       subtitle_hit);
+            } else if( subtitle_lowest < subtitle_highest )
+            {
+                /*
+                 * OK we have more than one, and the lowest is lower,
+                 * but how much lower to qualify for turning it on by
+                 * default?
+                 *
+                 * Let's say 10% as a default.
+                 */
+                if( subtitle_lowest < ( subtitle_highest * 0.1 ) )
+                {
+                    subtitle_hit = subtitle_lowest_id;
+                    hb_log( "Found a subtitle candidate id 0x%x",
+                            subtitle_hit );
+                } else {
+                    hb_log( "No candidate subtitle detected during subtitle-scan");
+                }
+            }
+        }
+    }
+
+    if( job->select_subtitle )
+    {
+        if( job->indepth_scan )
+        {
+            for( i=0; i < hb_list_count( title->list_subtitle ); i++ )
+            {
+                subtitle =  hb_list_item( title->list_subtitle, i );
+                if( subtitle->id == subtitle_hit )
+                {
+                    hb_list_rem( title->list_subtitle, subtitle );
+                    *( job->select_subtitle ) = subtitle;
+                }
+            }
+        } else {
+            /*
+             * Must be the end of pass 0 or 2 - we don't need this anymore.
+             *
+             * Have to put the subtitle list back together in the title though
+             * or the GUI will have a hissy fit.
+             */
+            free( job->select_subtitle );
+            job->select_subtitle = NULL;
+        }
+    }
+
+    if( job->filters )
+    {
+        for( i = 0; i < hb_list_count( job->filters ); i++ )
+        {
+            hb_filter_object_t * filter = hb_list_item( job->filters, i );
+            hb_filter_close( &filter );
+        }
+        hb_list_close( &job->filters );
+    }
+
+    hb_buffer_pool_free();
+
+    hb_title_close( &job->title );
+    free( job );
+}
+
+/**
+ * Performs the work object's specific work function.
+ * Loops calling work function for associated work object. Sleeps when fifo is full.
+ * Monitors work done indicator.
+ * Exits loop when work indiactor is set.
+ * @param _w Handle to work object.
+ */
+static void work_loop( void * _w )
+{
+    hb_work_object_t * w = _w;
+    hb_buffer_t      * buf_in, * buf_out;
+
+    while( !*w->done )
+    {
+#if 0
+        hb_lock( job->pause );
+        hb_unlock( job->pause );
+#endif
+        if( hb_fifo_is_full( w->fifo_out ) ||
+//        if( (hb_fifo_percent_full( w->fifo_out ) > 0.8) ||
+            !( buf_in = hb_fifo_get( w->fifo_in ) ) )
+        {
+            hb_snooze( w->thread_sleep_interval );
+//                     w->thread_sleep_interval += 1;
+            continue;
+        }
+//             w->thread_sleep_interval = MAX(1, (w->thread_sleep_interval - 1));
+
+        w->status = w->work( w, &buf_in, &buf_out );
+
+        // Propagate any chapter breaks for the worker if and only if the
+        // output frame has the same time stamp as the input frame (any
+        // worker that delays frames has to propagate the chapter marks itself
+        // and workers that move chapter marks to a different time should set
+        // 'buf_in' to NULL so that this code won't generate spurious duplicates.)
+        if( buf_in && buf_out && buf_in->new_chap && buf_in->start == buf_out->start)
+        {
+            // restore log below to debug chapter mark propagation problems
+            //hb_log("work %s: Copying Chapter Break @ %lld", w->name, buf_in->start);
+            buf_out->new_chap = buf_in->new_chap;
+        }
+
+        if( buf_in )
+        {
+            hb_buffer_close( &buf_in );
+        }
+        if( buf_out )
+        {
+            hb_fifo_push( w->fifo_out, buf_out );
+        }
+    }
+}
diff --git a/macosx/ChapterTitles.h b/macosx/ChapterTitles.h
new file mode 100644 (file)
index 0000000..e8071b5
--- /dev/null
@@ -0,0 +1,28 @@
+/*  ChapterTitles.h $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include <Cocoa/Cocoa.h>
+#include "hb.h"
+
+@interface ChapterTitles : NSObject {
+    hb_title_t *fTitle;
+}
+
+// Trigger a refresh of data
+- (void)resetWithTitle:(hb_title_t *)title;
+
+// Table View Delegates
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
+
+- (id)tableView:(NSTableView *)aTableView
+      objectValueForTableColumn:(NSTableColumn *)aTableColumn
+      row:(int)rowIndex;
+      
+- (void)tableView:(NSTableView *)aTableView
+        setObjectValue:(id)anObject
+        forTableColumn:(NSTableColumn *)aTableColumn
+        row:(int)rowIndex;
+@end
diff --git a/macosx/ChapterTitles.m b/macosx/ChapterTitles.m
new file mode 100644 (file)
index 0000000..0ad5651
--- /dev/null
@@ -0,0 +1,141 @@
+/*  ChapterTitles.m $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+   
+#include "ChapterTitles.h"
+#include "hb.h"
+
+@implementation ChapterTitles
+- (id)init 
+{
+    self = [super init];
+    if( self != nil )
+    {
+        fTitle = NULL;
+    }
+    
+    return self;
+}
+
+- (void)resetWithTitle:(hb_title_t *)title
+{
+    int i;
+    NSString *chapterString;
+    
+    fTitle = title;
+
+    if (!title)
+        return;
+
+    int count = hb_list_count( title->list_chapter );
+
+    for( i = 0; i < count; i++ )
+    {
+        hb_chapter_t *chapter = hb_list_item( title->list_chapter, i );
+        
+        if( chapter != NULL && chapter->title[0] == '\0' )
+        {
+            chapterString = [NSString stringWithFormat:@"Chapter %2d",(i+1)];
+    
+            strncpy( chapter->title, [chapterString UTF8String], 1023);
+            chapter->title[1023] = '\0';
+        }
+    }
+    
+}
+
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView
+{
+    if( fTitle == NULL )
+    {
+        return 0;
+    }
+    else
+    {
+        return hb_list_count( fTitle->list_chapter );
+    }
+}
+
+- (void)tableView:(NSTableView *)aTableView
+        setObjectValue:(id)anObject
+        forTableColumn:(NSTableColumn *)aTableColumn
+        row:(int)rowIndex
+{
+    if(aTableColumn != nil && [[aTableColumn identifier] intValue] == 2)
+    {
+        if( fTitle )
+        {
+            hb_chapter_t *chapter = hb_list_item( fTitle->list_chapter, rowIndex );
+
+            if( chapter != NULL )
+            {
+                strncpy( chapter->title, [anObject UTF8String], 1023);
+                chapter->title[1023] = '\0';
+            }
+        }
+    }
+}
+
+- (id)tableView:(NSTableView *)aTableView
+      objectValueForTableColumn:(NSTableColumn *)aTableColumn
+      row:(int)rowIndex
+{
+    NSString *cellEntry =  @"__DATA ERROR__";
+
+    if([[aTableColumn identifier] intValue] == 1)
+    {
+        cellEntry = [NSString stringWithFormat:@"%d",rowIndex+1];
+    }
+    else
+    {
+        if( fTitle )
+        {
+            hb_chapter_t *chapter = hb_list_item( fTitle->list_chapter, rowIndex );
+
+            if( chapter != NULL )
+            {
+                cellEntry = [NSString stringWithUTF8String:chapter->title];
+            }
+        }
+    }
+
+    return cellEntry;
+}
+
+/* Method to edit the next chapter when the user presses Return. We have to use
+a timer to avoid interfering with the chain of events that handles the edit. */
+- (void)controlTextDidEndEditing: (NSNotification *) notification
+{
+    NSTableView *chapterTable = [notification object];
+    NSInteger column = [chapterTable editedColumn];
+    NSInteger row = [chapterTable editedRow];
+    int textMovement;
+
+    // Edit the cell in the next row, same column
+    row++;
+    textMovement = [[[notification userInfo] objectForKey:@"NSTextMovement"] intValue];
+    if( textMovement == NSReturnTextMovement && row < [chapterTable numberOfRows] )
+    {
+        NSArray *info = [NSArray arrayWithObjects:chapterTable,
+            [NSNumber numberWithInteger:column], [NSNumber numberWithInteger:row], nil];
+        /* The delay is unimportant; editNextRow: won't be called until the responder
+        chain finishes because the event loop containing the timer is on this thread */
+        [self performSelector:@selector(editNextRow:) withObject:info afterDelay:0.0];
+    }
+}
+
+- (void)editNextRow: (id) objects
+{
+    NSTableView *chapterTable = [objects objectAtIndex:0];
+    NSInteger column = [[objects objectAtIndex:1] integerValue];
+    NSInteger row = [[objects objectAtIndex:2] integerValue];
+
+    if( row >= 0 && row < [chapterTable numberOfRows] )
+    {
+        [chapterTable selectRow:row byExtendingSelection:NO];
+        [chapterTable editColumn:column row:row withEvent:nil select:YES];
+    }
+}
+@end
diff --git a/macosx/Controller.h b/macosx/Controller.h
new file mode 100644 (file)
index 0000000..3625efd
--- /dev/null
@@ -0,0 +1,399 @@
+/* $Id: Controller.h,v 1.35 2005/08/01 14:29:50 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#import <Cocoa/Cocoa.h>
+#import <Growl/Growl.h>
+
+#include "hb.h"
+
+#import "ChapterTitles.h"
+#import "PictureController.h"
+#import "HBQueueController.h"
+#import "HBAdvancedController.h"
+#import "HBPreferencesController.h"
+#import "HBPresets.h"
+@class HBOutputPanelController;
+
+/* We subclass NSView so that our drags show both the icon as well as PresetName columns */
+@interface HBPresetsOutlineView : NSOutlineView
+{
+
+BOOL                        fIsDragging;
+
+}
+@end
+@interface HBController : NSObject <GrowlApplicationBridgeDelegate>
+{
+    IBOutlet NSWindow            * fWindow;
+
+    /* Main Menu Outlets */
+    NSMenuItem                   * fOpenSourceTitleMMenu;
+    
+    /* Source Title Scan Outlets */
+    IBOutlet NSPanel              * fScanSrcTitlePanel;
+    IBOutlet NSTextField          * fScanSrcTitlePathField;
+    IBOutlet NSTextField          * fSrcDsplyNameTitleScan;
+    IBOutlet NSTextField          * fScanSrcTitleNumField;
+    IBOutlet NSButton             * fScanSrcTitleCancelButton;
+    IBOutlet NSButton             * fScanSrcTitleOpenButton;
+    
+    /* Picture panel */
+    PictureController            * fPictureController;
+    
+    /* Advanced options tab */
+    HBAdvancedController         * fAdvancedOptions;
+       IBOutlet NSBox               * fAdvancedView;
+    
+    HBPreferencesController      * fPreferencesController;
+    
+    /* Queue panel */
+    HBQueueController            * fQueueController;
+    IBOutlet NSTextField         * fQueueStatus;
+    
+    /* Output panel */
+    HBOutputPanelController       *outputPanel;
+       
+    /* Source box */
+       IBOutlet NSProgressIndicator * fScanIndicator;
+       NSString                     * sourceDisplayName;
+    IBOutlet NSTextField         * fSrcDVD2Field;
+    IBOutlet NSTextField         * fSrcTitleField;
+    IBOutlet NSPopUpButton       * fSrcTitlePopUp;
+    IBOutlet NSTextField         * fSrcChapterField;
+    IBOutlet NSPopUpButton       * fSrcChapterStartPopUp;
+    IBOutlet NSTextField         * fSrcChapterToField;
+    IBOutlet NSPopUpButton       * fSrcChapterEndPopUp;
+    IBOutlet NSTextField         * fSrcDuration1Field;
+    IBOutlet NSTextField         * fSrcDuration2Field;
+       
+    /* Destination box */
+    IBOutlet NSTextField         * fDstFormatField;
+       IBOutlet NSPopUpButton       * fDstFormatPopUp;
+       
+    IBOutlet NSTextField         * fDstFile1Field;
+    IBOutlet NSTextField         * fDstFile2Field;
+    IBOutlet NSButton            * fDstBrowseButton;
+    /* MP4 Options */
+    // Creates 64 bit mp4's that allow file sizes over 4gb
+    IBOutlet NSButton            * fDstMp4LargeFileCheck;
+    // Optimizes mp4's for http
+    IBOutlet NSButton            * fDstMp4HttpOptFileCheck;
+    // Creates iPod compatible mp4's (add ipod uuid atom)
+    IBOutlet NSButton            * fDstMp4iPodFileCheck;
+       
+    /* Video box */
+    IBOutlet NSTextField         * fVidRateField;
+    IBOutlet NSPopUpButton       * fVidRatePopUp;
+    IBOutlet NSTextField         * fVidEncoderField;
+    IBOutlet NSPopUpButton       * fVidEncoderPopUp;
+    IBOutlet NSTextField         * fVidQualityField;
+    IBOutlet NSMatrix            * fVidQualityMatrix;
+    IBOutlet NSButtonCell        * fVidTargetCell;
+    IBOutlet NSTextField         * fVidTargetSizeField;
+    IBOutlet NSButtonCell        * fVidBitrateCell;
+    IBOutlet NSTextField         * fVidBitrateField;
+    IBOutlet NSButtonCell        * fVidConstantCell;
+    IBOutlet NSSlider            * fVidQualitySlider;
+    IBOutlet NSButton            * fVidGrayscaleCheck;
+    IBOutlet NSButton            * fVidTwoPassCheck;
+    IBOutlet NSButton            * fVidTurboPassCheck;
+       
+       /* Picture Settings box */
+       IBOutlet NSTextField         * fPicLabelSettings;
+       IBOutlet NSTextField         * fPicLabelSrc;
+    IBOutlet NSTextField         * fPicSettingsSrc;
+       IBOutlet NSTextField         * fPicLabelOutp;
+    IBOutlet NSTextField         * fPicSettingsOutp;
+    IBOutlet NSTextField         * fPicLabelAnamorphic;
+    IBOutlet NSTextField         * fPicSettingsAnamorphic;
+    
+    IBOutlet NSTextField         * fPicLabelAr;
+       IBOutlet NSTextField         * fPicLabelAutoCrop;
+    IBOutlet NSTextField         * fPicLabelDetelecine;
+       IBOutlet NSTextField         * fPicLabelDeinterlace;
+    IBOutlet NSTextField         * fPicLabelDecomb;
+    IBOutlet NSTextField         * fPicLabelDenoise;
+    IBOutlet NSTextField         * fPicLabelDeblock;
+       IBOutlet NSTextField         * fPicSettingDeinterlace;
+    IBOutlet NSTextField         * fPicSettingDecomb;
+       IBOutlet NSTextField         * fPicSettingARkeep;
+       IBOutlet NSTextField         * fPicSettingPAR;
+       IBOutlet NSTextField         * fPicSettingAutoCrop;
+       IBOutlet NSTextField         * fPicSettingDetelecine;
+       IBOutlet NSTextField         * fPicSettingDenoise;
+    IBOutlet NSTextField         * fPicSettingDeblock;
+       
+       /* Picture variables */
+       int                        PicOrigOutputWidth;
+       int                        PicOrigOutputHeight;
+       int                        AutoCropTop;
+       int                        AutoCropBottom;
+       int                        AutoCropLeft;
+       int                        AutoCropRight;
+    /* Subtitles box */
+    IBOutlet NSTextField         * fSubField;
+    IBOutlet NSPopUpButton       * fSubPopUp;
+       IBOutlet NSButton            * fSubForcedCheck;
+       
+    /* Audio box */
+    /* Track Labels */
+    IBOutlet NSTextField         * fAudSourceLabel;
+    IBOutlet NSTextField         * fAudCodecLabel;
+    IBOutlet NSTextField         * fAudMixdownLabel;
+    IBOutlet NSTextField         * fAudSamplerateLabel;
+    IBOutlet NSTextField         * fAudBitrateLabel;
+    IBOutlet NSTextField         * fAudDrcLabel;
+    
+    IBOutlet NSTextField         * fAudTrack1Label;
+    IBOutlet NSTextField         * fAudTrack2Label;
+    IBOutlet NSTextField         * fAudTrack3Label;
+    IBOutlet NSTextField         * fAudTrack4Label;
+    
+    /* Source Audio PopUps */
+    IBOutlet NSPopUpButton       * fAudLang1PopUp;
+    IBOutlet NSPopUpButton       * fAudLang2PopUp;
+    IBOutlet NSPopUpButton       * fAudLang3PopUp;
+    IBOutlet NSPopUpButton       * fAudLang4PopUp;
+    
+    /* Codec Popups */
+    IBOutlet NSPopUpButton       * fAudTrack1CodecPopUp;
+    IBOutlet NSPopUpButton       * fAudTrack2CodecPopUp;
+    IBOutlet NSPopUpButton       * fAudTrack3CodecPopUp;
+    IBOutlet NSPopUpButton       * fAudTrack4CodecPopUp;
+    
+       /* Mixdown PopUps */
+       IBOutlet NSPopUpButton       * fAudTrack1MixPopUp;
+    IBOutlet NSPopUpButton       * fAudTrack2MixPopUp;
+    IBOutlet NSPopUpButton       * fAudTrack3MixPopUp;
+    IBOutlet NSPopUpButton       * fAudTrack4MixPopUp;
+       
+    /* Samplerate PopUps */
+       IBOutlet NSPopUpButton       * fAudTrack1RatePopUp;
+    IBOutlet NSPopUpButton       * fAudTrack2RatePopUp;
+    IBOutlet NSPopUpButton       * fAudTrack3RatePopUp;
+    IBOutlet NSPopUpButton       * fAudTrack4RatePopUp;
+    
+    /* Bitrate PopUps */
+    IBOutlet NSPopUpButton       * fAudTrack1BitratePopUp;
+    IBOutlet NSPopUpButton       * fAudTrack2BitratePopUp;
+    IBOutlet NSPopUpButton       * fAudTrack3BitratePopUp;
+    IBOutlet NSPopUpButton       * fAudTrack4BitratePopUp;
+    
+    /* Dynamic Range Compression */
+    IBOutlet NSSlider            * fAudTrack1DrcSlider;
+    IBOutlet NSTextField         * fAudTrack1DrcField;
+    IBOutlet NSSlider            * fAudTrack2DrcSlider;
+    IBOutlet NSTextField         * fAudTrack2DrcField;
+    IBOutlet NSSlider            * fAudTrack3DrcSlider;
+    IBOutlet NSTextField         * fAudTrack3DrcField;
+    IBOutlet NSSlider            * fAudTrack4DrcSlider;
+    IBOutlet NSTextField         * fAudTrack4DrcField;
+    
+    /* Chapters box */
+    IBOutlet NSButton            * fCreateChapterMarkers;
+    IBOutlet NSTableView         * fChapterTable;
+       ChapterTitles                * fChapterTitlesDelegate;
+       
+    /* Bottom */
+    IBOutlet NSButton            * fPictureButton;
+    IBOutlet NSTextField         * fStatusField;
+    IBOutlet NSProgressIndicator * fRipIndicator;
+       BOOL                           fRipIndicatorShown;
+    
+    /* Queue File variables */
+    NSString                     * QueueFile;
+       NSMutableArray               * QueueFileArray;
+    int                            currentQueueEncodeIndex; // Used to track the currently encoding queueu item
+    
+       /* User Preset variables here */
+       HBPresets                    * fPresetsBuiltin;
+       IBOutlet NSDrawer            * fPresetDrawer;
+       IBOutlet NSTextField         * fPresetNewName;
+       IBOutlet NSTextField         * fPresetNewDesc;
+       IBOutlet NSPopUpButton       * fPresetNewPicSettingsPopUp;
+    IBOutlet NSButton            * fPresetNewPicFiltersCheck;
+    IBOutlet NSButton            * fPresetNewFolderCheck;
+       IBOutlet NSTextField         * fPresetSelectedDisplay;
+       
+       NSString                     * AppSupportDirectory;
+       NSString                     * UserPresetsFile;
+       NSMutableArray               * UserPresets;
+       NSMutableArray               * UserPresetssortedArray;
+       NSMutableDictionary          * chosenPreset;
+    int                            curUserPresetChosenNum;
+        
+       NSMutableDictionary          *presetHbDefault; // this is 1 in "Default" preset key
+       NSMutableDictionary          *presetUserDefault;// this is 2 in "Default" preset key
+    NSMutableDictionary          *presetUserDefaultParent;
+    NSMutableDictionary          *presetUserDefaultParentParent;
+    int                        presetCurrentBuiltInCount; // keeps track of the current number of built in presets
+    IBOutlet NSPanel             * fAddPresetPanel;
+       /* new NSOutline View for the presets */
+    NSArray                      *fDraggedNodes;
+    IBOutlet HBPresetsOutlineView * fPresetsOutlineView;
+    IBOutlet NSButton            * fPresetsAdd;
+       IBOutlet NSButton            * fPresetsDelete;
+    IBOutlet NSPopUpButton       * fPresetsActionButton;
+
+    hb_handle_t                  * fHandle;
+    
+    hb_handle_t              * fQueueEncodeLibhb;           // libhb for HB Encoding
+       hb_title_t                   * fTitle;
+    hb_title_t                   * fQueueEncodeTitle;
+    int                          fEncodingQueueItem;     // corresponds to the index of fJobGroups encoding item
+    int                          fPendingCount;         // Number of various kinds of job groups in fJobGroups.
+    int                          fCompletedCount;
+    int                          fCanceledCount;
+    int                          fWorkingCount;
+    
+    
+    /* integer to set to determine the previous state
+               of encode 0==idle, 1==encoding, 2==cancelled*/
+    int                            fEncodeState;
+       int                            currentScanCount;
+       int                            currentSuccessfulScanCount;
+    BOOL                           SuccessfulScan;
+    BOOL                           applyQueueToScan;
+       NSString                      * currentSource;
+    NSString                     * browsedSourceDisplayName;
+}
+- (void) writeToActivityLog:(char *) format, ...;
+- (IBAction) browseSources: (id) sender;
+- (void) browseSourcesDone: (NSOpenPanel *) sheet
+                returnCode: (int) returnCode contextInfo: (void *) contextInfo;
+- (IBAction) showSourceTitleScanPanel: (id) sender;
+- (IBAction) closeSourceTitleScanPanel: (id) sender;  
+- (void) performScan:(NSString *) scanPath scanTitleNum: (int) scanTitleNum;
+- (IBAction) showNewScan: (id) sender;
+
+- (void)     updateUI: (NSTimer *) timer;
+- (void)     enableUI: (bool) enable;
+
+- (IBAction) titlePopUpChanged: (id) sender;
+- (IBAction) chapterPopUpChanged: (id) sender;
+
+- (IBAction) formatPopUpChanged: (id) sender;
+- (IBAction) videoEncoderPopUpChanged: (id) sender;
+- (IBAction) autoSetM4vExtension: (id) sender;
+- (IBAction) twoPassCheckboxChanged: (id) sender;
+- (IBAction) videoFrameRateChanged: (id) sender;
+- (IBAction) audioAddAudioTrackCodecs: (id)sender;
+- (IBAction) audioCodecsPopUpChanged: (id) sender;
+- (IBAction) setEnabledStateOfAudioMixdownControls: (id) sender;
+- (IBAction) addAllAudioTracksToPopUp: (id) sender;
+- (IBAction) selectAudioTrackInPopUp: (id) sender searchPrefixString: (NSString *) searchPrefixString selectIndexIfNotFound: (int) selectIndexIfNotFound;
+- (IBAction) audioTrackPopUpChanged: (id) sender;
+- (IBAction) audioTrackPopUpChanged: (id) sender mixdownToUse: (int) mixdownToUse;
+- (IBAction) audioTrackMixdownChanged: (id) sender;
+- (IBAction) subtitleSelectionChanged: (id) sender;
+- (void) prepareJob;
+- (IBAction) browseFile: (id) sender;
+- (void)     browseFileDone: (NSSavePanel *) sheet
+                 returnCode: (int) returnCode contextInfo: (void *) contextInfo;
+
+- (IBAction) videoMatrixChanged: (id) sender;
+- (IBAction) qualitySliderChanged: (id) sender;
+- (IBAction) audioDRCSliderChanged: (id) sender;
+
+- (IBAction) showPicturePanel: (id) sender;
+- (IBAction) calculatePictureSizing: (id) sender;
+- (IBAction) openMainWindow: (id) sender;
+
+/* Queue File Stuff */
+- (void) loadQueueFile;
+- (NSDictionary *)createQueueFileItem;
+- (void)saveQueueFileItem;
+- (void) incrementQueueItemDone:(int) queueItemDoneIndexNum;
+- (void) performNewQueueScan:(NSString *) scanPath scanTitleNum: (int) scanTitleNum;
+- (void) processNewQueueEncode;
+- (void) clearQueueEncodedItems;
+- (IBAction)applyQueueSettings:(id)sender;
+- (void) removeQueueFileItem:(int) queueItemToRemove;
+- (void) clearQueueAllItems;
+- (void)moveObjectsInQueueArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex;
+- (void)getQueueStats;
+- (void)setQueueEncodingItemsAsPending;
+- (IBAction) addToQueue: (id) sender;
+- (void) overwriteAddToQueueAlertDone: (NSWindow *) sheet
+                           returnCode: (int) returnCode contextInfo: (void *) contextInfo;
+- (void)     doAddToQueue;
+
+- (IBAction) showQueueWindow:(id)sender;
+
+- (IBAction)showPreferencesWindow:(id)sender;
+
+- (IBAction) Rip: (id) sender;
+- (void)     overWriteAlertDone: (NSWindow *) sheet
+                     returnCode: (int) returnCode contextInfo: (void *) contextInfo;
+- (void)     doRip;
+
+- (IBAction) Cancel: (id) sender;
+- (void)     doCancelCurrentJob;
+- (void) doCancelCurrentJobAndStop;
+- (IBAction) Pause: (id) sender;
+
+- (IBAction) calculateBitrate: (id) sender;
+- (void) controlTextDidChange: (NSNotification *) notification;
+
+- (IBAction) openHomepage: (id) sender;
+- (IBAction) openForums:   (id) sender;
+- (IBAction) openUserGuide:   (id) sender;
+
+// Preset Methods Here
+    
+/* These are required by the NSOutlineView Datasource Delegate */
+/* We use this to deterimine children of an item */
+- (id)outlineView:(NSOutlineView *)fPresetsOutlineView child:(NSInteger)index ofItem:(id)item;
+/* We use this to determine if an item should be expandable */
+- (BOOL)outlineView:(NSOutlineView *)fPresetsOutlineView isItemExpandable:(id)item;
+/* used to specify the number of levels to show for each item */
+- (int)outlineView:(NSOutlineView *)fPresetsOutlineView numberOfChildrenOfItem:(id)item;
+/* Used to tell the outline view which information is to be displayed per item */
+- (id)outlineView:(NSOutlineView *)fPresetsOutlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;
+/* Use to customize the font and display characteristics of the title cell */
+- (void)outlineView:(NSOutlineView *)fPresetsOutlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item;
+/* We use this to edit the name field in the outline view */
+- (void)outlineView:(NSOutlineView *)fPresetsOutlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;
+/* We use this to provide tooltips for the items in the presets outline view */
+- (NSString *)outlineView:(NSOutlineView *)fPresetsOutlineView toolTipForCell:(NSCell *)cell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)tc item:(id)item mouseLocation:(NSPoint)mouseLocation;
+
+/* We use this to actually select the preset and act accordingly */
+- (IBAction)selectPreset:(id)sender;    
+
+/* Manage User presets */    
+- (void) loadPresets;
+- (IBAction) customSettingUsed: (id) sender;
+- (IBAction) showAddPresetPanel: (id) sender;
+- (IBAction) closeAddPresetPanel: (id) sender;
+- (NSDictionary *)createPreset;
+
+- (IBAction) revertPictureSizeToMax:(id)sender;
+
+- (IBAction)setDefaultPreset:(id)sender;
+- (IBAction)selectDefaultPreset:(id)sender;
+- (void) savePreset;
+- (void)sortPresets;
+- (IBAction)addFactoryPresets:(id)sender;
+- (IBAction)deleteFactoryPresets:(id)sender;
+- (IBAction)addUserPreset:(id)sender;
+- (void)addPreset;
+- (IBAction)insertPreset:(id)sender;
+- (IBAction)deletePreset:(id)sender;
+- (IBAction)getDefaultPresets:(id)sender;
+
+-(void)sendToMetaX:(NSString *) filePath;
+    // Growl methods
+- (NSDictionary *) registrationDictionaryForGrowl;
+-(void)showGrowlDoneNotification:(NSString *) filePath;
+- (IBAction)showDebugOutputPanel:(id)sender;
+- (void)setupToolbar;
+
+
+- (void) remindUserOfSleepOrShutdown;
+
+- (void)moveObjectsInPresetsArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex;
+@end
+
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
new file mode 100644 (file)
index 0000000..a1ab827
--- /dev/null
@@ -0,0 +1,6369 @@
+/* $Id: Controller.mm,v 1.79 2005/11/04 19:41:32 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#import "Controller.h"
+#import "HBOutputPanelController.h"
+#import "HBPreferencesController.h"
+#import "HBDVDDetector.h"
+#import "HBPresets.h"
+
+#define DragDropSimplePboardType       @"MyCustomOutlineViewPboardType"
+
+/* We setup the toolbar values here */
+static NSString *        ToggleDrawerIdentifier             = @"Toggle Drawer Item Identifier";
+static NSString *        StartEncodingIdentifier            = @"Start Encoding Item Identifier";
+static NSString *        PauseEncodingIdentifier            = @"Pause Encoding Item Identifier";
+static NSString *        ShowQueueIdentifier                = @"Show Queue Item Identifier";
+static NSString *        AddToQueueIdentifier               = @"Add to Queue Item Identifier";
+static NSString *        ShowActivityIdentifier             = @"Debug Output Item Identifier";
+static NSString *        ChooseSourceIdentifier             = @"Choose Source Item Identifier";
+
+
+/*******************************
+ * HBController implementation *
+ *******************************/
+@implementation HBController
+
+- (id)init
+{
+    self = [super init];
+    if( !self )
+    {
+        return nil;
+    }
+
+    [HBPreferencesController registerUserDefaults];
+    fHandle = NULL;
+    fQueueEncodeLibhb = NULL;
+    /* Check for check for the app support directory here as
+     * outputPanel needs it right away, as may other future methods
+     */
+    NSString *libraryDir = [NSSearchPathForDirectoriesInDomains( NSLibraryDirectory,
+                                                                 NSUserDomainMask,
+                                                                 YES ) objectAtIndex:0];
+    AppSupportDirectory = [[libraryDir stringByAppendingPathComponent:@"Application Support"]
+                                       stringByAppendingPathComponent:@"HandBrake"];
+    if( ![[NSFileManager defaultManager] fileExistsAtPath:AppSupportDirectory] )
+    {
+        [[NSFileManager defaultManager] createDirectoryAtPath:AppSupportDirectory
+                                                   attributes:nil];
+    }
+
+    outputPanel = [[HBOutputPanelController alloc] init];
+    fPictureController = [[PictureController alloc] initWithDelegate:self];
+    fQueueController = [[HBQueueController alloc] init];
+    fAdvancedOptions = [[HBAdvancedController alloc] init];
+    /* we init the HBPresets class which currently is only used
+    * for updating built in presets, may move more functionality
+    * there in the future
+    */
+    fPresetsBuiltin = [[HBPresets alloc] init];
+    fPreferencesController = [[HBPreferencesController alloc] init];
+    /* Lets report the HandBrake version number here to the activity log and text log file */
+    NSString *versionStringFull = [[NSString stringWithFormat: @"Handbrake Version: %@", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleGetInfoString"]] stringByAppendingString: [NSString stringWithFormat: @" (%@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]]];
+    [self writeToActivityLog: "%s", [versionStringFull UTF8String]];    
+    
+    return self;
+}
+
+
+- (void) applicationDidFinishLaunching: (NSNotification *) notification
+{
+    /* Init libhb with check for updates libhb style set to "0" so its ignored and lets sparkle take care of it */
+    int loggingLevel = [[[NSUserDefaults standardUserDefaults] objectForKey:@"LoggingLevel"] intValue];
+    fHandle = hb_init(loggingLevel, 0);
+    /* Init a separate instance of libhb for user scanning and setting up jobs */
+    fQueueEncodeLibhb = hb_init(loggingLevel, 0);
+    
+       // Set the Growl Delegate
+    [GrowlApplicationBridge setGrowlDelegate: self];
+    /* Init others controllers */
+    [fPictureController SetHandle: fHandle];
+    [fQueueController   setHandle: fQueueEncodeLibhb];
+    [fQueueController   setHBController: self];
+
+    fChapterTitlesDelegate = [[ChapterTitles alloc] init];
+    [fChapterTable setDataSource:fChapterTitlesDelegate];
+    [fChapterTable setDelegate:fChapterTitlesDelegate];
+
+    /* Call UpdateUI every 1/2 sec */
+    [[NSRunLoop currentRunLoop] addTimer:[NSTimer
+                                          scheduledTimerWithTimeInterval:0.5 target:self
+                                          selector:@selector(updateUI:) userInfo:nil repeats:YES]
+                                 forMode:NSEventTrackingRunLoopMode];
+
+    // Open debug output window now if it was visible when HB was closed
+    if ([[NSUserDefaults standardUserDefaults] boolForKey:@"OutputPanelIsOpen"])
+        [self showDebugOutputPanel:nil];
+
+    // Open queue window now if it was visible when HB was closed
+    if ([[NSUserDefaults standardUserDefaults] boolForKey:@"QueueWindowIsOpen"])
+        [self showQueueWindow:nil];
+
+       [self openMainWindow:nil];
+    
+    /* We have to set the bool to tell hb what to do after a scan
+     * Initially we set it to NO until we start processing the queue
+     */
+     applyQueueToScan = NO;
+    
+    /* Now we re-check the queue array to see if there are
+     * any remaining encodes to be done in it and ask the
+     * user if they want to reload the queue */
+    if ([QueueFileArray count] > 0)
+       {
+        /* run  getQueueStats to see whats in the queue file */
+        [self getQueueStats];
+        /* this results in these values
+         * fEncodingQueueItem = 0;
+         * fPendingCount = 0;
+         * fCompletedCount = 0;
+         * fCanceledCount = 0;
+         * fWorkingCount = 0;
+         */
+        
+        /*On Screen Notification*/
+        NSString * alertTitle;
+        if (fWorkingCount > 0)
+        {
+            alertTitle = [NSString stringWithFormat:
+                         NSLocalizedString(@"HandBrake Has Detected %d Previously Encoding Item and %d Pending Item(s) In Your Queue.", @""),
+                         fWorkingCount,fPendingCount];
+        }
+        else
+        {
+            alertTitle = [NSString stringWithFormat:
+                         NSLocalizedString(@"HandBrake Has Detected %d Pending Item(s) In Your Queue.", @""),
+                         fPendingCount];
+        }
+        NSBeginCriticalAlertSheet(
+                                  alertTitle,
+                                  NSLocalizedString(@"Reload Queue", nil),
+                                  nil,
+                                  NSLocalizedString(@"Empty Queue", nil),
+                                  fWindow, self,
+                                  nil, @selector(didDimissReloadQueue:returnCode:contextInfo:), nil,
+                                  NSLocalizedString(@" Do you want to reload them ?", nil));
+        // call didDimissReloadQueue: (NSWindow *)sheet returnCode: (int)returnCode contextInfo: (void *)contextInfo
+        // right below to either clear the old queue or keep it loaded up.
+    }
+    else
+    {
+        
+        /* Show Browse Sources Window ASAP */
+        [self performSelectorOnMainThread:@selector(browseSources:)
+                               withObject:nil waitUntilDone:NO];
+    }
+}
+
+- (void) didDimissReloadQueue: (NSWindow *)sheet returnCode: (int)returnCode contextInfo: (void *)contextInfo
+{
+    if (returnCode == NSAlertOtherReturn)
+    {
+        [self clearQueueAllItems];
+        [self performSelectorOnMainThread:@selector(browseSources:)
+                           withObject:nil waitUntilDone:NO];
+    }
+    else
+    {
+    [self setQueueEncodingItemsAsPending];
+    [self showQueueWindow:NULL];
+    }
+}
+
+- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *) app
+{
+    
+    // Warn if encoding a movie
+    hb_state_t s;
+    hb_get_state( fQueueEncodeLibhb, &s );
+    
+    if ( s.state != HB_STATE_IDLE )
+    {
+        int result = NSRunCriticalAlertPanel(
+                                             NSLocalizedString(@"Are you sure you want to quit HandBrake?", nil),
+                                             NSLocalizedString(@"If you quit HandBrake your current encode will be reloaded into your queue at next launch. Do you want to quit anyway?", nil),
+                                             NSLocalizedString(@"Quit", nil), NSLocalizedString(@"Don't Quit", nil), nil, @"A movie" );
+        
+        if (result == NSAlertDefaultReturn)
+        {
+            return NSTerminateNow;
+        }
+        else
+            return NSTerminateCancel;
+    }
+    
+    // Warn if items still in the queue
+    else if ( fPendingCount > 0 )
+    {
+        int result = NSRunCriticalAlertPanel(
+                                             NSLocalizedString(@"Are you sure you want to quit HandBrake?", nil),
+                                             NSLocalizedString(@"There are pending encodes in your queue. Do you want to quit anyway?",nil),
+                                             NSLocalizedString(@"Quit", nil), NSLocalizedString(@"Don't Quit", nil), nil);
+        
+        if ( result == NSAlertDefaultReturn )
+            return NSTerminateNow;
+        else
+            return NSTerminateCancel;
+    }
+    
+    return NSTerminateNow;
+}
+
+- (void)applicationWillTerminate:(NSNotification *)aNotification
+{
+       [browsedSourceDisplayName release];
+    [outputPanel release];
+       [fQueueController release];
+       hb_close(&fHandle);
+    hb_close(&fQueueEncodeLibhb);
+}
+
+
+- (void) awakeFromNib
+{
+    [fWindow center];
+    [fWindow setExcludedFromWindowsMenu:YES];
+    [fAdvancedOptions setView:fAdvancedView];
+
+    /* lets setup our presets drawer for drag and drop here */
+    [fPresetsOutlineView registerForDraggedTypes: [NSArray arrayWithObject:DragDropSimplePboardType] ];
+    [fPresetsOutlineView setDraggingSourceOperationMask:NSDragOperationEvery forLocal:YES];
+    [fPresetsOutlineView setVerticalMotionCanBeginDrag: YES];
+
+    /* Initialize currentScanCount so HB can use it to
+               evaluate successive scans */
+       currentScanCount = 0;
+
+
+    /* Init UserPresets .plist */
+       [self loadPresets];
+    
+    /* Init QueueFile .plist */
+    [self loadQueueFile];
+       
+    fRipIndicatorShown = NO;  // initially out of view in the nib
+
+       /* Show/Dont Show Presets drawer upon launch based
+               on user preference DefaultPresetsDrawerShow*/
+       if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow"] > 0)
+       {
+               [fPresetDrawer open];
+       }
+       
+       
+    
+    /* Destination box*/
+    NSMenuItem *menuItem;
+    [fDstFormatPopUp removeAllItems];
+    // MP4 file
+    menuItem = [[fDstFormatPopUp menu] addItemWithTitle:@"MP4 file" action: NULL keyEquivalent: @""];
+    [menuItem setTag: HB_MUX_MP4];
+       // MKV file
+    menuItem = [[fDstFormatPopUp menu] addItemWithTitle:@"MKV file" action: NULL keyEquivalent: @""];
+    [menuItem setTag: HB_MUX_MKV];
+    // AVI file
+    menuItem = [[fDstFormatPopUp menu] addItemWithTitle:@"AVI file" action: NULL keyEquivalent: @""];
+    [menuItem setTag: HB_MUX_AVI];
+    // OGM file
+    menuItem = [[fDstFormatPopUp menu] addItemWithTitle:@"OGM file" action: NULL keyEquivalent: @""];
+    [menuItem setTag: HB_MUX_OGM];
+    [fDstFormatPopUp selectItemAtIndex: 0];
+
+    [self formatPopUpChanged:nil];
+
+       /* We enable the create chapters checkbox here since we are .mp4 */
+       [fCreateChapterMarkers setEnabled: YES];
+       if ([fDstFormatPopUp indexOfSelectedItem] == 0 && [[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultChapterMarkers"] > 0)
+       {
+               [fCreateChapterMarkers setState: NSOnState];
+       }
+
+
+
+
+    [fDstFile2Field setStringValue: [NSString stringWithFormat:
+        @"%@/Desktop/Movie.mp4", NSHomeDirectory()]];
+
+    /* Video encoder */
+    [fVidEncoderPopUp removeAllItems];
+    [fVidEncoderPopUp addItemWithTitle: @"FFmpeg"];
+    [fVidEncoderPopUp addItemWithTitle: @"XviD"];
+
+
+
+    /* Video quality */
+    [fVidTargetSizeField setIntValue: 700];
+       [fVidBitrateField    setIntValue: 1000];
+
+    [fVidQualityMatrix   selectCell: fVidBitrateCell];
+    [self videoMatrixChanged:nil];
+
+    /* Video framerate */
+    [fVidRatePopUp removeAllItems];
+       [fVidRatePopUp addItemWithTitle: NSLocalizedString( @"Same as source", @"" )];
+    for( int i = 0; i < hb_video_rates_count; i++ )
+    {
+        if ([[NSString stringWithCString: hb_video_rates[i].string] isEqualToString: [NSString stringWithFormat: @"%.3f",23.976]])
+               {
+                       [fVidRatePopUp addItemWithTitle:[NSString stringWithFormat: @"%@%@",
+                               [NSString stringWithCString: hb_video_rates[i].string], @" (NTSC Film)"]];
+               }
+               else if ([[NSString stringWithCString: hb_video_rates[i].string] isEqualToString: [NSString stringWithFormat: @"%d",25]])
+               {
+                       [fVidRatePopUp addItemWithTitle:[NSString stringWithFormat: @"%@%@",
+                               [NSString stringWithCString: hb_video_rates[i].string], @" (PAL Film/Video)"]];
+               }
+               else if ([[NSString stringWithCString: hb_video_rates[i].string] isEqualToString: [NSString stringWithFormat: @"%.2f",29.97]])
+               {
+                       [fVidRatePopUp addItemWithTitle:[NSString stringWithFormat: @"%@%@",
+                               [NSString stringWithCString: hb_video_rates[i].string], @" (NTSC Video)"]];
+               }
+               else
+               {
+                       [fVidRatePopUp addItemWithTitle:
+                               [NSString stringWithCString: hb_video_rates[i].string]];
+               }
+    }
+    [fVidRatePopUp selectItemAtIndex: 0];
+       
+       /* Set Auto Crop to On at launch */
+    [fPictureController setAutoCrop:YES];
+       
+       /* Audio bitrate */
+    [fAudTrack1BitratePopUp removeAllItems];
+    for( int i = 0; i < hb_audio_bitrates_count; i++ )
+    {
+        [fAudTrack1BitratePopUp addItemWithTitle:
+                               [NSString stringWithCString: hb_audio_bitrates[i].string]];
+
+    }
+    [fAudTrack1BitratePopUp selectItemAtIndex: hb_audio_bitrates_default];
+       
+    /* Audio samplerate */
+    [fAudTrack1RatePopUp removeAllItems];
+    for( int i = 0; i < hb_audio_rates_count; i++ )
+    {
+        [fAudTrack1RatePopUp addItemWithTitle:
+            [NSString stringWithCString: hb_audio_rates[i].string]];
+    }
+    [fAudTrack1RatePopUp selectItemAtIndex: hb_audio_rates_default];
+       
+    /* Bottom */
+    [fStatusField setStringValue: @""];
+
+    [self enableUI: NO];
+       [self setupToolbar];
+
+       /* We disable the Turbo 1st pass checkbox since we are not x264 */
+       [fVidTurboPassCheck setEnabled: NO];
+       [fVidTurboPassCheck setState: NSOffState];
+
+
+       /* lets get our default prefs here */
+       [self getDefaultPresets:nil];
+       /* lets initialize the current successful scancount here to 0 */
+       currentSuccessfulScanCount = 0;
+
+
+}
+
+- (void) enableUI: (bool) b
+{
+    NSControl * controls[] =
+      { fSrcTitleField, fSrcTitlePopUp,
+        fSrcChapterField, fSrcChapterStartPopUp, fSrcChapterToField,
+        fSrcChapterEndPopUp, fSrcDuration1Field, fSrcDuration2Field,
+        fDstFormatField, fDstFormatPopUp, fDstFile1Field, fDstFile2Field,
+        fDstBrowseButton, fVidRateField, fVidRatePopUp,
+        fVidEncoderField, fVidEncoderPopUp, fVidQualityField,
+        fVidQualityMatrix, fVidGrayscaleCheck, fSubField, fSubPopUp,
+        fAudSourceLabel, fAudCodecLabel, fAudMixdownLabel, fAudSamplerateLabel, fAudBitrateLabel,
+        fAudTrack1Label, fAudTrack2Label, fAudTrack3Label, fAudTrack4Label,
+        fAudLang1PopUp, fAudLang2PopUp, fAudLang3PopUp, fAudLang4PopUp,
+        fAudTrack1CodecPopUp, fAudTrack2CodecPopUp, fAudTrack3CodecPopUp, fAudTrack4CodecPopUp,
+        fAudTrack1MixPopUp, fAudTrack2MixPopUp, fAudTrack3MixPopUp, fAudTrack4MixPopUp,
+        fAudTrack1RatePopUp, fAudTrack2RatePopUp, fAudTrack3RatePopUp, fAudTrack4RatePopUp,
+        fAudTrack1BitratePopUp, fAudTrack2BitratePopUp, fAudTrack3BitratePopUp, fAudTrack4BitratePopUp,
+        fAudDrcLabel, fAudTrack1DrcSlider, fAudTrack1DrcField, fAudTrack2DrcSlider,
+        fAudTrack2DrcField, fAudTrack3DrcSlider, fAudTrack3DrcField, fAudTrack4DrcSlider,fAudTrack4DrcField,
+        fPictureButton,fQueueStatus,fPicSettingARkeep, fPicSettingDeinterlace,fPicLabelSettings,fPicLabelSrc,
+        fPicLabelOutp,fPicSettingsSrc,fPicSettingsOutp,fPicSettingsAnamorphic,
+               fPicLabelAr,fPicLabelDeinterlace,fPicSettingPAR,fPicLabelAnamorphic,fPresetsAdd,fPresetsDelete,
+               fCreateChapterMarkers,fVidTurboPassCheck,fDstMp4LargeFileCheck,fPicLabelAutoCrop,
+               fPicSettingAutoCrop,fPicSettingDetelecine,fPicLabelDetelecine,fPicLabelDenoise,fPicSettingDenoise,
+        fSubForcedCheck,fPicSettingDeblock,fPicLabelDeblock,fPicLabelDecomb,fPicSettingDecomb,fPresetsOutlineView,
+        fAudDrcLabel,fDstMp4HttpOptFileCheck,fDstMp4iPodFileCheck};
+
+    for( unsigned i = 0;
+         i < sizeof( controls ) / sizeof( NSControl * ); i++ )
+    {
+        if( [[controls[i] className] isEqualToString: @"NSTextField"] )
+        {
+            NSTextField * tf = (NSTextField *) controls[i];
+            if( ![tf isBezeled] )
+            {
+                [tf setTextColor: b ? [NSColor controlTextColor] :
+                    [NSColor disabledControlTextColor]];
+                continue;
+            }
+        }
+        [controls[i] setEnabled: b];
+
+    }
+
+       if (b) {
+
+        /* if we're enabling the interface, check if the audio mixdown controls need to be enabled or not */
+        /* these will have been enabled by the mass control enablement above anyway, so we're sense-checking it here */
+        [self setEnabledStateOfAudioMixdownControls:nil];
+        /* we also call calculatePictureSizing here to sense check if we already have vfr selected */
+        [self calculatePictureSizing:nil];
+
+       } else {
+
+               [fPresetsOutlineView setEnabled: NO];
+
+       }
+
+    [self videoMatrixChanged:nil];
+    [fAdvancedOptions enableUI:b];
+}
+
+
+/***********************************************************************
+ * UpdateDockIcon
+ ***********************************************************************
+ * Shows a progression bar on the dock icon, filled according to
+ * 'progress' (0.0 <= progress <= 1.0).
+ * Called with progress < 0.0 or progress > 1.0, restores the original
+ * icon.
+ **********************************************************************/
+- (void) UpdateDockIcon: (float) progress
+{
+    NSImage * icon;
+    NSData * tiff;
+    NSBitmapImageRep * bmp;
+    uint32_t * pen;
+    uint32_t black = htonl( 0x000000FF );
+    uint32_t red   = htonl( 0xFF0000FF );
+    uint32_t white = htonl( 0xFFFFFFFF );
+    int row_start, row_end;
+    int i, j;
+
+    /* Get application original icon */
+    icon = [NSImage imageNamed: @"NSApplicationIcon"];
+
+    if( progress < 0.0 || progress > 1.0 )
+    {
+        [NSApp setApplicationIconImage: icon];
+        return;
+    }
+
+    /* Get it in a raw bitmap form */
+    tiff = [icon TIFFRepresentationUsingCompression:
+            NSTIFFCompressionNone factor: 1.0];
+    bmp = [NSBitmapImageRep imageRepWithData: tiff];
+    
+    /* Draw the progression bar */
+    /* It's pretty simple (ugly?) now, but I'm no designer */
+
+    row_start = 3 * (int) [bmp size].height / 4;
+    row_end   = 7 * (int) [bmp size].height / 8;
+
+    for( i = row_start; i < row_start + 2; i++ )
+    {
+        pen = (uint32_t *) ( [bmp bitmapData] + i * [bmp bytesPerRow] );
+        for( j = 0; j < (int) [bmp size].width; j++ )
+        {
+            pen[j] = black;
+        }
+    }
+    for( i = row_start + 2; i < row_end - 2; i++ )
+    {
+        pen = (uint32_t *) ( [bmp bitmapData] + i * [bmp bytesPerRow] );
+        pen[0] = black;
+        pen[1] = black;
+        for( j = 2; j < (int) [bmp size].width - 2; j++ )
+        {
+            if( j < 2 + (int) ( ( [bmp size].width - 4.0 ) * progress ) )
+            {
+                pen[j] = red;
+            }
+            else
+            {
+                pen[j] = white;
+            }
+        }
+        pen[j]   = black;
+        pen[j+1] = black;
+    }
+    for( i = row_end - 2; i < row_end; i++ )
+    {
+        pen = (uint32_t *) ( [bmp bitmapData] + i * [bmp bytesPerRow] );
+        for( j = 0; j < (int) [bmp size].width; j++ )
+        {
+            pen[j] = black;
+        }
+    }
+
+    /* Now update the dock icon */
+    tiff = [bmp TIFFRepresentationUsingCompression:
+            NSTIFFCompressionNone factor: 1.0];
+    icon = [[NSImage alloc] initWithData: tiff];
+    [NSApp setApplicationIconImage: icon];
+    [icon release];
+}
+
+- (void) updateUI: (NSTimer *) timer
+{
+    
+    /* Update UI for fHandle (user scanning instance of libhb ) */
+    
+    hb_list_t  * list;
+    list = hb_get_titles( fHandle );
+    /* check to see if there has been a new scan done
+     this bypasses the constraints of HB_STATE_WORKING
+     not allowing setting a newly scanned source */
+       int checkScanCount = hb_get_scancount( fHandle );
+       if( checkScanCount > currentScanCount )
+       {
+               currentScanCount = checkScanCount;
+        [fScanIndicator setIndeterminate: NO];
+        [fScanIndicator setDoubleValue: 0.0];
+        [fScanIndicator setHidden: YES];
+               [self showNewScan:nil];
+       }
+    
+    hb_state_t s;
+    hb_get_state( fHandle, &s );
+    
+    switch( s.state )
+    {
+        case HB_STATE_IDLE:
+            break;
+#define p s.param.scanning
+        case HB_STATE_SCANNING:
+               {
+            [fSrcDVD2Field setStringValue: [NSString stringWithFormat:
+                                            NSLocalizedString( @"Scanning title %d of %d...", @"" ),
+                                            p.title_cur, p.title_count]];
+            [fScanIndicator setHidden: NO];
+            [fScanIndicator setDoubleValue: 100.0 * ( p.title_cur - 1 ) / p.title_count];
+            break;
+               }
+#undef p
+            
+#define p s.param.scandone
+        case HB_STATE_SCANDONE:
+        {
+            [fScanIndicator setIndeterminate: NO];
+            [fScanIndicator setDoubleValue: 0.0];
+            [fScanIndicator setHidden: YES];
+                       [self writeToActivityLog:"ScanDone state received from fHandle"];
+            [self showNewScan:nil];
+            [[fWindow toolbar] validateVisibleItems];
+            
+                       break;
+        }
+#undef p
+            
+#define p s.param.working
+        case HB_STATE_WORKING:
+        {
+            
+            break;
+        }
+#undef p
+            
+#define p s.param.muxing
+        case HB_STATE_MUXING:
+        {
+            
+            break;
+        }
+#undef p
+            
+        case HB_STATE_PAUSED:
+            break;
+            
+        case HB_STATE_WORKDONE:
+        {
+            break;
+        }
+    }
+    
+    
+    /* Update UI for fQueueEncodeLibhb */
+    // hb_list_t  * list;
+    // list = hb_get_titles( fQueueEncodeLibhb ); //fQueueEncodeLibhb
+    /* check to see if there has been a new scan done
+     this bypasses the constraints of HB_STATE_WORKING
+     not allowing setting a newly scanned source */
+       
+    checkScanCount = hb_get_scancount( fQueueEncodeLibhb );
+       if( checkScanCount > currentScanCount )
+       {
+               currentScanCount = checkScanCount;
+        [self writeToActivityLog:"currentScanCount received from fQueueEncodeLibhb"];
+       }
+    
+    //hb_state_t s;
+    hb_get_state( fQueueEncodeLibhb, &s );
+    
+    switch( s.state )
+    {
+        case HB_STATE_IDLE:
+            break;
+#define p s.param.scanning
+        case HB_STATE_SCANNING:
+               {
+            [fStatusField setStringValue: [NSString stringWithFormat:
+                                           NSLocalizedString( @"Queue Scanning title %d of %d...", @"" ),
+                                           p.title_cur, p.title_count]];
+            
+            /* Set the status string in fQueueController as well */                               
+            [fQueueController setQueueStatusString: [NSString stringWithFormat:
+                                                     NSLocalizedString( @"Queue Scanning title %d of %d...", @"" ),
+                                                     p.title_cur, p.title_count]];
+            
+            [fRipIndicator setHidden: NO];
+            [fRipIndicator setDoubleValue: 100.0 * ( p.title_cur - 1 ) / p.title_count];
+            break;
+               }
+#undef p
+            
+#define p s.param.scandone
+        case HB_STATE_SCANDONE:
+        {
+            [fRipIndicator setIndeterminate: NO];
+            [fRipIndicator setDoubleValue: 0.0];
+            
+                       [self writeToActivityLog:"ScanDone state received from fQueueEncodeLibhb"];
+            [self processNewQueueEncode];
+            [[fWindow toolbar] validateVisibleItems];
+            
+                       break;
+        }
+#undef p
+            
+#define p s.param.working
+        case HB_STATE_WORKING:
+        {
+            float progress_total;
+            NSMutableString * string;
+                       /* Update text field */
+                       string = [NSMutableString stringWithFormat: NSLocalizedString( @"Encoding: pass %d of %d, %.2f %%", @"" ), p.job_cur, p.job_count, 100.0 * p.progress];
+            
+                       if( p.seconds > -1 )
+            {
+                [string appendFormat:
+                 NSLocalizedString( @" (%.2f fps, avg %.2f fps, ETA %02dh%02dm%02ds)", @"" ),
+                 p.rate_cur, p.rate_avg, p.hours, p.minutes, p.seconds];
+            }
+            
+            [fStatusField setStringValue: string];
+            /* Set the status string in fQueueController as well */
+            [fQueueController setQueueStatusString: string];
+            /* Update slider */
+                       progress_total = ( p.progress + p.job_cur - 1 ) / p.job_count;
+            [fRipIndicator setIndeterminate: NO];
+            [fRipIndicator setDoubleValue: 100.0 * progress_total];
+            
+            // If progress bar hasn't been revealed at the bottom of the window, do
+            // that now. This code used to be in doRip. I moved it to here to handle
+            // the case where hb_start is called by HBQueueController and not from
+            // HBController.
+            if( !fRipIndicatorShown )
+            {
+                NSRect frame = [fWindow frame];
+                if( frame.size.width <= 591 )
+                    frame.size.width = 591;
+                frame.size.height += 36;
+                frame.origin.y -= 36;
+                [fWindow setFrame:frame display:YES animate:YES];
+                fRipIndicatorShown = YES;
+                
+            }
+            
+            /* Update dock icon */
+            [self UpdateDockIcon: progress_total];
+            
+            break;
+        }
+#undef p
+            
+#define p s.param.muxing
+        case HB_STATE_MUXING:
+        {
+            /* Update text field */
+            [fStatusField setStringValue: NSLocalizedString( @"Muxing...", @"" )];
+            /* Set the status string in fQueueController as well */
+            [fQueueController setQueueStatusString: NSLocalizedString( @"Muxing...", @"" )];
+            /* Update slider */
+            [fRipIndicator setIndeterminate: YES];
+            [fRipIndicator startAnimation: nil];
+            
+            /* Update dock icon */
+            [self UpdateDockIcon: 1.0];
+            
+                       break;
+        }
+#undef p
+            
+        case HB_STATE_PAUSED:
+                   [fStatusField setStringValue: NSLocalizedString( @"Paused", @"" )];
+            [fQueueController setQueueStatusString: NSLocalizedString( @"Paused", @"" )];
+            
+                       break;
+            
+        case HB_STATE_WORKDONE:
+        {
+            // HB_STATE_WORKDONE happpens as a result of libhb finishing all its jobs
+            // or someone calling hb_stop. In the latter case, hb_stop does not clear
+            // out the remaining passes/jobs in the queue. We'll do that here.
+            
+            // Delete all remaining jobs of this encode.
+            [fStatusField setStringValue: NSLocalizedString( @"Encode Finished.", @"" )];
+            /* Set the status string in fQueueController as well */
+            [fQueueController setQueueStatusString: NSLocalizedString( @"Encode Finished.", @"" )];
+            [fRipIndicator setIndeterminate: NO];
+            [fRipIndicator setDoubleValue: 0.0];
+            [[fWindow toolbar] validateVisibleItems];
+            
+            /* Restore dock icon */
+            [self UpdateDockIcon: -1.0];
+            
+            if( fRipIndicatorShown )
+            {
+                NSRect frame = [fWindow frame];
+                if( frame.size.width <= 591 )
+                                   frame.size.width = 591;
+                frame.size.height += -36;
+                frame.origin.y -= -36;
+                [fWindow setFrame:frame display:YES animate:YES];
+                               fRipIndicatorShown = NO;
+                       }
+            /* Since we are done with this encode, tell output to stop writing to the
+             * individual encode log
+             */
+                       [outputPanel endEncodeLog];
+            /* Check to see if the encode state has not been cancelled
+             to determine if we should check for encode done notifications */
+                       if( fEncodeState != 2 )
+            {
+                NSString *pathOfFinishedEncode;
+                /* Get the output file name for the finished encode */
+                pathOfFinishedEncode = [[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"DestinationPath"];
+                
+                /* Both the Growl Alert and Sending to MetaX can be done as encodes roll off the queue */
+                /* Growl alert */
+                [self showGrowlDoneNotification:pathOfFinishedEncode];
+                /* Send to MetaX */
+                [self sendToMetaX:pathOfFinishedEncode];
+                
+                /* since we have successfully completed an encode, we increment the queue counter */
+                [self incrementQueueItemDone:nil]; 
+                
+                /* all end of queue actions below need to be done after all queue encodes have finished 
+                 * and there are no pending jobs left to process
+                 */
+                if (fPendingCount == 0)
+                {
+                    /* If Alert Window or Window and Growl has been selected */
+                    if( [[[NSUserDefaults standardUserDefaults] stringForKey:@"AlertWhenDone"] isEqualToString: @"Alert Window"] ||
+                       [[[NSUserDefaults standardUserDefaults] stringForKey:@"AlertWhenDone"] isEqualToString: @"Alert Window And Growl"] )
+                    {
+                        /*On Screen Notification*/
+                        int status;
+                        NSBeep();
+                        status = NSRunAlertPanel(@"Put down that cocktail...",@"Your HandBrake queue is done!", @"OK", nil, nil);
+                        [NSApp requestUserAttention:NSCriticalRequest];
+                    }
+                    
+                    /* If sleep has been selected */
+                    if( [[[NSUserDefaults standardUserDefaults] stringForKey:@"AlertWhenDone"] isEqualToString: @"Put Computer To Sleep"] )
+                    {
+                        /* Sleep */
+                        NSDictionary* errorDict;
+                        NSAppleEventDescriptor* returnDescriptor = nil;
+                        NSAppleScript* scriptObject = [[NSAppleScript alloc] initWithSource:
+                                                       @"tell application \"Finder\" to sleep"];
+                        returnDescriptor = [scriptObject executeAndReturnError: &errorDict];
+                        [scriptObject release];
+                    }
+                    /* If Shutdown has been selected */
+                    if( [[[NSUserDefaults standardUserDefaults] stringForKey:@"AlertWhenDone"] isEqualToString: @"Shut Down Computer"] )
+                    {
+                        /* Shut Down */
+                        NSDictionary* errorDict;
+                        NSAppleEventDescriptor* returnDescriptor = nil;
+                        NSAppleScript* scriptObject = [[NSAppleScript alloc] initWithSource:
+                                                       @"tell application \"Finder\" to shut down"];
+                        returnDescriptor = [scriptObject executeAndReturnError: &errorDict];
+                        [scriptObject release];
+                    }
+                    
+                }
+                
+                
+            }
+            
+            break;
+        }
+    }
+    
+}
+
+/* We use this to write messages to stderr from the macgui which show up in the activity window and log*/
+- (void) writeToActivityLog:(char *) format, ...
+{
+    va_list args;
+    va_start(args, format);
+    if (format != nil)
+    {
+        char str[1024];
+        vsnprintf( str, 1024, format, args );
+
+        time_t _now = time( NULL );
+        struct tm * now  = localtime( &_now );
+        fprintf(stderr, "[%02d:%02d:%02d] macgui: %s\n", now->tm_hour, now->tm_min, now->tm_sec, str );
+    }
+    va_end(args);
+}
+
+#pragma mark -
+#pragma mark Toolbar
+// ============================================================
+// NSToolbar Related Methods
+// ============================================================
+
+- (void) setupToolbar {
+    NSToolbar *toolbar = [[[NSToolbar alloc] initWithIdentifier: @"HandBrake Toolbar"] autorelease];
+
+    [toolbar setAllowsUserCustomization: YES];
+    [toolbar setAutosavesConfiguration: YES];
+    [toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
+
+    [toolbar setDelegate: self];
+
+    [fWindow setToolbar: toolbar];
+}
+
+- (NSToolbarItem *) toolbar: (NSToolbar *)toolbar itemForItemIdentifier:
+    (NSString *) itemIdent willBeInsertedIntoToolbar:(BOOL) willBeInserted {
+    NSToolbarItem * item = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdent] autorelease];
+
+    if ([itemIdent isEqualToString: ToggleDrawerIdentifier])
+    {
+        [item setLabel: @"Toggle Presets"];
+        [item setPaletteLabel: @"Toggler Presets"];
+        [item setToolTip: @"Open/Close Preset Drawer"];
+        [item setImage: [NSImage imageNamed: @"Drawer"]];
+        [item setTarget: self];
+        [item setAction: @selector(toggleDrawer:)];
+        [item setAutovalidates: NO];
+    }
+    else if ([itemIdent isEqualToString: StartEncodingIdentifier])
+    {
+        [item setLabel: @"Start"];
+        [item setPaletteLabel: @"Start Encoding"];
+        [item setToolTip: @"Start Encoding"];
+        [item setImage: [NSImage imageNamed: @"Play"]];
+        [item setTarget: self];
+        [item setAction: @selector(Rip:)];
+    }
+    else if ([itemIdent isEqualToString: ShowQueueIdentifier])
+    {
+        [item setLabel: @"Show Queue"];
+        [item setPaletteLabel: @"Show Queue"];
+        [item setToolTip: @"Show Queue"];
+        [item setImage: [NSImage imageNamed: @"Queue"]];
+        [item setTarget: self];
+        [item setAction: @selector(showQueueWindow:)];
+        [item setAutovalidates: NO];
+    }
+    else if ([itemIdent isEqualToString: AddToQueueIdentifier])
+    {
+        [item setLabel: @"Add to Queue"];
+        [item setPaletteLabel: @"Add to Queue"];
+        [item setToolTip: @"Add to Queue"];
+        [item setImage: [NSImage imageNamed: @"AddToQueue"]];
+        [item setTarget: self];
+        [item setAction: @selector(addToQueue:)];
+    }
+    else if ([itemIdent isEqualToString: PauseEncodingIdentifier])
+    {
+        [item setLabel: @"Pause"];
+        [item setPaletteLabel: @"Pause Encoding"];
+        [item setToolTip: @"Pause Encoding"];
+        [item setImage: [NSImage imageNamed: @"Pause"]];
+        [item setTarget: self];
+        [item setAction: @selector(Pause:)];
+    }
+    else if ([itemIdent isEqualToString: ShowActivityIdentifier]) {
+        [item setLabel: @"Activity Window"];
+        [item setPaletteLabel: @"Show Activity Window"];
+        [item setToolTip: @"Show Activity Window"];
+        [item setImage: [NSImage imageNamed: @"ActivityWindow"]];
+        [item setTarget: self];
+        [item setAction: @selector(showDebugOutputPanel:)];
+        [item setAutovalidates: NO];
+    }
+    else if ([itemIdent isEqualToString: ChooseSourceIdentifier])
+    {
+        [item setLabel: @"Source"];
+        [item setPaletteLabel: @"Source"];
+        [item setToolTip: @"Choose Video Source"];
+        [item setImage: [NSImage imageNamed: @"Source"]];
+        [item setTarget: self];
+        [item setAction: @selector(browseSources:)];
+    }
+    else
+    {
+        return nil;
+    }
+
+    return item;
+}
+
+- (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar
+{
+    return [NSArray arrayWithObjects: ChooseSourceIdentifier, NSToolbarSeparatorItemIdentifier, StartEncodingIdentifier,
+        PauseEncodingIdentifier, AddToQueueIdentifier, ShowQueueIdentifier, NSToolbarFlexibleSpaceItemIdentifier, 
+               NSToolbarSpaceItemIdentifier, ShowActivityIdentifier, ToggleDrawerIdentifier, nil];
+}
+
+- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar
+{
+    return [NSArray arrayWithObjects:  StartEncodingIdentifier, PauseEncodingIdentifier, AddToQueueIdentifier,
+        ChooseSourceIdentifier, ShowQueueIdentifier, ShowActivityIdentifier, ToggleDrawerIdentifier,
+        NSToolbarCustomizeToolbarItemIdentifier, NSToolbarFlexibleSpaceItemIdentifier,
+        NSToolbarSpaceItemIdentifier, NSToolbarSeparatorItemIdentifier, nil];
+}
+
+- (BOOL) validateToolbarItem: (NSToolbarItem *) toolbarItem
+{
+    NSString * ident = [toolbarItem itemIdentifier];
+        
+    if (fHandle)
+    {
+        hb_state_t s;
+        hb_get_state2( fQueueEncodeLibhb, &s );
+        
+        if (s.state == HB_STATE_WORKING || s.state == HB_STATE_MUXING)
+        {
+            if ([ident isEqualToString: StartEncodingIdentifier])
+            {
+                [toolbarItem setImage: [NSImage imageNamed: @"Stop"]];
+                [toolbarItem setLabel: @"Stop"];
+                [toolbarItem setPaletteLabel: @"Stop"];
+                [toolbarItem setToolTip: @"Stop Encoding"];
+                return YES;
+            }
+            if ([ident isEqualToString: PauseEncodingIdentifier])
+            {
+                [toolbarItem setImage: [NSImage imageNamed: @"Pause"]];
+                [toolbarItem setLabel: @"Pause"];
+                [toolbarItem setPaletteLabel: @"Pause Encoding"];
+                [toolbarItem setToolTip: @"Pause Encoding"];
+                return YES;
+            }
+            if (SuccessfulScan)
+                if ([ident isEqualToString: AddToQueueIdentifier])
+                    return YES;
+        }
+        else if (s.state == HB_STATE_PAUSED)
+        {
+            if ([ident isEqualToString: PauseEncodingIdentifier])
+            {
+                [toolbarItem setImage: [NSImage imageNamed: @"Play"]];
+                [toolbarItem setLabel: @"Resume"];
+                [toolbarItem setPaletteLabel: @"Resume Encoding"];
+                [toolbarItem setToolTip: @"Resume Encoding"];
+                return YES;
+            }
+            if ([ident isEqualToString: StartEncodingIdentifier])
+                return YES;
+            if ([ident isEqualToString: AddToQueueIdentifier])
+                return YES;
+        }
+        else if (s.state == HB_STATE_SCANNING)
+            return NO;
+        else if (s.state == HB_STATE_WORKDONE || s.state == HB_STATE_SCANDONE || SuccessfulScan)
+        {
+            if ([ident isEqualToString: StartEncodingIdentifier])
+            {
+                [toolbarItem setImage: [NSImage imageNamed: @"Play"]];
+                if (hb_count(fHandle) > 0)
+                    [toolbarItem setLabel: @"Start Queue"];
+                else
+                    [toolbarItem setLabel: @"Start"];
+                [toolbarItem setPaletteLabel: @"Start Encoding"];
+                [toolbarItem setToolTip: @"Start Encoding"];
+                return YES;
+            }
+            if ([ident isEqualToString: AddToQueueIdentifier])
+                return YES;
+        }
+
+    }
+    /* If there are any pending queue items, make sure the start/stop button is active */
+    if ([ident isEqualToString: StartEncodingIdentifier] && fPendingCount > 0)
+        return YES;
+    if ([ident isEqualToString: ShowQueueIdentifier])
+        return YES;
+    if ([ident isEqualToString: ToggleDrawerIdentifier])
+        return YES;
+    if ([ident isEqualToString: ChooseSourceIdentifier])
+        return YES;
+    if ([ident isEqualToString: ShowActivityIdentifier])
+        return YES;
+    
+    return NO;
+}
+
+- (BOOL) validateMenuItem: (NSMenuItem *) menuItem
+{
+    SEL action = [menuItem action];
+    
+    hb_state_t s;
+    hb_get_state2( fHandle, &s );
+    
+    if (fHandle)
+    {
+        if (action == @selector(addToQueue:) || action == @selector(showPicturePanel:) || action == @selector(showAddPresetPanel:))
+            return SuccessfulScan && [fWindow attachedSheet] == nil;
+        
+        if (action == @selector(browseSources:))
+        {
+            if (s.state == HB_STATE_SCANNING)
+                return NO;
+            else
+                return [fWindow attachedSheet] == nil;
+        }
+        if (action == @selector(selectDefaultPreset:))
+            return [fPresetsOutlineView selectedRow] >= 0 && [fWindow attachedSheet] == nil;
+        if (action == @selector(Pause:))
+        {
+            if (s.state == HB_STATE_WORKING)
+            {
+                if(![[menuItem title] isEqualToString:@"Pause Encoding"])
+                    [menuItem setTitle:@"Pause Encoding"];
+                return YES;
+            }
+            else if (s.state == HB_STATE_PAUSED)
+            {
+                if(![[menuItem title] isEqualToString:@"Resume Encoding"])
+                    [menuItem setTitle:@"Resume Encoding"];
+                return YES;
+            }
+            else
+                return NO;
+        }
+        if (action == @selector(Rip:))
+        {
+            if (s.state == HB_STATE_WORKING || s.state == HB_STATE_MUXING || s.state == HB_STATE_PAUSED)
+            {
+                if(![[menuItem title] isEqualToString:@"Stop Encoding"])
+                    [menuItem setTitle:@"Stop Encoding"];
+                return YES;
+            }
+            else if (SuccessfulScan)
+            {
+                if(![[menuItem title] isEqualToString:@"Start Encoding"])
+                    [menuItem setTitle:@"Start Encoding"];
+                return [fWindow attachedSheet] == nil;
+            }
+            else
+                return NO;
+        }
+    }
+    if( action == @selector(setDefaultPreset:) )
+    {
+        return [fPresetsOutlineView selectedRow] != -1;
+    }
+
+    return YES;
+}
+
+#pragma mark -
+#pragma mark Encode Done Actions
+// register a test notification and make
+// it enabled by default
+#define SERVICE_NAME @"Encode Done"
+- (NSDictionary *)registrationDictionaryForGrowl 
+{ 
+    NSDictionary *registrationDictionary = [NSDictionary dictionaryWithObjectsAndKeys: 
+    [NSArray arrayWithObjects:SERVICE_NAME,nil], GROWL_NOTIFICATIONS_ALL, 
+    [NSArray arrayWithObjects:SERVICE_NAME,nil], GROWL_NOTIFICATIONS_DEFAULT, 
+    nil]; 
+
+    return registrationDictionary; 
+} 
+
+-(void)showGrowlDoneNotification:(NSString *) filePath
+{
+    /* This end of encode action is called as each encode rolls off of the queue */
+    NSString * finishedEncode = filePath;
+    /* strip off the path to just show the file name */
+    finishedEncode = [finishedEncode lastPathComponent];
+    if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"AlertWhenDone"] isEqualToString: @"Growl Notification"] || 
+        [[[NSUserDefaults standardUserDefaults] stringForKey:@"AlertWhenDone"] isEqualToString: @"Alert Window And Growl"])
+    {
+        NSString * growlMssg = [NSString stringWithFormat: @"your HandBrake encode %@ is done!",finishedEncode];
+        [GrowlApplicationBridge 
+         notifyWithTitle:@"Put down that cocktail..." 
+         description:growlMssg 
+         notificationName:SERVICE_NAME
+         iconData:nil 
+         priority:0 
+         isSticky:1 
+         clickContext:nil];
+    }
+    
+}
+-(void)sendToMetaX:(NSString *) filePath
+{
+    /* This end of encode action is called as each encode rolls off of the queue */
+    if([[NSUserDefaults standardUserDefaults] boolForKey: @"sendToMetaX"] == YES)
+    {
+        NSAppleScript *myScript = [[NSAppleScript alloc] initWithSource: [NSString stringWithFormat: @"%@%@%@", @"tell application \"MetaX\" to open (POSIX file \"", filePath, @"\")"]];
+        [myScript executeAndReturnError: nil];
+        [myScript release];
+    }
+}
+#pragma mark -
+#pragma mark Get New Source
+
+/*Opens the source browse window, called from Open Source widgets */
+- (IBAction) browseSources: (id) sender
+{
+    NSOpenPanel * panel;
+       
+    panel = [NSOpenPanel openPanel];
+    [panel setAllowsMultipleSelection: NO];
+    [panel setCanChooseFiles: YES];
+    [panel setCanChooseDirectories: YES ];
+    NSString * sourceDirectory;
+       if ([[NSUserDefaults standardUserDefaults] stringForKey:@"LastSourceDirectory"])
+       {
+               sourceDirectory = [[NSUserDefaults standardUserDefaults] stringForKey:@"LastSourceDirectory"];
+       }
+       else
+       {
+               sourceDirectory = @"~/Desktop";
+               sourceDirectory = [sourceDirectory stringByExpandingTildeInPath];
+       }
+    /* we open up the browse sources sheet here and call for browseSourcesDone after the sheet is closed
+        * to evaluate whether we want to specify a title, we pass the sender in the contextInfo variable
+        */
+    [panel beginSheetForDirectory: sourceDirectory file: nil types: nil
+                   modalForWindow: fWindow modalDelegate: self
+                   didEndSelector: @selector( browseSourcesDone:returnCode:contextInfo: )
+                      contextInfo: sender]; 
+}
+
+- (void) browseSourcesDone: (NSOpenPanel *) sheet
+                returnCode: (int) returnCode contextInfo: (void *) contextInfo
+{
+    /* we convert the sender content of contextInfo back into a variable called sender
+     * mostly just for consistency for evaluation later
+     */
+    id sender = (id)contextInfo;
+    /* User selected a file to open */
+       if( returnCode == NSOKButton )
+    {
+            /* Free display name allocated previously by this code */
+        [browsedSourceDisplayName release];
+       
+        NSString *scanPath = [[sheet filenames] objectAtIndex: 0];
+        /* we set the last searched source directory in the prefs here */
+        NSString *sourceDirectory = [scanPath stringByDeletingLastPathComponent];
+        [[NSUserDefaults standardUserDefaults] setObject:sourceDirectory forKey:@"LastSourceDirectory"];
+        /* we order out sheet, which is the browse window as we need to open
+         * the title selection sheet right away
+         */
+        [sheet orderOut: self];
+        
+        if (sender == fOpenSourceTitleMMenu)
+        {
+            /* We put the chosen source path in the source display text field for the
+             * source title selection sheet in which the user specifies the specific title to be
+             * scanned  as well as the short source name in fSrcDsplyNameTitleScan just for display
+             * purposes in the title panel
+             */
+            /* Full Path */
+            [fScanSrcTitlePathField setStringValue:scanPath];
+            NSString *displayTitlescanSourceName;
+
+            if ([[scanPath lastPathComponent] isEqualToString: @"VIDEO_TS"])
+            {
+                /* If VIDEO_TS Folder is chosen, choose its parent folder for the source display name
+                 we have to use the title->dvd value so we get the proper name of the volume if a physical dvd is the source*/
+                displayTitlescanSourceName = [[scanPath stringByDeletingLastPathComponent] lastPathComponent];
+            }
+            else
+            {
+                /* if not the VIDEO_TS Folder, we can assume the chosen folder is the source name */
+                displayTitlescanSourceName = [scanPath lastPathComponent];
+            }
+            /* we set the source display name in the title selection dialogue */
+            [fSrcDsplyNameTitleScan setStringValue:displayTitlescanSourceName];
+            /* we set the attempted scans display name for main window to displayTitlescanSourceName*/
+            browsedSourceDisplayName = [displayTitlescanSourceName retain];
+            /* We show the actual sheet where the user specifies the title to be scanned
+             * as we are going to do a title specific scan
+             */
+            [self showSourceTitleScanPanel:nil];
+        }
+        else
+        {
+            /* We are just doing a standard full source scan, so we specify "0" to libhb */
+            NSString *path = [[sheet filenames] objectAtIndex: 0];
+            
+            /* We check to see if the chosen file at path is a package */
+            if ([[NSWorkspace sharedWorkspace] isFilePackageAtPath:path])
+            {
+                [self writeToActivityLog: "trying to open a package at: %s", [path UTF8String]];
+                /* We check to see if this is an .eyetv package */
+                if ([[path pathExtension] isEqualToString: @"eyetv"])
+                {
+                    [self writeToActivityLog:"trying to open eyetv package"];
+                    /* We're looking at an EyeTV package - try to open its enclosed
+                     .mpg media file */
+                     browsedSourceDisplayName = [[[path stringByDeletingPathExtension] lastPathComponent] retain];
+                    NSString *mpgname;
+                    int n = [[path stringByAppendingString: @"/"]
+                             completePathIntoString: &mpgname caseSensitive: NO
+                             matchesIntoArray: nil
+                             filterTypes: [NSArray arrayWithObject: @"mpg"]];
+                    if (n > 0)
+                    {
+                        /* Found an mpeg inside the eyetv package, make it our scan path 
+                        and call performScan on the enclosed mpeg */
+                        path = mpgname;
+                        [self writeToActivityLog:"found mpeg in eyetv package"];
+                        [self performScan:path scanTitleNum:0];
+                    }
+                    else
+                    {
+                        /* We did not find an mpeg file in our package, so we do not call performScan */
+                        [self writeToActivityLog:"no valid mpeg in eyetv package"];
+                    }
+                }
+                /* We check to see if this is a .dvdmedia package */
+                else if ([[path pathExtension] isEqualToString: @"dvdmedia"])
+                {
+                    /* path IS a package - but dvdmedia packages can be treaded like normal directories */
+                    browsedSourceDisplayName = [[[path stringByDeletingPathExtension] lastPathComponent] retain];
+                    [self writeToActivityLog:"trying to open dvdmedia package"];
+                    [self performScan:path scanTitleNum:0];
+                }
+                else
+                {
+                    /* The package is not an eyetv package, so we do not call performScan */
+                    [self writeToActivityLog:"unable to open package"];
+                }
+            }
+            else // path is not a package, so we treat it as a dvd parent folder or VIDEO_TS folder
+            {
+                /* path is not a package, so we call perform scan directly on our file */
+                if ([[path lastPathComponent] isEqualToString: @"VIDEO_TS"])
+                {
+                    [self writeToActivityLog:"trying to open video_ts folder (video_ts folder chosen)"];
+                    /* If VIDEO_TS Folder is chosen, choose its parent folder for the source display name*/
+                    browsedSourceDisplayName = [[[path stringByDeletingLastPathComponent] lastPathComponent] retain];
+                }
+                else
+                {
+                    [self writeToActivityLog:"trying to open video_ts folder (parent directory chosen)"];
+                    /* if not the VIDEO_TS Folder, we can assume the chosen folder is the source name */
+                    /* make sure we remove any path extension as this can also be an '.mpg' file */
+                    browsedSourceDisplayName = [[path lastPathComponent] retain];
+                }
+                [self performScan:path scanTitleNum:0];
+            }
+
+        }
+
+    }
+}
+
+/* Here we open the title selection sheet where we can specify an exact title to be scanned */
+- (IBAction) showSourceTitleScanPanel: (id) sender
+{
+    /* We default the title number to be scanned to "0" which results in a full source scan, unless the
+    * user changes it
+    */
+    [fScanSrcTitleNumField setStringValue: @"0"];
+       /* Show the panel */
+       [NSApp beginSheet:fScanSrcTitlePanel modalForWindow:fWindow modalDelegate:nil didEndSelector:NULL contextInfo:NULL];
+}
+
+- (IBAction) closeSourceTitleScanPanel: (id) sender
+{
+    [NSApp endSheet: fScanSrcTitlePanel];
+    [fScanSrcTitlePanel orderOut: self];
+
+    if(sender == fScanSrcTitleOpenButton)
+    {
+        /* We setup the scan status in the main window to indicate a source title scan */
+        [fSrcDVD2Field setStringValue: @"Opening a new source title ..."];
+               [fScanIndicator setHidden: NO];
+        [fScanIndicator setIndeterminate: YES];
+        [fScanIndicator startAnimation: nil];
+               
+        /* We use the performScan method to actually perform the specified scan passing the path and the title
+            * to be scanned
+            */
+        [self performScan:[fScanSrcTitlePathField stringValue] scanTitleNum:[fScanSrcTitleNumField intValue]];
+    }
+}
+
+/* Here we actually tell hb_scan to perform the source scan, using the path to source and title number*/
+- (void) performScan:(NSString *) scanPath scanTitleNum: (int) scanTitleNum
+{
+    /* set the bool applyQueueToScan so that we dont apply a queue setting to the final scan */
+    applyQueueToScan = NO;
+    /* use a bool to determine whether or not we can decrypt using vlc */
+    BOOL cancelScanDecrypt = 0;
+    NSString *path = scanPath;
+    HBDVDDetector *detector = [HBDVDDetector detectorForPath:path];
+
+    // Notify ChapterTitles that there's no title
+    [fChapterTitlesDelegate resetWithTitle:nil];
+    [fChapterTable reloadData];
+
+    [self enableUI: NO];
+
+    if( [detector isVideoDVD] )
+    {
+        // The chosen path was actually on a DVD, so use the raw block
+        // device path instead.
+        path = [detector devicePath];
+        [self writeToActivityLog: "trying to open a physical dvd at: %s", [scanPath UTF8String]];
+
+        /* lets check for vlc here to make sure we have a dylib available to use for decrypting */
+        NSString *vlcPath = @"/Applications/VLC.app";
+        NSFileManager * fileManager = [NSFileManager defaultManager];
+           if ([fileManager fileExistsAtPath:vlcPath] == 0) 
+           {
+            /*vlc not found in /Applications so we set the bool to cancel scanning to 1 */
+            cancelScanDecrypt = 1;
+            [self writeToActivityLog: "VLC app not found for decrypting physical dvd"];
+            int status;
+            status = NSRunAlertPanel(@"HandBrake could not find VLC.",@"Please download and install VLC media player in your /Applications folder if you wish to read encrypted DVDs.", @"Get VLC", @"Cancel Scan", @"Attempt Scan Anyway");
+            [NSApp requestUserAttention:NSCriticalRequest];
+            
+            if (status == NSAlertDefaultReturn)
+            {
+                /* User chose to go download vlc (as they rightfully should) so we send them to the vlc site */
+                [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.videolan.org/"]];
+            }
+            else if (status == NSAlertAlternateReturn)
+            {
+            /* User chose to cancel the scan */
+            [self writeToActivityLog: "cannot open physical dvd , scan cancelled"];
+            }
+            else
+            {
+            /* User chose to override our warning and scan the physical dvd anyway, at their own peril. on an encrypted dvd this produces massive log files and fails */
+            cancelScanDecrypt = 0;
+            [self writeToActivityLog: "user overrode vlc warning -trying to open physical dvd without decryption"];
+            }
+
+        }
+        else
+        {
+            /* VLC was found in /Applications so all is well, we can carry on using vlc's libdvdcss.dylib for decrypting if needed */
+            [self writeToActivityLog: "VLC app found for decrypting physical dvd"];
+        }
+    }
+
+    if (cancelScanDecrypt == 0)
+    {
+        /* we actually pass the scan off to libhb here */
+        /* If there is no title number passed to scan, we use "0"
+         * which causes the default behavior of a full source scan
+         */
+        if (!scanTitleNum)
+        {
+            scanTitleNum = 0;
+        }
+        if (scanTitleNum > 0)
+        {
+            [self writeToActivityLog: "scanning specifically for title: %d", scanTitleNum];
+        }
+
+        hb_scan( fHandle, [path UTF8String], scanTitleNum );
+        [fSrcDVD2Field setStringValue:@"Scanning new source ..."];
+    }
+}
+
+- (IBAction) showNewScan:(id)sender
+{
+    hb_list_t  * list;
+       hb_title_t * title;
+       int indxpri=0;    // Used to search the longuest title (default in combobox)
+       int longuestpri=0; // Used to search the longuest title (default in combobox)
+    
+
+        list = hb_get_titles( fHandle );
+        
+        if( !hb_list_count( list ) )
+        {
+            /* We display a message if a valid dvd source was not chosen */
+            [fSrcDVD2Field setStringValue: @"No Valid Source Found"];
+            SuccessfulScan = NO;
+            
+            // Notify ChapterTitles that there's no title
+            [fChapterTitlesDelegate resetWithTitle:nil];
+            [fChapterTable reloadData];
+        }
+        else
+        {
+            /* We increment the successful scancount here by one,
+             which we use at the end of this function to tell the gui
+             if this is the first successful scan since launch and whether
+             or not we should set all settings to the defaults */
+            
+            currentSuccessfulScanCount++;
+            
+            [[fWindow toolbar] validateVisibleItems];
+            
+            [fSrcTitlePopUp removeAllItems];
+            for( int i = 0; i < hb_list_count( list ); i++ )
+            {
+                title = (hb_title_t *) hb_list_item( list, i );
+                
+                currentSource = [NSString stringWithUTF8String: title->name];
+                /*Set DVD Name at top of window with the browsedSourceDisplayName grokked right before -performScan */
+                [fSrcDVD2Field setStringValue:browsedSourceDisplayName];
+                
+                /* Use the dvd name in the default output field here
+                 May want to add code to remove blank spaces for some dvd names*/
+                /* Check to see if the last destination has been set,use if so, if not, use Desktop */
+                if ([[NSUserDefaults standardUserDefaults] stringForKey:@"LastDestinationDirectory"])
+                {
+                    [fDstFile2Field setStringValue: [NSString stringWithFormat:
+                                                     @"%@/%@.mp4", [[NSUserDefaults standardUserDefaults] stringForKey:@"LastDestinationDirectory"],[browsedSourceDisplayName stringByDeletingPathExtension]]];
+                }
+                else
+                {
+                    [fDstFile2Field setStringValue: [NSString stringWithFormat:
+                                                     @"%@/Desktop/%@.mp4", NSHomeDirectory(),[browsedSourceDisplayName stringByDeletingPathExtension]]];
+                }
+                
+                
+                if (longuestpri < title->hours*60*60 + title->minutes *60 + title->seconds)
+                {
+                    longuestpri=title->hours*60*60 + title->minutes *60 + title->seconds;
+                    indxpri=i;
+                }
+                
+                [fSrcTitlePopUp addItemWithTitle: [NSString
+                                                   stringWithFormat: @"%d - %02dh%02dm%02ds",
+                                                   title->index, title->hours, title->minutes,
+                                                   title->seconds]];
+            }
+            
+            // Select the longuest title
+            [fSrcTitlePopUp selectItemAtIndex: indxpri];
+            [self titlePopUpChanged:nil];
+            
+            SuccessfulScan = YES;
+            [self enableUI: YES];
+
+                /* if its the initial successful scan after awakeFromNib */
+                if (currentSuccessfulScanCount == 1)
+                {
+                    [self selectDefaultPreset:nil];
+                    /* initially set deinterlace to 0, will be overridden reset by the default preset anyway */
+                    //[fPictureController setDeinterlace:0];
+                    
+                    /* lets set Denoise to index 0 or "None" since this is the first scan */
+                    //[fPictureController setDenoise:0];
+                    
+                    [fPictureController setInitialPictureFilters];
+                }
+
+            
+        }
+
+}
+
+
+#pragma mark -
+#pragma mark New Output Destination
+
+- (IBAction) browseFile: (id) sender
+{
+    /* Open a panel to let the user choose and update the text field */
+    NSSavePanel * panel = [NSSavePanel savePanel];
+       /* We get the current file name and path from the destination field here */
+       [panel beginSheetForDirectory: [[fDstFile2Field stringValue] stringByDeletingLastPathComponent] file: [[fDstFile2Field stringValue] lastPathComponent]
+                                  modalForWindow: fWindow modalDelegate: self
+                                  didEndSelector: @selector( browseFileDone:returnCode:contextInfo: )
+                                         contextInfo: NULL];
+}
+
+- (void) browseFileDone: (NSSavePanel *) sheet
+    returnCode: (int) returnCode contextInfo: (void *) contextInfo
+{
+    if( returnCode == NSOKButton )
+    {
+        [fDstFile2Field setStringValue: [sheet filename]];
+    }
+}
+
+
+#pragma mark -
+#pragma mark Main Window Control
+
+- (IBAction) openMainWindow: (id) sender
+{
+    [fWindow  makeKeyAndOrderFront:nil];
+}
+
+- (BOOL) windowShouldClose: (id) sender
+{
+    return YES;
+}
+
+- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag
+{
+    if( !flag ) {
+        [fWindow  makeKeyAndOrderFront:nil];
+                
+        return YES;
+    }
+    
+    return NO;
+}
+
+
+#pragma mark -
+#pragma mark Queue File
+
+- (void) loadQueueFile {
+       /* We declare the default NSFileManager into fileManager */
+       NSFileManager * fileManager = [NSFileManager defaultManager];
+       /*We define the location of the user presets file */
+    QueueFile = @"~/Library/Application Support/HandBrake/Queue.plist";
+       QueueFile = [[QueueFile stringByExpandingTildeInPath]retain];
+    /* We check for the presets.plist */
+       if ([fileManager fileExistsAtPath:QueueFile] == 0)
+       {
+               [fileManager createFileAtPath:QueueFile contents:nil attributes:nil];
+       }
+
+       QueueFileArray = [[NSMutableArray alloc] initWithContentsOfFile:QueueFile];
+       /* lets check to see if there is anything in the queue file .plist */
+    if (nil == QueueFileArray)
+       {
+        /* if not, then lets initialize an empty array */
+               QueueFileArray = [[NSMutableArray alloc] init];
+        
+     /* Initialize our curQueueEncodeIndex to 0
+     * so we can use it to track which queue
+     * item is to be used to track our encodes */
+     /* NOTE: this should be changed if and when we
+      * are able to get the last unfinished encode
+      * in the case of a crash or shutdown */
+    
+       }
+    else
+    {
+    [self clearQueueEncodedItems];
+    }
+    currentQueueEncodeIndex = 0;
+}
+
+- (void)addQueueFileItem
+{
+        [QueueFileArray addObject:[self createQueueFileItem]];
+        [self saveQueueFileItem];
+
+}
+
+- (void) removeQueueFileItem:(int) queueItemToRemove
+{
+   
+   /* Find out if the item we are removing is a cancelled (3) or a finished (0) item*/
+   if ([[[QueueFileArray objectAtIndex:queueItemToRemove] objectForKey:@"Status"] intValue] == 3 || [[[QueueFileArray objectAtIndex:queueItemToRemove] objectForKey:@"Status"] intValue] == 0)
+    {
+    /* Since we are removing a cancelled or finished item, WE need to decrement the currentQueueEncodeIndex
+     * by one to keep in sync with the queue array
+     */
+    currentQueueEncodeIndex--;
+    [self writeToActivityLog: "removeQueueFileItem: Removing a cancelled/finished encode, decrement currentQueueEncodeIndex to %d", currentQueueEncodeIndex];
+    }
+    [QueueFileArray removeObjectAtIndex:queueItemToRemove];
+    [self saveQueueFileItem];
+
+}
+
+- (void)saveQueueFileItem
+{
+    [QueueFileArray writeToFile:QueueFile atomically:YES];
+    [fQueueController setQueueArray: QueueFileArray];
+    [self getQueueStats];
+}
+
+- (void)getQueueStats
+{
+/* lets get the stats on the status of the queue array */
+
+fEncodingQueueItem = 0;
+fPendingCount = 0;
+fCompletedCount = 0;
+fCanceledCount = 0;
+fWorkingCount = 0;
+
+    /* We use a number system to set the encode status of the queue item
+     * in controller.mm
+     * 0 == already encoded
+     * 1 == is being encoded
+     * 2 == is yet to be encoded
+     * 3 == cancelled
+     */
+
+       int i = 0;
+    NSEnumerator *enumerator = [QueueFileArray objectEnumerator];
+       id tempObject;
+       while (tempObject = [enumerator nextObject])
+       {
+               NSDictionary *thisQueueDict = tempObject;
+               if ([[thisQueueDict objectForKey:@"Status"] intValue] == 0) // Completed
+               {
+                       fCompletedCount++;      
+               }
+               if ([[thisQueueDict objectForKey:@"Status"] intValue] == 1) // being encoded
+               {
+                       fWorkingCount++;
+            fEncodingQueueItem = i;    
+               }
+        if ([[thisQueueDict objectForKey:@"Status"] intValue] == 2) // pending         
+        {
+                       fPendingCount++;
+               }
+        if ([[thisQueueDict objectForKey:@"Status"] intValue] == 3) // cancelled               
+        {
+                       fCanceledCount++;
+               }
+               i++;
+       }
+
+    /* Set the queue status field in the main window */
+    NSMutableString * string;
+    if (fPendingCount == 1)
+    {
+        string = [NSMutableString stringWithFormat: NSLocalizedString( @"%d encode pending in the queue", @"" ), fPendingCount];
+    }
+    else
+    {
+        string = [NSMutableString stringWithFormat: NSLocalizedString( @"%d encode(s) pending in the queue", @"" ), fPendingCount];
+    }
+    [fQueueStatus setStringValue:string];
+}
+
+/* This method will set any item marked as encoding back to pending
+ * currently used right after a queue reload
+ */
+- (void) setQueueEncodingItemsAsPending
+{
+    NSEnumerator *enumerator = [QueueFileArray objectEnumerator];
+       id tempObject;
+    NSMutableArray *tempArray;
+    tempArray = [NSMutableArray array];
+    /* we look here to see if the preset is we move on to the next one */
+    while ( tempObject = [enumerator nextObject] )  
+    {
+        /* If the queue item is marked as "encoding" (1)
+         * then change its status back to pending (2) which effectively
+         * puts it back into the queue to be encoded
+         */
+        if ([[tempObject objectForKey:@"Status"] intValue] == 1)
+        {
+            [tempObject setObject:[NSNumber numberWithInt: 2] forKey:@"Status"];
+        }
+        [tempArray addObject:tempObject];
+    }
+    
+    [QueueFileArray setArray:tempArray];
+    [self saveQueueFileItem];
+}
+
+
+/* This method will clear the queue of any encodes that are not still pending
+ * this includes both successfully completed encodes as well as cancelled encodes */
+- (void) clearQueueEncodedItems
+{
+    NSEnumerator *enumerator = [QueueFileArray objectEnumerator];
+       id tempObject;
+    NSMutableArray *tempArray;
+    tempArray = [NSMutableArray array];
+    /* we look here to see if the preset is we move on to the next one */
+    while ( tempObject = [enumerator nextObject] )  
+    {
+        /* If the queue item is either completed (0) or cancelled (3) from the
+         * last session, then we put it in tempArray to be deleted from QueueFileArray.
+         * NOTE: this means we retain pending (2) and also an item that is marked as
+         * still encoding (1). If the queue has an item that is still marked as encoding
+         * from a previous session, we can conlude that HB was either shutdown, or crashed
+         * during the encodes so we keep it and tell the user in the "Load Queue Alert"
+         */
+        if ([[tempObject objectForKey:@"Status"] intValue] == 0 || [[tempObject objectForKey:@"Status"] intValue] == 3)
+        {
+            [tempArray addObject:tempObject];
+        }
+    }
+    
+    [QueueFileArray removeObjectsInArray:tempArray];
+    [self saveQueueFileItem];
+}
+
+/* This method will clear the queue of all encodes. effectively creating an empty queue */
+- (void) clearQueueAllItems
+{
+    NSEnumerator *enumerator = [QueueFileArray objectEnumerator];
+       id tempObject;
+    NSMutableArray *tempArray;
+    tempArray = [NSMutableArray array];
+    /* we look here to see if the preset is we move on to the next one */
+    while ( tempObject = [enumerator nextObject] )  
+    {
+        [tempArray addObject:tempObject];
+    }
+    
+    [QueueFileArray removeObjectsInArray:tempArray];
+    [self saveQueueFileItem];
+}
+
+/* This method will duplicate prepareJob however into the
+ * queue .plist instead of into the job structure so it can
+ * be recalled later */
+- (NSDictionary *)createQueueFileItem
+{
+    NSMutableDictionary *queueFileJob = [[NSMutableDictionary alloc] init];
+    
+       hb_list_t  * list  = hb_get_titles( fHandle );
+    hb_title_t * title = (hb_title_t *) hb_list_item( list,
+            [fSrcTitlePopUp indexOfSelectedItem] );
+    hb_job_t * job = title->job;
+    
+    
+    
+    /* We use a number system to set the encode status of the queue item
+     * 0 == already encoded
+     * 1 == is being encoded
+     * 2 == is yet to be encoded
+     * 3 == cancelled
+     */
+    [queueFileJob setObject:[NSNumber numberWithInt:2] forKey:@"Status"];
+    /* Source and Destination Information */
+    
+    [queueFileJob setObject:[NSString stringWithUTF8String: title->dvd] forKey:@"SourcePath"];
+    [queueFileJob setObject:[fSrcDVD2Field stringValue] forKey:@"SourceName"];
+    [queueFileJob setObject:[NSNumber numberWithInt:title->index] forKey:@"TitleNumber"];
+    [queueFileJob setObject:[NSNumber numberWithInt:[fSrcChapterStartPopUp indexOfSelectedItem] + 1] forKey:@"ChapterStart"];
+    
+    [queueFileJob setObject:[NSNumber numberWithInt:[fSrcChapterEndPopUp indexOfSelectedItem] + 1] forKey:@"ChapterEnd"];
+    
+    [queueFileJob setObject:[fDstFile2Field stringValue] forKey:@"DestinationPath"];
+    
+    /* Lets get the preset info if there is any */
+    [queueFileJob setObject:[fPresetSelectedDisplay stringValue] forKey:@"PresetName"];
+    [queueFileJob setObject:[NSNumber numberWithInt:[fPresetsOutlineView selectedRow]] forKey:@"PresetIndexNum"];
+    
+    [queueFileJob setObject:[fDstFormatPopUp titleOfSelectedItem] forKey:@"FileFormat"];
+       /* Chapter Markers fCreateChapterMarkers*/
+       [queueFileJob setObject:[NSNumber numberWithInt:[fCreateChapterMarkers state]] forKey:@"ChapterMarkers"];
+       
+    /* We need to get the list of chapter names to put into an array and store 
+     * in our queue, so they can be reapplied in prepareJob when this queue
+     * item comes up if Chapter Markers is set to on.
+     */
+     int i;
+     NSMutableArray *ChapterNamesArray = [[NSMutableArray alloc] init];
+     int chaptercount = hb_list_count( fTitle->list_chapter );
+     for( i = 0; i < chaptercount; i++ )
+    {
+        hb_chapter_t *chapter = (hb_chapter_t *) hb_list_item( fTitle->list_chapter, i );
+        if( chapter != NULL )
+        {
+          [ChapterNamesArray addObject:[NSString stringWithCString:chapter->title encoding:NSUTF8StringEncoding]];
+        }
+    }
+    [queueFileJob setObject:[NSMutableArray arrayWithArray: ChapterNamesArray] forKey:@"ChapterNames"];
+    [ChapterNamesArray autorelease];
+    
+    /* Allow Mpeg4 64 bit formatting +4GB file sizes */
+       [queueFileJob setObject:[NSNumber numberWithInt:[fDstMp4LargeFileCheck state]] forKey:@"Mp4LargeFile"];
+    /* Mux mp4 with http optimization */
+    [queueFileJob setObject:[NSNumber numberWithInt:[fDstMp4HttpOptFileCheck state]] forKey:@"Mp4HttpOptimize"];
+    /* Add iPod uuid atom */
+    [queueFileJob setObject:[NSNumber numberWithInt:[fDstMp4iPodFileCheck state]] forKey:@"Mp4iPodCompatible"];
+    
+    /* Codecs */
+       /* Video encoder */
+       [queueFileJob setObject:[fVidEncoderPopUp titleOfSelectedItem] forKey:@"VideoEncoder"];
+       /* x264 Option String */
+       [queueFileJob setObject:[fAdvancedOptions optionsString] forKey:@"x264Option"];
+
+       [queueFileJob setObject:[NSNumber numberWithInt:[fVidQualityMatrix selectedRow]] forKey:@"VideoQualityType"];
+       [queueFileJob setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
+       [queueFileJob setObject:[fVidBitrateField stringValue] forKey:@"VideoAvgBitrate"];
+       [queueFileJob setObject:[NSNumber numberWithFloat:[fVidQualitySlider floatValue]] forKey:@"VideoQualitySlider"];
+    /* Framerate */
+    [queueFileJob setObject:[fVidRatePopUp titleOfSelectedItem] forKey:@"VideoFramerate"];
+    
+    /* GrayScale */
+       [queueFileJob setObject:[NSNumber numberWithInt:[fVidGrayscaleCheck state]] forKey:@"VideoGrayScale"];
+       /* 2 Pass Encoding */
+       [queueFileJob setObject:[NSNumber numberWithInt:[fVidTwoPassCheck state]] forKey:@"VideoTwoPass"];
+       /* Turbo 2 pass Encoding fVidTurboPassCheck*/
+       [queueFileJob setObject:[NSNumber numberWithInt:[fVidTurboPassCheck state]] forKey:@"VideoTurboTwoPass"];
+    
+       /* Picture Sizing */
+       /* Use Max Picture settings for whatever the dvd is.*/
+       [queueFileJob setObject:[NSNumber numberWithInt:0] forKey:@"UsesMaxPictureSettings"];
+       [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->width] forKey:@"PictureWidth"];
+       [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->height] forKey:@"PictureHeight"];
+       [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->keep_ratio] forKey:@"PictureKeepRatio"];
+       [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->pixel_ratio] forKey:@"PicturePAR"];
+    NSString * pictureSummary;
+    pictureSummary = [NSString stringWithFormat:@"Source: %@ Output: %@ Anamorphic: %@", 
+                     [fPicSettingsSrc stringValue], 
+                     [fPicSettingsOutp stringValue], 
+                     [fPicSettingsAnamorphic stringValue]];
+    [queueFileJob setObject:pictureSummary forKey:@"PictureSizingSummary"];                 
+    /* Set crop settings here */
+       [queueFileJob setObject:[NSNumber numberWithInt:[fPictureController autoCrop]] forKey:@"PictureAutoCrop"];
+    [queueFileJob setObject:[NSNumber numberWithInt:job->crop[0]] forKey:@"PictureTopCrop"];
+    [queueFileJob setObject:[NSNumber numberWithInt:job->crop[1]] forKey:@"PictureBottomCrop"];
+       [queueFileJob setObject:[NSNumber numberWithInt:job->crop[2]] forKey:@"PictureLeftCrop"];
+       [queueFileJob setObject:[NSNumber numberWithInt:job->crop[3]] forKey:@"PictureRightCrop"];
+    
+    /* Picture Filters */
+    [queueFileJob setObject:[NSNumber numberWithInt:[fPictureController deinterlace]] forKey:@"PictureDeinterlace"];
+       [queueFileJob setObject:[NSNumber numberWithInt:[fPictureController detelecine]] forKey:@"PictureDetelecine"];
+    [queueFileJob setObject:[NSNumber numberWithInt:[fPictureController denoise]] forKey:@"PictureDenoise"];
+    [queueFileJob setObject:[NSString stringWithFormat:@"%d",[fPictureController deblock]] forKey:@"PictureDeblock"]; 
+    [queueFileJob setObject:[NSNumber numberWithInt:[fPictureController decomb]] forKey:@"PictureDecomb"];
+    
+    /*Audio*/
+    if ([fAudLang1PopUp indexOfSelectedItem] > 0)
+    {
+        [queueFileJob setObject:[NSNumber numberWithInt:[fAudLang1PopUp indexOfSelectedItem]] forKey:@"Audio1Track"];
+        [queueFileJob setObject:[fAudLang1PopUp titleOfSelectedItem] forKey:@"Audio1TrackDescription"];
+        [queueFileJob setObject:[fAudTrack1CodecPopUp titleOfSelectedItem] forKey:@"Audio1Encoder"];
+        [queueFileJob setObject:[fAudTrack1MixPopUp titleOfSelectedItem] forKey:@"Audio1Mixdown"];
+        [queueFileJob setObject:[fAudTrack1RatePopUp titleOfSelectedItem] forKey:@"Audio1Samplerate"];
+        [queueFileJob setObject:[fAudTrack1BitratePopUp titleOfSelectedItem] forKey:@"Audio1Bitrate"];
+        [queueFileJob setObject:[NSNumber numberWithFloat:[fAudTrack1DrcSlider floatValue]] forKey:@"Audio1TrackDRCSlider"];
+    }
+    if ([fAudLang2PopUp indexOfSelectedItem] > 0)
+    {
+        [queueFileJob setObject:[NSNumber numberWithInt:[fAudLang2PopUp indexOfSelectedItem]] forKey:@"Audio2Track"];
+        [queueFileJob setObject:[fAudLang2PopUp titleOfSelectedItem] forKey:@"Audio2TrackDescription"];
+        [queueFileJob setObject:[fAudTrack2CodecPopUp titleOfSelectedItem] forKey:@"Audio2Encoder"];
+        [queueFileJob setObject:[fAudTrack2MixPopUp titleOfSelectedItem] forKey:@"Audio2Mixdown"];
+        [queueFileJob setObject:[fAudTrack2RatePopUp titleOfSelectedItem] forKey:@"Audio2Samplerate"];
+        [queueFileJob setObject:[fAudTrack2BitratePopUp titleOfSelectedItem] forKey:@"Audio2Bitrate"];
+        [queueFileJob setObject:[NSNumber numberWithFloat:[fAudTrack2DrcSlider floatValue]] forKey:@"Audio2TrackDRCSlider"];
+    }
+    if ([fAudLang3PopUp indexOfSelectedItem] > 0)
+    {
+        [queueFileJob setObject:[NSNumber numberWithInt:[fAudLang3PopUp indexOfSelectedItem]] forKey:@"Audio3Track"];
+        [queueFileJob setObject:[fAudLang3PopUp titleOfSelectedItem] forKey:@"Audio3TrackDescription"];
+        [queueFileJob setObject:[fAudTrack3CodecPopUp titleOfSelectedItem] forKey:@"Audio3Encoder"];
+        [queueFileJob setObject:[fAudTrack3MixPopUp titleOfSelectedItem] forKey:@"Audio3Mixdown"];
+        [queueFileJob setObject:[fAudTrack3RatePopUp titleOfSelectedItem] forKey:@"Audio3Samplerate"];
+        [queueFileJob setObject:[fAudTrack3BitratePopUp titleOfSelectedItem] forKey:@"Audio3Bitrate"];
+        [queueFileJob setObject:[NSNumber numberWithFloat:[fAudTrack3DrcSlider floatValue]] forKey:@"Audio3TrackDRCSlider"];
+    }
+    if ([fAudLang4PopUp indexOfSelectedItem] > 0)
+    {
+        [queueFileJob setObject:[NSNumber numberWithInt:[fAudLang4PopUp indexOfSelectedItem]] forKey:@"Audio4Track"];
+        [queueFileJob setObject:[fAudLang4PopUp titleOfSelectedItem] forKey:@"Audio4TrackDescription"];
+        [queueFileJob setObject:[fAudTrack4CodecPopUp titleOfSelectedItem] forKey:@"Audio4Encoder"];
+        [queueFileJob setObject:[fAudTrack4MixPopUp titleOfSelectedItem] forKey:@"Audio4Mixdown"];
+        [queueFileJob setObject:[fAudTrack4RatePopUp titleOfSelectedItem] forKey:@"Audio4Samplerate"];
+        [queueFileJob setObject:[fAudTrack4BitratePopUp titleOfSelectedItem] forKey:@"Audio4Bitrate"];
+        [queueFileJob setObject:[NSNumber numberWithFloat:[fAudTrack4DrcSlider floatValue]] forKey:@"Audio4TrackDRCSlider"];
+    }
+    
+       /* Subtitles*/
+       [queueFileJob setObject:[fSubPopUp titleOfSelectedItem] forKey:@"Subtitles"];
+    [queueFileJob setObject:[NSNumber numberWithInt:[fSubPopUp indexOfSelectedItem]] forKey:@"JobSubtitlesIndex"];
+    /* Forced Subtitles */
+       [queueFileJob setObject:[NSNumber numberWithInt:[fSubForcedCheck state]] forKey:@"SubtitlesForced"];
+    
+    
+    
+    /* Now we go ahead and set the "job->values in the plist for passing right to fQueueEncodeLibhb */
+     
+    [queueFileJob setObject:[NSNumber numberWithInt:[fSrcChapterStartPopUp indexOfSelectedItem] + 1] forKey:@"JobChapterStart"];
+    
+    [queueFileJob setObject:[NSNumber numberWithInt:[fSrcChapterEndPopUp indexOfSelectedItem] + 1] forKey:@"JobChapterEnd"];
+    
+    
+    [queueFileJob setObject:[NSNumber numberWithInt:[[fDstFormatPopUp selectedItem] tag]] forKey:@"JobFileFormatMux"];
+    
+    /* Codecs */
+       /* Video encoder */
+       [queueFileJob setObject:[NSNumber numberWithInt:[[fVidEncoderPopUp selectedItem] tag]] forKey:@"JobVideoEncoderVcodec"];
+       
+    /* Framerate */
+    [queueFileJob setObject:[NSNumber numberWithInt:[fVidRatePopUp indexOfSelectedItem]] forKey:@"JobIndexVideoFramerate"];
+    [queueFileJob setObject:[NSNumber numberWithInt:title->rate] forKey:@"JobVrate"];
+    [queueFileJob setObject:[NSNumber numberWithInt:title->rate_base] forKey:@"JobVrateBase"];
+       
+    /* Picture Sizing */
+       /* Use Max Picture settings for whatever the dvd is.*/
+       [queueFileJob setObject:[NSNumber numberWithInt:0] forKey:@"UsesMaxPictureSettings"];
+       [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->width] forKey:@"PictureWidth"];
+       [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->height] forKey:@"PictureHeight"];
+       [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->keep_ratio] forKey:@"PictureKeepRatio"];
+       [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->pixel_ratio] forKey:@"PicturePAR"];
+    
+    /* Set crop settings here */
+       [queueFileJob setObject:[NSNumber numberWithInt:[fPictureController autoCrop]] forKey:@"PictureAutoCrop"];
+    [queueFileJob setObject:[NSNumber numberWithInt:job->crop[0]] forKey:@"PictureTopCrop"];
+    [queueFileJob setObject:[NSNumber numberWithInt:job->crop[1]] forKey:@"PictureBottomCrop"];
+       [queueFileJob setObject:[NSNumber numberWithInt:job->crop[2]] forKey:@"PictureLeftCrop"];
+       [queueFileJob setObject:[NSNumber numberWithInt:job->crop[3]] forKey:@"PictureRightCrop"];
+    
+    /* Picture Filters */
+    [queueFileJob setObject:[fPicSettingDecomb stringValue] forKey:@"JobPictureDecomb"];
+    
+    /*Audio*/
+    if ([fAudLang1PopUp indexOfSelectedItem] > 0)
+    {
+        //[queueFileJob setObject:[fAudTrack1CodecPopUp indexOfSelectedItem] forKey:@"JobAudio1Encoder"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack1CodecPopUp selectedItem] tag]] forKey:@"JobAudio1Encoder"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack1MixPopUp selectedItem] tag]] forKey:@"JobAudio1Mixdown"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack1RatePopUp selectedItem] tag]] forKey:@"JobAudio1Samplerate"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack1BitratePopUp selectedItem] tag]] forKey:@"JobAudio1Bitrate"];
+     }
+    if ([fAudLang2PopUp indexOfSelectedItem] > 0)
+    {
+        //[queueFileJob setObject:[fAudTrack1CodecPopUp indexOfSelectedItem] forKey:@"JobAudio2Encoder"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack2CodecPopUp selectedItem] tag]] forKey:@"JobAudio2Encoder"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack2MixPopUp selectedItem] tag]] forKey:@"JobAudio2Mixdown"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack2RatePopUp selectedItem] tag]] forKey:@"JobAudio2Samplerate"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack2BitratePopUp selectedItem] tag]] forKey:@"JobAudio2Bitrate"];
+    }
+    if ([fAudLang3PopUp indexOfSelectedItem] > 0)
+    {
+        //[queueFileJob setObject:[fAudTrack1CodecPopUp indexOfSelectedItem] forKey:@"JobAudio3Encoder"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack3CodecPopUp selectedItem] tag]] forKey:@"JobAudio3Encoder"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack3MixPopUp selectedItem] tag]] forKey:@"JobAudio3Mixdown"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack3RatePopUp selectedItem] tag]] forKey:@"JobAudio3Samplerate"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack3BitratePopUp selectedItem] tag]] forKey:@"JobAudio3Bitrate"];
+    }
+    if ([fAudLang4PopUp indexOfSelectedItem] > 0)
+    {
+        //[queueFileJob setObject:[fAudTrack1CodecPopUp indexOfSelectedItem] forKey:@"JobAudio4Encoder"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack4CodecPopUp selectedItem] tag]] forKey:@"JobAudio4Encoder"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack4MixPopUp selectedItem] tag]] forKey:@"JobAudio4Mixdown"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack4RatePopUp selectedItem] tag]] forKey:@"JobAudio4Samplerate"];
+        [queueFileJob setObject:[NSNumber numberWithInt:[[fAudTrack4BitratePopUp selectedItem] tag]] forKey:@"JobAudio4Bitrate"];
+    }
+       /* Subtitles*/
+       [queueFileJob setObject:[fSubPopUp titleOfSelectedItem] forKey:@"Subtitles"];
+    /* Forced Subtitles */
+       [queueFileJob setObject:[NSNumber numberWithInt:[fSubForcedCheck state]] forKey:@"SubtitlesForced"];
+    /* we need to auto relase the queueFileJob and return it */
+    [queueFileJob autorelease];
+    return queueFileJob;
+
+}
+
+/* this is actually called from the queue controller to modify the queue array and return it back to the queue controller */
+- (void)moveObjectsInQueueArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex
+{
+    unsigned index = [indexSet lastIndex];
+    unsigned aboveInsertIndexCount = 0;
+    
+    while (index != NSNotFound)
+    {
+        unsigned removeIndex;
+        
+        if (index >= insertIndex)
+        {
+            removeIndex = index + aboveInsertIndexCount;
+            aboveInsertIndexCount++;
+        }
+        else
+        {
+            removeIndex = index;
+            insertIndex--;
+        }
+        
+        id object = [[QueueFileArray objectAtIndex:removeIndex] retain];
+        [QueueFileArray removeObjectAtIndex:removeIndex];
+        [QueueFileArray insertObject:object atIndex:insertIndex];
+        [object release];
+        
+        index = [indexSet indexLessThanIndex:index];
+    }
+   /* We save all of the Queue data here 
+    * and it also gets sent back to the queue controller*/
+    [self saveQueueFileItem]; 
+    
+}
+
+
+#pragma mark -
+#pragma mark Queue Job Processing
+
+- (void) incrementQueueItemDone:(int) queueItemDoneIndexNum
+{
+    int i = currentQueueEncodeIndex;
+    [[QueueFileArray objectAtIndex:i] setObject:[NSNumber numberWithInt:0] forKey:@"Status"];
+       
+    /* We save all of the Queue data here */
+    [self saveQueueFileItem];
+       /* We Reload the New Table data for presets */
+    //[fPresetsOutlineView reloadData];
+
+    /* Since we have now marked a queue item as done
+     * we can go ahead and increment currentQueueEncodeIndex 
+     * so that if there is anything left in the queue we can
+     * go ahead and move to the next item if we want to */
+    currentQueueEncodeIndex++ ;
+    [self writeToActivityLog: "incrementQueueItemDone currentQueueEncodeIndex is incremented to: %d", currentQueueEncodeIndex];
+    int queueItems = [QueueFileArray count];
+    /* If we still have more items in our queue, lets go to the next one */
+    if (currentQueueEncodeIndex < queueItems)
+    {
+    [self writeToActivityLog: "incrementQueueItemDone currentQueueEncodeIndex is incremented to: %d", currentQueueEncodeIndex];
+    [self performNewQueueScan:[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"SourcePath"] scanTitleNum:[[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"TitleNumber"]intValue]];
+    }
+    else
+    {
+        [self writeToActivityLog: "incrementQueueItemDone the %d item queue is complete", currentQueueEncodeIndex - 1];
+    }
+}
+
+/* Here we actually tell hb_scan to perform the source scan, using the path to source and title number*/
+- (void) performNewQueueScan:(NSString *) scanPath scanTitleNum: (int) scanTitleNum
+{
+   /* Tell HB to output a new activity log file for this encode */
+    [outputPanel startEncodeLog:[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"DestinationPath"]];
+    
+    
+     /* use a bool to determine whether or not we can decrypt using vlc */
+    BOOL cancelScanDecrypt = 0;
+    /* set the bool so that showNewScan knows to apply the appropriate queue
+    * settings as this is a queue rescan
+    */
+    applyQueueToScan = YES;
+    NSString *path = scanPath;
+    HBDVDDetector *detector = [HBDVDDetector detectorForPath:path];
+
+        /*On Screen Notification*/
+        //int status;
+        //status = NSRunAlertPanel(@"HandBrake is now loading up a new queue item...",@"Would You Like to wait until you add another encode?", @"Cancel", @"Okay", nil);
+        //[NSApp requestUserAttention:NSCriticalRequest];
+
+    // Notify ChapterTitles that there's no title
+    [fChapterTitlesDelegate resetWithTitle:nil];
+    [fChapterTable reloadData];
+
+    //[self enableUI: NO];
+
+    if( [detector isVideoDVD] )
+    {
+        // The chosen path was actually on a DVD, so use the raw block
+        // device path instead.
+        path = [detector devicePath];
+        [self writeToActivityLog: "trying to open a physical dvd at: %s", [scanPath UTF8String]];
+
+        /* lets check for vlc here to make sure we have a dylib available to use for decrypting */
+        NSString *vlcPath = @"/Applications/VLC.app";
+        NSFileManager * fileManager = [NSFileManager defaultManager];
+           if ([fileManager fileExistsAtPath:vlcPath] == 0) 
+           {
+            /*vlc not found in /Applications so we set the bool to cancel scanning to 1 */
+            cancelScanDecrypt = 1;
+            [self writeToActivityLog: "VLC app not found for decrypting physical dvd"];
+            int status;
+            status = NSRunAlertPanel(@"HandBrake could not find VLC.",@"Please download and install VLC media player in your /Applications folder if you wish to read encrypted DVDs.", @"Get VLC", @"Cancel Scan", @"Attempt Scan Anyway");
+            [NSApp requestUserAttention:NSCriticalRequest];
+            
+            if (status == NSAlertDefaultReturn)
+            {
+                /* User chose to go download vlc (as they rightfully should) so we send them to the vlc site */
+                [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.videolan.org/"]];
+            }
+            else if (status == NSAlertAlternateReturn)
+            {
+            /* User chose to cancel the scan */
+            [self writeToActivityLog: "cannot open physical dvd , scan cancelled"];
+            }
+            else
+            {
+            /* User chose to override our warning and scan the physical dvd anyway, at their own peril. on an encrypted dvd this produces massive log files and fails */
+            cancelScanDecrypt = 0;
+            [self writeToActivityLog: "user overrode vlc warning -trying to open physical dvd without decryption"];
+            }
+
+        }
+        else
+        {
+            /* VLC was found in /Applications so all is well, we can carry on using vlc's libdvdcss.dylib for decrypting if needed */
+            [self writeToActivityLog: "VLC app found for decrypting physical dvd"];
+        }
+    }
+
+    if (cancelScanDecrypt == 0)
+    {
+        /* we actually pass the scan off to libhb here */
+        /* If there is no title number passed to scan, we use "0"
+         * which causes the default behavior of a full source scan
+         */
+        if (!scanTitleNum)
+        {
+            scanTitleNum = 0;
+        }
+        if (scanTitleNum > 0)
+        {
+            [self writeToActivityLog: "scanning specifically for title: %d", scanTitleNum];
+        }
+        [self writeToActivityLog: "performNewQueueScan currentQueueEncodeIndex is: %d", currentQueueEncodeIndex];
+        hb_scan( fQueueEncodeLibhb, [path UTF8String], scanTitleNum );
+    }
+}
+
+/* This method was originally used to load up a new queue item in the gui and
+ * then start processing it. However we now have modified -prepareJob and use a second
+ * instance of libhb to do our actual encoding, therefor right now it is not required. 
+ * Nonetheless I want to leave this in here
+ * because basically its everything we need to be able to actually modify a pending queue
+ * item in the gui and resave it. At least for now - dynaflash
+ */
+
+- (IBAction)applyQueueSettings:(id)sender
+{
+    NSMutableDictionary * queueToApply = [QueueFileArray objectAtIndex:currentQueueEncodeIndex];
+    hb_job_t * job = fTitle->job;
+    
+    /* Set title number and chapters */
+    /* since the queue only scans a single title, we really don't need to pick a title */
+    //[fSrcTitlePopUp selectItemAtIndex: [[queueToApply objectForKey:@"TitleNumber"] intValue] - 1];
+    
+    [fSrcChapterStartPopUp selectItemAtIndex: [[queueToApply objectForKey:@"ChapterStart"] intValue] - 1];
+    [fSrcChapterEndPopUp selectItemAtIndex: [[queueToApply objectForKey:@"ChapterEnd"] intValue] - 1];
+    
+    /* File Format */
+    [fDstFormatPopUp selectItemWithTitle:[queueToApply objectForKey:@"FileFormat"]];
+    [self formatPopUpChanged:nil];
+    
+    /* Chapter Markers*/
+    [fCreateChapterMarkers setState:[[queueToApply objectForKey:@"ChapterMarkers"] intValue]];
+    /* Allow Mpeg4 64 bit formatting +4GB file sizes */
+    [fDstMp4LargeFileCheck setState:[[queueToApply objectForKey:@"Mp4LargeFile"] intValue]];
+    /* Mux mp4 with http optimization */
+    [fDstMp4HttpOptFileCheck setState:[[queueToApply objectForKey:@"Mp4HttpOptimize"] intValue]];
+    
+    /* Video encoder */
+    /* We set the advanced opt string here if applicable*/
+    [fVidEncoderPopUp selectItemWithTitle:[queueToApply objectForKey:@"VideoEncoder"]];
+    [fAdvancedOptions setOptions:[queueToApply objectForKey:@"x264Option"]];
+    
+    /* Lets run through the following functions to get variables set there */
+    [self videoEncoderPopUpChanged:nil];
+    /* Set the state of ipod compatible with Mp4iPodCompatible. Only for x264*/
+    [fDstMp4iPodFileCheck setState:[[queueToApply objectForKey:@"Mp4iPodCompatible"] intValue]];
+    [self calculateBitrate:nil];
+    
+    /* Video quality */
+    [fVidQualityMatrix selectCellAtRow:[[queueToApply objectForKey:@"VideoQualityType"] intValue] column:0];
+    
+    [fVidTargetSizeField setStringValue:[queueToApply objectForKey:@"VideoTargetSize"]];
+    [fVidBitrateField setStringValue:[queueToApply objectForKey:@"VideoAvgBitrate"]];
+    [fVidQualitySlider setFloatValue:[[queueToApply objectForKey:@"VideoQualitySlider"] floatValue]];
+    
+    [self videoMatrixChanged:nil];
+    
+    /* Video framerate */
+    /* For video preset video framerate, we want to make sure that Same as source does not conflict with the
+     detected framerate in the fVidRatePopUp so we use index 0*/
+    if ([[queueToApply objectForKey:@"VideoFramerate"] isEqualToString:@"Same as source"])
+    {
+        [fVidRatePopUp selectItemAtIndex: 0];
+    }
+    else
+    {
+        [fVidRatePopUp selectItemWithTitle:[queueToApply objectForKey:@"VideoFramerate"]];
+    }
+    
+    /* GrayScale */
+    [fVidGrayscaleCheck setState:[[queueToApply objectForKey:@"VideoGrayScale"] intValue]];
+    
+    /* 2 Pass Encoding */
+    [fVidTwoPassCheck setState:[[queueToApply objectForKey:@"VideoTwoPass"] intValue]];
+    [self twoPassCheckboxChanged:nil];
+    /* Turbo 1st pass for 2 Pass Encoding */
+    [fVidTurboPassCheck setState:[[queueToApply objectForKey:@"VideoTurboTwoPass"] intValue]];
+    
+    /*Audio*/
+    if ([queueToApply objectForKey:@"Audio1Track"] > 0)
+    {
+        if ([fAudLang1PopUp indexOfSelectedItem] == 0)
+        {
+            [fAudLang1PopUp selectItemAtIndex: 1];
+        }
+        [self audioTrackPopUpChanged: fAudLang1PopUp];
+        [fAudTrack1CodecPopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio1Encoder"]];
+        [self audioTrackPopUpChanged: fAudTrack1CodecPopUp];
+        [fAudTrack1MixPopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio1Mixdown"]];
+        /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default
+         * mixdown*/
+        if  ([fAudTrack1MixPopUp selectedItem] == nil)
+        {
+            [self audioTrackPopUpChanged: fAudTrack1CodecPopUp];
+        }
+        [fAudTrack1RatePopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio1Samplerate"]];
+        /* We set the presets bitrate if it is *not* an AC3 track since that uses the input bitrate */
+        if (![[queueToApply objectForKey:@"Audio1Encoder"] isEqualToString:@"AC3 Passthru"])
+        {
+            [fAudTrack1BitratePopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio1Bitrate"]];
+        }
+        [fAudTrack1DrcSlider setFloatValue:[[queueToApply objectForKey:@"Audio1TrackDRCSlider"] floatValue]];
+        [self audioDRCSliderChanged: fAudTrack1DrcSlider];
+    }
+    if ([queueToApply objectForKey:@"Audio2Track"] > 0)
+    {
+        if ([fAudLang2PopUp indexOfSelectedItem] == 0)
+        {
+            [fAudLang2PopUp selectItemAtIndex: 1];
+        }
+        [self audioTrackPopUpChanged: fAudLang2PopUp];
+        [fAudTrack2CodecPopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio2Encoder"]];
+        [self audioTrackPopUpChanged: fAudTrack2CodecPopUp];
+        [fAudTrack2MixPopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio2Mixdown"]];
+        /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default
+         * mixdown*/
+        if  ([fAudTrack2MixPopUp selectedItem] == nil)
+        {
+            [self audioTrackPopUpChanged: fAudTrack2CodecPopUp];
+        }
+        [fAudTrack2RatePopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio2Samplerate"]];
+        /* We set the presets bitrate if it is *not* an AC3 track since that uses the input bitrate */
+        if (![[queueToApply objectForKey:@"Audio2Encoder"] isEqualToString:@"AC3 Passthru"])
+        {
+            [fAudTrack2BitratePopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio2Bitrate"]];
+        }
+        [fAudTrack2DrcSlider setFloatValue:[[queueToApply objectForKey:@"Audio2TrackDRCSlider"] floatValue]];
+        [self audioDRCSliderChanged: fAudTrack2DrcSlider];
+    }
+    if ([queueToApply objectForKey:@"Audio3Track"] > 0)
+    {
+        if ([fAudLang3PopUp indexOfSelectedItem] == 0)
+        {
+            [fAudLang3PopUp selectItemAtIndex: 1];
+        }
+        [self audioTrackPopUpChanged: fAudLang3PopUp];
+        [fAudTrack3CodecPopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio3Encoder"]];
+        [self audioTrackPopUpChanged: fAudTrack3CodecPopUp];
+        [fAudTrack3MixPopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio3Mixdown"]];
+        /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default
+         * mixdown*/
+        if  ([fAudTrack3MixPopUp selectedItem] == nil)
+        {
+            [self audioTrackPopUpChanged: fAudTrack3CodecPopUp];
+        }
+        [fAudTrack3RatePopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio3Samplerate"]];
+        /* We set the presets bitrate if it is *not* an AC3 track since that uses the input bitrate */
+        if (![[queueToApply objectForKey:@"Audio3Encoder"] isEqualToString: @"AC3 Passthru"])
+        {
+            [fAudTrack3BitratePopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio3Bitrate"]];
+        }
+        [fAudTrack3DrcSlider setFloatValue:[[queueToApply objectForKey:@"Audio3TrackDRCSlider"] floatValue]];
+        [self audioDRCSliderChanged: fAudTrack3DrcSlider];
+    }
+    if ([queueToApply objectForKey:@"Audio4Track"] > 0)
+    {
+        if ([fAudLang4PopUp indexOfSelectedItem] == 0)
+        {
+            [fAudLang4PopUp selectItemAtIndex: 1];
+        }
+        [self audioTrackPopUpChanged: fAudLang4PopUp];
+        [fAudTrack4CodecPopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio4Encoder"]];
+        [self audioTrackPopUpChanged: fAudTrack4CodecPopUp];
+        [fAudTrack4MixPopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio4Mixdown"]];
+        /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default
+         * mixdown*/
+        if  ([fAudTrack4MixPopUp selectedItem] == nil)
+        {
+            [self audioTrackPopUpChanged: fAudTrack4CodecPopUp];
+        }
+        [fAudTrack4RatePopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio4Samplerate"]];
+        /* We set the presets bitrate if it is *not* an AC3 track since that uses the input bitrate */
+        if (![[chosenPreset objectForKey:@"Audio4Encoder"] isEqualToString:@"AC3 Passthru"])
+        {
+            [fAudTrack4BitratePopUp selectItemWithTitle:[queueToApply objectForKey:@"Audio4Bitrate"]];
+        }
+        [fAudTrack4DrcSlider setFloatValue:[[queueToApply objectForKey:@"Audio4TrackDRCSlider"] floatValue]];
+        [self audioDRCSliderChanged: fAudTrack4DrcSlider];
+    }
+    
+    
+    /*Subtitles*/
+    [fSubPopUp selectItemWithTitle:[queueToApply objectForKey:@"Subtitles"]];
+    /* Forced Subtitles */
+    [fSubForcedCheck setState:[[queueToApply objectForKey:@"SubtitlesForced"] intValue]];
+    
+    /* Picture Settings */
+    /* we check to make sure the presets width/height does not exceed the sources width/height */
+    if (fTitle->width < [[queueToApply objectForKey:@"PictureWidth"]  intValue] || fTitle->height < [[queueToApply objectForKey:@"PictureHeight"]  intValue])
+    {
+        /* if so, then we use the sources height and width to avoid scaling up */
+        job->width = fTitle->width;
+        job->height = fTitle->height;
+    }
+    else // source width/height is >= the preset height/width
+    {
+        /* we can go ahead and use the presets values for height and width */
+        job->width = [[queueToApply objectForKey:@"PictureWidth"]  intValue];
+        job->height = [[queueToApply objectForKey:@"PictureHeight"]  intValue];
+    }
+    job->keep_ratio = [[queueToApply objectForKey:@"PictureKeepRatio"]  intValue];
+    if (job->keep_ratio == 1)
+    {
+        hb_fix_aspect( job, HB_KEEP_WIDTH );
+        if( job->height > fTitle->height )
+        {
+            job->height = fTitle->height;
+            hb_fix_aspect( job, HB_KEEP_HEIGHT );
+        }
+    }
+    job->pixel_ratio = [[queueToApply objectForKey:@"PicturePAR"]  intValue];
+    
+    
+    /* If Cropping is set to custom, then recall all four crop values from
+     when the preset was created and apply them */
+    if ([[queueToApply objectForKey:@"PictureAutoCrop"]  intValue] == 0)
+    {
+        [fPictureController setAutoCrop:NO];
+        
+        /* Here we use the custom crop values saved at the time the preset was saved */
+        job->crop[0] = [[queueToApply objectForKey:@"PictureTopCrop"]  intValue];
+        job->crop[1] = [[queueToApply objectForKey:@"PictureBottomCrop"]  intValue];
+        job->crop[2] = [[queueToApply objectForKey:@"PictureLeftCrop"]  intValue];
+        job->crop[3] = [[queueToApply objectForKey:@"PictureRightCrop"]  intValue];
+        
+    }
+    else /* if auto crop has been saved in preset, set to auto and use post scan auto crop */
+    {
+        [fPictureController setAutoCrop:YES];
+        /* Here we use the auto crop values determined right after scan */
+        job->crop[0] = AutoCropTop;
+        job->crop[1] = AutoCropBottom;
+        job->crop[2] = AutoCropLeft;
+        job->crop[3] = AutoCropRight;
+        
+    }
+    
+    /* Filters */
+    /* Deinterlace */
+    [fPictureController setDeinterlace:[[queueToApply objectForKey:@"PictureDeinterlace"] intValue]];
+    
+    /* Detelecine */
+    [fPictureController setDetelecine:[[queueToApply objectForKey:@"PictureDetelecine"] intValue]];
+    /* Denoise */
+    [fPictureController setDenoise:[[queueToApply objectForKey:@"PictureDenoise"] intValue]];
+    /* Deblock */
+    [fPictureController setDeblock:[[queueToApply objectForKey:@"PictureDeblock"] intValue]];
+    /* Decomb */
+    [fPictureController setDecomb:[[queueToApply objectForKey:@"PictureDecomb"] intValue]];
+    
+    [self calculatePictureSizing:nil];
+    
+    
+    /* somehow we need to figure out a way to tie the queue item to a preset if it used one */
+    //[queueFileJob setObject:[fPresetSelectedDisplay stringValue] forKey:@"PresetName"];
+    //    [queueFileJob setObject:[NSNumber numberWithInt:[fPresetsOutlineView selectedRow]] forKey:@"PresetIndexNum"];
+    if ([queueToApply objectForKey:@"PresetIndexNum"]) // This item used a preset so insert that info
+       {
+               /* Deselect the currently selected Preset if there is one*/
+        //[fPresetsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:[[queueToApply objectForKey:@"PresetIndexNum"] intValue]] byExtendingSelection:NO];
+        //[self selectPreset:nil];
+               
+        //[fPresetsOutlineView selectRow:[[queueToApply objectForKey:@"PresetIndexNum"] intValue]];
+               /* Change UI to show "Custom" settings are being used */
+               //[fPresetSelectedDisplay setStringValue: [[queueToApply objectForKey:@"PresetName"] stringValue]];
+        
+               curUserPresetChosenNum = nil;
+       }
+    else
+    {
+        /* Deselect the currently selected Preset if there is one*/
+               [fPresetsOutlineView deselectRow:[fPresetsOutlineView selectedRow]];
+               /* Change UI to show "Custom" settings are being used */
+               [fPresetSelectedDisplay setStringValue: @"Custom"];
+        
+               //curUserPresetChosenNum = nil;
+    }
+    
+    /* We need to set this bool back to NO, in case the user wants to do a scan */
+    //applyQueueToScan = NO;
+    
+    /* so now we go ahead and process the new settings */
+    [self processNewQueueEncode];
+}
+
+
+
+/* This assumes that we have re-scanned and loaded up a new queue item to send to libhb as fQueueEncodeLibhb */
+- (void) processNewQueueEncode
+{
+    hb_list_t  * list  = hb_get_titles( fQueueEncodeLibhb );
+    hb_title_t * title = (hb_title_t *) hb_list_item( list,0 ); // is always zero since now its a single title scan
+    hb_job_t * job = title->job;
+    
+    if( !hb_list_count( list ) )
+    {
+        [self writeToActivityLog: "processNewQueueEncode WARNING nothing found in the title list"];
+    }
+    else
+    {
+        [self writeToActivityLog: "processNewQueueEncode title list is: %d", hb_list_count( list )];
+    }
+    
+    NSMutableDictionary * queueToApply = [QueueFileArray objectAtIndex:currentQueueEncodeIndex];
+    [self writeToActivityLog: "Preset: %s", [[queueToApply objectForKey:@"PresetName"] UTF8String]];
+    [self writeToActivityLog: "processNewQueueEncode number of passes expected is: %d", ([[queueToApply objectForKey:@"VideoTwoPass"] intValue] + 1)];
+    job->file = [[queueToApply objectForKey:@"DestinationPath"] UTF8String];
+    //[self writeToActivityLog: "processNewQueueEncode sending to prepareJob"];
+    [self prepareJob];
+    if( [[queueToApply objectForKey:@"SubtitlesForced"] intValue] == 1 )
+        job->subtitle_force = 1;
+    else
+        job->subtitle_force = 0;
+    
+    /*
+     * subtitle of -1 is a scan
+     */
+    if( job->subtitle == -1 )
+    {
+        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;
+        x264opts_tmp = job->x264opts;
+        job->subtitle = -1;
+        
+        job->x264opts = NULL;
+        
+        job->indepth_scan = 1;  
+        
+        job->select_subtitle = (hb_subtitle_t**)malloc(sizeof(hb_subtitle_t*));
+        *(job->select_subtitle) = NULL;
+        
+        /*
+         * Add the pre-scan job
+         */
+        hb_add( fQueueEncodeLibhb, job );
+        job->x264opts = x264opts_tmp;
+    }
+    else
+        job->select_subtitle = NULL;
+    
+    /* No subtitle were selected, so reset the subtitle to -1 (which before
+     * this point meant we were scanning
+     */
+    if( job->subtitle == -2 )
+        job->subtitle = -1;
+    
+    if( [[queueToApply objectForKey:@"VideoTwoPass"] intValue] == 1 )
+    {
+        hb_subtitle_t **subtitle_tmp = job->select_subtitle;
+        job->indepth_scan = 0;
+        
+        /*
+         * Do not autoselect subtitles on the first pass of a two pass
+         */
+        job->select_subtitle = NULL;
+        
+        job->pass = 1;
+        
+        hb_add( fQueueEncodeLibhb, job );
+        
+        job->pass = 2;
+        
+        job->x264opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */  
+        strcpy(job->x264opts, [[queueToApply objectForKey:@"x264Option"] UTF8String]);
+        
+        job->select_subtitle = subtitle_tmp;
+        
+        hb_add( fQueueEncodeLibhb, job );
+        
+    }
+    else
+    {
+        job->indepth_scan = 0;
+        job->pass = 0;
+        
+        hb_add( fQueueEncodeLibhb, job );
+    }
+       
+    NSString *destinationDirectory = [[queueToApply objectForKey:@"DestinationPath"] stringByDeletingLastPathComponent];
+       [[NSUserDefaults standardUserDefaults] setObject:destinationDirectory forKey:@"LastDestinationDirectory"];
+       /* Lets mark our new encode as 1 or "Encoding" */
+    [queueToApply setObject:[NSNumber numberWithInt:1] forKey:@"Status"];
+    [self saveQueueFileItem];
+    /* We should be all setup so let 'er rip */   
+    [self doRip];
+}
+
+
+#pragma mark -
+#pragma mark Job Handling
+
+
+- (void) prepareJob
+{
+    
+    NSMutableDictionary * queueToApply = [QueueFileArray objectAtIndex:currentQueueEncodeIndex];
+    hb_list_t  * list  = hb_get_titles( fQueueEncodeLibhb );
+    hb_title_t * title = (hb_title_t *) hb_list_item( list,0 ); // is always zero since now its a single title scan
+    hb_job_t * job = title->job;
+    hb_audio_config_t * audio;
+    /* Chapter selection */
+    job->chapter_start = [[queueToApply objectForKey:@"JobChapterStart"] intValue];
+    job->chapter_end   = [[queueToApply objectForKey:@"JobChapterEnd"] intValue];
+       
+    /* Format (Muxer) and Video Encoder */
+    job->mux = [[queueToApply objectForKey:@"JobFileFormatMux"] intValue];
+    job->vcodec = [[queueToApply objectForKey:@"JobVideoEncoderVcodec"] intValue];
+    
+    
+    /* If mpeg-4, then set mpeg-4 specific options like chapters and > 4gb file sizes */
+       //if( [fDstFormatPopUp indexOfSelectedItem] == 0 )
+       //{
+    /* We set the largeFileSize (64 bit formatting) variable here to allow for > 4gb files based on the format being
+     mpeg4 and the checkbox being checked 
+     *Note: this will break compatibility with some target devices like iPod, etc.!!!!*/
+    if( [[queueToApply objectForKey:@"Mp4LargeFile"] intValue] == 1)
+    {
+        job->largeFileSize = 1;
+    }
+    else
+    {
+        job->largeFileSize = 0;
+    }
+    /* We set http optimized mp4 here */
+    if( [[queueToApply objectForKey:@"Mp4HttpOptimize"] intValue] == 1 )
+    {
+        job->mp4_optimize = 1;
+    }
+    else
+    {
+        job->mp4_optimize = 0;
+    }
+    
+    //}
+       
+    /* We set the chapter marker extraction here based on the format being
+     mpeg4 or mkv and the checkbox being checked */
+    if ([[queueToApply objectForKey:@"ChapterMarkers"] intValue] == 1)
+    {
+        job->chapter_markers = 1;
+        
+        /* now lets get our saved chapter names out the array in the queue file
+         * and insert them back into the title chapter list. We have it here,
+         * because unless we are inserting chapter markers there is no need to
+         * spend the overhead of iterating through the chapter names array imo
+         * Also, note that if for some reason we don't apply chapter names, the
+         * chapters just come out 001, 002, etc. etc.
+         */
+         
+        NSMutableArray *ChapterNamesArray = [queueToApply objectForKey:@"ChapterNames"];
+        int i = 0;
+        NSEnumerator *enumerator = [ChapterNamesArray objectEnumerator];
+        id tempObject;
+        while (tempObject = [enumerator nextObject])
+        {
+            hb_chapter_t *chapter = (hb_chapter_t *) hb_list_item( title->list_chapter, i );
+            if( chapter != NULL )
+            {
+                strncpy( chapter->title, [tempObject UTF8String], 1023);
+                chapter->title[1023] = '\0';
+            }
+            i++;
+        }
+    }
+    else
+    {
+        job->chapter_markers = 0;
+    }
+    
+
+    
+    
+    
+    if( job->vcodec & HB_VCODEC_X264 )
+    {
+               if ([[queueToApply objectForKey:@"Mp4iPodCompatible"] intValue] == 1)
+           {
+            job->ipod_atom = 1;
+               }
+        else
+        {
+            job->ipod_atom = 0;
+        }
+               
+               /* Set this flag to switch from Constant Quantizer(default) to Constant Rate Factor Thanks jbrjake
+         Currently only used with Constant Quality setting*/
+               if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultCrf"] > 0 && [[queueToApply objectForKey:@"VideoQualityType"] intValue] == 2)
+               {
+               job->crf = 1;
+               }
+               /* Below Sends x264 options to the core library if x264 is selected*/
+               /* Lets use this as per Nyx, Thanks Nyx!*/
+               job->x264opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */
+               /* Turbo first pass if two pass and Turbo First pass is selected */
+               if( [[queueToApply objectForKey:@"VideoTwoPass"] intValue] == 1 && [[queueToApply objectForKey:@"VideoTurboTwoPass"] intValue] == 1 )
+               {
+                       /* pass the "Turbo" string to be appended to the existing x264 opts string into a variable for the first pass */
+                       NSString *firstPassOptStringTurbo = @":ref=1:subme=1:me=dia:analyse=none:trellis=0:no-fast-pskip=0:8x8dct=0:weightb=0";
+                       /* append the "Turbo" string variable to the existing opts string.
+             Note: the "Turbo" string must be appended, not prepended to work properly*/
+                       NSString *firstPassOptStringCombined = [[queueToApply objectForKey:@"x264Option"] stringByAppendingString:firstPassOptStringTurbo];
+                       strcpy(job->x264opts, [firstPassOptStringCombined UTF8String]);
+               }
+               else
+               {
+                       strcpy(job->x264opts, [[queueToApply objectForKey:@"x264Option"] UTF8String]);
+               }
+        
+    }
+    
+    
+    /* Picture Size Settings */
+    job->width = [[queueToApply objectForKey:@"PictureWidth"]  intValue];
+    job->height = [[queueToApply objectForKey:@"PictureHeight"]  intValue];
+    
+    job->keep_ratio = [[queueToApply objectForKey:@"PictureKeepRatio"]  intValue];
+    job->pixel_ratio = [[queueToApply objectForKey:@"PicturePAR"]  intValue];
+    
+    
+    /* Here we use the crop values saved at the time the preset was saved */
+    job->crop[0] = [[queueToApply objectForKey:@"PictureTopCrop"]  intValue];
+    job->crop[1] = [[queueToApply objectForKey:@"PictureBottomCrop"]  intValue];
+    job->crop[2] = [[queueToApply objectForKey:@"PictureLeftCrop"]  intValue];
+    job->crop[3] = [[queueToApply objectForKey:@"PictureRightCrop"]  intValue];
+    
+    /* Video settings */
+    /* Framerate */
+    
+    /* Set vfr to 0 as it's only on if using same as source in the framerate popup
+     * and detelecine is on, so we handle that in the logic below
+     */
+    job->vfr = 0;
+    if( [[queueToApply objectForKey:@"JobIndexVideoFramerate"] intValue] > 0 )
+    {
+        /* a specific framerate has been chosen */
+        job->vrate      = 27000000;
+        job->vrate_base = hb_video_rates[[[queueToApply objectForKey:@"JobIndexVideoFramerate"] intValue]-1].rate;
+        /* We are not same as source so we set job->cfr to 1 
+         * to enable constant frame rate since user has specified
+         * a specific framerate*/
+        job->cfr = 1;
+    }
+    else
+    {
+        /* We are same as source (variable) */
+        job->vrate      = [[queueToApply objectForKey:@"JobVrate"] intValue];
+        job->vrate_base = [[queueToApply objectForKey:@"JobVrateBase"] intValue];
+        /* We are same as source so we set job->cfr to 0 
+         * to enable true same as source framerate */
+        job->cfr = 0;
+        /* If we are same as source and we have detelecine on, we need to turn on
+         * job->vfr
+         */
+        if ([[queueToApply objectForKey:@"PictureDetelecine"] intValue] == 1)
+        {
+            job->vfr = 1;
+        }
+    }
+    if ( [[queueToApply objectForKey:@"VideoQualityType"] intValue] != 2 )
+    {
+        /* Target size.
+         Bitrate should already have been calculated and displayed
+         in fVidBitrateField, so let's just use it same as abr*/
+        job->vquality = -1.0;
+        job->vbitrate = [[queueToApply objectForKey:@"VideoAvgBitrate"] intValue];
+    }
+    if ( [[queueToApply objectForKey:@"VideoQualityType"] intValue] == 2 )
+    {
+        job->vquality = [[queueToApply objectForKey:@"VideoQualitySlider"] floatValue];
+        job->vbitrate = 0;
+        
+    }
+    
+    job->grayscale = [[queueToApply objectForKey:@"VideoGrayScale"] intValue];
+    /* Subtitle settings */
+    job->subtitle = [[queueToApply objectForKey:@"JobSubtitlesIndex"] intValue] - 2;
+    
+    /* Audio tracks and mixdowns */
+    /* Lets make sure there arent any erroneous audio tracks in the job list, so lets make sure its empty*/
+    int audiotrack_count = hb_list_count(job->list_audio);
+    for( int i = 0; i < audiotrack_count;i++)
+    {
+        hb_audio_t * temp_audio = (hb_audio_t*) hb_list_item( job->list_audio, 0 );
+        hb_list_rem(job->list_audio, temp_audio);
+    }
+    /* Now lets add our new tracks to the audio list here */
+    if ([[queueToApply objectForKey:@"Audio1Track"] intValue] > 0)
+    {
+        audio = (hb_audio_config_t *) calloc(1, sizeof(*audio));
+        hb_audio_config_init(audio);
+        audio->in.track = [[queueToApply objectForKey:@"Audio1Track"] intValue] - 1;
+        /* We go ahead and assign values to our audio->out.<properties> */
+        audio->out.track = [[queueToApply objectForKey:@"Audio1Track"] intValue] - 1;
+        audio->out.codec = [[queueToApply objectForKey:@"JobAudio1Encoder"] intValue];
+        audio->out.mixdown = [[queueToApply objectForKey:@"JobAudio1Mixdown"] intValue];
+        audio->out.bitrate = [[queueToApply objectForKey:@"JobAudio1Bitrate"] intValue];
+        audio->out.samplerate = [[queueToApply objectForKey:@"JobAudio1Samplerate"] intValue];
+        audio->out.dynamic_range_compression = [[queueToApply objectForKey:@"Audio1TrackDRCSlider"] floatValue];
+        
+        hb_audio_add( job, audio );
+        free(audio);
+    }  
+    if ([[queueToApply objectForKey:@"Audio2Track"] intValue] > 0)
+    {
+        
+        audio = (hb_audio_config_t *) calloc(1, sizeof(*audio));
+        hb_audio_config_init(audio);
+        audio->in.track = [[queueToApply objectForKey:@"Audio2Track"] intValue] - 1;
+        [self writeToActivityLog: "prepareJob audiotrack 2 is: %d", audio->in.track];
+        /* We go ahead and assign values to our audio->out.<properties> */
+        audio->out.track = [[queueToApply objectForKey:@"Audio2Track"] intValue] - 1;
+        audio->out.codec = [[queueToApply objectForKey:@"JobAudio2Encoder"] intValue];
+        audio->out.mixdown = [[queueToApply objectForKey:@"JobAudio2Mixdown"] intValue];
+        audio->out.bitrate = [[queueToApply objectForKey:@"JobAudio2Bitrate"] intValue];
+        audio->out.samplerate = [[queueToApply objectForKey:@"JobAudio2Samplerate"] intValue];
+        audio->out.dynamic_range_compression = [[queueToApply objectForKey:@"Audio2TrackDRCSlider"] floatValue];
+        
+        hb_audio_add( job, audio );
+        free(audio);
+    }
+    
+    if ([[queueToApply objectForKey:@"Audio3Track"] intValue] > 0)
+    {
+        audio = (hb_audio_config_t *) calloc(1, sizeof(*audio));
+        hb_audio_config_init(audio);
+        audio->in.track = [[queueToApply objectForKey:@"Audio3Track"] intValue] - 1;
+        /* We go ahead and assign values to our audio->out.<properties> */
+        audio->out.track = [[queueToApply objectForKey:@"Audio3Track"] intValue] - 1;
+        audio->out.codec = [[queueToApply objectForKey:@"JobAudio3Encoder"] intValue];
+        audio->out.mixdown = [[queueToApply objectForKey:@"JobAudio3Mixdown"] intValue];
+        audio->out.bitrate = [[queueToApply objectForKey:@"JobAudio3Bitrate"] intValue];
+        audio->out.samplerate = [[queueToApply objectForKey:@"JobAudio3Samplerate"] intValue];
+        audio->out.dynamic_range_compression = [[queueToApply objectForKey:@"Audio3TrackDRCSlider"] floatValue];
+        
+        hb_audio_add( job, audio );
+        free(audio);        
+    }
+    
+    if ([[queueToApply objectForKey:@"Audio4Track"] intValue] > 0)
+    {
+        audio = (hb_audio_config_t *) calloc(1, sizeof(*audio));
+        hb_audio_config_init(audio);
+        audio->in.track = [[queueToApply objectForKey:@"Audio4Track"] intValue] - 1;
+        /* We go ahead and assign values to our audio->out.<properties> */
+        audio->out.track = [[queueToApply objectForKey:@"Audio4Track"] intValue] - 1;
+        audio->out.codec = [[queueToApply objectForKey:@"JobAudio4Encoder"] intValue];
+        audio->out.mixdown = [[queueToApply objectForKey:@"JobAudio4Mixdown"] intValue];
+        audio->out.bitrate = [[queueToApply objectForKey:@"JobAudio4Bitrate"] intValue];
+        audio->out.samplerate = [[queueToApply objectForKey:@"JobAudio4Samplerate"] intValue];
+        audio->out.dynamic_range_compression = [[queueToApply objectForKey:@"Audio4TrackDRCSlider"] floatValue];
+        
+        hb_audio_add( job, audio );
+        free(audio);
+    }
+    
+    /* Filters */ 
+    job->filters = hb_list_init();
+    
+    /* Now lets call the filters if applicable.
+     * The order of the filters is critical
+     */
+    /* Detelecine */
+    if ([[queueToApply objectForKey:@"PictureDetelecine"] intValue] == 1)
+    {
+        hb_list_add( job->filters, &hb_filter_detelecine );
+    }
+    
+    /* Decomb */
+    if ([[queueToApply objectForKey:@"PictureDecomb"] intValue] == 1)
+    {
+        /* Run old deinterlacer fd by default */
+        hb_filter_decomb.settings = (char *) [[queueToApply objectForKey:@"JobPictureDecomb"] UTF8String];
+        hb_list_add( job->filters, &hb_filter_decomb );
+    }
+    
+    /* Deinterlace */
+    if ([[queueToApply objectForKey:@"PictureDeinterlace"] intValue] == 1)
+    {
+        /* Run old deinterlacer fd by default */
+        hb_filter_deinterlace.settings = "-1"; 
+        hb_list_add( job->filters, &hb_filter_deinterlace );
+    }
+    else if ([[queueToApply objectForKey:@"PictureDeinterlace"] intValue] == 2)
+    {
+        /* Yadif mode 0 (without spatial deinterlacing.) */
+        hb_filter_deinterlace.settings = "2"; 
+        hb_list_add( job->filters, &hb_filter_deinterlace );            
+    }
+    else if ([[queueToApply objectForKey:@"PictureDeinterlace"] intValue] == 3)
+    {
+        /* Yadif (with spatial deinterlacing) */
+        hb_filter_deinterlace.settings = "0"; 
+        hb_list_add( job->filters, &hb_filter_deinterlace );            
+    }
+       
+    /* Denoise */
+       if ([[queueToApply objectForKey:@"PictureDenoise"] intValue] == 1) // Weak in popup
+       {
+               hb_filter_denoise.settings = "2:1:2:3"; 
+        hb_list_add( job->filters, &hb_filter_denoise );       
+       }
+       else if ([[queueToApply objectForKey:@"PictureDenoise"] intValue] == 2) // Medium in popup
+       {
+               hb_filter_denoise.settings = "3:2:2:3"; 
+        hb_list_add( job->filters, &hb_filter_denoise );       
+       }
+       else if ([[queueToApply objectForKey:@"PictureDenoise"] intValue] == 3) // Strong in popup
+       {
+               hb_filter_denoise.settings = "7:7:5:5"; 
+        hb_list_add( job->filters, &hb_filter_denoise );       
+       }
+    
+    /* Deblock  (uses pp7 default) */
+    /* NOTE: even though there is a valid deblock setting of 0 for the filter, for 
+     * the macgui's purposes a value of 0 actually means to not even use the filter
+     * current hb_filter_deblock.settings valid ranges are from 5 - 15 
+     */
+    if ([[queueToApply objectForKey:@"PictureDeblock"] intValue] != 0)
+    {
+        hb_filter_deblock.settings = (char *) [[queueToApply objectForKey:@"PictureDeblock"] UTF8String];
+        hb_list_add( job->filters, &hb_filter_deblock );
+    }
+[self writeToActivityLog: "prepareJob exiting"];    
+}
+
+
+
+/* addToQueue: puts up an alert before ultimately calling doAddToQueue
+*/
+- (IBAction) addToQueue: (id) sender
+{
+       /* We get the destination directory from the destination field here */
+       NSString *destinationDirectory = [[fDstFile2Field stringValue] stringByDeletingLastPathComponent];
+       /* We check for a valid destination here */
+       if ([[NSFileManager defaultManager] fileExistsAtPath:destinationDirectory] == 0) 
+       {
+               NSRunAlertPanel(@"Warning!", @"This is not a valid destination directory!", @"OK", nil, nil);
+        return;
+       }
+
+    /* We check for duplicate name here */
+       if( [[NSFileManager defaultManager] fileExistsAtPath:
+            [fDstFile2Field stringValue]] )
+    {
+        NSBeginCriticalAlertSheet( NSLocalizedString( @"File already exists", @"" ),
+            NSLocalizedString( @"Cancel", @"" ), NSLocalizedString( @"Overwrite", @"" ), nil, fWindow, self,
+            @selector( overwriteAddToQueueAlertDone:returnCode:contextInfo: ),
+            NULL, NULL, [NSString stringWithFormat:
+            NSLocalizedString( @"Do you want to overwrite %@?", @"" ),
+            [fDstFile2Field stringValue]] );
+        // overwriteAddToQueueAlertDone: will be called when the alert is dismissed.
+    }
+    else
+    {
+        [self doAddToQueue];
+    }
+}
+
+/* overwriteAddToQueueAlertDone: called from the alert posted by addToQueue that asks
+   the user if they want to overwrite an exiting movie file.
+*/
+- (void) overwriteAddToQueueAlertDone: (NSWindow *) sheet
+    returnCode: (int) returnCode contextInfo: (void *) contextInfo
+{
+    if( returnCode == NSAlertAlternateReturn )
+        [self doAddToQueue];
+}
+
+- (void) doAddToQueue
+{
+    [self addQueueFileItem ];
+}
+
+
+
+/* Rip: puts up an alert before ultimately calling doRip
+*/
+- (IBAction) Rip: (id) sender
+{
+    [self writeToActivityLog: "Rip: Pending queue count is %d", fPendingCount];
+    /* Rip or Cancel ? */
+    hb_state_t s;
+    hb_get_state2( fQueueEncodeLibhb, &s );
+    
+    if(s.state == HB_STATE_WORKING || s.state == HB_STATE_PAUSED)
+       {
+        [self Cancel: sender];
+        return;
+    }
+    
+    /* We check to see if we need to warn the user that the computer will go to sleep
+                 or shut down when encoding is finished */
+                [self remindUserOfSleepOrShutdown];
+    
+    // If there are pending jobs in the queue, then this is a rip the queue
+    if (fPendingCount > 0)
+    {
+        /* here lets start the queue with the first pending item */
+        [self performNewQueueScan:[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"SourcePath"] scanTitleNum:[[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"TitleNumber"]intValue]]; 
+        
+        return;
+    }
+    
+    // Before adding jobs to the queue, check for a valid destination.
+    
+    NSString *destinationDirectory = [[fDstFile2Field stringValue] stringByDeletingLastPathComponent];
+    if ([[NSFileManager defaultManager] fileExistsAtPath:destinationDirectory] == 0) 
+    {
+        NSRunAlertPanel(@"Warning!", @"This is not a valid destination directory!", @"OK", nil, nil);
+        return;
+    }
+    
+    /* We check for duplicate name here */
+    if( [[NSFileManager defaultManager] fileExistsAtPath:[fDstFile2Field stringValue]] )
+    {
+        NSBeginCriticalAlertSheet( NSLocalizedString( @"File already exists", @"" ),
+                                  NSLocalizedString( @"Cancel", "" ), NSLocalizedString( @"Overwrite", @"" ), nil, fWindow, self,
+                                  @selector( overWriteAlertDone:returnCode:contextInfo: ),
+                                  NULL, NULL, [NSString stringWithFormat:
+                                               NSLocalizedString( @"Do you want to overwrite %@?", @"" ),
+                                               [fDstFile2Field stringValue]] );
+        
+        // overWriteAlertDone: will be called when the alert is dismissed. It will call doRip.
+    }
+    else
+    {
+        /* if there are no pending jobs in the queue, then add this one to the queue and rip
+         otherwise, just rip the queue */
+        if(fPendingCount == 0)
+        {
+         [self writeToActivityLog: "Rip: No pending jobs, so sending this one to doAddToQueue"];
+               [self doAddToQueue];
+        }
+        
+        NSString *destinationDirectory = [[fDstFile2Field stringValue] stringByDeletingLastPathComponent];
+        [[NSUserDefaults standardUserDefaults] setObject:destinationDirectory forKey:@"LastDestinationDirectory"];
+        /* go right to processing the new queue encode */
+       [self writeToActivityLog: "Rip: Going right to performNewQueueScan"];
+         [self performNewQueueScan:[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"SourcePath"] scanTitleNum:[[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"TitleNumber"]intValue]]; 
+        
+    }
+}
+
+/* overWriteAlertDone: called from the alert posted by Rip: that asks the user if they
+   want to overwrite an exiting movie file.
+*/
+- (void) overWriteAlertDone: (NSWindow *) sheet
+    returnCode: (int) returnCode contextInfo: (void *) contextInfo
+{
+    if( returnCode == NSAlertAlternateReturn )
+    {
+        /* if there are no jobs in the queue, then add this one to the queue and rip 
+        otherwise, just rip the queue */
+        if( fPendingCount == 0 )
+        {
+            [self doAddToQueue];
+        }
+
+        NSString *destinationDirectory = [[fDstFile2Field stringValue] stringByDeletingLastPathComponent];
+        [[NSUserDefaults standardUserDefaults] setObject:destinationDirectory forKey:@"LastDestinationDirectory"];
+        [self performNewQueueScan:[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"SourcePath"] scanTitleNum:[[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"TitleNumber"]intValue]]; 
+      
+    }
+}
+
+- (void) remindUserOfSleepOrShutdown
+{
+       if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"AlertWhenDone"] isEqualToString: @"Put Computer To Sleep"])
+       {
+               /*Warn that computer will sleep after encoding*/
+               int reminduser;
+               NSBeep();
+               reminduser = NSRunAlertPanel(@"The computer will sleep after encoding is done.",@"You have selected to sleep the computer after encoding. To turn off sleeping, go to the HandBrake preferences.", @"OK", @"Preferences...", nil);
+               [NSApp requestUserAttention:NSCriticalRequest];
+               if ( reminduser == NSAlertAlternateReturn )
+               {
+                       [self showPreferencesWindow:nil];
+               }
+       }
+       else if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"AlertWhenDone"] isEqualToString: @"Shut Down Computer"])
+       {
+               /*Warn that computer will shut down after encoding*/
+               int reminduser;
+               NSBeep();
+               reminduser = NSRunAlertPanel(@"The computer will shut down after encoding is done.",@"You have selected to shut down the computer after encoding. To turn off shut down, go to the HandBrake preferences.", @"OK", @"Preferences...", nil);
+               [NSApp requestUserAttention:NSCriticalRequest];
+               if ( reminduser == NSAlertAlternateReturn )
+               {
+                       [self showPreferencesWindow:nil];
+               }
+       }
+
+}
+
+
+- (void) doRip
+{
+    /* Let libhb do the job */
+    hb_start( fQueueEncodeLibhb );
+    /*set the fEncodeState State */
+       fEncodeState = 1;
+}
+
+
+//------------------------------------------------------------------------------------
+// Displays an alert asking user if the want to cancel encoding of current job.
+// Cancel: returns immediately after posting the alert. Later, when the user
+// acknowledges the alert, doCancelCurrentJob is called.
+//------------------------------------------------------------------------------------
+- (IBAction)Cancel: (id)sender
+{
+    if (!fQueueController) return;
+    
+  hb_pause( fQueueEncodeLibhb );
+    NSString * alertTitle = [NSString stringWithFormat:NSLocalizedString(@"You are currently encoding. What would you like to do ?", nil)];
+   
+    // Which window to attach the sheet to?
+    NSWindow * docWindow;
+    if ([sender respondsToSelector: @selector(window)])
+        docWindow = [sender window];
+    else
+        docWindow = fWindow;
+        
+    NSBeginCriticalAlertSheet(
+            alertTitle,
+            NSLocalizedString(@"Continue Encoding", nil),
+            NSLocalizedString(@"Cancel Current and Stop", nil),
+            NSLocalizedString(@"Cancel Current and Continue", nil),
+            docWindow, self,
+            nil, @selector(didDimissCancel:returnCode:contextInfo:), nil,
+            NSLocalizedString(@"Your encode will be cancelled if you don't continue encoding.", nil));
+    
+    // didDimissCancelCurrentJob:returnCode:contextInfo: will be called when the dialog is dismissed
+}
+
+- (void) didDimissCancel: (NSWindow *)sheet returnCode: (int)returnCode contextInfo: (void *)contextInfo
+{
+   hb_resume( fQueueEncodeLibhb );
+     if (returnCode == NSAlertOtherReturn)
+    {
+        [self doCancelCurrentJob];  // <- this also stops libhb
+    }
+    if (returnCode == NSAlertAlternateReturn)
+    {
+    [self doCancelCurrentJobAndStop];
+    }
+}
+
+//------------------------------------------------------------------------------------
+// Cancels and deletes the current job and stops libhb from processing the remaining
+// encodes.
+//------------------------------------------------------------------------------------
+- (void) doCancelCurrentJob
+{
+    // Stop the current job. hb_stop will only cancel the current pass and then set
+    // its state to HB_STATE_WORKDONE. It also does this asynchronously. So when we
+    // see the state has changed to HB_STATE_WORKDONE (in updateUI), we'll delete the
+    // remaining passes of the job and then start the queue back up if there are any
+    // remaining jobs.
+     
+    
+    hb_stop( fQueueEncodeLibhb );
+    
+    // Delete all remaining jobs since libhb doesn't do this on its own.
+            hb_job_t * job;
+            while( ( job = hb_job(fQueueEncodeLibhb, 0) ) )
+                hb_rem( fQueueEncodeLibhb, job );
+                
+    fEncodeState = 2;   // don't alert at end of processing since this was a cancel
+    
+    // now that we've stopped the currently encoding job, lets mark it as cancelled
+    [[QueueFileArray objectAtIndex:currentQueueEncodeIndex] setObject:[NSNumber numberWithInt:3] forKey:@"Status"];
+    // and as always, save it in the queue .plist...
+    /* We save all of the Queue data here */
+    [self saveQueueFileItem];
+    // so now lets move to 
+    currentQueueEncodeIndex++ ;
+    // ... and see if there are more items left in our queue
+    int queueItems = [QueueFileArray count];
+    /* If we still have more items in our queue, lets go to the next one */
+    if (currentQueueEncodeIndex < queueItems)
+    {
+    [self writeToActivityLog: "doCancelCurrentJob currentQueueEncodeIndex is incremented to: %d", currentQueueEncodeIndex];
+    [self writeToActivityLog: "doCancelCurrentJob moving to the next job"];
+    
+    [self performNewQueueScan:[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"SourcePath"] scanTitleNum:[[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"TitleNumber"]intValue]];
+    }
+    else
+    {
+        [self writeToActivityLog: "doCancelCurrentJob the item queue is complete"];
+    }
+
+}
+
+- (void) doCancelCurrentJobAndStop
+{
+    hb_stop( fQueueEncodeLibhb );
+    
+    // Delete all remaining jobs since libhb doesn't do this on its own.
+            hb_job_t * job;
+            while( ( job = hb_job(fQueueEncodeLibhb, 0) ) )
+                hb_rem( fQueueEncodeLibhb, job );
+                
+                
+    fEncodeState = 2;   // don't alert at end of processing since this was a cancel
+    
+    // now that we've stopped the currently encoding job, lets mark it as cancelled
+    [[QueueFileArray objectAtIndex:currentQueueEncodeIndex] setObject:[NSNumber numberWithInt:3] forKey:@"Status"];
+    // and as always, save it in the queue .plist...
+    /* We save all of the Queue data here */
+    [self saveQueueFileItem];
+    // so now lets move to 
+    currentQueueEncodeIndex++ ;
+    [self writeToActivityLog: "cancelling current job and stopping the queue"];
+}
+- (IBAction) Pause: (id) sender
+{
+    hb_state_t s;
+    hb_get_state2( fQueueEncodeLibhb, &s );
+
+    if( s.state == HB_STATE_PAUSED )
+    {
+        hb_resume( fQueueEncodeLibhb );
+    }
+    else
+    {
+        hb_pause( fQueueEncodeLibhb );
+    }
+}
+
+#pragma mark -
+#pragma mark GUI Controls Changed Methods
+
+- (IBAction) titlePopUpChanged: (id) sender
+{
+    hb_list_t  * list  = hb_get_titles( fHandle );
+    hb_title_t * title = (hb_title_t*)
+        hb_list_item( list, [fSrcTitlePopUp indexOfSelectedItem] );
+
+    /* If Auto Naming is on. We create an output filename of dvd name - title number */
+    if( [[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultAutoNaming"] > 0 && ( hb_list_count( list ) > 1 ) )
+       {
+               [fDstFile2Field setStringValue: [NSString stringWithFormat:
+                       @"%@/%@-%d.%@", [[fDstFile2Field stringValue] stringByDeletingLastPathComponent],
+                       [browsedSourceDisplayName stringByDeletingPathExtension],
+            title->index,
+                       [[fDstFile2Field stringValue] pathExtension]]]; 
+       }
+
+    /* Update chapter popups */
+    [fSrcChapterStartPopUp removeAllItems];
+    [fSrcChapterEndPopUp   removeAllItems];
+    for( int i = 0; i < hb_list_count( title->list_chapter ); i++ )
+    {
+        [fSrcChapterStartPopUp addItemWithTitle: [NSString
+            stringWithFormat: @"%d", i + 1]];
+        [fSrcChapterEndPopUp addItemWithTitle: [NSString
+            stringWithFormat: @"%d", i + 1]];
+    }
+
+    [fSrcChapterStartPopUp selectItemAtIndex: 0];
+    [fSrcChapterEndPopUp   selectItemAtIndex:
+        hb_list_count( title->list_chapter ) - 1];
+    [self chapterPopUpChanged:nil];
+
+    /* Start Get and set the initial pic size for display */
+       hb_job_t * job = title->job;
+       fTitle = title;
+
+       /*Set Source Size Field Here */
+    [fPicSettingsSrc setStringValue: [NSString stringWithFormat: @"%d x %d", fTitle->width, fTitle->height]];
+       
+       /* Set Auto Crop to on upon selecting a new title */
+    [fPictureController setAutoCrop:YES];
+    
+       /* We get the originial output picture width and height and put them
+       in variables for use with some presets later on */
+       PicOrigOutputWidth = job->width;
+       PicOrigOutputHeight = job->height;
+       AutoCropTop = job->crop[0];
+       AutoCropBottom = job->crop[1];
+       AutoCropLeft = job->crop[2];
+       AutoCropRight = job->crop[3];
+
+       /* Run Through encoderPopUpChanged to see if there
+               needs to be any pic value modifications based on encoder settings */
+       //[self encoderPopUpChanged: NULL];
+       /* END Get and set the initial pic size for display */ 
+
+    /* Update subtitle popups */
+    hb_subtitle_t * subtitle;
+    [fSubPopUp removeAllItems];
+    [fSubPopUp addItemWithTitle: @"None"];
+    [fSubPopUp addItemWithTitle: @"Autoselect"];
+    for( int i = 0; i < hb_list_count( title->list_subtitle ); i++ )
+    {
+        subtitle = (hb_subtitle_t *) hb_list_item( title->list_subtitle, i );
+
+        /* We cannot use NSPopUpButton's addItemWithTitle because
+           it checks for duplicate entries */
+        [[fSubPopUp menu] addItemWithTitle: [NSString stringWithCString:
+            subtitle->lang] action: NULL keyEquivalent: @""];
+    }
+    [fSubPopUp selectItemAtIndex: 0];
+
+       [self subtitleSelectionChanged:nil];
+
+    /* Update chapter table */
+    [fChapterTitlesDelegate resetWithTitle:title];
+    [fChapterTable reloadData];
+
+   /* Lets make sure there arent any erroneous audio tracks in the job list, so lets make sure its empty*/
+    int audiotrack_count = hb_list_count(job->list_audio);
+    for( int i = 0; i < audiotrack_count;i++)
+    {
+        hb_audio_t * temp_audio = (hb_audio_t*) hb_list_item( job->list_audio, 0 );
+        hb_list_rem(job->list_audio, temp_audio);
+    }
+
+    /* Update audio popups */
+    [self addAllAudioTracksToPopUp: fAudLang1PopUp];
+    [self addAllAudioTracksToPopUp: fAudLang2PopUp];
+    [self addAllAudioTracksToPopUp: fAudLang3PopUp];
+    [self addAllAudioTracksToPopUp: fAudLang4PopUp];
+    /* search for the first instance of our prefs default language for track 1, and set track 2 to "none" */
+       NSString * audioSearchPrefix = [[NSUserDefaults standardUserDefaults] stringForKey:@"DefaultLanguage"];
+        [self selectAudioTrackInPopUp: fAudLang1PopUp searchPrefixString: audioSearchPrefix selectIndexIfNotFound: 1];
+    [self selectAudioTrackInPopUp:fAudLang2PopUp searchPrefixString:nil selectIndexIfNotFound:0];
+    [self selectAudioTrackInPopUp:fAudLang3PopUp searchPrefixString:nil selectIndexIfNotFound:0];
+    [self selectAudioTrackInPopUp:fAudLang4PopUp searchPrefixString:nil selectIndexIfNotFound:0];
+
+       /* changing the title may have changed the audio channels on offer, */
+       /* so call audioTrackPopUpChanged for both audio tracks to update the mixdown popups */
+       [self audioTrackPopUpChanged: fAudLang1PopUp];
+       [self audioTrackPopUpChanged: fAudLang2PopUp];
+    [self audioTrackPopUpChanged: fAudLang3PopUp];
+    [self audioTrackPopUpChanged: fAudLang4PopUp];
+
+    [fVidRatePopUp selectItemAtIndex: 0];
+
+    /* we run the picture size values through calculatePictureSizing to get all picture setting        information*/
+       [self calculatePictureSizing:nil];
+
+   /* lets call tableViewSelected to make sure that any preset we have selected is enforced after a title change */
+       [self selectPreset:nil];
+}
+
+- (IBAction) chapterPopUpChanged: (id) sender
+{
+
+       /* If start chapter popup is greater than end chapter popup,
+       we set the end chapter popup to the same as start chapter popup */
+       if ([fSrcChapterStartPopUp indexOfSelectedItem] > [fSrcChapterEndPopUp indexOfSelectedItem])
+       {
+               [fSrcChapterEndPopUp selectItemAtIndex: [fSrcChapterStartPopUp indexOfSelectedItem]];
+    }
+
+               
+       hb_list_t  * list  = hb_get_titles( fHandle );
+    hb_title_t * title = (hb_title_t *)
+        hb_list_item( list, [fSrcTitlePopUp indexOfSelectedItem] );
+
+    hb_chapter_t * chapter;
+    int64_t        duration = 0;
+    for( int i = [fSrcChapterStartPopUp indexOfSelectedItem];
+         i <= [fSrcChapterEndPopUp indexOfSelectedItem]; i++ )
+    {
+        chapter = (hb_chapter_t *) hb_list_item( title->list_chapter, i );
+        duration += chapter->duration;
+    }
+    
+    duration /= 90000; /* pts -> seconds */
+    [fSrcDuration2Field setStringValue: [NSString stringWithFormat:
+        @"%02lld:%02lld:%02lld", duration / 3600, ( duration / 60 ) % 60,
+        duration % 60]];
+
+    [self calculateBitrate: sender];
+}
+
+- (IBAction) formatPopUpChanged: (id) sender
+{
+    NSString * string = [fDstFile2Field stringValue];
+    int format = [fDstFormatPopUp indexOfSelectedItem];
+    char * ext = NULL;
+       /* Initially set the large file (64 bit formatting) output checkbox to hidden */
+    [fDstMp4LargeFileCheck setHidden: YES];
+    [fDstMp4HttpOptFileCheck setHidden: YES];
+    [fDstMp4iPodFileCheck setHidden: YES];
+    
+    /* Update the Video Codec PopUp */
+    /* Note: we now store the video encoder int values from common.c in the tags of each popup for easy retrieval later */
+    [fVidEncoderPopUp removeAllItems];
+    NSMenuItem *menuItem;
+    /* These video encoders are available to all of our current muxers, so lets list them once here */
+    menuItem = [[fVidEncoderPopUp menu] addItemWithTitle:@"MPEG-4 (FFmpeg)" action: NULL keyEquivalent: @""];
+    [menuItem setTag: HB_VCODEC_FFMPEG];
+    
+    menuItem = [[fVidEncoderPopUp menu] addItemWithTitle:@"MPEG-4 (XviD)" action: NULL keyEquivalent: @""];
+    [menuItem setTag: HB_VCODEC_XVID];
+    switch( format )
+    {
+        case 0:
+                       /*Get Default MP4 File Extension*/
+                       if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultMpegName"] > 0)
+                       {
+                               ext = "m4v";
+                       }
+                       else
+                       {
+                               ext = "mp4";
+                       }
+            /* Add additional video encoders here */
+            menuItem = [[fVidEncoderPopUp menu] addItemWithTitle:@"H.264 (x264)" action: NULL keyEquivalent: @""];
+            [menuItem setTag: HB_VCODEC_X264];
+            /* We show the mp4 option checkboxes here since we are mp4 */
+            [fCreateChapterMarkers setEnabled: YES];
+                       [fDstMp4LargeFileCheck setHidden: NO];
+                       [fDstMp4HttpOptFileCheck setHidden: NO];
+            [fDstMp4iPodFileCheck setHidden: NO];
+            break;
+            
+            case 1:
+            ext = "mkv";
+            /* Add additional video encoders here */
+            menuItem = [[fVidEncoderPopUp menu] addItemWithTitle:@"H.264 (x264)" action: NULL keyEquivalent: @""];
+            [menuItem setTag: HB_VCODEC_X264];
+            menuItem = [[fVidEncoderPopUp menu] addItemWithTitle:@"VP3 (Theora)" action: NULL keyEquivalent: @""];
+            [menuItem setTag: HB_VCODEC_THEORA];
+            /* We enable the create chapters checkbox here */
+                       [fCreateChapterMarkers setEnabled: YES];
+                       break;
+            
+            case 2: 
+            ext = "avi";
+            /* Add additional video encoders here */
+            menuItem = [[fVidEncoderPopUp menu] addItemWithTitle:@"H.264 (x264)" action: NULL keyEquivalent: @""];
+            [menuItem setTag: HB_VCODEC_X264];
+            /* We disable the create chapters checkbox here and make sure it is unchecked*/
+                       [fCreateChapterMarkers setEnabled: NO];
+                       [fCreateChapterMarkers setState: NSOffState];
+                       break;
+            
+            case 3:
+            ext = "ogm";
+            /* Add additional video encoders here */
+            menuItem = [[fVidEncoderPopUp menu] addItemWithTitle:@"VP3 (Theora)" action: NULL keyEquivalent: @""];
+            [menuItem setTag: HB_VCODEC_THEORA];
+            /* We disable the create chapters checkbox here and make sure it is unchecked*/
+                       [fCreateChapterMarkers setEnabled: NO];
+                       [fCreateChapterMarkers setState: NSOffState];
+                       break;
+    }
+    [fVidEncoderPopUp selectItemAtIndex: 0];
+
+    [self audioAddAudioTrackCodecs: fAudTrack1CodecPopUp];
+    [self audioAddAudioTrackCodecs: fAudTrack2CodecPopUp];
+    [self audioAddAudioTrackCodecs: fAudTrack3CodecPopUp];
+    [self audioAddAudioTrackCodecs: fAudTrack4CodecPopUp];
+
+    if( format == 0 )
+        [self autoSetM4vExtension: sender];
+    else
+        [fDstFile2Field setStringValue: [NSString stringWithFormat:@"%@.%s", [string stringByDeletingPathExtension], ext]];
+
+    if( SuccessfulScan )
+    {
+        /* Add/replace to the correct extension */
+        [self audioTrackPopUpChanged: fAudLang1PopUp];
+        [self audioTrackPopUpChanged: fAudLang2PopUp];
+        [self audioTrackPopUpChanged: fAudLang3PopUp];
+        [self audioTrackPopUpChanged: fAudLang4PopUp];
+
+        if( [fVidEncoderPopUp selectedItem] == nil )
+        {
+
+            [fVidEncoderPopUp selectItemAtIndex:0];
+            [self videoEncoderPopUpChanged:nil];
+
+            /* changing the format may mean that we can / can't offer mono or 6ch, */
+            /* so call audioTrackPopUpChanged for both audio tracks to update the mixdown popups */
+
+            /* We call the method to properly enable/disable turbo 2 pass */
+            [self twoPassCheckboxChanged: sender];
+            /* We call method method to change UI to reflect whether a preset is used or not*/
+        }
+    }
+       [self customSettingUsed: sender];
+}
+
+- (IBAction) autoSetM4vExtension: (id) sender
+{
+    if ( [fDstFormatPopUp indexOfSelectedItem] )
+        return;
+
+    NSString * extension = @"mp4";
+
+    if( [[fAudTrack1CodecPopUp selectedItem] tag] == HB_ACODEC_AC3 || [[fAudTrack2CodecPopUp selectedItem] tag] == HB_ACODEC_AC3 ||
+                                                        [[fAudTrack3CodecPopUp selectedItem] tag] == HB_ACODEC_AC3 ||
+                                                        [[fAudTrack4CodecPopUp selectedItem] tag] == HB_ACODEC_AC3 ||
+                                                        [fCreateChapterMarkers state] == NSOnState ||
+                                                        [[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultMpegName"] > 0 )
+    {
+        extension = @"m4v";
+    }
+
+    if( [extension isEqualTo: [[fDstFile2Field stringValue] pathExtension]] )
+        return;
+    else
+        [fDstFile2Field setStringValue: [NSString stringWithFormat:@"%@.%@",
+                                    [[fDstFile2Field stringValue] stringByDeletingPathExtension], extension]];
+}
+
+/* Method to determine if we should change the UI
+To reflect whether or not a Preset is being used or if
+the user is using "Custom" settings by determining the sender*/
+- (IBAction) customSettingUsed: (id) sender
+{
+       if ([sender stringValue])
+       {
+               /* Deselect the currently selected Preset if there is one*/
+               [fPresetsOutlineView deselectRow:[fPresetsOutlineView selectedRow]];
+               /* Change UI to show "Custom" settings are being used */
+               [fPresetSelectedDisplay setStringValue: @"Custom"];
+
+               curUserPresetChosenNum = nil;
+       }
+[self calculateBitrate:nil];
+}
+
+
+#pragma mark -
+#pragma mark - Video
+
+- (IBAction) videoEncoderPopUpChanged: (id) sender
+{
+    hb_job_t * job = fTitle->job;
+    int videoEncoder = [[fVidEncoderPopUp selectedItem] tag];
+    
+    [fAdvancedOptions setHidden:YES];
+    /* If we are using x264 then show the x264 advanced panel*/
+    if (videoEncoder == HB_VCODEC_X264)
+    {
+        [fAdvancedOptions setHidden:NO];
+        [self autoSetM4vExtension: sender];
+    }
+    
+    /* We need to set loose anamorphic as available depending on whether or not the ffmpeg encoder
+    is being used as it borks up loose anamorphic .
+    For convenience lets use the titleOfSelected index. Probably should revisit whether or not we want
+    to use the index itself but this is easier */
+    if (videoEncoder == HB_VCODEC_FFMPEG)
+    {
+        if (job->pixel_ratio == 2)
+        {
+            job->pixel_ratio = 0;
+        }
+        [fPictureController setAllowLooseAnamorphic:NO];
+        /* We set the iPod atom checkbox to disabled and uncheck it as its only for x264 in the mp4
+         container. Format is taken care of in formatPopUpChanged method by hiding and unchecking
+         anything other than MP4.
+         */ 
+        [fDstMp4iPodFileCheck setEnabled: NO];
+        [fDstMp4iPodFileCheck setState: NSOffState];
+    }
+    else
+    {
+        [fPictureController setAllowLooseAnamorphic:YES];
+        [fDstMp4iPodFileCheck setEnabled: YES];
+    }
+    
+       [self calculatePictureSizing: sender];
+       [self twoPassCheckboxChanged: sender];
+}
+
+
+- (IBAction) twoPassCheckboxChanged: (id) sender
+{
+       /* check to see if x264 is chosen */
+       if([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_X264)
+    {
+               if( [fVidTwoPassCheck state] == NSOnState)
+               {
+                       [fVidTurboPassCheck setHidden: NO];
+               }
+               else
+               {
+                       [fVidTurboPassCheck setHidden: YES];
+                       [fVidTurboPassCheck setState: NSOffState];
+               }
+               /* Make sure Two Pass is checked if Turbo is checked */
+               if( [fVidTurboPassCheck state] == NSOnState)
+               {
+                       [fVidTwoPassCheck setState: NSOnState];
+               }
+       }
+       else
+       {
+               [fVidTurboPassCheck setHidden: YES];
+               [fVidTurboPassCheck setState: NSOffState];
+       }
+       
+       /* We call method method to change UI to reflect whether a preset is used or not*/
+       [self customSettingUsed: sender];
+}
+
+- (IBAction ) videoFrameRateChanged: (id) sender
+{
+    /* We call method method to calculatePictureSizing to error check detelecine*/
+    [self calculatePictureSizing: sender];
+
+    /* We call method method to change UI to reflect whether a preset is used or not*/
+       [self customSettingUsed: sender];
+}
+- (IBAction) videoMatrixChanged: (id) sender;
+{
+    bool target, bitrate, quality;
+
+    target = bitrate = quality = false;
+    if( [fVidQualityMatrix isEnabled] )
+    {
+        switch( [fVidQualityMatrix selectedRow] )
+        {
+            case 0:
+                target = true;
+                break;
+            case 1:
+                bitrate = true;
+                break;
+            case 2:
+                quality = true;
+                break;
+        }
+    }
+    [fVidTargetSizeField  setEnabled: target];
+    [fVidBitrateField     setEnabled: bitrate];
+    [fVidQualitySlider    setEnabled: quality];
+    [fVidTwoPassCheck     setEnabled: !quality &&
+        [fVidQualityMatrix isEnabled]];
+    if( quality )
+    {
+        [fVidTwoPassCheck setState: NSOffState];
+               [fVidTurboPassCheck setHidden: YES];
+               [fVidTurboPassCheck setState: NSOffState];
+    }
+
+    [self qualitySliderChanged: sender];
+    [self calculateBitrate: sender];
+       [self customSettingUsed: sender];
+}
+
+- (IBAction) qualitySliderChanged: (id) sender
+{
+    [fVidConstantCell setTitle: [NSString stringWithFormat:
+        NSLocalizedString( @"Constant quality: %.0f %%", @"" ), 100.0 *
+        [fVidQualitySlider floatValue]]];
+               [self customSettingUsed: sender];
+}
+
+- (void) controlTextDidChange: (NSNotification *) notification
+{
+    [self calculateBitrate:nil];
+}
+
+- (IBAction) calculateBitrate: (id) sender
+{
+    if( !fHandle || [fVidQualityMatrix selectedRow] != 0 || !SuccessfulScan )
+    {
+        return;
+    }
+
+    hb_list_t  * list  = hb_get_titles( fHandle );
+    hb_title_t * title = (hb_title_t *) hb_list_item( list,
+            [fSrcTitlePopUp indexOfSelectedItem] );
+    hb_job_t * job = title->job;
+    hb_audio_config_t * audio;
+    /* For  hb_calc_bitrate in addition to the Target Size in MB out of the
+     * Target Size Field, we also need the job info for the Muxer, the Chapters
+     * as well as all of the audio track info.
+     * This used to be accomplished by simply calling prepareJob here, however
+     * since the resilient queue sets the queue array values instead of the job
+     * values directly, we duplicate the old prepareJob code here for the variables
+     * needed
+     */
+    job->chapter_start = [fSrcChapterStartPopUp indexOfSelectedItem] + 1;
+    job->chapter_end = [fSrcChapterEndPopUp indexOfSelectedItem] + 1; 
+    job->mux = [[fDstFormatPopUp selectedItem] tag];
+    
+    /* Audio goes here */
+    int audiotrack_count = hb_list_count(job->list_audio);
+    for( int i = 0; i < audiotrack_count;i++)
+    {
+        hb_audio_t * temp_audio = (hb_audio_t*) hb_list_item( job->list_audio, 0 );
+        hb_list_rem(job->list_audio, temp_audio);
+    }
+    /* Now we need our audio info here for each track if applicable */
+    if ([fAudLang1PopUp indexOfSelectedItem] > 0)
+    {
+        audio = (hb_audio_config_t *) calloc(1, sizeof(*audio));
+        hb_audio_config_init(audio);
+        audio->in.track = [fAudLang1PopUp indexOfSelectedItem] - 1;
+        /* We go ahead and assign values to our audio->out.<properties> */
+        audio->out.track = [fAudLang1PopUp indexOfSelectedItem] - 1;
+        audio->out.codec = [[fAudTrack1CodecPopUp selectedItem] tag];
+        audio->out.mixdown = [[fAudTrack1MixPopUp selectedItem] tag];
+        audio->out.bitrate = [[fAudTrack1BitratePopUp selectedItem] tag];
+        audio->out.samplerate = [[fAudTrack1RatePopUp selectedItem] tag];
+        audio->out.dynamic_range_compression = [fAudTrack1DrcField floatValue];
+        
+        hb_audio_add( job, audio );
+        free(audio);
+    }  
+    if ([fAudLang2PopUp indexOfSelectedItem] > 0)
+    {
+        audio = (hb_audio_config_t *) calloc(1, sizeof(*audio));
+        hb_audio_config_init(audio);
+        audio->in.track = [fAudLang2PopUp indexOfSelectedItem] - 1;
+        /* We go ahead and assign values to our audio->out.<properties> */
+        audio->out.track = [fAudLang2PopUp indexOfSelectedItem] - 1;
+        audio->out.codec = [[fAudTrack2CodecPopUp selectedItem] tag];
+        audio->out.mixdown = [[fAudTrack2MixPopUp selectedItem] tag];
+        audio->out.bitrate = [[fAudTrack2BitratePopUp selectedItem] tag];
+        audio->out.samplerate = [[fAudTrack2RatePopUp selectedItem] tag];
+        audio->out.dynamic_range_compression = [fAudTrack2DrcField floatValue];
+        
+        hb_audio_add( job, audio );
+        free(audio);
+        
+    }
+    
+    if ([fAudLang3PopUp indexOfSelectedItem] > 0)
+    {
+        audio = (hb_audio_config_t *) calloc(1, sizeof(*audio));
+        hb_audio_config_init(audio);
+        audio->in.track = [fAudLang3PopUp indexOfSelectedItem] - 1;
+        /* We go ahead and assign values to our audio->out.<properties> */
+        audio->out.track = [fAudLang3PopUp indexOfSelectedItem] - 1;
+        audio->out.codec = [[fAudTrack3CodecPopUp selectedItem] tag];
+        audio->out.mixdown = [[fAudTrack3MixPopUp selectedItem] tag];
+        audio->out.bitrate = [[fAudTrack3BitratePopUp selectedItem] tag];
+        audio->out.samplerate = [[fAudTrack3RatePopUp selectedItem] tag];
+        audio->out.dynamic_range_compression = [fAudTrack3DrcField floatValue];
+        
+        hb_audio_add( job, audio );
+        free(audio);
+        
+    }
+
+    if ([fAudLang4PopUp indexOfSelectedItem] > 0)
+    {
+        audio = (hb_audio_config_t *) calloc(1, sizeof(*audio));
+        hb_audio_config_init(audio);
+        audio->in.track = [fAudLang4PopUp indexOfSelectedItem] - 1;
+        /* We go ahead and assign values to our audio->out.<properties> */
+        audio->out.track = [fAudLang4PopUp indexOfSelectedItem] - 1;
+        audio->out.codec = [[fAudTrack4CodecPopUp selectedItem] tag];
+        audio->out.mixdown = [[fAudTrack4MixPopUp selectedItem] tag];
+        audio->out.bitrate = [[fAudTrack4BitratePopUp selectedItem] tag];
+        audio->out.samplerate = [[fAudTrack4RatePopUp selectedItem] tag];
+        audio->out.dynamic_range_compression = [fAudTrack4DrcField floatValue];
+        
+        hb_audio_add( job, audio );
+        free(audio);
+        
+    }
+       
+[fVidBitrateField setIntValue: hb_calc_bitrate( job, [fVidTargetSizeField intValue] )];
+}
+
+#pragma mark -
+#pragma mark - Picture
+
+/* lets set the picture size back to the max from right after title scan
+   Lets use an IBAction here as down the road we could always use a checkbox
+   in the gui to easily take the user back to max. Remember, the compiler
+   resolves IBActions down to -(void) during compile anyway */
+- (IBAction) revertPictureSizeToMax: (id) sender
+{
+       hb_job_t * job = fTitle->job;
+       /* Here we apply the max source storage width and height */
+    job->width = fTitle->width-fTitle->job->crop[2]-fTitle->job->crop[3];
+    job->height = fTitle->height-fTitle->job->crop[0]-fTitle->job->crop[1];
+    
+    [self calculatePictureSizing: sender];
+    /* We call method to change UI to reflect whether a preset is used or not*/    
+    [self customSettingUsed: sender];
+}
+
+/**
+ * Registers changes made in the Picture Settings Window.
+ */
+
+- (void)pictureSettingsDidChange {
+       [self calculatePictureSizing:nil];
+}
+
+/* Get and Display Current Pic Settings in main window */
+- (IBAction) calculatePictureSizing: (id) sender
+{
+       [fPicSettingsOutp setStringValue: [NSString stringWithFormat:@"%d x %d", fTitle->job->width, fTitle->job->height]];
+       
+    if (fTitle->job->pixel_ratio == 1)
+       {
+        int titlewidth = fTitle->width-fTitle->job->crop[2]-fTitle->job->crop[3];
+        int arpwidth = fTitle->job->pixel_aspect_width;
+        int arpheight = fTitle->job->pixel_aspect_height;
+        int displayparwidth = titlewidth * arpwidth / arpheight;
+        int displayparheight = fTitle->height-fTitle->job->crop[0]-fTitle->job->crop[1];
+        [fPicSettingsOutp setStringValue: [NSString stringWithFormat:@"%d x %d", titlewidth, displayparheight]];
+        [fPicSettingsAnamorphic setStringValue: [NSString stringWithFormat:@"%d x %d Strict", displayparwidth, displayparheight]];
+        fTitle->job->keep_ratio = 0;
+       }
+    else if (fTitle->job->pixel_ratio == 2)
+    {
+        hb_job_t * job = fTitle->job;
+        int output_width, output_height, output_par_width, output_par_height;
+        hb_set_anamorphic_size(job, &output_width, &output_height, &output_par_width, &output_par_height);
+        int display_width;
+        display_width = output_width * output_par_width / output_par_height;
+
+        [fPicSettingsOutp setStringValue: [NSString stringWithFormat:@"%d x %d", output_width, output_height]];
+        [fPicSettingsAnamorphic setStringValue: [NSString stringWithFormat:@"%d x %d Loose", display_width, output_height]];
+
+        fTitle->job->keep_ratio = 0;
+    }
+       else
+       {
+        [fPicSettingsAnamorphic setStringValue:@"Off"];
+       }
+
+       /* Set ON/Off values for the deinterlace/keep aspect ratio according to boolean */
+       if (fTitle->job->keep_ratio > 0)
+       {
+               [fPicSettingARkeep setStringValue: @"On"];
+       }
+       else
+       {
+               [fPicSettingARkeep setStringValue: @"Off"];
+       }       
+    
+    /* Detelecine */
+    if ([fPictureController detelecine]) {
+        [fPicSettingDetelecine setStringValue: @"Yes"];
+    }
+    else {
+        [fPicSettingDetelecine setStringValue: @"No"];
+    }
+    
+    /* Decomb */
+       if ([fPictureController decomb] == 0)
+       {
+               [fPicSettingDecomb setStringValue: @"Off"];
+       }
+       else if ([fPictureController decomb] == 1)
+       {
+               [fPicSettingDecomb setStringValue: @"1:2:6:9:80:16:16"];
+       }
+    else if ([fPictureController decomb] == 2)
+    {
+        [fPicSettingDecomb setStringValue:[[NSUserDefaults standardUserDefaults] stringForKey:@"DecombCustomString"]];
+    }
+
+    /* VFR (Variable Frame Rate) */
+    
+    
+       /* Deinterlace */
+       if ([fPictureController deinterlace] == 0)
+       {
+               [fPicSettingDeinterlace setStringValue: @"Off"];
+       }
+       else if ([fPictureController deinterlace] == 1)
+       {
+               [fPicSettingDeinterlace setStringValue: @"Fast"];
+       }
+       else if ([fPictureController deinterlace] == 2)
+       {
+               [fPicSettingDeinterlace setStringValue: @"Slow"];
+       }
+       else if ([fPictureController deinterlace] == 3)
+       {
+               [fPicSettingDeinterlace setStringValue: @"Slower"];
+       }
+               
+    /* Denoise */
+       if ([fPictureController denoise] == 0)
+       {
+               [fPicSettingDenoise setStringValue: @"Off"];
+       }
+       else if ([fPictureController denoise] == 1)
+       {
+               [fPicSettingDenoise setStringValue: @"Weak"];
+       }
+       else if ([fPictureController denoise] == 2)
+       {
+               [fPicSettingDenoise setStringValue: @"Medium"];
+       }
+       else if ([fPictureController denoise] == 3)
+       {
+               [fPicSettingDenoise setStringValue: @"Strong"];
+       }
+    
+    /* Deblock */
+    if ([fPictureController deblock] == 0) 
+    {
+        [fPicSettingDeblock setStringValue: @"Off"];
+    }
+    else 
+    {
+        [fPicSettingDeblock setStringValue: [NSString stringWithFormat:@"%d",[fPictureController deblock]]];
+    }
+       
+       if (fTitle->job->pixel_ratio > 0)
+       {
+               [fPicSettingPAR setStringValue: @""];
+       }
+       else
+       {
+               [fPicSettingPAR setStringValue: @"Off"];
+       }
+       
+    /* Set the display field for crop as per boolean */
+       if (![fPictureController autoCrop])
+       {
+           [fPicSettingAutoCrop setStringValue: @"Custom"];
+       }
+       else
+       {
+               [fPicSettingAutoCrop setStringValue: @"Auto"];
+       }       
+       
+    
+}
+
+
+#pragma mark -
+#pragma mark - Audio and Subtitles
+- (IBAction) audioCodecsPopUpChanged: (id) sender
+{
+    
+    NSPopUpButton * audiotrackPopUp;
+    NSPopUpButton * sampleratePopUp;
+    NSPopUpButton * bitratePopUp;
+    NSPopUpButton * audiocodecPopUp;
+    if (sender == fAudTrack1CodecPopUp)
+    {
+        audiotrackPopUp = fAudLang1PopUp;
+        audiocodecPopUp = fAudTrack1CodecPopUp;
+        sampleratePopUp = fAudTrack1RatePopUp;
+        bitratePopUp = fAudTrack1BitratePopUp;
+    }
+    else if (sender == fAudTrack2CodecPopUp)
+    {
+        audiotrackPopUp = fAudLang2PopUp;
+        audiocodecPopUp = fAudTrack2CodecPopUp;
+        sampleratePopUp = fAudTrack2RatePopUp;
+        bitratePopUp = fAudTrack2BitratePopUp;
+    }
+    else if (sender == fAudTrack3CodecPopUp)
+    {
+        audiotrackPopUp = fAudLang3PopUp;
+        audiocodecPopUp = fAudTrack3CodecPopUp;
+        sampleratePopUp = fAudTrack3RatePopUp;
+        bitratePopUp = fAudTrack3BitratePopUp;
+    }
+    else
+    {
+        audiotrackPopUp = fAudLang4PopUp;
+        audiocodecPopUp = fAudTrack4CodecPopUp;
+        sampleratePopUp = fAudTrack4RatePopUp;
+        bitratePopUp = fAudTrack4BitratePopUp;
+    }
+       
+    /* changing the codecs on offer may mean that we can / can't offer mono or 6ch, */
+       /* so call audioTrackPopUpChanged for both audio tracks to update the mixdown popups */
+    [self audioTrackPopUpChanged: audiotrackPopUp];
+    
+}
+
+- (IBAction) setEnabledStateOfAudioMixdownControls: (id) sender
+{
+    /* We will be setting the enabled/disabled state of each tracks audio controls based on
+     * the settings of the source audio for that track. We leave the samplerate and bitrate
+     * to audiotrackMixdownChanged
+     */
+    
+    /* We will first verify that a lower track number has been selected before enabling each track
+     * for example, make sure a track is selected for track 1 before enabling track 2, etc.
+     */
+    if ([fAudLang1PopUp indexOfSelectedItem] == 0)
+    {
+        [fAudLang2PopUp setEnabled: NO];
+        [fAudLang2PopUp selectItemAtIndex: 0];
+    }
+    else
+    {
+        [fAudLang2PopUp setEnabled: YES];
+    }
+    
+    if ([fAudLang2PopUp indexOfSelectedItem] == 0)
+    {
+        [fAudLang3PopUp setEnabled: NO];
+        [fAudLang3PopUp selectItemAtIndex: 0];
+    }
+    else
+    {
+        [fAudLang3PopUp setEnabled: YES];
+    }
+    if ([fAudLang3PopUp indexOfSelectedItem] == 0)
+    {
+        [fAudLang4PopUp setEnabled: NO];
+        [fAudLang4PopUp selectItemAtIndex: 0];
+    }
+    else
+    {
+        [fAudLang4PopUp setEnabled: YES];
+    }
+    /* enable/disable the mixdown text and popupbutton for audio track 1 */
+    [fAudTrack1CodecPopUp setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack1MixPopUp setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack1RatePopUp setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack1BitratePopUp setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack1DrcSlider setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack1DrcField setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    if ([fAudLang1PopUp indexOfSelectedItem] == 0)
+    {
+        [fAudTrack1CodecPopUp removeAllItems];
+        [fAudTrack1MixPopUp removeAllItems];
+        [fAudTrack1RatePopUp removeAllItems];
+        [fAudTrack1BitratePopUp removeAllItems];
+        [fAudTrack1DrcSlider setFloatValue: 1.00];
+        [self audioDRCSliderChanged: fAudTrack1DrcSlider];
+    }
+    else if ([[fAudTrack1MixPopUp selectedItem] tag] == HB_ACODEC_AC3)
+    {
+        [fAudTrack1RatePopUp setEnabled: NO];
+        [fAudTrack1BitratePopUp setEnabled: NO];
+        [fAudTrack1DrcSlider setEnabled: NO];
+        [fAudTrack1DrcField setEnabled: NO];
+    }
+    
+    /* enable/disable the mixdown text and popupbutton for audio track 2 */
+    [fAudTrack2CodecPopUp setEnabled: ([fAudLang2PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack2MixPopUp setEnabled: ([fAudLang2PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack2RatePopUp setEnabled: ([fAudLang2PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack2BitratePopUp setEnabled: ([fAudLang2PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack2DrcSlider setEnabled: ([fAudLang2PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack2DrcField setEnabled: ([fAudLang2PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    if ([fAudLang2PopUp indexOfSelectedItem] == 0)
+    {
+        [fAudTrack2CodecPopUp removeAllItems];
+        [fAudTrack2MixPopUp removeAllItems];
+        [fAudTrack2RatePopUp removeAllItems];
+        [fAudTrack2BitratePopUp removeAllItems];
+        [fAudTrack2DrcSlider setFloatValue: 1.00];
+        [self audioDRCSliderChanged: fAudTrack2DrcSlider];
+    }
+    else if ([[fAudTrack2MixPopUp selectedItem] tag] == HB_ACODEC_AC3)
+    {
+        [fAudTrack2RatePopUp setEnabled: NO];
+        [fAudTrack2BitratePopUp setEnabled: NO];
+        [fAudTrack2DrcSlider setEnabled: NO];
+        [fAudTrack2DrcField setEnabled: NO];
+    }
+    
+    /* enable/disable the mixdown text and popupbutton for audio track 3 */
+    [fAudTrack3CodecPopUp setEnabled: ([fAudLang3PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack3MixPopUp setEnabled: ([fAudLang3PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack3RatePopUp setEnabled: ([fAudLang3PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack3BitratePopUp setEnabled: ([fAudLang3PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack3DrcSlider setEnabled: ([fAudLang3PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack3DrcField setEnabled: ([fAudLang3PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    if ([fAudLang3PopUp indexOfSelectedItem] == 0)
+    {
+        [fAudTrack3CodecPopUp removeAllItems];
+        [fAudTrack3MixPopUp removeAllItems];
+        [fAudTrack3RatePopUp removeAllItems];
+        [fAudTrack3BitratePopUp removeAllItems];
+        [fAudTrack3DrcSlider setFloatValue: 1.00];
+        [self audioDRCSliderChanged: fAudTrack3DrcSlider];
+    }
+    else if ([[fAudTrack3MixPopUp selectedItem] tag] == HB_ACODEC_AC3)
+    {
+        [fAudTrack3RatePopUp setEnabled: NO];
+        [fAudTrack3BitratePopUp setEnabled: NO];
+        [fAudTrack3DrcSlider setEnabled: NO];
+        [fAudTrack3DrcField setEnabled: NO];
+    }
+    
+    /* enable/disable the mixdown text and popupbutton for audio track 4 */
+    [fAudTrack4CodecPopUp setEnabled: ([fAudLang4PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack4MixPopUp setEnabled: ([fAudLang4PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack4RatePopUp setEnabled: ([fAudLang4PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack4BitratePopUp setEnabled: ([fAudLang4PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack4DrcSlider setEnabled: ([fAudLang4PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack4DrcField setEnabled: ([fAudLang4PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    if ([fAudLang4PopUp indexOfSelectedItem] == 0)
+    {
+        [fAudTrack4CodecPopUp removeAllItems];
+        [fAudTrack4MixPopUp removeAllItems];
+        [fAudTrack4RatePopUp removeAllItems];
+        [fAudTrack4BitratePopUp removeAllItems];
+        [fAudTrack4DrcSlider setFloatValue: 1.00];
+        [self audioDRCSliderChanged: fAudTrack4DrcSlider];
+    }
+    else if ([[fAudTrack4MixPopUp selectedItem] tag] == HB_ACODEC_AC3)
+    {
+        [fAudTrack4RatePopUp setEnabled: NO];
+        [fAudTrack4BitratePopUp setEnabled: NO];
+        [fAudTrack4DrcSlider setEnabled: NO];
+        [fAudTrack4DrcField setEnabled: NO];
+    }
+    
+}
+
+- (IBAction) addAllAudioTracksToPopUp: (id) sender
+{
+
+    hb_list_t  * list  = hb_get_titles( fHandle );
+    hb_title_t * title = (hb_title_t*)
+        hb_list_item( list, [fSrcTitlePopUp indexOfSelectedItem] );
+
+       hb_audio_config_t * audio;
+
+    [sender removeAllItems];
+    [sender addItemWithTitle: NSLocalizedString( @"None", @"" )];
+    for( int i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = (hb_audio_config_t *) hb_list_audio_config_item( title->list_audio, i );
+        [[sender menu] addItemWithTitle:
+            [NSString stringWithCString: audio->lang.description]
+            action: NULL keyEquivalent: @""];
+    }
+    [sender selectItemAtIndex: 0];
+
+}
+
+- (IBAction) selectAudioTrackInPopUp: (id) sender searchPrefixString: (NSString *) searchPrefixString selectIndexIfNotFound: (int) selectIndexIfNotFound
+{
+
+    /* this method can be used to find a language, or a language-and-source-format combination, by passing in the appropriate string */
+    /* e.g. to find the first French track, pass in an NSString * of "Francais" */
+    /* e.g. to find the first English 5.1 AC3 track, pass in an NSString * of "English (AC3) (5.1 ch)" */
+    /* if no matching track is found, then selectIndexIfNotFound is used to choose which track to select instead */
+
+       if (searchPrefixString)
+       {
+
+        for( int i = 0; i < [sender numberOfItems]; i++ )
+        {
+            /* Try to find the desired search string */
+            if ([[[sender itemAtIndex: i] title] hasPrefix:searchPrefixString])
+            {
+                [sender selectItemAtIndex: i];
+                return;
+            }
+        }
+        /* couldn't find the string, so select the requested "search string not found" item */
+        /* index of 0 means select the "none" item */
+        /* index of 1 means select the first audio track */
+        [sender selectItemAtIndex: selectIndexIfNotFound];
+       }
+    else
+    {
+        /* if no search string is provided, then select the selectIndexIfNotFound item */
+        [sender selectItemAtIndex: selectIndexIfNotFound];
+    }
+
+}
+- (IBAction) audioAddAudioTrackCodecs: (id)sender
+{
+    int format = [fDstFormatPopUp indexOfSelectedItem];
+    
+    /* setup pointers to the appropriate popups for the correct track */
+    NSPopUpButton * audiocodecPopUp;
+    NSPopUpButton * audiotrackPopUp;
+    if (sender == fAudTrack1CodecPopUp)
+    {
+        audiotrackPopUp = fAudLang1PopUp;
+        audiocodecPopUp = fAudTrack1CodecPopUp;
+    }
+    else if (sender == fAudTrack2CodecPopUp)
+    {
+        audiotrackPopUp = fAudLang2PopUp;
+        audiocodecPopUp = fAudTrack2CodecPopUp;
+    }
+    else if (sender == fAudTrack3CodecPopUp)
+    {
+        audiotrackPopUp = fAudLang3PopUp;
+        audiocodecPopUp = fAudTrack3CodecPopUp;
+    }
+    else
+    {
+        audiotrackPopUp = fAudLang4PopUp;
+        audiocodecPopUp = fAudTrack4CodecPopUp;
+    }
+    
+    [audiocodecPopUp removeAllItems];
+    /* Make sure "None" isnt selected in the source track */
+    if ([audiotrackPopUp indexOfSelectedItem] > 0)
+    {
+        [audiocodecPopUp setEnabled:YES];
+        NSMenuItem *menuItem;
+        /* We setup our appropriate popups for codecs and put the int value in the popup tag for easy retrieval */
+        switch( format )
+        {
+            case 0:
+                /* MP4 */
+                // AAC
+                menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AAC (faac)" action: NULL keyEquivalent: @""];
+                [menuItem setTag: HB_ACODEC_FAAC];
+                
+                // AC3 Passthru
+                menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AC3 Passthru" action: NULL keyEquivalent: @""];
+                [menuItem setTag: HB_ACODEC_AC3];
+                break;
+                
+            case 1:
+                /* MKV */
+                // AAC
+                menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AAC (faac)" action: NULL keyEquivalent: @""];
+                [menuItem setTag: HB_ACODEC_FAAC];
+                // AC3 Passthru
+                menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AC3 Passthru" action: NULL keyEquivalent: @""];
+                [menuItem setTag: HB_ACODEC_AC3];
+                // MP3
+                menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"MP3 (lame)" action: NULL keyEquivalent: @""];
+                [menuItem setTag: HB_ACODEC_LAME];
+                // Vorbis
+                menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"Vorbis (vorbis)" action: NULL keyEquivalent: @""];
+                [menuItem setTag: HB_ACODEC_VORBIS];
+                break;
+                
+            case 2: 
+                /* AVI */
+                // MP3
+                menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"MP3 (lame)" action: NULL keyEquivalent: @""];
+                [menuItem setTag: HB_ACODEC_LAME];
+                // AC3 Passthru
+                menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AC3 Passthru" action: NULL keyEquivalent: @""];
+                [menuItem setTag: HB_ACODEC_AC3];
+                break;
+                
+            case 3:
+                /* OGM */
+                // Vorbis
+                menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"Vorbis (vorbis)" action: NULL keyEquivalent: @""];
+                [menuItem setTag: HB_ACODEC_VORBIS];
+                // MP3
+                menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"MP3 (lame)" action: NULL keyEquivalent: @""];
+                [menuItem setTag: HB_ACODEC_LAME];
+                break;
+        }
+        [audiocodecPopUp selectItemAtIndex:0];
+    }
+    else
+    {
+        [audiocodecPopUp setEnabled:NO];
+    }
+}
+
+- (IBAction) audioTrackPopUpChanged: (id) sender
+{
+    /* utility function to call audioTrackPopUpChanged without passing in a mixdown-to-use */
+    [self audioTrackPopUpChanged: sender mixdownToUse: 0];
+}
+
+- (IBAction) audioTrackPopUpChanged: (id) sender mixdownToUse: (int) mixdownToUse
+{
+    
+    /* make sure we have a selected title before continuing */
+    if (fTitle == NULL) return;
+    /* if the sender is the lanaguage popup and there is nothing in the codec popup, lets call
+    * audioAddAudioTrackCodecs on the codec popup to populate it properly before moving on
+    */
+    if (sender == fAudLang1PopUp && [[fAudTrack1CodecPopUp menu] numberOfItems] == 0)
+    {
+        [self audioAddAudioTrackCodecs: fAudTrack1CodecPopUp];
+    }
+    if (sender == fAudLang2PopUp && [[fAudTrack2CodecPopUp menu] numberOfItems] == 0)
+    {
+        [self audioAddAudioTrackCodecs: fAudTrack2CodecPopUp];
+    }
+    if (sender == fAudLang3PopUp && [[fAudTrack3CodecPopUp menu] numberOfItems] == 0)
+    {
+        [self audioAddAudioTrackCodecs: fAudTrack3CodecPopUp];
+    }
+    if (sender == fAudLang4PopUp && [[fAudTrack4CodecPopUp menu] numberOfItems] == 0)
+    {
+        [self audioAddAudioTrackCodecs: fAudTrack4CodecPopUp];
+    }
+    
+    /* Now lets make the sender the appropriate Audio Track popup from this point on */
+    if (sender == fAudTrack1CodecPopUp || sender == fAudTrack1MixPopUp)
+    {
+        sender = fAudLang1PopUp;
+    }
+    if (sender == fAudTrack2CodecPopUp || sender == fAudTrack2MixPopUp)
+    {
+        sender = fAudLang2PopUp;
+    }
+    if (sender == fAudTrack3CodecPopUp || sender == fAudTrack3MixPopUp)
+    {
+        sender = fAudLang3PopUp;
+    }
+    if (sender == fAudTrack4CodecPopUp || sender == fAudTrack4MixPopUp)
+    {
+        sender = fAudLang4PopUp;
+    }
+    
+    /* pointer to this track's mixdown, codec, sample rate and bitrate NSPopUpButton's */
+    NSPopUpButton * mixdownPopUp;
+    NSPopUpButton * audiocodecPopUp;
+    NSPopUpButton * sampleratePopUp;
+    NSPopUpButton * bitratePopUp;
+    if (sender == fAudLang1PopUp)
+    {
+        mixdownPopUp = fAudTrack1MixPopUp;
+        audiocodecPopUp = fAudTrack1CodecPopUp;
+        sampleratePopUp = fAudTrack1RatePopUp;
+        bitratePopUp = fAudTrack1BitratePopUp;
+    }
+    else if (sender == fAudLang2PopUp)
+    {
+        mixdownPopUp = fAudTrack2MixPopUp;
+        audiocodecPopUp = fAudTrack2CodecPopUp;
+        sampleratePopUp = fAudTrack2RatePopUp;
+        bitratePopUp = fAudTrack2BitratePopUp;
+    }
+    else if (sender == fAudLang3PopUp)
+    {
+        mixdownPopUp = fAudTrack3MixPopUp;
+        audiocodecPopUp = fAudTrack3CodecPopUp;
+        sampleratePopUp = fAudTrack3RatePopUp;
+        bitratePopUp = fAudTrack3BitratePopUp;
+    }
+    else
+    {
+        mixdownPopUp = fAudTrack4MixPopUp;
+        audiocodecPopUp = fAudTrack4CodecPopUp;
+        sampleratePopUp = fAudTrack4RatePopUp;
+        bitratePopUp = fAudTrack4BitratePopUp;
+    }
+
+    /* get the index of the selected audio Track*/
+    int thisAudioIndex = [sender indexOfSelectedItem] - 1;
+
+    /* pointer for the hb_audio_s struct we will use later on */
+    hb_audio_config_t * audio;
+
+    int acodec;
+    /* check if the audio mixdown controls need their enabled state changing */
+    [self setEnabledStateOfAudioMixdownControls:nil];
+
+    if (thisAudioIndex != -1)
+    {
+
+        /* get the audio */
+        audio = (hb_audio_config_t *) hb_list_audio_config_item( fTitle->list_audio, thisAudioIndex );// Should "fTitle" be title and be setup ?
+
+        /* actually manipulate the proper mixdowns here */
+        /* delete the previous audio mixdown options */
+        [mixdownPopUp removeAllItems];
+
+        acodec = [[audiocodecPopUp selectedItem] tag];
+
+        if (audio != NULL)
+        {
+
+            /* find out if our selected output audio codec supports mono and / or 6ch */
+            /* we also check for an input codec of AC3 or DCA,
+             as they are the only libraries able to do the mixdown to mono / conversion to 6-ch */
+            /* audioCodecsSupportMono and audioCodecsSupport6Ch are the same for now,
+             but this may change in the future, so they are separated for flexibility */
+            int audioCodecsSupportMono =
+                    (audio->in.codec & (HB_ACODEC_AC3|HB_ACODEC_DCA)) &&
+                    (acodec != HB_ACODEC_LAME);
+            int audioCodecsSupport6Ch =
+                    (audio->in.codec & (HB_ACODEC_AC3|HB_ACODEC_DCA)) &&
+                    (acodec != HB_ACODEC_LAME);
+            
+            /* check for AC-3 passthru */
+            if (audio->in.codec == HB_ACODEC_AC3 && acodec == HB_ACODEC_AC3)
+            {
+                
+            NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
+                 [NSString stringWithCString: "AC3 Passthru"]
+                                               action: NULL keyEquivalent: @""];
+             [menuItem setTag: HB_ACODEC_AC3];   
+            }
+            else
+            {
+                
+                /* add the appropriate audio mixdown menuitems to the popupbutton */
+                /* in each case, we set the new menuitem's tag to be the amixdown value for that mixdown,
+                 so that we can reference the mixdown later */
+                
+                /* keep a track of the min and max mixdowns we used, so we can select the best match later */
+                int minMixdownUsed = 0;
+                int maxMixdownUsed = 0;
+                
+                /* get the input channel layout without any lfe channels */
+                int layout = audio->in.channel_layout & HB_INPUT_CH_LAYOUT_DISCRETE_NO_LFE_MASK;
+                
+                /* do we want to add a mono option? */
+                if (audioCodecsSupportMono == 1)
+                {
+                    NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
+                                            [NSString stringWithCString: hb_audio_mixdowns[0].human_readable_name]
+                                                                          action: NULL keyEquivalent: @""];
+                    [menuItem setTag: hb_audio_mixdowns[0].amixdown];
+                    if (minMixdownUsed == 0) minMixdownUsed = hb_audio_mixdowns[0].amixdown;
+                    maxMixdownUsed = MAX(maxMixdownUsed, hb_audio_mixdowns[0].amixdown);
+                }
+                
+                /* do we want to add a stereo option? */
+                /* offer stereo if we have a mono source and non-mono-supporting codecs, as otherwise we won't have a mixdown at all */
+                /* also offer stereo if we have a stereo-or-better source */
+                if ((layout == HB_INPUT_CH_LAYOUT_MONO && audioCodecsSupportMono == 0) || layout >= HB_INPUT_CH_LAYOUT_STEREO)
+                {
+                    NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
+                                            [NSString stringWithCString: hb_audio_mixdowns[1].human_readable_name]
+                                                                          action: NULL keyEquivalent: @""];
+                    [menuItem setTag: hb_audio_mixdowns[1].amixdown];
+                    if (minMixdownUsed == 0) minMixdownUsed = hb_audio_mixdowns[1].amixdown;
+                    maxMixdownUsed = MAX(maxMixdownUsed, hb_audio_mixdowns[1].amixdown);
+                }
+                
+                /* do we want to add a dolby surround (DPL1) option? */
+                if (layout == HB_INPUT_CH_LAYOUT_3F1R || layout == HB_INPUT_CH_LAYOUT_3F2R || layout == HB_INPUT_CH_LAYOUT_DOLBY)
+                {
+                    NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
+                                            [NSString stringWithCString: hb_audio_mixdowns[2].human_readable_name]
+                                                                          action: NULL keyEquivalent: @""];
+                    [menuItem setTag: hb_audio_mixdowns[2].amixdown];
+                    if (minMixdownUsed == 0) minMixdownUsed = hb_audio_mixdowns[2].amixdown;
+                    maxMixdownUsed = MAX(maxMixdownUsed, hb_audio_mixdowns[2].amixdown);
+                }
+                
+                /* do we want to add a dolby pro logic 2 (DPL2) option? */
+                if (layout == HB_INPUT_CH_LAYOUT_3F2R)
+                {
+                    NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
+                                            [NSString stringWithCString: hb_audio_mixdowns[3].human_readable_name]
+                                                                          action: NULL keyEquivalent: @""];
+                    [menuItem setTag: hb_audio_mixdowns[3].amixdown];
+                    if (minMixdownUsed == 0) minMixdownUsed = hb_audio_mixdowns[3].amixdown;
+                    maxMixdownUsed = MAX(maxMixdownUsed, hb_audio_mixdowns[3].amixdown);
+                }
+                
+                /* do we want to add a 6-channel discrete option? */
+                if (audioCodecsSupport6Ch == 1 && layout == HB_INPUT_CH_LAYOUT_3F2R && (audio->in.channel_layout & HB_INPUT_CH_LAYOUT_HAS_LFE))
+                {
+                    NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
+                                            [NSString stringWithCString: hb_audio_mixdowns[4].human_readable_name]
+                                                                          action: NULL keyEquivalent: @""];
+                    [menuItem setTag: hb_audio_mixdowns[4].amixdown];
+                    if (minMixdownUsed == 0) minMixdownUsed = hb_audio_mixdowns[4].amixdown;
+                    maxMixdownUsed = MAX(maxMixdownUsed, hb_audio_mixdowns[4].amixdown);
+                }
+                
+                /* do we want to add an AC-3 passthrough option? */
+                if (audio->in.codec == HB_ACODEC_AC3 && acodec == HB_ACODEC_AC3) 
+                {
+                    NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
+                                            [NSString stringWithCString: hb_audio_mixdowns[5].human_readable_name]
+                                                                          action: NULL keyEquivalent: @""];
+                    [menuItem setTag: HB_ACODEC_AC3];
+                    if (minMixdownUsed == 0) minMixdownUsed = hb_audio_mixdowns[5].amixdown;
+                    maxMixdownUsed = MAX(maxMixdownUsed, hb_audio_mixdowns[5].amixdown);
+                }
+                
+                /* auto-select the best mixdown based on our saved mixdown preference */
+                
+                /* for now, this is hard-coded to a "best" mixdown of HB_AMIXDOWN_DOLBYPLII */
+                /* ultimately this should be a prefs option */
+                int useMixdown;
+                
+                /* if we passed in a mixdown to use - in order to load a preset - then try and use it */
+                if (mixdownToUse > 0)
+                {
+                    useMixdown = mixdownToUse;
+                }
+                else
+                {
+                    useMixdown = HB_AMIXDOWN_DOLBYPLII;
+                }
+                
+                /* if useMixdown > maxMixdownUsed, then use maxMixdownUsed */
+                if (useMixdown > maxMixdownUsed)
+                { 
+                    useMixdown = maxMixdownUsed;
+                }
+                
+                /* if useMixdown < minMixdownUsed, then use minMixdownUsed */
+                if (useMixdown < minMixdownUsed)
+                { 
+                    useMixdown = minMixdownUsed;
+                }
+                
+                /* select the (possibly-amended) preferred mixdown */
+                [mixdownPopUp selectItemWithTag: useMixdown];
+
+            }
+            /* In the case of a source track that is not AC3 and the user tries to use AC3 Passthru (which does not work)
+             * we force the Audio Codec choice back to a workable codec. We use MP3 for avi and aac for all
+             * other containers.
+             */
+            if (audio->in.codec != HB_ACODEC_AC3 && [[audiocodecPopUp selectedItem] tag] == HB_ACODEC_AC3)
+            {
+                /* If we are using the avi container, we select MP3 as there is no aac available*/
+                if ([[fDstFormatPopUp selectedItem] tag] == HB_MUX_AVI)
+                {
+                    [audiocodecPopUp selectItemWithTag: HB_ACODEC_LAME];
+                }
+                else
+                {
+                    [audiocodecPopUp selectItemWithTag: HB_ACODEC_FAAC];
+                }
+            }
+            /* Setup our samplerate and bitrate popups we will need based on mixdown */
+            [self audioTrackMixdownChanged: mixdownPopUp];            
+        }
+    
+    }
+    if( [fDstFormatPopUp indexOfSelectedItem] == 0 )
+    {
+        [self autoSetM4vExtension: sender];
+    }
+}
+
+- (IBAction) audioTrackMixdownChanged: (id) sender
+{
+    
+    int acodec;
+    /* setup pointers to all of the other audio track controls
+    * we will need later
+    */
+    NSPopUpButton * mixdownPopUp;
+    NSPopUpButton * sampleratePopUp;
+    NSPopUpButton * bitratePopUp;
+    NSPopUpButton * audiocodecPopUp;
+    NSPopUpButton * audiotrackPopUp;
+    NSSlider * drcSlider;
+    NSTextField * drcField;
+    if (sender == fAudTrack1MixPopUp)
+    {
+        audiotrackPopUp = fAudLang1PopUp;
+        audiocodecPopUp = fAudTrack1CodecPopUp;
+        mixdownPopUp = fAudTrack1MixPopUp;
+        sampleratePopUp = fAudTrack1RatePopUp;
+        bitratePopUp = fAudTrack1BitratePopUp;
+        drcSlider = fAudTrack1DrcSlider;
+        drcField = fAudTrack1DrcField;
+    }
+    else if (sender == fAudTrack2MixPopUp)
+    {
+        audiotrackPopUp = fAudLang2PopUp;
+        audiocodecPopUp = fAudTrack2CodecPopUp;
+        mixdownPopUp = fAudTrack2MixPopUp;
+        sampleratePopUp = fAudTrack2RatePopUp;
+        bitratePopUp = fAudTrack2BitratePopUp;
+        drcSlider = fAudTrack2DrcSlider;
+        drcField = fAudTrack2DrcField;
+    }
+    else if (sender == fAudTrack3MixPopUp)
+    {
+        audiotrackPopUp = fAudLang3PopUp;
+        audiocodecPopUp = fAudTrack3CodecPopUp;
+        mixdownPopUp = fAudTrack3MixPopUp;
+        sampleratePopUp = fAudTrack3RatePopUp;
+        bitratePopUp = fAudTrack3BitratePopUp;
+        drcSlider = fAudTrack3DrcSlider;
+        drcField = fAudTrack3DrcField;
+    }
+    else
+    {
+        audiotrackPopUp = fAudLang4PopUp;
+        audiocodecPopUp = fAudTrack4CodecPopUp;
+        mixdownPopUp = fAudTrack4MixPopUp;
+        sampleratePopUp = fAudTrack4RatePopUp;
+        bitratePopUp = fAudTrack4BitratePopUp;
+        drcSlider = fAudTrack4DrcSlider;
+        drcField = fAudTrack4DrcField;
+    }
+    acodec = [[audiocodecPopUp selectedItem] tag];
+    /* storage variable for the min and max bitrate allowed for this codec */
+    int minbitrate;
+    int maxbitrate;
+    
+    switch( acodec )
+    {
+        case HB_ACODEC_FAAC:
+            /* check if we have a 6ch discrete conversion in either audio track */
+            if ([[mixdownPopUp selectedItem] tag] == HB_AMIXDOWN_6CH)
+            {
+                /* FAAC is happy using our min bitrate of 32 kbps, even for 6ch */
+                minbitrate = 32;
+                /* If either mixdown popup includes 6-channel discrete, then allow up to 384 kbps */
+                maxbitrate = 384;
+                break;
+            }
+            else
+            {
+                /* FAAC is happy using our min bitrate of 32 kbps for stereo or mono */
+                minbitrate = 32;
+                /* FAAC won't honour anything more than 160 for stereo, so let's not offer it */
+                /* note: haven't dealt with mono separately here, FAAC will just use the max it can */
+                maxbitrate = 160;
+                break;
+            }
+            
+            case HB_ACODEC_LAME:
+            /* Lame is happy using our min bitrate of 32 kbps */
+            minbitrate = 32;
+            /* Lame won't encode if the bitrate is higher than 320 kbps */
+            maxbitrate = 320;
+            break;
+            
+            case HB_ACODEC_VORBIS:
+            if ([[mixdownPopUp selectedItem] tag] == HB_AMIXDOWN_6CH)
+            {
+                /* Vorbis causes a crash if we use a bitrate below 192 kbps with 6 channel */
+                minbitrate = 192;
+                /* If either mixdown popup includes 6-channel discrete, then allow up to 384 kbps */
+                maxbitrate = 384;
+                break;
+            }
+            else
+            {
+                /* Vorbis causes a crash if we use a bitrate below 48 kbps */
+                minbitrate = 48;
+                /* Vorbis can cope with 384 kbps quite happily, even for stereo */
+                maxbitrate = 384;
+                break;
+            }
+            
+            default:
+            /* AC3 passthru disables the bitrate dropdown anyway, so we might as well just use the min and max bitrate */
+            minbitrate = 32;
+            maxbitrate = 384;
+            
+    }
+    
+    /* make sure we have a selected title before continuing */
+    if (fTitle == NULL) return;
+    /* get the audio so we can find out what input rates are*/
+    hb_audio_config_t * audio;
+    audio = (hb_audio_config_t *) hb_list_audio_config_item( fTitle->list_audio, [audiotrackPopUp indexOfSelectedItem] - 1 );
+    int inputbitrate = audio->in.bitrate / 1000;
+    int inputsamplerate = audio->in.samplerate;
+    
+    if ([[mixdownPopUp selectedItem] tag] != HB_ACODEC_AC3)
+    {
+        [bitratePopUp removeAllItems];
+        
+        for( int i = 0; i < hb_audio_bitrates_count; i++ )
+        {
+            if (hb_audio_bitrates[i].rate >= minbitrate && hb_audio_bitrates[i].rate <= maxbitrate)
+            {
+                /* add a new menuitem for this bitrate */
+                NSMenuItem *menuItem = [[bitratePopUp menu] addItemWithTitle:
+                                        [NSString stringWithCString: hb_audio_bitrates[i].string]
+                                                                      action: NULL keyEquivalent: @""];
+                /* set its tag to be the actual bitrate as an integer, so we can retrieve it later */
+                [menuItem setTag: hb_audio_bitrates[i].rate];
+            }
+        }
+        
+        /* select the default bitrate (but use 384 for 6-ch AAC) */
+        if ([[mixdownPopUp selectedItem] tag] == HB_AMIXDOWN_6CH)
+        {
+            [bitratePopUp selectItemWithTag: 384];
+        }
+        else
+        {
+            [bitratePopUp selectItemWithTag: hb_audio_bitrates[hb_audio_bitrates_default].rate];
+        }
+    }
+    /* populate and set the sample rate popup */
+    /* Audio samplerate */
+    [sampleratePopUp removeAllItems];
+    /* we create a same as source selection (Auto) so that we can choose to use the input sample rate */
+    NSMenuItem *menuItem = [[sampleratePopUp menu] addItemWithTitle: @"Auto" action: NULL keyEquivalent: @""];
+    [menuItem setTag: inputsamplerate];
+    
+    for( int i = 0; i < hb_audio_rates_count; i++ )
+    {
+        NSMenuItem *menuItem = [[sampleratePopUp menu] addItemWithTitle:
+                                [NSString stringWithCString: hb_audio_rates[i].string]
+                                                                 action: NULL keyEquivalent: @""];
+        [menuItem setTag: hb_audio_rates[i].rate];
+    }
+    /* We use the input sample rate as the default sample rate as downsampling just makes audio worse
+    * and there is no compelling reason to use anything else as default, though the users default
+    * preset will likely override any setting chosen here.
+    */
+    [sampleratePopUp selectItemWithTag: inputsamplerate];
+    
+    
+    /* Since AC3 Pass Thru uses the input ac3 bitrate and sample rate, we get the input tracks
+    * bitrate and dispay it in the bitrate popup even though libhb happily ignores any bitrate input from
+    * the gui. We do this for better user feedback in the audio tab as well as the queue for the most part
+    */
+    if ([[mixdownPopUp selectedItem] tag] == HB_ACODEC_AC3)
+    {
+        
+        /* lets also set the bitrate popup to the input bitrate as thats what passthru will use */
+        [bitratePopUp removeAllItems];
+        NSMenuItem *menuItem = [[bitratePopUp menu] addItemWithTitle:
+                                [NSString stringWithFormat:@"%d", inputbitrate]
+                                                              action: NULL keyEquivalent: @""];
+        [menuItem setTag: inputbitrate];
+        /* For ac3 passthru we disable the sample rate and bitrate popups as well as the drc slider*/
+        [bitratePopUp setEnabled: NO];
+        [sampleratePopUp setEnabled: NO];
+        
+        [drcSlider setFloatValue: 1.00];
+        [self audioDRCSliderChanged: drcSlider];
+        [drcSlider setEnabled: NO];
+        [drcField setEnabled: NO];
+    }
+    else
+    {
+        [sampleratePopUp setEnabled: YES];
+        [bitratePopUp setEnabled: YES];
+        [drcSlider setEnabled: YES];
+        [drcField setEnabled: YES];
+    }
+[self calculateBitrate:nil];    
+}
+
+- (IBAction) audioDRCSliderChanged: (id) sender
+{
+    NSSlider * drcSlider;
+    NSTextField * drcField;
+    if (sender == fAudTrack1DrcSlider)
+    {
+        drcSlider = fAudTrack1DrcSlider;
+        drcField = fAudTrack1DrcField;
+    }
+    else if (sender == fAudTrack2DrcSlider)
+    {
+        drcSlider = fAudTrack2DrcSlider;
+        drcField = fAudTrack2DrcField;
+    }
+    else if (sender == fAudTrack3DrcSlider)
+    {
+        drcSlider = fAudTrack3DrcSlider;
+        drcField = fAudTrack3DrcField;
+    }
+    else
+    {
+        drcSlider = fAudTrack4DrcSlider;
+        drcField = fAudTrack4DrcField;
+    }
+    [drcField setStringValue: [NSString stringWithFormat: @"%.2f", [drcSlider floatValue]]];
+    /* For now, do not call this until we have an intelligent way to determine audio track selections
+    * compared to presets
+    */
+    //[self customSettingUsed: sender];
+}
+
+- (IBAction) subtitleSelectionChanged: (id) sender
+{
+       if ([fSubPopUp indexOfSelectedItem] == 0)
+       {
+        [fSubForcedCheck setState: NSOffState];
+        [fSubForcedCheck setEnabled: NO];      
+       }
+       else
+       {
+        [fSubForcedCheck setEnabled: YES];     
+       }
+       
+}
+
+
+
+
+#pragma mark -
+#pragma mark Open New Windows
+
+- (IBAction) openHomepage: (id) sender
+{
+    [[NSWorkspace sharedWorkspace] openURL: [NSURL
+        URLWithString:@"http://handbrake.fr/"]];
+}
+
+- (IBAction) openForums: (id) sender
+{
+    [[NSWorkspace sharedWorkspace] openURL: [NSURL
+        URLWithString:@"http://handbrake.fr/forum/"]];
+}
+- (IBAction) openUserGuide: (id) sender
+{
+    [[NSWorkspace sharedWorkspace] openURL: [NSURL
+        URLWithString:@"http://handbrake.fr/trac/wiki/HandBrakeGuide"]];
+}
+
+/**
+ * Shows debug output window.
+ */
+- (IBAction)showDebugOutputPanel:(id)sender
+{
+    [outputPanel showOutputPanel:sender];
+}
+
+/**
+ * Shows preferences window.
+ */
+- (IBAction) showPreferencesWindow: (id) sender
+{
+    NSWindow * window = [fPreferencesController window];
+    if (![window isVisible])
+        [window center];
+
+    [window makeKeyAndOrderFront: nil];
+}
+
+/**
+ * Shows queue window.
+ */
+- (IBAction) showQueueWindow:(id)sender
+{
+    [fQueueController showQueueWindow:sender];
+}
+
+
+- (IBAction) toggleDrawer:(id)sender {
+    [fPresetDrawer toggle:self];
+}
+
+/**
+ * Shows Picture Settings Window.
+ */
+
+- (IBAction) showPicturePanel: (id) sender
+{
+       hb_list_t  * list  = hb_get_titles( fHandle );
+    hb_title_t * title = (hb_title_t *) hb_list_item( list,
+            [fSrcTitlePopUp indexOfSelectedItem] );
+    [fPictureController showPanelInWindow:fWindow forTitle:title];
+}
+
+#pragma mark -
+#pragma mark Preset Outline View Methods
+#pragma mark - Required
+/* These are required by the NSOutlineView Datasource Delegate */
+
+
+/* used to specify the number of levels to show for each item */
+- (int)outlineView:(NSOutlineView *)fPresetsOutlineView numberOfChildrenOfItem:(id)item
+{
+    /* currently use no levels to test outline view viability */
+    if (item == nil) // for an outline view the root level of the hierarchy is always nil
+    {
+        return [UserPresets count];
+    }
+    else
+    {
+        /* we need to return the count of the array in ChildrenArray for this folder */
+        NSArray *children = nil;
+        children = [item objectForKey:@"ChildrenArray"];
+        if ([children count] > 0)
+        {
+            return [children count];
+        }
+        else
+        {
+            return 0;
+        }
+    }
+}
+
+/* We use this to deterimine children of an item */
+- (id)outlineView:(NSOutlineView *)fPresetsOutlineView child:(int)index ofItem:(id)item
+{
+    
+    /* we need to return the count of the array in ChildrenArray for this folder */
+    NSArray *children = nil;
+    if (item == nil)
+    {
+        children = UserPresets;
+    }
+    else
+    {
+        if ([item objectForKey:@"ChildrenArray"])
+        {
+            children = [item objectForKey:@"ChildrenArray"];
+        }
+    }   
+    if ((children == nil) || ([children count] <= index))
+    {
+        return nil;
+    }
+    else
+    {
+        return [children objectAtIndex:index];
+    }
+    
+    
+    // We are only one level deep, so we can't be asked about children
+    //NSAssert (NO, @"Presets View outlineView:child:ofItem: currently can't handle nested items.");
+    //return nil;
+}
+
+/* We use this to determine if an item should be expandable */
+- (BOOL)outlineView:(NSOutlineView *)fPresetsOutlineView isItemExpandable:(id)item
+{
+    
+    /* we need to return the count of the array in ChildrenArray for this folder */
+    NSArray *children= nil;
+    if (item == nil)
+    {
+        children = UserPresets;
+    }
+    else
+    {
+        if ([item objectForKey:@"ChildrenArray"])
+        {
+            children = [item objectForKey:@"ChildrenArray"];
+        }
+    }   
+    
+    /* To deterimine if an item should show a disclosure triangle
+     * we could do it by the children count as so:
+     * if ([children count] < 1)
+     * However, lets leave the triangle show even if there are no
+     * children to help indicate a folder, just like folder in the
+     * finder can show a disclosure triangle even when empty
+     */
+    
+    /* We need to determine if the item is a folder */
+   if ([[item objectForKey:@"Folder"] intValue] == 1)
+   {
+        return YES;
+    }
+    else
+    {
+        return NO;
+    }
+    
+}
+
+- (BOOL)outlineView:(NSOutlineView *)outlineView shouldExpandItem:(id)item
+{
+    // Our outline view has no levels, but we can still expand every item. Doing so
+    // just makes the row taller. See heightOfRowByItem below.
+//return ![(HBQueueOutlineView*)outlineView isDragging];
+
+return YES;
+}
+
+
+/* Used to tell the outline view which information is to be displayed per item */
+- (id)outlineView:(NSOutlineView *)fPresetsOutlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
+{
+       /* We have two columns right now, icon and PresetName */
+       
+    if ([[tableColumn identifier] isEqualToString:@"PresetName"])
+    {
+        return [item objectForKey:@"PresetName"];
+    }
+    else
+    {
+        //return @"";
+        return nil;
+    }
+}
+
+#pragma mark - Added Functionality (optional)
+/* Use to customize the font and display characteristics of the title cell */
+- (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
+{
+    if ([[tableColumn identifier] isEqualToString:@"PresetName"])
+    {
+        NSFont *txtFont;
+        NSColor *fontColor;
+        NSColor *shadowColor;
+        txtFont = [NSFont systemFontOfSize: [NSFont smallSystemFontSize]];
+        /*check to see if its a selected row */
+        if ([fPresetsOutlineView selectedRow] == [fPresetsOutlineView rowForItem:item])
+        {
+            
+            fontColor = [NSColor blackColor];
+            shadowColor = [NSColor colorWithDeviceRed:(127.0/255.0) green:(140.0/255.0) blue:(160.0/255.0) alpha:1.0];
+        }
+        else
+        {
+            if ([[item objectForKey:@"Type"] intValue] == 0)
+            {
+                fontColor = [NSColor blueColor];
+            }
+            else // User created preset, use a black font
+            {
+                fontColor = [NSColor blackColor];
+            }
+            /* check to see if its a folder */
+            //if ([[item objectForKey:@"Folder"] intValue] == 1)
+            //{
+            //fontColor = [NSColor greenColor];
+            //}
+            
+            
+        }
+        /* We use Bold Text for the HB Default */
+        if ([[item objectForKey:@"Default"] intValue] == 1)// 1 is HB default
+        {
+            txtFont = [NSFont boldSystemFontOfSize: [NSFont smallSystemFontSize]];
+        }
+        /* We use Bold Text for the User Specified Default */
+        if ([[item objectForKey:@"Default"] intValue] == 2)// 2 is User default
+        {
+            txtFont = [NSFont boldSystemFontOfSize: [NSFont smallSystemFontSize]];
+        }
+        
+        
+        [cell setTextColor:fontColor];
+        [cell setFont:txtFont];
+        
+    }
+}
+
+/* We use this to edit the name field in the outline view */
+- (void)outlineView:(NSOutlineView *)outlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
+{
+    if ([[tableColumn identifier] isEqualToString:@"PresetName"])
+    {
+        id theRecord;
+        
+        theRecord = item;
+        [theRecord setObject:object forKey:@"PresetName"];
+        
+        [self sortPresets];
+        
+        [fPresetsOutlineView reloadData];
+        /* We save all of the preset data here */
+        [self savePreset];
+    }
+}
+/* We use this to provide tooltips for the items in the presets outline view */
+- (NSString *)outlineView:(NSOutlineView *)fPresetsOutlineView toolTipForCell:(NSCell *)cell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)tc item:(id)item mouseLocation:(NSPoint)mouseLocation
+{
+    //if ([[tc identifier] isEqualToString:@"PresetName"])
+    //{
+        /* initialize the tooltip contents variable */
+        NSString *loc_tip;
+        /* if there is a description for the preset, we show it in the tooltip */
+        if ([item objectForKey:@"PresetDescription"])
+        {
+            loc_tip = [item objectForKey:@"PresetDescription"];
+            return (loc_tip);
+        }
+        else
+        {
+            loc_tip = @"No description available";
+        }
+        return (loc_tip);
+    //}
+}
+
+#pragma mark -
+#pragma mark Preset Outline View Methods (dragging related)
+
+
+- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard
+{
+       // Dragging is only allowed for custom presets.
+    //[[[fPresetsOutlineView itemAtRow:[fPresetsOutlineView selectedRow]] objectForKey:@"Default"] intValue] != 1
+       if ([[[fPresetsOutlineView itemAtRow:[fPresetsOutlineView selectedRow]] objectForKey:@"Type"] intValue] == 0) // 0 is built in preset
+    {
+        return NO;
+    }
+    // Don't retain since this is just holding temporaral drag information, and it is
+    //only used during a drag!  We could put this in the pboard actually.
+    fDraggedNodes = items;
+    // Provide data for our custom type, and simple NSStrings.
+    [pboard declareTypes:[NSArray arrayWithObjects: DragDropSimplePboardType, nil] owner:self];
+    
+    // the actual data doesn't matter since DragDropSimplePboardType drags aren't recognized by anyone but us!.
+    [pboard setData:[NSData data] forType:DragDropSimplePboardType]; 
+    
+    return YES;
+}
+
+- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(int)index
+{
+       
+       // Don't allow dropping ONTO an item since they can't really contain any children.
+    
+    BOOL isOnDropTypeProposal = index == NSOutlineViewDropOnItemIndex;
+    if (isOnDropTypeProposal)
+        return NSDragOperationNone;
+    
+    // Don't allow dropping INTO an item since they can't really contain any children as of yet.
+       if (item != nil)
+       {
+               index = [fPresetsOutlineView rowForItem: item] + 1;
+               item = nil;
+       }
+    
+    // Don't allow dropping into the Built In Presets.
+    if (index < presetCurrentBuiltInCount)
+    {
+        return NSDragOperationNone;
+        index = MAX (index, presetCurrentBuiltInCount);
+       }    
+       
+    [outlineView setDropItem:item dropChildIndex:index];
+    return NSDragOperationGeneric;
+}
+
+
+
+- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(int)index
+{
+    /* first, lets see if we are dropping into a folder */
+    if ([[fPresetsOutlineView itemAtRow:index] objectForKey:@"Folder"] && [[[fPresetsOutlineView itemAtRow:index] objectForKey:@"Folder"] intValue] == 1) // if its a folder
+       {
+    NSMutableArray *childrenArray = [[NSMutableArray alloc] init];
+    childrenArray = [[fPresetsOutlineView itemAtRow:index] objectForKey:@"ChildrenArray"];
+    [childrenArray addObject:item];
+    [[fPresetsOutlineView itemAtRow:index] setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
+    [childrenArray autorelease];
+    }
+    else // We are not, so we just move the preset into the existing array 
+    {
+        NSMutableIndexSet *moveItems = [NSMutableIndexSet indexSet];
+        id obj;
+        NSEnumerator *enumerator = [fDraggedNodes objectEnumerator];
+        while (obj = [enumerator nextObject])
+        {
+            [moveItems addIndex:[UserPresets indexOfObject:obj]];
+        }
+        // Successful drop, lets rearrange the view and save it all
+        [self moveObjectsInPresetsArray:UserPresets fromIndexes:moveItems toIndex: index];
+    }
+    [fPresetsOutlineView reloadData];
+    [self savePreset];
+    return YES;
+}
+
+- (void)moveObjectsInPresetsArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex
+{
+    unsigned index = [indexSet lastIndex];
+    unsigned aboveInsertIndexCount = 0;
+    
+    while (index != NSNotFound)
+    {
+        unsigned removeIndex;
+        
+        if (index >= insertIndex)
+        {
+            removeIndex = index + aboveInsertIndexCount;
+            aboveInsertIndexCount++;
+        }
+        else
+        {
+            removeIndex = index;
+            insertIndex--;
+        }
+        
+        id object = [[array objectAtIndex:removeIndex] retain];
+        [array removeObjectAtIndex:removeIndex];
+        [array insertObject:object atIndex:insertIndex];
+        [object release];
+        
+        index = [indexSet indexLessThanIndex:index];
+    }
+}
+
+
+
+#pragma mark - Functional Preset NSOutlineView Methods
+
+- (IBAction)selectPreset:(id)sender
+{
+    
+    if ([fPresetsOutlineView selectedRow] >= 0 && [[[fPresetsOutlineView itemAtRow:[fPresetsOutlineView selectedRow]] objectForKey:@"Folder"] intValue] != 1)
+    {
+        chosenPreset = [fPresetsOutlineView itemAtRow:[fPresetsOutlineView selectedRow]];
+        [fPresetSelectedDisplay setStringValue:[chosenPreset objectForKey:@"PresetName"]];
+        
+        if ([[chosenPreset objectForKey:@"Default"] intValue] == 1)
+        {
+            [fPresetSelectedDisplay setStringValue:[NSString stringWithFormat:@"%@ (Default)", [chosenPreset objectForKey:@"PresetName"]]];
+        }
+        else
+        {
+            [fPresetSelectedDisplay setStringValue:[chosenPreset objectForKey:@"PresetName"]];
+        }
+        
+        /* File Format */
+        [fDstFormatPopUp selectItemWithTitle:[chosenPreset objectForKey:@"FileFormat"]];
+        [self formatPopUpChanged:nil];
+        
+        /* Chapter Markers*/
+        [fCreateChapterMarkers setState:[[chosenPreset objectForKey:@"ChapterMarkers"] intValue]];
+        /* Allow Mpeg4 64 bit formatting +4GB file sizes */
+        [fDstMp4LargeFileCheck setState:[[chosenPreset objectForKey:@"Mp4LargeFile"] intValue]];
+        /* Mux mp4 with http optimization */
+        [fDstMp4HttpOptFileCheck setState:[[chosenPreset objectForKey:@"Mp4HttpOptimize"] intValue]];
+        
+        /* Video encoder */
+        /* We set the advanced opt string here if applicable*/
+        [fAdvancedOptions setOptions:[chosenPreset objectForKey:@"x264Option"]];
+        /* We use a conditional to account for the new x264 encoder dropdown as well as presets made using legacy x264 settings*/
+        if ([[chosenPreset objectForKey:@"VideoEncoder"] isEqualToString:@"x264 (h.264 Main)"] ||
+            [[chosenPreset objectForKey:@"VideoEncoder"] isEqualToString:@"x264 (h.264 iPod)"] ||
+            [[chosenPreset objectForKey:@"VideoEncoder"] isEqualToString:@"x264"])
+        {
+            [fVidEncoderPopUp selectItemWithTitle:@"H.264 (x264)"];
+            /* special case for legacy preset to check the new fDstMp4HttpOptFileCheck checkbox to set the ipod atom */
+            if ([[chosenPreset objectForKey:@"VideoEncoder"] isEqualToString:@"x264 (h.264 iPod)"])
+            {
+                [fDstMp4iPodFileCheck setState:NSOnState];
+                /* We also need to add "level=30:" to the advanced opts string to set the correct level for the iPod when
+                 encountering a legacy preset as it used to be handled separately from the opt string*/
+                [fAdvancedOptions setOptions:[@"level=30:" stringByAppendingString:[fAdvancedOptions optionsString]]];
+            }
+            else
+            {
+                [fDstMp4iPodFileCheck setState:NSOffState];
+            }
+        }
+        else if ([[chosenPreset objectForKey:@"VideoEncoder"] isEqualToString:@"FFmpeg"])
+        {
+            [fVidEncoderPopUp selectItemWithTitle:@"MPEG-4 (FFmpeg)"];
+        }
+        else if ([[chosenPreset objectForKey:@"VideoEncoder"] isEqualToString:@"XviD"])
+        {
+            [fVidEncoderPopUp selectItemWithTitle:@"MPEG-4 (XviD)"];
+        }
+        else
+        {
+            [fVidEncoderPopUp selectItemWithTitle:[chosenPreset objectForKey:@"VideoEncoder"]];
+        }
+        
+        /* Lets run through the following functions to get variables set there */
+        [self videoEncoderPopUpChanged:nil];
+        /* Set the state of ipod compatible with Mp4iPodCompatible. Only for x264*/
+        [fDstMp4iPodFileCheck setState:[[chosenPreset objectForKey:@"Mp4iPodCompatible"] intValue]];
+        [self calculateBitrate:nil];
+        
+        /* Video quality */
+        [fVidQualityMatrix selectCellAtRow:[[chosenPreset objectForKey:@"VideoQualityType"] intValue] column:0];
+        
+        [fVidTargetSizeField setStringValue:[chosenPreset objectForKey:@"VideoTargetSize"]];
+        [fVidBitrateField setStringValue:[chosenPreset objectForKey:@"VideoAvgBitrate"]];
+        [fVidQualitySlider setFloatValue:[[chosenPreset objectForKey:@"VideoQualitySlider"] floatValue]];
+        
+        [self videoMatrixChanged:nil];
+        
+        /* Video framerate */
+        /* For video preset video framerate, we want to make sure that Same as source does not conflict with the
+         detected framerate in the fVidRatePopUp so we use index 0*/
+        if ([[chosenPreset objectForKey:@"VideoFramerate"] isEqualToString:@"Same as source"])
+        {
+            [fVidRatePopUp selectItemAtIndex: 0];
+        }
+        else
+        {
+            [fVidRatePopUp selectItemWithTitle:[chosenPreset objectForKey:@"VideoFramerate"]];
+        }
+        
+        /* GrayScale */
+        [fVidGrayscaleCheck setState:[[chosenPreset objectForKey:@"VideoGrayScale"] intValue]];
+        
+        /* 2 Pass Encoding */
+        [fVidTwoPassCheck setState:[[chosenPreset objectForKey:@"VideoTwoPass"] intValue]];
+        [self twoPassCheckboxChanged:nil];
+        /* Turbo 1st pass for 2 Pass Encoding */
+        [fVidTurboPassCheck setState:[[chosenPreset objectForKey:@"VideoTurboTwoPass"] intValue]];
+        
+        /*Audio*/
+        if ([chosenPreset objectForKey:@"FileCodecs"])
+        {
+            /* We need to handle the audio codec popup by determining what was chosen from the deprecated Codecs PopUp for past presets*/
+            if ([[chosenPreset objectForKey:@"FileCodecs"] isEqualToString: @"AVC/H.264 Video / AAC + AC3 Audio"])
+            {
+                /* We need to address setting languages etc. here in the new multi track audio panel */
+                /* Track One set here */
+                /*for track one though a track should be selected but lets check here anyway and use track one if its not.*/
+                if ([fAudLang1PopUp indexOfSelectedItem] == 0)
+                {
+                    [fAudLang1PopUp selectItemAtIndex: 1];
+                    [self audioTrackPopUpChanged: fAudLang1PopUp];
+                }
+                [fAudTrack1CodecPopUp selectItemWithTitle: @"AAC (faac)"];
+                [self audioTrackPopUpChanged: fAudTrack1CodecPopUp];
+                /* Track Two, set source same as track one */
+                [fAudLang2PopUp selectItemAtIndex: [fAudLang1PopUp indexOfSelectedItem]];
+                [self audioTrackPopUpChanged: fAudLang2PopUp];
+                [fAudTrack2CodecPopUp selectItemWithTitle: @"AC3 Passthru"];
+                [self audioTrackPopUpChanged: fAudTrack2CodecPopUp];
+            }
+            else if ([[chosenPreset objectForKey:@"FileCodecs"] isEqualToString:@"MPEG-4 Video / AAC Audio"] ||
+                     [[chosenPreset objectForKey:@"FileCodecs"] isEqualToString:@"AVC/H.264 Video / AAC Audio"])
+            {
+                if ([fAudLang1PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack1CodecPopUp selectItemWithTitle: @"AAC (faac)"];
+                    [self audioTrackPopUpChanged: fAudTrack1CodecPopUp];
+                }
+                if ([fAudLang2PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack2CodecPopUp selectItemWithTitle: @"AAC (faac)"];
+                    [self audioTrackPopUpChanged: fAudTrack2CodecPopUp];
+                }
+                if ([fAudLang3PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack3CodecPopUp selectItemWithTitle: @"AAC (faac)"];
+                    [self audioTrackPopUpChanged: fAudTrack3CodecPopUp];
+                }
+                if ([fAudLang4PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack4CodecPopUp selectItemWithTitle: @"AAC (faac)"];
+                    [self audioTrackPopUpChanged: fAudTrack4CodecPopUp];
+                }
+            }
+            else if ([[chosenPreset objectForKey:@"FileCodecs"] isEqualToString:@"MPEG-4 Video / AC-3 Audio"] ||
+                     [[chosenPreset objectForKey:@"FileCodecs"] isEqualToString:@"AVC/H.264 Video / AC-3 Audio"])
+            {
+                if ([fAudLang1PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack1CodecPopUp selectItemWithTitle: @"AC3 Passthru"];
+                    [self audioTrackPopUpChanged: fAudTrack1CodecPopUp];
+                }
+                if ([fAudLang2PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack2CodecPopUp selectItemWithTitle: @"AC3 Passthru"];
+                    [self audioTrackPopUpChanged: fAudTrack2CodecPopUp];
+                }
+                if ([fAudLang3PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack3CodecPopUp selectItemWithTitle: @"AC3 Passthru"];
+                    [self audioTrackPopUpChanged: fAudTrack3CodecPopUp];
+                }
+                if ([fAudLang4PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack4CodecPopUp selectItemWithTitle: @"AC3 Passthru"];
+                    [self audioTrackPopUpChanged: fAudTrack4CodecPopUp];
+                }
+            }
+            else if ([[chosenPreset objectForKey:@"FileCodecs"] isEqualToString:@"MPEG-4 Video / MP3 Audio"] ||
+                     [[chosenPreset objectForKey:@"FileCodecs"] isEqualToString:@"AVC/H.264 Video / MP3 Audio"])
+            {
+                if ([fAudLang1PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack1CodecPopUp selectItemWithTitle: @"MP3 (lame)"];
+                    [self audioTrackPopUpChanged: fAudTrack1CodecPopUp];
+                }
+                if ([fAudLang2PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack2CodecPopUp selectItemWithTitle: @"MP3 (lame)"];
+                    [self audioTrackPopUpChanged: fAudTrack2CodecPopUp];
+                }
+                if ([fAudLang3PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack3CodecPopUp selectItemWithTitle: @"MP3 (lame)"];
+                    [self audioTrackPopUpChanged: fAudTrack3CodecPopUp];
+                }
+                if ([fAudLang4PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack4CodecPopUp selectItemWithTitle: @"MP3 (lame)"];
+                    [self audioTrackPopUpChanged: fAudTrack4CodecPopUp];
+                }
+            }
+            else if ([[chosenPreset objectForKey:@"FileCodecs"] isEqualToString:@"MPEG-4 Video / Vorbis Audio"])
+            {
+                if ([fAudLang1PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack1CodecPopUp selectItemWithTitle: @"Vorbis (vorbis)"];
+                    [self audioTrackPopUpChanged: fAudTrack1CodecPopUp];
+                }
+                if ([fAudLang2PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack2CodecPopUp selectItemWithTitle: @"Vorbis (vorbis)"];
+                    [self audioTrackPopUpChanged: fAudTrack2CodecPopUp];
+                }
+                if ([fAudLang3PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack3CodecPopUp selectItemWithTitle: @"Vorbis (vorbis)"];
+                    [self audioTrackPopUpChanged: fAudTrack3CodecPopUp];
+                }
+                if ([fAudLang4PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack4CodecPopUp selectItemWithTitle: @"Vorbis (vorbis)"];
+                    [self audioTrackPopUpChanged: fAudTrack4CodecPopUp];
+                }
+            }
+            /* We detect here if we have the old audio sample rate and if so we apply samplerate and bitrate to the existing four tracks if chosen
+             * UNLESS the CodecPopUp is AC3 in which case the preset values are ignored in favor of rates set in audioTrackMixdownChanged*/
+            if ([chosenPreset objectForKey:@"AudioSampleRate"])
+            {
+                if ([fAudLang1PopUp indexOfSelectedItem] > 0 && [fAudTrack1CodecPopUp titleOfSelectedItem] != @"AC3 Passthru")
+                {
+                    [fAudTrack1RatePopUp selectItemWithTitle:[chosenPreset objectForKey:@"AudioSampleRate"]];
+                    [fAudTrack1BitratePopUp selectItemWithTitle:[chosenPreset objectForKey:@"AudioBitRate"]];
+                }
+                if ([fAudLang2PopUp indexOfSelectedItem] > 0 && [fAudTrack2CodecPopUp titleOfSelectedItem] != @"AC3 Passthru")
+                {
+                    [fAudTrack2RatePopUp selectItemWithTitle:[chosenPreset objectForKey:@"AudioSampleRate"]];
+                    [fAudTrack2BitratePopUp selectItemWithTitle:[chosenPreset objectForKey:@"AudioBitRate"]];
+                }
+                if ([fAudLang3PopUp indexOfSelectedItem] > 0 && [fAudTrack3CodecPopUp titleOfSelectedItem] != @"AC3 Passthru")
+                {
+                    [fAudTrack3RatePopUp selectItemWithTitle:[chosenPreset objectForKey:@"AudioSampleRate"]];
+                    [fAudTrack3BitratePopUp selectItemWithTitle:[chosenPreset objectForKey:@"AudioBitRate"]];
+                }
+                if ([fAudLang4PopUp indexOfSelectedItem] > 0 && [fAudTrack4CodecPopUp titleOfSelectedItem] != @"AC3 Passthru")
+                {
+                    [fAudTrack4RatePopUp selectItemWithTitle:[chosenPreset objectForKey:@"AudioSampleRate"]];
+                    [fAudTrack4BitratePopUp selectItemWithTitle:[chosenPreset objectForKey:@"AudioBitRate"]];
+                }
+            }
+            /* We detect here if we have the old DRC Slider and if so we apply it to the existing four tracks if chosen */
+            if ([chosenPreset objectForKey:@"AudioDRCSlider"])
+            {
+                if ([fAudLang1PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack1DrcSlider setFloatValue:[[chosenPreset objectForKey:@"AudioDRCSlider"] floatValue]];
+                    [self audioDRCSliderChanged: fAudTrack1DrcSlider];
+                }
+                if ([fAudLang2PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack2DrcSlider setFloatValue:[[chosenPreset objectForKey:@"AudioDRCSlider"] floatValue]];
+                    [self audioDRCSliderChanged: fAudTrack2DrcSlider];
+                }
+                if ([fAudLang3PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack3DrcSlider setFloatValue:[[chosenPreset objectForKey:@"AudioDRCSlider"] floatValue]];
+                    [self audioDRCSliderChanged: fAudTrack3DrcSlider];
+                }
+                if ([fAudLang4PopUp indexOfSelectedItem] > 0)
+                {
+                    [fAudTrack4DrcSlider setFloatValue:[[chosenPreset objectForKey:@"AudioDRCSlider"] floatValue]];
+                    [self audioDRCSliderChanged: fAudTrack4DrcSlider];
+                }
+            }
+        }
+        else // since there was no codecs key in the preset we know we can use new multi-audio track presets
+        {
+            if ([chosenPreset objectForKey:@"Audio1Track"] > 0)
+            {
+                if ([fAudLang1PopUp indexOfSelectedItem] == 0)
+                {
+                    [fAudLang1PopUp selectItemAtIndex: 1];
+                }
+                [self audioTrackPopUpChanged: fAudLang1PopUp];
+                [fAudTrack1CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio1Encoder"]];
+                [self audioTrackPopUpChanged: fAudTrack1CodecPopUp];
+                [fAudTrack1MixPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio1Mixdown"]];
+                /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default
+                 * mixdown*/
+                if  ([fAudTrack1MixPopUp selectedItem] == nil)
+                {
+                    [self audioTrackPopUpChanged: fAudTrack1CodecPopUp];
+                }
+                [fAudTrack1RatePopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio1Samplerate"]];
+                /* We set the presets bitrate if it is *not* an AC3 track since that uses the input bitrate */
+                if (![[chosenPreset objectForKey:@"Audio1Encoder"] isEqualToString:@"AC3 Passthru"])
+                {
+                    [fAudTrack1BitratePopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio1Bitrate"]];
+                }
+                [fAudTrack1DrcSlider setFloatValue:[[chosenPreset objectForKey:@"Audio1TrackDRCSlider"] floatValue]];
+                [self audioDRCSliderChanged: fAudTrack1DrcSlider];
+            }
+            if ([chosenPreset objectForKey:@"Audio2Track"] > 0)
+            {
+                if ([fAudLang2PopUp indexOfSelectedItem] == 0)
+                {
+                    [fAudLang2PopUp selectItemAtIndex: 1];
+                }
+                [self audioTrackPopUpChanged: fAudLang2PopUp];
+                [fAudTrack2CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio2Encoder"]];
+                [self audioTrackPopUpChanged: fAudTrack2CodecPopUp];
+                [fAudTrack2MixPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio2Mixdown"]];
+                /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default
+                 * mixdown*/
+                if  ([fAudTrack2MixPopUp selectedItem] == nil)
+                {
+                    [self audioTrackPopUpChanged: fAudTrack2CodecPopUp];
+                }
+                [fAudTrack2RatePopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio2Samplerate"]];
+                /* We set the presets bitrate if it is *not* an AC3 track since that uses the input bitrate */
+                if (![[chosenPreset objectForKey:@"Audio2Encoder"] isEqualToString:@"AC3 Passthru"])
+                {
+                    [fAudTrack2BitratePopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio2Bitrate"]];
+                }
+                [fAudTrack2DrcSlider setFloatValue:[[chosenPreset objectForKey:@"Audio2TrackDRCSlider"] floatValue]];
+                [self audioDRCSliderChanged: fAudTrack2DrcSlider];
+            }
+            if ([chosenPreset objectForKey:@"Audio3Track"] > 0)
+            {
+                if ([fAudLang3PopUp indexOfSelectedItem] == 0)
+                {
+                    [fAudLang3PopUp selectItemAtIndex: 1];
+                }
+                [self audioTrackPopUpChanged: fAudLang3PopUp];
+                [fAudTrack3CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio3Encoder"]];
+                [self audioTrackPopUpChanged: fAudTrack3CodecPopUp];
+                [fAudTrack3MixPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio3Mixdown"]];
+                /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default
+                 * mixdown*/
+                if  ([fAudTrack3MixPopUp selectedItem] == nil)
+                {
+                    [self audioTrackPopUpChanged: fAudTrack3CodecPopUp];
+                }
+                [fAudTrack3RatePopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio3Samplerate"]];
+                /* We set the presets bitrate if it is *not* an AC3 track since that uses the input bitrate */
+                if (![[chosenPreset objectForKey:@"Audio3Encoder"] isEqualToString: @"AC3 Passthru"])
+                {
+                    [fAudTrack3BitratePopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio3Bitrate"]];
+                }
+                [fAudTrack3DrcSlider setFloatValue:[[chosenPreset objectForKey:@"Audio3TrackDRCSlider"] floatValue]];
+                [self audioDRCSliderChanged: fAudTrack3DrcSlider];
+            }
+            if ([chosenPreset objectForKey:@"Audio4Track"] > 0)
+            {
+                if ([fAudLang4PopUp indexOfSelectedItem] == 0)
+                {
+                    [fAudLang4PopUp selectItemAtIndex: 1];
+                }
+                [self audioTrackPopUpChanged: fAudLang4PopUp];
+                [fAudTrack4CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio4Encoder"]];
+                [self audioTrackPopUpChanged: fAudTrack4CodecPopUp];
+                [fAudTrack4MixPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio4Mixdown"]];
+                /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default
+                 * mixdown*/
+                if  ([fAudTrack4MixPopUp selectedItem] == nil)
+                {
+                    [self audioTrackPopUpChanged: fAudTrack4CodecPopUp];
+                }
+                [fAudTrack4RatePopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio4Samplerate"]];
+                /* We set the presets bitrate if it is *not* an AC3 track since that uses the input bitrate */
+                if (![[chosenPreset objectForKey:@"Audio4Encoder"] isEqualToString:@"AC3 Passthru"])
+                {
+                    [fAudTrack4BitratePopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio4Bitrate"]];
+                }
+                [fAudTrack4DrcSlider setFloatValue:[[chosenPreset objectForKey:@"Audio4TrackDRCSlider"] floatValue]];
+                [self audioDRCSliderChanged: fAudTrack4DrcSlider];
+            }
+            
+            
+        }
+        
+        /* We now cleanup any extra audio tracks that may be previously set if we need to, we do it here so we don't have to
+         * duplicate any code for legacy presets.*/
+        /* First we handle the legacy Codecs crazy AVC/H.264 Video / AAC + AC3 Audio atv hybrid */
+        if ([chosenPreset objectForKey:@"FileCodecs"] && [[chosenPreset objectForKey:@"FileCodecs"] isEqualToString:@"AVC/H.264 Video / AAC + AC3 Audio"])
+        {
+            [fAudLang3PopUp selectItemAtIndex: 0];
+            [self audioTrackPopUpChanged: fAudLang3PopUp];
+            [fAudLang4PopUp selectItemAtIndex: 0];
+            [self audioTrackPopUpChanged: fAudLang4PopUp];
+        }
+        else
+        {
+            if (![chosenPreset objectForKey:@"Audio2Track"] || [chosenPreset objectForKey:@"Audio2Track"] == 0)
+            {
+                [fAudLang2PopUp selectItemAtIndex: 0];
+                [self audioTrackPopUpChanged: fAudLang2PopUp];
+            }
+            if (![chosenPreset objectForKey:@"Audio3Track"] || [chosenPreset objectForKey:@"Audio3Track"] > 0)
+            {
+                [fAudLang3PopUp selectItemAtIndex: 0];
+                [self audioTrackPopUpChanged: fAudLang3PopUp];
+            }
+            if (![chosenPreset objectForKey:@"Audio4Track"] || [chosenPreset objectForKey:@"Audio4Track"] > 0)
+            {
+                [fAudLang4PopUp selectItemAtIndex: 0];
+                [self audioTrackPopUpChanged: fAudLang4PopUp];
+            }
+        }
+        
+        /*Subtitles*/
+        [fSubPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Subtitles"]];
+        /* Forced Subtitles */
+        [fSubForcedCheck setState:[[chosenPreset objectForKey:@"SubtitlesForced"] intValue]];
+        
+        /* Picture Settings */
+        /* Note: objectForKey:@"UsesPictureSettings" now refers to picture size, this encompasses:
+         * height, width, keep ar, anamorphic and crop settings.
+         * picture filters are now handled separately.
+         * We will be able to actually change the key names for legacy preset keys when preset file
+         * update code is done. But for now, lets hang onto the old legacy key name for backwards compatibility.
+         */
+        /* Check to see if the objectForKey:@"UsesPictureSettings is greater than 0, as 0 means use picture sizing "None" 
+         * and the preset completely ignores any picture sizing values in the preset.
+         */
+        if ([[chosenPreset objectForKey:@"UsesPictureSettings"]  intValue] > 0)
+        {
+            hb_job_t * job = fTitle->job;
+            
+            /* If Cropping is set to custom, then recall all four crop values from
+                 when the preset was created and apply them */
+                if ([[chosenPreset objectForKey:@"PictureAutoCrop"]  intValue] == 0)
+                {
+                    [fPictureController setAutoCrop:NO];
+                    
+                    /* Here we use the custom crop values saved at the time the preset was saved */
+                    job->crop[0] = [[chosenPreset objectForKey:@"PictureTopCrop"]  intValue];
+                    job->crop[1] = [[chosenPreset objectForKey:@"PictureBottomCrop"]  intValue];
+                    job->crop[2] = [[chosenPreset objectForKey:@"PictureLeftCrop"]  intValue];
+                    job->crop[3] = [[chosenPreset objectForKey:@"PictureRightCrop"]  intValue];
+                    
+                }
+                else /* if auto crop has been saved in preset, set to auto and use post scan auto crop */
+                {
+                    [fPictureController setAutoCrop:YES];
+                    /* Here we use the auto crop values determined right after scan */
+                    job->crop[0] = AutoCropTop;
+                    job->crop[1] = AutoCropBottom;
+                    job->crop[2] = AutoCropLeft;
+                    job->crop[3] = AutoCropRight;
+                    
+                }
+
+            
+            /* Check to see if the objectForKey:@"UsesPictureSettings is 2 which is "Use Max for the source */
+            if ([[chosenPreset objectForKey:@"UsesPictureSettings"]  intValue] == 2 || [[chosenPreset objectForKey:@"UsesMaxPictureSettings"]  intValue] == 1)
+            {
+                /* Use Max Picture settings for whatever the dvd is.*/
+                [self revertPictureSizeToMax:nil];
+                job->keep_ratio = [[chosenPreset objectForKey:@"PictureKeepRatio"]  intValue];
+                if (job->keep_ratio == 1)
+                {
+                    hb_fix_aspect( job, HB_KEEP_WIDTH );
+                    if( job->height > fTitle->height )
+                    {
+                        job->height = fTitle->height;
+                        hb_fix_aspect( job, HB_KEEP_HEIGHT );
+                    }
+                }
+                job->pixel_ratio = [[chosenPreset objectForKey:@"PicturePAR"]  intValue];
+            }
+            else // /* If not 0 or 2 we assume objectForKey:@"UsesPictureSettings is 1 which is "Use picture sizing from when the preset was set" */
+            {
+                /* we check to make sure the presets width/height does not exceed the sources width/height */
+                if (fTitle->width < [[chosenPreset objectForKey:@"PictureWidth"]  intValue] || fTitle->height < [[chosenPreset objectForKey:@"PictureHeight"]  intValue])
+                {
+                    /* if so, then we use the sources height and width to avoid scaling up */
+                    job->width = fTitle->width;
+                    job->height = fTitle->height;
+                }
+                else // source width/height is >= the preset height/width
+                {
+                    /* we can go ahead and use the presets values for height and width */
+                    job->width = [[chosenPreset objectForKey:@"PictureWidth"]  intValue];
+                    job->height = [[chosenPreset objectForKey:@"PictureHeight"]  intValue];
+                }
+                job->keep_ratio = [[chosenPreset objectForKey:@"PictureKeepRatio"]  intValue];
+                if (job->keep_ratio == 1)
+                {
+                    hb_fix_aspect( job, HB_KEEP_WIDTH );
+                    if( job->height > fTitle->height )
+                    {
+                        job->height = fTitle->height;
+                        hb_fix_aspect( job, HB_KEEP_HEIGHT );
+                    }
+                }
+                job->pixel_ratio = [[chosenPreset objectForKey:@"PicturePAR"]  intValue];
+                
+                
+                                /* If the preset has no objectForKey:@"UsesPictureFilters", then we know it is a legacy preset
+                 * and handle the filters here as before.
+                 * NOTE: This should be removed when the update presets code is done as we can be assured that legacy
+                 * presets are updated to work properly with new keys.
+                 */
+                if (![chosenPreset objectForKey:@"UsesPictureFilters"])
+                {
+                    /* Filters */
+                    /* Deinterlace */
+                    if ([chosenPreset objectForKey:@"PictureDeinterlace"])
+                    {
+                        /* We check to see if the preset used the past fourth "Slowest" deinterlaceing and set that to "Slower
+                         * since we no longer have a fourth "Slowest" deinterlacing due to the mcdeint bug */
+                        if ([[chosenPreset objectForKey:@"PictureDeinterlace"] intValue] == 4)
+                        {
+                            [fPictureController setDeinterlace:3];
+                        }
+                        else
+                        {
+                            
+                            [fPictureController setDeinterlace:[[chosenPreset objectForKey:@"PictureDeinterlace"] intValue]];
+                        }
+                    }
+                    else
+                    {
+                        [fPictureController setDeinterlace:0];
+                    }
+                    /* VFR */
+                    if ([[chosenPreset objectForKey:@"VFR"] intValue] == 1)
+                    {
+                        // We make sure that framerate is set to Same as source variable
+                        // detelecine will take care of itself right below
+                        //[fPictureController setVFR:[[chosenPreset objectForKey:@"VFR"] intValue]];
+                    }
+                    
+                    /* Detelecine */
+                    if ([[chosenPreset objectForKey:@"PictureDetelecine"] intValue] == 1)
+                    {
+                        [fPictureController setDetelecine:[[chosenPreset objectForKey:@"PictureDetelecine"] intValue]];
+                    }
+                    else
+                    {
+                        [fPictureController setDetelecine:0];
+                    }
+                    /* Denoise */
+                    if ([chosenPreset objectForKey:@"PictureDenoise"])
+                    {
+                        [fPictureController setDenoise:[[chosenPreset objectForKey:@"PictureDenoise"] intValue]];
+                    }
+                    else
+                    {
+                        [fPictureController setDenoise:0];
+                    }   
+                    /* Deblock */
+                    if ([[chosenPreset objectForKey:@"PictureDeblock"] intValue] == 1)
+                    {
+                        /* since we used to use 1 to turn on deblock, we now use a 5 in our sliding scale */
+                        [fPictureController setDeblock:5];
+                    }
+                    else
+                    {
+                        [fPictureController setDeblock:0];
+                        
+                    }
+                    
+                    [self calculatePictureSizing:nil];
+                }
+                
+            }
+            
+            
+        }
+        /* If the preset has an objectForKey:@"UsesPictureFilters", then we know it is a newer style filters preset
+         * and handle the filters here depending on whether or not the preset specifies applying the filter.
+         */
+        if ([chosenPreset objectForKey:@"UsesPictureFilters"] && [[chosenPreset objectForKey:@"UsesPictureFilters"]  intValue] > 0)
+        {
+            /* Filters */
+            /* Deinterlace */
+            if ([chosenPreset objectForKey:@"PictureDeinterlace"])
+            {
+                /* We check to see if the preset used the past fourth "Slowest" deinterlaceing and set that to "Slower
+                 * since we no longer have a fourth "Slowest" deinterlacing due to the mcdeint bug */
+                if ([[chosenPreset objectForKey:@"PictureDeinterlace"] intValue] == 4)
+                {
+                    [fPictureController setDeinterlace:3];
+                }
+                else
+                {
+                    [fPictureController setDeinterlace:[[chosenPreset objectForKey:@"PictureDeinterlace"] intValue]];
+                }
+            }
+            else
+            {
+                [fPictureController setDeinterlace:0];
+            }
+            
+            /* Detelecine */
+            if ([[chosenPreset objectForKey:@"PictureDetelecine"] intValue] == 1)
+            {
+                [fPictureController setDetelecine:[[chosenPreset objectForKey:@"PictureDetelecine"] intValue]];
+            }
+            else
+            {
+                [fPictureController setDetelecine:0];
+            }
+            /* Denoise */
+            if ([chosenPreset objectForKey:@"PictureDenoise"])
+            {
+                [fPictureController setDenoise:[[chosenPreset objectForKey:@"PictureDenoise"] intValue]];
+            }
+            else
+            {
+                [fPictureController setDenoise:0];
+            }   
+            /* Deblock */
+            if ([[chosenPreset objectForKey:@"PictureDeblock"] intValue] == 1)
+            {
+                /* if its a one, then its the old on/off deblock, set on to 5*/
+                [fPictureController setDeblock:5];
+            }
+            else
+            {
+                /* use the settings intValue */
+                [fPictureController setDeblock:[[chosenPreset objectForKey:@"PictureDeblock"] intValue]];
+            }
+            /* Decomb */
+            /* Even though we currently allow for a custom setting for decomb, ultimately it will only have Off and
+             * Default so we just pay attention to anything greater than 0 as 1 (Default). 0 is Off. */
+            if ([[chosenPreset objectForKey:@"PictureDecomb"] intValue] > 0)
+            {
+                [fPictureController setDecomb:1];
+            }
+            else
+            {
+                [fPictureController setDecomb:0];
+            }
+        }
+        [self calculatePictureSizing:nil];
+    }
+}
+
+
+#pragma mark -
+#pragma mark Manage Presets
+
+- (void) loadPresets {
+       /* We declare the default NSFileManager into fileManager */
+       NSFileManager * fileManager = [NSFileManager defaultManager];
+       /*We define the location of the user presets file */
+    UserPresetsFile = @"~/Library/Application Support/HandBrake/UserPresets.plist";
+       UserPresetsFile = [[UserPresetsFile stringByExpandingTildeInPath]retain];
+    /* We check for the presets.plist */
+       if ([fileManager fileExistsAtPath:UserPresetsFile] == 0)
+       {
+               [fileManager createFileAtPath:UserPresetsFile contents:nil attributes:nil];
+       }
+
+       UserPresets = [[NSMutableArray alloc] initWithContentsOfFile:UserPresetsFile];
+       if (nil == UserPresets)
+       {
+               UserPresets = [[NSMutableArray alloc] init];
+               [self addFactoryPresets:nil];
+       }
+       [fPresetsOutlineView reloadData];
+}
+
+
+- (IBAction) showAddPresetPanel: (id) sender
+{
+    /* Deselect the currently selected Preset if there is one*/
+    [fPresetsOutlineView deselectRow:[fPresetsOutlineView selectedRow]];
+
+    /* Populate the preset picture settings popup here */
+    [fPresetNewPicSettingsPopUp removeAllItems];
+    [fPresetNewPicSettingsPopUp addItemWithTitle:@"None"];
+    [fPresetNewPicSettingsPopUp addItemWithTitle:@"Current"];
+    [fPresetNewPicSettingsPopUp addItemWithTitle:@"Source Maximum (post source scan)"];
+    [fPresetNewPicSettingsPopUp selectItemAtIndex: 0]; 
+    /* Uncheck the preset use filters checkbox */
+    [fPresetNewPicFiltersCheck setState:NSOffState];
+    // fPresetNewFolderCheck
+    [fPresetNewFolderCheck setState:NSOffState];
+    /* Erase info from the input fields*/
+       [fPresetNewName setStringValue: @""];
+       [fPresetNewDesc setStringValue: @""];
+       /* Show the panel */
+       [NSApp beginSheet:fAddPresetPanel modalForWindow:fWindow modalDelegate:nil didEndSelector:NULL contextInfo:NULL];
+}
+
+- (IBAction) closeAddPresetPanel: (id) sender
+{
+    [NSApp endSheet: fAddPresetPanel];
+    [fAddPresetPanel orderOut: self];
+}
+
+- (IBAction)addUserPreset:(id)sender
+{
+    if (![[fPresetNewName stringValue] length])
+            NSRunAlertPanel(@"Warning!", @"You need to insert a name for the preset.", @"OK", nil , nil);
+    else
+    {
+        /* Here we create a custom user preset */
+        [UserPresets addObject:[self createPreset]];
+        [self addPreset];
+
+        [self closeAddPresetPanel:nil];
+    }
+}
+- (void)addPreset
+{
+
+       
+       /* We Reload the New Table data for presets */
+    [fPresetsOutlineView reloadData];
+   /* We save all of the preset data here */
+    [self savePreset];
+}
+
+- (void)sortPresets
+{
+
+       
+       /* We Sort the Presets By Factory or Custom */
+       NSSortDescriptor * presetTypeDescriptor=[[[NSSortDescriptor alloc] initWithKey:@"Type" 
+                                                    ascending:YES] autorelease];
+       /* We Sort the Presets Alphabetically by name  We do not use this now as we have drag and drop*/
+       /*
+    NSSortDescriptor * presetNameDescriptor=[[[NSSortDescriptor alloc] initWithKey:@"PresetName" 
+                                                    ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease];
+       //NSArray *sortDescriptors=[NSArray arrayWithObjects:presetTypeDescriptor,presetNameDescriptor,nil];
+    
+    */
+    /* Since we can drag and drop our custom presets, lets just sort by type and not name */
+    NSArray *sortDescriptors=[NSArray arrayWithObjects:presetTypeDescriptor,nil];
+       NSArray *sortedArray=[UserPresets sortedArrayUsingDescriptors:sortDescriptors];
+       [UserPresets setArray:sortedArray];
+       
+
+}
+
+- (IBAction)insertPreset:(id)sender
+{
+    int index = [fPresetsOutlineView selectedRow];
+    [UserPresets insertObject:[self createPreset] atIndex:index];
+    [fPresetsOutlineView reloadData];
+    [self savePreset];
+}
+
+- (NSDictionary *)createPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+       /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:[fPresetNewName stringValue] forKey:@"PresetName"];
+    /* Set whether or not this is to be a folder fPresetNewFolderCheck*/
+    [preset setObject:[NSNumber numberWithBool:[fPresetNewFolderCheck state]] forKey:@"Folder"];
+       /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+       [preset setObject:[NSNumber numberWithInt:1] forKey:@"Type"];
+       /*Set whether or not this is default, at creation set to 0*/
+       [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+    if ([fPresetNewFolderCheck state] == YES)
+    {
+        /* initialize and set an empty array for children here since we are a new folder */
+        NSMutableArray *childrenArray = [[NSMutableArray alloc] init];
+        [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
+        [childrenArray autorelease];
+    }
+    else // we are not creating a preset folder, so we go ahead with the rest of the preset info
+    {
+        /*Get the whether or not to apply pic Size and Cropping (includes Anamorphic)*/
+        [preset setObject:[NSNumber numberWithInt:[fPresetNewPicSettingsPopUp indexOfSelectedItem]] forKey:@"UsesPictureSettings"];
+        /* Get whether or not to use the current Picture Filter settings for the preset */
+        [preset setObject:[NSNumber numberWithInt:[fPresetNewPicFiltersCheck state]] forKey:@"UsesPictureFilters"];
+        
+        /* Get New Preset Description from the field in the AddPresetPanel*/
+        [preset setObject:[fPresetNewDesc stringValue] forKey:@"PresetDescription"];
+        /* File Format */
+        [preset setObject:[fDstFormatPopUp titleOfSelectedItem] forKey:@"FileFormat"];
+        /* Chapter Markers fCreateChapterMarkers*/
+        [preset setObject:[NSNumber numberWithInt:[fCreateChapterMarkers state]] forKey:@"ChapterMarkers"];
+        /* Allow Mpeg4 64 bit formatting +4GB file sizes */
+        [preset setObject:[NSNumber numberWithInt:[fDstMp4LargeFileCheck state]] forKey:@"Mp4LargeFile"];
+        /* Mux mp4 with http optimization */
+        [preset setObject:[NSNumber numberWithInt:[fDstMp4HttpOptFileCheck state]] forKey:@"Mp4HttpOptimize"];
+        /* Add iPod uuid atom */
+        [preset setObject:[NSNumber numberWithInt:[fDstMp4iPodFileCheck state]] forKey:@"Mp4iPodCompatible"];
+        
+        /* Codecs */
+        /* Video encoder */
+        [preset setObject:[fVidEncoderPopUp titleOfSelectedItem] forKey:@"VideoEncoder"];
+        /* x264 Option String */
+        [preset setObject:[fAdvancedOptions optionsString] forKey:@"x264Option"];
+        
+        [preset setObject:[NSNumber numberWithInt:[fVidQualityMatrix selectedRow]] forKey:@"VideoQualityType"];
+        [preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
+        [preset setObject:[fVidBitrateField stringValue] forKey:@"VideoAvgBitrate"];
+        [preset setObject:[NSNumber numberWithFloat:[fVidQualitySlider floatValue]] forKey:@"VideoQualitySlider"];
+        
+        /* Video framerate */
+        if ([fVidRatePopUp indexOfSelectedItem] == 0) // Same as source is selected
+        {
+            [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+        }
+        else // we can record the actual titleOfSelectedItem
+        {
+            [preset setObject:[fVidRatePopUp titleOfSelectedItem] forKey:@"VideoFramerate"];
+        }
+        /* GrayScale */
+        [preset setObject:[NSNumber numberWithInt:[fVidGrayscaleCheck state]] forKey:@"VideoGrayScale"];
+        /* 2 Pass Encoding */
+        [preset setObject:[NSNumber numberWithInt:[fVidTwoPassCheck state]] forKey:@"VideoTwoPass"];
+        /* Turbo 2 pass Encoding fVidTurboPassCheck*/
+        [preset setObject:[NSNumber numberWithInt:[fVidTurboPassCheck state]] forKey:@"VideoTurboTwoPass"];
+        /*Picture Settings*/
+        hb_job_t * job = fTitle->job;
+        /* Picture Sizing */
+        /* Use Max Picture settings for whatever the dvd is.*/
+        [preset setObject:[NSNumber numberWithInt:0] forKey:@"UsesMaxPictureSettings"];
+        [preset setObject:[NSNumber numberWithInt:fTitle->job->width] forKey:@"PictureWidth"];
+        [preset setObject:[NSNumber numberWithInt:fTitle->job->height] forKey:@"PictureHeight"];
+        [preset setObject:[NSNumber numberWithInt:fTitle->job->keep_ratio] forKey:@"PictureKeepRatio"];
+        [preset setObject:[NSNumber numberWithInt:fTitle->job->pixel_ratio] forKey:@"PicturePAR"];
+        
+        /* Set crop settings here */
+        [preset setObject:[NSNumber numberWithInt:[fPictureController autoCrop]] forKey:@"PictureAutoCrop"];
+        [preset setObject:[NSNumber numberWithInt:job->crop[0]] forKey:@"PictureTopCrop"];
+        [preset setObject:[NSNumber numberWithInt:job->crop[1]] forKey:@"PictureBottomCrop"];
+        [preset setObject:[NSNumber numberWithInt:job->crop[2]] forKey:@"PictureLeftCrop"];
+        [preset setObject:[NSNumber numberWithInt:job->crop[3]] forKey:@"PictureRightCrop"];
+        
+        /* Picture Filters */
+        [preset setObject:[NSNumber numberWithInt:[fPictureController deinterlace]] forKey:@"PictureDeinterlace"];
+        [preset setObject:[NSNumber numberWithInt:[fPictureController detelecine]] forKey:@"PictureDetelecine"];
+        //[preset setObject:[NSNumber numberWithInt:[fPictureController vfr]] forKey:@"VFR"];
+        [preset setObject:[NSNumber numberWithInt:[fPictureController denoise]] forKey:@"PictureDenoise"];
+        [preset setObject:[NSNumber numberWithInt:[fPictureController deblock]] forKey:@"PictureDeblock"]; 
+        [preset setObject:[NSNumber numberWithInt:[fPictureController decomb]] forKey:@"PictureDecomb"];
+        
+        
+        /*Audio*/
+        if ([fAudLang1PopUp indexOfSelectedItem] > 0)
+        {
+            [preset setObject:[NSNumber numberWithInt:[fAudLang1PopUp indexOfSelectedItem]] forKey:@"Audio1Track"];
+            [preset setObject:[fAudLang1PopUp titleOfSelectedItem] forKey:@"Audio1TrackDescription"];
+            [preset setObject:[fAudTrack1CodecPopUp titleOfSelectedItem] forKey:@"Audio1Encoder"];
+            [preset setObject:[fAudTrack1MixPopUp titleOfSelectedItem] forKey:@"Audio1Mixdown"];
+            [preset setObject:[fAudTrack1RatePopUp titleOfSelectedItem] forKey:@"Audio1Samplerate"];
+            [preset setObject:[fAudTrack1BitratePopUp titleOfSelectedItem] forKey:@"Audio1Bitrate"];
+            [preset setObject:[NSNumber numberWithFloat:[fAudTrack1DrcSlider floatValue]] forKey:@"Audio1TrackDRCSlider"];
+        }
+        if ([fAudLang2PopUp indexOfSelectedItem] > 0)
+        {
+            [preset setObject:[NSNumber numberWithInt:[fAudLang2PopUp indexOfSelectedItem]] forKey:@"Audio2Track"];
+            [preset setObject:[fAudLang2PopUp titleOfSelectedItem] forKey:@"Audio2TrackDescription"];
+            [preset setObject:[fAudTrack2CodecPopUp titleOfSelectedItem] forKey:@"Audio2Encoder"];
+            [preset setObject:[fAudTrack2MixPopUp titleOfSelectedItem] forKey:@"Audio2Mixdown"];
+            [preset setObject:[fAudTrack2RatePopUp titleOfSelectedItem] forKey:@"Audio2Samplerate"];
+            [preset setObject:[fAudTrack2BitratePopUp titleOfSelectedItem] forKey:@"Audio2Bitrate"];
+            [preset setObject:[NSNumber numberWithFloat:[fAudTrack2DrcSlider floatValue]] forKey:@"Audio2TrackDRCSlider"];
+        }
+        if ([fAudLang3PopUp indexOfSelectedItem] > 0)
+        {
+            [preset setObject:[NSNumber numberWithInt:[fAudLang3PopUp indexOfSelectedItem]] forKey:@"Audio3Track"];
+            [preset setObject:[fAudLang3PopUp titleOfSelectedItem] forKey:@"Audio3TrackDescription"];
+            [preset setObject:[fAudTrack3CodecPopUp titleOfSelectedItem] forKey:@"Audio3Encoder"];
+            [preset setObject:[fAudTrack3MixPopUp titleOfSelectedItem] forKey:@"Audio3Mixdown"];
+            [preset setObject:[fAudTrack3RatePopUp titleOfSelectedItem] forKey:@"Audio3Samplerate"];
+            [preset setObject:[fAudTrack3BitratePopUp titleOfSelectedItem] forKey:@"Audio3Bitrate"];
+            [preset setObject:[NSNumber numberWithFloat:[fAudTrack3DrcSlider floatValue]] forKey:@"Audio3TrackDRCSlider"];
+        }
+        if ([fAudLang4PopUp indexOfSelectedItem] > 0)
+        {
+            [preset setObject:[NSNumber numberWithInt:[fAudLang4PopUp indexOfSelectedItem]] forKey:@"Audio4Track"];
+            [preset setObject:[fAudLang4PopUp titleOfSelectedItem] forKey:@"Audio4TrackDescription"];
+            [preset setObject:[fAudTrack4CodecPopUp titleOfSelectedItem] forKey:@"Audio4Encoder"];
+            [preset setObject:[fAudTrack4MixPopUp titleOfSelectedItem] forKey:@"Audio4Mixdown"];
+            [preset setObject:[fAudTrack4RatePopUp titleOfSelectedItem] forKey:@"Audio4Samplerate"];
+            [preset setObject:[fAudTrack4BitratePopUp titleOfSelectedItem] forKey:@"Audio4Bitrate"];
+            [preset setObject:[NSNumber numberWithFloat:[fAudTrack4DrcSlider floatValue]] forKey:@"Audio4TrackDRCSlider"];
+        }
+        
+        /* Subtitles*/
+        [preset setObject:[fSubPopUp titleOfSelectedItem] forKey:@"Subtitles"];
+        /* Forced Subtitles */
+        [preset setObject:[NSNumber numberWithInt:[fSubForcedCheck state]] forKey:@"SubtitlesForced"];
+    }
+    [preset autorelease];
+    return preset;
+    
+}
+
+- (void)savePreset
+{
+    [UserPresets writeToFile:UserPresetsFile atomically:YES];
+       /* We get the default preset in case it changed */
+       [self getDefaultPresets:nil];
+
+}
+
+- (IBAction)deletePreset:(id)sender
+{
+    
+    
+    if ( [fPresetsOutlineView numberOfSelectedRows] == 0 )
+    {
+        return;
+    }
+    /* Alert user before deleting preset */
+       int status;
+    status = NSRunAlertPanel(@"Warning!", @"Are you sure that you want to delete the selected preset?", @"OK", @"Cancel", nil);
+    
+    if ( status == NSAlertDefaultReturn ) 
+    {
+        int presetToModLevel = [fPresetsOutlineView levelForItem: [fPresetsOutlineView itemAtRow:[fPresetsOutlineView selectedRow]]];
+        NSDictionary *presetToMod = [fPresetsOutlineView itemAtRow:[fPresetsOutlineView selectedRow]];
+        NSDictionary *presetToModParent = [fPresetsOutlineView parentForItem: presetToMod];
+        
+        NSEnumerator *enumerator;
+        NSMutableArray *presetsArrayToMod;
+        NSMutableArray *tempArray;
+        id tempObject;
+        /* If we are a root level preset, we are modding the UserPresets array */
+        if (presetToModLevel == 0)
+        {
+            presetsArrayToMod = UserPresets;
+        }
+        else // We have a parent preset, so we modify the chidren array object for key
+        {
+            presetsArrayToMod = [presetToModParent objectForKey:@"ChildrenArray"]; 
+        }
+        
+        enumerator = [presetsArrayToMod objectEnumerator];
+        tempArray = [NSMutableArray array];
+        
+        while (tempObject = [enumerator nextObject]) 
+        {
+            NSDictionary *thisPresetDict = tempObject;
+            if (thisPresetDict == presetToMod)
+            {
+                [tempArray addObject:tempObject];
+            }
+        }
+        
+        [presetsArrayToMod removeObjectsInArray:tempArray];
+        [fPresetsOutlineView reloadData];
+        [self savePreset];   
+    }
+}
+
+#pragma mark -
+#pragma mark Manage Default Preset
+
+- (IBAction)getDefaultPresets:(id)sender
+{
+       presetHbDefault = nil;
+    presetUserDefault = nil;
+    presetUserDefaultParent = nil;
+    presetUserDefaultParentParent = nil;
+    NSMutableDictionary *presetHbDefaultParent = nil;
+    NSMutableDictionary *presetHbDefaultParentParent = nil;
+    
+    int i = 0;
+    BOOL userDefaultFound = NO;
+    presetCurrentBuiltInCount = 0;
+    /* First we iterate through the root UserPresets array to check for defaults */
+    NSEnumerator *enumerator = [UserPresets objectEnumerator];
+       id tempObject;
+       while (tempObject = [enumerator nextObject])
+       {
+               NSMutableDictionary *thisPresetDict = tempObject;
+               if ([[thisPresetDict objectForKey:@"Default"] intValue] == 1) // 1 is HB default
+               {
+                       presetHbDefault = thisPresetDict;       
+               }
+               if ([[thisPresetDict objectForKey:@"Default"] intValue] == 2) // 2 is User specified default
+               {
+                       presetUserDefault = thisPresetDict;
+            userDefaultFound = YES;
+        }
+        if ([[thisPresetDict objectForKey:@"Type"] intValue] == 0) // Type 0 is a built in preset              
+        {
+                       presetCurrentBuiltInCount++; // <--increment the current number of built in presets     
+               }
+               i++;
+        
+        /* if we run into a folder, go to level 1 and iterate through the children arrays for the default */
+        if ([thisPresetDict objectForKey:@"ChildrenArray"])
+        {
+            NSMutableDictionary *thisPresetDictParent = thisPresetDict;
+            NSEnumerator *enumerator = [[thisPresetDict objectForKey:@"ChildrenArray"] objectEnumerator];
+            id tempObject;
+            while (tempObject = [enumerator nextObject])
+            {
+                NSMutableDictionary *thisPresetDict = tempObject;
+                if ([[thisPresetDict objectForKey:@"Default"] intValue] == 1) // 1 is HB default
+                {
+                    presetHbDefault = thisPresetDict;
+                    presetHbDefaultParent = thisPresetDictParent;
+                }
+                if ([[thisPresetDict objectForKey:@"Default"] intValue] == 2) // 2 is User specified default
+                {
+                    presetUserDefault = thisPresetDict;
+                    presetUserDefaultParent = thisPresetDictParent;
+                    userDefaultFound = YES;
+                }
+                
+                /* if we run into a folder, go to level 2 and iterate through the children arrays for the default */
+                if ([thisPresetDict objectForKey:@"ChildrenArray"])
+                {
+                    NSMutableDictionary *thisPresetDictParentParent = thisPresetDict;
+                    NSEnumerator *enumerator = [[thisPresetDict objectForKey:@"ChildrenArray"] objectEnumerator];
+                    id tempObject;
+                    while (tempObject = [enumerator nextObject])
+                    {
+                        NSMutableDictionary *thisPresetDict = tempObject;
+                        if ([[thisPresetDict objectForKey:@"Default"] intValue] == 1) // 1 is HB default
+                        {
+                            presetHbDefault = thisPresetDict;
+                            presetHbDefaultParent = thisPresetDictParent;
+                            presetHbDefaultParentParent = thisPresetDictParentParent;  
+                        }
+                        if ([[thisPresetDict objectForKey:@"Default"] intValue] == 2) // 2 is User specified default
+                        {
+                            presetUserDefault = thisPresetDict;
+                            presetUserDefaultParent = thisPresetDictParent;
+                            presetUserDefaultParentParent = thisPresetDictParentParent;
+                            userDefaultFound = YES;    
+                        }
+                        
+                    }
+                }
+            }
+        }
+        
+       }
+    /* check to see if a user specified preset was found, if not then assign the parents for
+     * the presetHbDefault so that we can open the parents for the nested presets
+     */
+    if (userDefaultFound == NO)
+    {
+        presetUserDefaultParent = presetHbDefaultParent;
+        presetUserDefaultParentParent = presetHbDefaultParentParent;
+    }
+}
+
+- (IBAction)setDefaultPreset:(id)sender
+{
+/* We need to determine if the item is a folder */
+   if ([[[fPresetsOutlineView itemAtRow:[fPresetsOutlineView selectedRow]] objectForKey:@"Folder"] intValue] == 1)
+   {
+   return;
+   }
+
+    int i = 0;
+    NSEnumerator *enumerator = [UserPresets objectEnumerator];
+       id tempObject;
+       /* First make sure the old user specified default preset is removed */
+    while (tempObject = [enumerator nextObject])
+       {
+               NSMutableDictionary *thisPresetDict = tempObject;
+               if ([[tempObject objectForKey:@"Default"] intValue] != 1) // if not the default HB Preset, set to 0
+               {
+                       [[UserPresets objectAtIndex:i] setObject:[NSNumber numberWithInt:0] forKey:@"Default"]; 
+               }
+               
+               /* if we run into a folder, go to level 1 and iterate through the children arrays for the default */
+        if ([thisPresetDict objectForKey:@"ChildrenArray"])
+        {
+            NSEnumerator *enumerator = [[thisPresetDict objectForKey:@"ChildrenArray"] objectEnumerator];
+            id tempObject;
+            int ii = 0;
+            while (tempObject = [enumerator nextObject])
+            {
+                NSMutableDictionary *thisPresetDict1 = tempObject;
+                if ([[tempObject objectForKey:@"Default"] intValue] != 1) // if not the default HB Preset, set to 0
+                {
+                    [[[thisPresetDict objectForKey:@"ChildrenArray"] objectAtIndex:ii] setObject:[NSNumber numberWithInt:0] forKey:@"Default"];        
+                }
+                /* if we run into a folder, go to level 2 and iterate through the children arrays for the default */
+                if ([thisPresetDict1 objectForKey:@"ChildrenArray"])
+                {
+                    NSEnumerator *enumerator = [[thisPresetDict1 objectForKey:@"ChildrenArray"] objectEnumerator];
+                    id tempObject;
+                    int iii = 0;
+                    while (tempObject = [enumerator nextObject])
+                    {
+                        if ([[tempObject objectForKey:@"Default"] intValue] != 1) // if not the default HB Preset, set to 0
+                        {
+                            [[[thisPresetDict1 objectForKey:@"ChildrenArray"] objectAtIndex:iii] setObject:[NSNumber numberWithInt:0] forKey:@"Default"];      
+                        }
+                        iii++;
+                    }
+                }
+                ii++;
+            }
+            
+        }
+        i++; 
+       }
+    
+    
+    int presetToModLevel = [fPresetsOutlineView levelForItem: [fPresetsOutlineView itemAtRow:[fPresetsOutlineView selectedRow]]];
+    NSDictionary *presetToMod = [fPresetsOutlineView itemAtRow:[fPresetsOutlineView selectedRow]];
+    NSDictionary *presetToModParent = [fPresetsOutlineView parentForItem: presetToMod];
+    
+    
+    NSMutableArray *presetsArrayToMod;
+    NSMutableArray *tempArray;
+    
+    /* If we are a root level preset, we are modding the UserPresets array */
+    if (presetToModLevel == 0)
+    {
+        presetsArrayToMod = UserPresets;
+    }
+    else // We have a parent preset, so we modify the chidren array object for key
+    {
+        presetsArrayToMod = [presetToModParent objectForKey:@"ChildrenArray"]; 
+    }
+    
+    enumerator = [presetsArrayToMod objectEnumerator];
+    tempArray = [NSMutableArray array];
+    int iiii = 0;
+    while (tempObject = [enumerator nextObject]) 
+    {
+        NSDictionary *thisPresetDict = tempObject;
+        if (thisPresetDict == presetToMod)
+        {
+            if ([[tempObject objectForKey:@"Default"] intValue] != 1) // if not the default HB Preset, set to 2
+            {
+                [[presetsArrayToMod objectAtIndex:iiii] setObject:[NSNumber numberWithInt:2] forKey:@"Default"];       
+            }
+        }
+     iiii++;
+     }
+    
+    
+    /* We save all of the preset data here */
+    [self savePreset];
+    /* We Reload the New Table data for presets */
+    [fPresetsOutlineView reloadData];
+}
+
+- (IBAction)selectDefaultPreset:(id)sender
+{
+       NSMutableDictionary *presetToMod;
+    /* if there is a user specified default, we use it */
+       if (presetUserDefault)
+       {
+        presetToMod = presetUserDefault;
+    }
+       else if (presetHbDefault) //else we use the built in default presetHbDefault
+       {
+        presetToMod = presetHbDefault;
+       }
+    else
+    {
+    return;
+    }
+    
+    if (presetUserDefaultParent != nil)
+    {
+        [fPresetsOutlineView expandItem:presetUserDefaultParent];
+        
+    }
+    if (presetUserDefaultParentParent != nil)
+    {
+        [fPresetsOutlineView expandItem:presetUserDefaultParentParent];
+        
+    }
+    
+    [fPresetsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:[fPresetsOutlineView rowForItem: presetToMod]] byExtendingSelection:NO];
+       [self selectPreset:nil];
+}
+
+
+#pragma mark -
+#pragma mark Manage Built In Presets
+
+
+- (IBAction)deleteFactoryPresets:(id)sender
+{
+    //int status;
+    NSEnumerator *enumerator = [UserPresets objectEnumerator];
+       id tempObject;
+    
+       //NSNumber *index;
+    NSMutableArray *tempArray;
+
+
+        tempArray = [NSMutableArray array];
+        /* we look here to see if the preset is we move on to the next one */
+        while ( tempObject = [enumerator nextObject] )  
+               {
+                       /* if the preset is "Factory" then we put it in the array of
+                       presets to delete */
+                       if ([[tempObject objectForKey:@"Type"] intValue] == 0)
+                       {
+                               [tempArray addObject:tempObject];
+                       }
+        }
+        
+        [UserPresets removeObjectsInArray:tempArray];
+        [fPresetsOutlineView reloadData];
+        [self savePreset];   
+
+}
+
+   /* We use this method to recreate new, updated factory
+   presets */
+- (IBAction)addFactoryPresets:(id)sender
+{
+   
+   /* First, we delete any existing built in presets */
+    [self deleteFactoryPresets: sender];
+    /* Then we generate new built in presets programmatically with fPresetsBuiltin
+    * which is all setup in HBPresets.h and  HBPresets.m*/
+    [fPresetsBuiltin generateBuiltinPresets:UserPresets];
+    [self sortPresets];
+    [self addPreset];
+    
+}
+
+
+
+
+
+@end
+
+/*******************************
+ * Subclass of the HBPresetsOutlineView *
+ *******************************/
+
+@implementation HBPresetsOutlineView
+- (NSImage *)dragImageForRowsWithIndexes:(NSIndexSet *)dragRows tableColumns:(NSArray *)tableColumns event:(NSEvent*)dragEvent offset:(NSPointPointer)dragImageOffset
+{
+    fIsDragging = YES;
+
+    // By default, NSTableView only drags an image of the first column. Change this to
+    // drag an image of the queue's icon and PresetName columns.
+    NSArray * cols = [NSArray arrayWithObjects: [self tableColumnWithIdentifier:@"PresetName"], nil];
+    return [super dragImageForRowsWithIndexes:dragRows tableColumns:cols event:dragEvent offset:dragImageOffset];
+}
+
+
+
+- (void) mouseDown:(NSEvent *)theEvent
+{
+    [super mouseDown:theEvent];
+       fIsDragging = NO;
+}
+
+
+
+- (BOOL) isDragging;
+{
+    return fIsDragging;
+}
+@end
+
+
+
diff --git a/macosx/English.lproj/AdvancedView.xib b/macosx/English.lproj/AdvancedView.xib
new file mode 100644 (file)
index 0000000..ac8ca58
--- /dev/null
@@ -0,0 +1,3721 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+       <data>
+               <int key="IBDocument.SystemTarget">1050</int>
+               <string key="IBDocument.SystemVersion">9F33</string>
+               <string key="IBDocument.InterfaceBuilderVersion">658</string>
+               <string key="IBDocument.AppKitVersion">949.34</string>
+               <string key="IBDocument.HIToolboxVersion">352.00</string>
+               <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+               </object>
+               <object class="NSArray" key="IBDocument.PluginDependencies">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+               </object>
+               <object class="NSMutableArray" key="IBDocument.RootObjects" id="658768339">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <object class="NSCustomObject" id="674763238">
+                               <string key="NSClassName">HBAdvancedController</string>
+                       </object>
+                       <object class="NSCustomObject" id="670200792">
+                               <string key="NSClassName">FirstResponder</string>
+                       </object>
+                       <object class="NSCustomObject" id="620160606">
+                               <string key="NSClassName">NSApplication</string>
+                       </object>
+                       <object class="NSCustomView" id="738514360">
+                               <nil key="NSNextResponder"/>
+                               <int key="NSvFlags">256</int>
+                               <object class="NSMutableArray" key="NSSubviews">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSPopUpButton" id="502806021">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{150, 264}, {84, 15}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="928228060">
+                                                       <int key="NSCellFlags">-2076049856</int>
+                                                       <int key="NSCellFlags2">264192</int>
+                                                       <object class="NSFont" key="NSSupport" id="22">
+                                                               <string key="NSName">LucidaGrande</string>
+                                                               <double key="NSSize">9.000000e+00</double>
+                                                               <int key="NSfFlags">3614</int>
+                                                       </object>
+                                                       <reference key="NSControlView" ref="502806021"/>
+                                                       <int key="NSButtonFlags">109199615</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <reference key="NSAlternateImage" ref="22"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                               <characters key="NS.bytes"/>
+                                                       </object>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="675281532">
+                                                               <reference key="NSMenu" ref="302593572"/>
+                                                               <string key="NSTitle">Item1</string>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <object class="NSCustomResource" key="NSOnImage" id="98535564">
+                                                                       <string key="NSClassName">NSImage</string>
+                                                                       <string key="NSResourceName">NSMenuCheckmark</string>
+                                                               </object>
+                                                               <object class="NSCustomResource" key="NSMixedImage" id="993852628">
+                                                                       <string key="NSClassName">NSImage</string>
+                                                                       <string key="NSResourceName">NSMenuMixedState</string>
+                                                               </object>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="928228060"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="302593572">
+                                                               <object class="NSMutableString" key="NSTitle">
+                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <reference ref="675281532"/>
+                                                                       <object class="NSMenuItem" id="381221882">
+                                                                               <reference key="NSMenu" ref="302593572"/>
+                                                                               <string key="NSTitle">Item2</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="928228060"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="473757651">
+                                                                               <reference key="NSMenu" ref="302593572"/>
+                                                                               <string key="NSTitle">Item3</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="928228060"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSPreferredEdge">3</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">1</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="496835891">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{20, 265}, {128, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="621289166">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71434240</int>
+                                                       <string key="NSContents">Reference Frames:</string>
+                                                       <object class="NSFont" key="NSSupport" id="826935898">
+                                                               <string key="NSName">LucidaGrande</string>
+                                                               <double key="NSSize">1.000000e+01</double>
+                                                               <int key="NSfFlags">2843</int>
+                                                       </object>
+                                                       <reference key="NSControlView" ref="496835891"/>
+                                                       <object class="NSColor" key="NSBackgroundColor" id="1006136775">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName">System</string>
+                                                               <string key="NSColorName">controlColor</string>
+                                                               <object class="NSColor" key="NSColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <object class="NSColor" key="NSTextColor" id="555417541">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName">System</string>
+                                                               <string key="NSColorName">controlTextColor</string>
+                                                               <object class="NSColor" key="NSColor" id="534207422">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MAA</bytes>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="444018704">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{20, 214}, {128, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="660394934">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71303168</int>
+                                                       <string key="NSContents">B-Frames:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="444018704"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSPopUpButton" id="463613064">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{150, 213}, {84, 15}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="67902101">
+                                                       <int key="NSCellFlags">-2076049856</int>
+                                                       <int key="NSCellFlags2">264704</int>
+                                                       <reference key="NSSupport" ref="22"/>
+                                                       <reference key="NSControlView" ref="463613064"/>
+                                                       <int key="NSButtonFlags">109199615</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <reference key="NSAlternateImage" ref="22"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                               <characters key="NS.bytes"/>
+                                                       </object>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="817763274">
+                                                               <reference key="NSMenu" ref="735303444"/>
+                                                               <string key="NSTitle">Item1</string>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="67902101"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="735303444">
+                                                               <object class="NSMutableString" key="NSTitle">
+                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <reference ref="817763274"/>
+                                                                       <object class="NSMenuItem" id="604338719">
+                                                                               <reference key="NSMenu" ref="735303444"/>
+                                                                               <string key="NSTitle">Item2</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="67902101"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="704690128">
+                                                                               <reference key="NSMenu" ref="735303444"/>
+                                                                               <string key="NSTitle">Item3</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="67902101"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSPreferredEdge">3</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">1</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSPopUpButton" id="1012635724">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{407, 222}, {83, 15}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="597433555">
+                                                       <int key="NSCellFlags">-2076049856</int>
+                                                       <int key="NSCellFlags2">264192</int>
+                                                       <reference key="NSSupport" ref="22"/>
+                                                       <reference key="NSControlView" ref="1012635724"/>
+                                                       <int key="NSButtonFlags">109199615</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <reference key="NSAlternateImage" ref="22"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                               <characters key="NS.bytes"/>
+                                                       </object>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="138849732">
+                                                               <reference key="NSMenu" ref="418397244"/>
+                                                               <string key="NSTitle">Item1</string>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="597433555"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="418397244">
+                                                               <object class="NSMutableString" key="NSTitle">
+                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <reference ref="138849732"/>
+                                                                       <object class="NSMenuItem" id="87174157">
+                                                                               <reference key="NSMenu" ref="418397244"/>
+                                                                               <string key="NSTitle">Item2</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="597433555"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="193116813">
+                                                                               <reference key="NSMenu" ref="418397244"/>
+                                                                               <string key="NSTitle">Item3</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="597433555"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSPreferredEdge">3</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">1</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="34095372">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{263, 142}, {142, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="368733355">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71303168</int>
+                                                       <string key="NSContents">Trellis:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="34095372"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="677509567">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{429, 121}, {96, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="652898624">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71303168</int>
+                                                       <string key="NSContents">No DCT-Decimate:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="677509567"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="570675882">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{263, 121}, {142, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="622431002">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71303168</int>
+                                                       <string key="NSContents">No Fast-P-Skip:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="570675882"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSBox" id="945084535">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{23, 233}, {210, 5}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <string key="NSOffsets">{0, 0}</string>
+                                               <object class="NSTextFieldCell" key="NSTitleCell">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents">Box</string>
+                                                       <object class="NSFont" key="NSSupport" id="1073480903">
+                                                               <string key="NSName">LucidaGrande</string>
+                                                               <double key="NSSize">1.300000e+01</double>
+                                                               <int key="NSfFlags">1044</int>
+                                                       </object>
+                                                       <object class="NSColor" key="NSBackgroundColor" id="431629906">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName">System</string>
+                                                               <string key="NSColorName">textBackgroundColor</string>
+                                                               <object class="NSColor" key="NSColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MQA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <object class="NSColor" key="NSTextColor">
+                                                               <int key="NSColorSpace">3</int>
+                                                               <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                       </object>
+                                               </object>
+                                               <int key="NSBorderType">3</int>
+                                               <int key="NSBoxType">2</int>
+                                               <int key="NSTitlePosition">0</int>
+                                               <bool key="NSTransparent">NO</bool>
+                                       </object>
+                                       <object class="NSBox" id="126101945">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{263, 212}, {278, 5}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <string key="NSOffsets">{0, 0}</string>
+                                               <object class="NSTextFieldCell" key="NSTitleCell">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents">Box</string>
+                                                       <reference key="NSSupport" ref="1073480903"/>
+                                                       <reference key="NSBackgroundColor" ref="431629906"/>
+                                                       <object class="NSColor" key="NSTextColor">
+                                                               <int key="NSColorSpace">3</int>
+                                                               <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                       </object>
+                                               </object>
+                                               <int key="NSBorderType">3</int>
+                                               <int key="NSBoxType">2</int>
+                                               <int key="NSTitlePosition">0</int>
+                                               <bool key="NSTransparent">NO</bool>
+                                       </object>
+                                       <object class="NSTextField" id="862092551">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{20, 20}, {660, 44}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="456227852">
+                                                       <int key="NSCellFlags">-1805517311</int>
+                                                       <int key="NSCellFlags2">272760832</int>
+                                                       <string key="NSContents"/>
+                                                       <object class="NSFont" key="NSSupport" id="26">
+                                                               <string key="NSName">LucidaGrande</string>
+                                                               <double key="NSSize">1.100000e+01</double>
+                                                               <int key="NSfFlags">3100</int>
+                                                       </object>
+                                                       <reference key="NSControlView" ref="862092551"/>
+                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                       <reference key="NSBackgroundColor" ref="431629906"/>
+                                                       <object class="NSColor" key="NSTextColor">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName">System</string>
+                                                               <string key="NSColorName">textColor</string>
+                                                               <reference key="NSColor" ref="534207422"/>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="286114143">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{20, 244}, {128, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="19206206">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71303168</int>
+                                                       <string key="NSContents">Mixed References:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="286114143"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSPopUpButton" id="463632258">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{407, 264}, {135, 15}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="1015322159">
+                                                       <int key="NSCellFlags">-2076049856</int>
+                                                       <int key="NSCellFlags2">264704</int>
+                                                       <reference key="NSSupport" ref="22"/>
+                                                       <reference key="NSControlView" ref="463632258"/>
+                                                       <int key="NSButtonFlags">109199615</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <reference key="NSAlternateImage" ref="22"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                               <characters key="NS.bytes"/>
+                                                       </object>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="355405826">
+                                                               <reference key="NSMenu" ref="4652010"/>
+                                                               <string key="NSTitle">Item1</string>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="1015322159"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="4652010">
+                                                               <object class="NSMutableString" key="NSTitle">
+                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <reference ref="355405826"/>
+                                                                       <object class="NSMenuItem" id="623541927">
+                                                                               <reference key="NSMenu" ref="4652010"/>
+                                                                               <string key="NSTitle">Item2</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="1015322159"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="716695777">
+                                                                               <reference key="NSMenu" ref="4652010"/>
+                                                                               <string key="NSTitle">Item3</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="1015322159"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSPreferredEdge">3</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">1</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="501486901">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{263, 265}, {142, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="523579964">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71303168</int>
+                                                       <string key="NSContents">Motion Estimation Method:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="501486901"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="9309938">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{263, 244}, {142, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="625397549">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71434240</int>
+                                                       <string key="NSContents">Motion Estimation Range:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="9309938"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSPopUpButton" id="108597901">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{407, 243}, {83, 15}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="1015445713">
+                                                       <int key="NSCellFlags">-2076049856</int>
+                                                       <int key="NSCellFlags2">264704</int>
+                                                       <reference key="NSSupport" ref="22"/>
+                                                       <reference key="NSControlView" ref="108597901"/>
+                                                       <int key="NSButtonFlags">109199615</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <reference key="NSAlternateImage" ref="22"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                               <characters key="NS.bytes"/>
+                                                       </object>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="664014443">
+                                                               <reference key="NSMenu" ref="945504605"/>
+                                                               <string key="NSTitle">Item1</string>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="1015445713"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="945504605">
+                                                               <object class="NSMutableString" key="NSTitle">
+                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <reference ref="664014443"/>
+                                                                       <object class="NSMenuItem" id="42097014">
+                                                                               <reference key="NSMenu" ref="945504605"/>
+                                                                               <string key="NSTitle">Item2</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="1015445713"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="712570706">
+                                                                               <reference key="NSMenu" ref="945504605"/>
+                                                                               <string key="NSTitle">Item3</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="1015445713"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSPreferredEdge">3</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">1</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="335373847">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{263, 223}, {142, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="492298910">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71434240</int>
+                                                       <string key="NSContents">Subpixel Motion Estimation:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="335373847"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="677007332">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{20, 172}, {128, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="288316749">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71303168</int>
+                                                       <string key="NSContents">Weighted B-Frames:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="677007332"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="34260806">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{20, 151}, {128, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="124098371">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71434240</int>
+                                                       <string key="NSContents">Pyramidal B-Frames:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="34260806"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="751714853">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{20, 193}, {128, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="651032081">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71303168</int>
+                                                       <string key="NSContents">Direct Prediction:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="751714853"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSPopUpButton" id="1028233887">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{150, 192}, {84, 15}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="96368274">
+                                                       <int key="NSCellFlags">-2076049856</int>
+                                                       <int key="NSCellFlags2">264704</int>
+                                                       <reference key="NSSupport" ref="22"/>
+                                                       <reference key="NSControlView" ref="1028233887"/>
+                                                       <int key="NSButtonFlags">109199615</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <reference key="NSAlternateImage" ref="22"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                               <characters key="NS.bytes"/>
+                                                       </object>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="551923619">
+                                                               <reference key="NSMenu" ref="359920682"/>
+                                                               <string key="NSTitle">Item1</string>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="96368274"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="359920682">
+                                                               <object class="NSMutableString" key="NSTitle">
+                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <reference ref="551923619"/>
+                                                                       <object class="NSMenuItem" id="1005011526">
+                                                                               <reference key="NSMenu" ref="359920682"/>
+                                                                               <string key="NSTitle">Item2</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="96368274"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="836668078">
+                                                                               <reference key="NSMenu" ref="359920682"/>
+                                                                               <string key="NSTitle">Item3</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="96368274"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSPreferredEdge">3</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">1</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="498769415">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{20, 67}, {231, 14}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="492969921">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">272629760</int>
+                                                       <string key="NSContents">Current x264 Advanced Option String:</string>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSControlView" ref="498769415"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSPopUpButton" id="130462646">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{407, 162}, {63, 15}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="1069442299">
+                                                       <int key="NSCellFlags">-2076049856</int>
+                                                       <int key="NSCellFlags2">263680</int>
+                                                       <reference key="NSSupport" ref="22"/>
+                                                       <reference key="NSControlView" ref="130462646"/>
+                                                       <int key="NSButtonFlags">109199615</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <reference key="NSAlternateImage" ref="22"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                               <characters key="NS.bytes"/>
+                                                       </object>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="259498980">
+                                                               <reference key="NSMenu" ref="155689363"/>
+                                                               <string key="NSTitle">Item1</string>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="1069442299"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="155689363">
+                                                               <object class="NSMutableString" key="NSTitle">
+                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <reference ref="259498980"/>
+                                                                       <object class="NSMenuItem" id="736037090">
+                                                                               <reference key="NSMenu" ref="155689363"/>
+                                                                               <string key="NSTitle">Item2</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="1069442299"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="354770588">
+                                                                               <reference key="NSMenu" ref="155689363"/>
+                                                                               <string key="NSTitle">Item3</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="1069442299"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSPreferredEdge">3</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">1</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSPopUpButton" id="497968468">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{479, 162}, {63, 15}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="691127886">
+                                                       <int key="NSCellFlags">-2076049856</int>
+                                                       <int key="NSCellFlags2">263680</int>
+                                                       <reference key="NSSupport" ref="22"/>
+                                                       <reference key="NSControlView" ref="497968468"/>
+                                                       <int key="NSButtonFlags">109199615</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <reference key="NSAlternateImage" ref="22"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                               <characters key="NS.bytes"/>
+                                                       </object>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="286317196">
+                                                               <reference key="NSMenu" ref="1069179379"/>
+                                                               <string key="NSTitle">Item1</string>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="691127886"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="1069179379">
+                                                               <object class="NSMutableString" key="NSTitle">
+                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <reference ref="286317196"/>
+                                                                       <object class="NSMenuItem" id="847739510">
+                                                                               <reference key="NSMenu" ref="1069179379"/>
+                                                                               <string key="NSTitle">Item2</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="691127886"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="413956336">
+                                                                               <reference key="NSMenu" ref="1069179379"/>
+                                                                               <string key="NSTitle">Item3</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="691127886"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSPreferredEdge">3</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">1</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="529644976">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{263, 163}, {142, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="343844477">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71303168</int>
+                                                       <string key="NSContents">Deblocking:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="529644976"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="977241029">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{148, 243}, {22, 16}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="656145587">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">131072</int>
+                                                       <string key="NSContents"/>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSControlView" ref="977241029"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <object class="NSButtonImageSource" key="NSAlternateImage" id="534293989">
+                                                               <string key="NSImageName">NSSwitch</string>
+                                                       </object>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="749948454">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{148, 171}, {22, 16}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="98290860">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">131072</int>
+                                                       <string key="NSContents"/>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSControlView" ref="749948454"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="534293989"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="1035779890">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{148, 150}, {22, 16}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="773053098">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">131072</int>
+                                                       <string key="NSContents"/>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSControlView" ref="1035779890"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="534293989"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="928128304">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{405, 120}, {22, 16}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="1016156756">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">131072</int>
+                                                       <string key="NSContents"/>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSControlView" ref="928128304"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="534293989"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="140207359">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{525, 120}, {22, 16}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="401971973">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">131072</int>
+                                                       <string key="NSContents"/>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSControlView" ref="140207359"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="534293989"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSPopUpButton" id="907540673">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{407, 141}, {83, 15}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="804220802">
+                                                       <int key="NSCellFlags">-2076049856</int>
+                                                       <int key="NSCellFlags2">264192</int>
+                                                       <reference key="NSSupport" ref="22"/>
+                                                       <reference key="NSControlView" ref="907540673"/>
+                                                       <int key="NSButtonFlags">109199615</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <reference key="NSAlternateImage" ref="22"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                               <characters key="NS.bytes"/>
+                                                       </object>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="169170697">
+                                                               <reference key="NSMenu" ref="869830194"/>
+                                                               <string key="NSTitle">Item1</string>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="804220802"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="869830194">
+                                                               <object class="NSMutableString" key="NSTitle">
+                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <reference ref="169170697"/>
+                                                                       <object class="NSMenuItem" id="1070100923">
+                                                                               <reference key="NSMenu" ref="869830194"/>
+                                                                               <string key="NSTitle">Item2</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="804220802"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="6137744">
+                                                                               <reference key="NSMenu" ref="869830194"/>
+                                                                               <string key="NSTitle">Item3</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="804220802"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSPreferredEdge">3</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">1</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSBox" id="523657812">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{263, 182}, {278, 5}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <string key="NSOffsets">{0, 0}</string>
+                                               <object class="NSTextFieldCell" key="NSTitleCell">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents">Box</string>
+                                                       <reference key="NSSupport" ref="1073480903"/>
+                                                       <reference key="NSBackgroundColor" ref="431629906"/>
+                                                       <object class="NSColor" key="NSTextColor">
+                                                               <int key="NSColorSpace">3</int>
+                                                               <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                       </object>
+                                               </object>
+                                               <int key="NSBorderType">3</int>
+                                               <int key="NSBoxType">2</int>
+                                               <int key="NSTitlePosition">0</int>
+                                               <bool key="NSTransparent">NO</bool>
+                                       </object>
+                                       <object class="NSPopUpButton" id="473093704">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{407, 192}, {63, 15}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="572444645">
+                                                       <int key="NSCellFlags">-2076049856</int>
+                                                       <int key="NSCellFlags2">264704</int>
+                                                       <reference key="NSSupport" ref="22"/>
+                                                       <reference key="NSControlView" ref="473093704"/>
+                                                       <int key="NSButtonFlags">109199615</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <reference key="NSAlternateImage" ref="22"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                               <characters key="NS.bytes"/>
+                                                       </object>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="894119487">
+                                                               <reference key="NSMenu" ref="838480608"/>
+                                                               <string key="NSTitle">Item1</string>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="572444645"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="838480608">
+                                                               <object class="NSMutableString" key="NSTitle">
+                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <reference ref="894119487"/>
+                                                                       <object class="NSMenuItem" id="946029370">
+                                                                               <reference key="NSMenu" ref="838480608"/>
+                                                                               <string key="NSTitle">Item2</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="572444645"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="19515960">
+                                                                               <reference key="NSMenu" ref="838480608"/>
+                                                                               <string key="NSTitle">Item3</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="98535564"/>
+                                                                               <reference key="NSMixedImage" ref="993852628"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="572444645"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSPreferredEdge">3</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">1</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="516451639">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{263, 193}, {142, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="562573539">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71434240</int>
+                                                       <string key="NSContents">Analysis:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="516451639"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="526934709">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{525, 192}, {22, 16}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="273314683">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">131072</int>
+                                                       <string key="NSContents"/>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSControlView" ref="526934709"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="534293989"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="180296347">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{475, 193}, {50, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="495611013">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71434240</int>
+                                                       <string key="NSContents">8x8 DCT:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="180296347"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="612818913">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{525, 99}, {22, 16}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="12489527">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">131072</int>
+                                                       <string key="NSContents"/>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSControlView" ref="612818913"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="534293989"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="5114506">
+                                               <reference key="NSNextResponder" ref="738514360"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{263, 100}, {262, 13}}</string>
+                                               <reference key="NSSuperview" ref="738514360"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="894602850">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">71565312</int>
+                                                       <string key="NSContents">CABAC Entropy Coding:</string>
+                                                       <reference key="NSSupport" ref="826935898"/>
+                                                       <reference key="NSControlView" ref="5114506"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSFrameSize">{700, 290}</string>
+                               <string key="NSClassName">NSView</string>
+                               <string key="NSExtension">NSResponder</string>
+                       </object>
+                       <object class="NSCustomView" id="679064762">
+                               <nil key="NSNextResponder"/>
+                               <int key="NSvFlags">256</int>
+                               <object class="NSMutableArray" key="NSSubviews">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSTextField" id="743280560">
+                                               <reference key="NSNextResponder" ref="679064762"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{20, 206}, {660, 14}}</string>
+                                               <reference key="NSSuperview" ref="679064762"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="82262124">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">138412032</int>
+                                                       <string key="NSContents">Small System Font Text</string>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSControlView" ref="743280560"/>
+                                                       <reference key="NSBackgroundColor" ref="1006136775"/>
+                                                       <reference key="NSTextColor" ref="555417541"/>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSFrameSize">{700, 290}</string>
+                               <object class="NSMutableString" key="NSClassName">
+                                       <characters key="NS.bytes">NSView</characters>
+                               </object>
+                               <string key="NSExtension">NSResponder</string>
+                       </object>
+               </object>
+               <object class="IBObjectContainer" key="IBDocument.Objects">
+                       <object class="NSMutableArray" key="connectionRecords">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDisplayX264Options</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="862092551"/>
+                                       </object>
+                                       <int key="connectionID">191</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDisplayX264OptionsLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="498769415"/>
+                                       </object>
+                                       <int key="connectionID">192</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsSet:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="862092551"/>
+                                       </object>
+                                       <int key="connectionID">193</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optView</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="738514360"/>
+                                       </object>
+                                       <int key="connectionID">194</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264opt8x8dctSwitch</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="526934709"/>
+                                       </object>
+                                       <int key="connectionID">195</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264opt8x8dctLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="180296347"/>
+                                       </object>
+                                       <int key="connectionID">196</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optAlphaDeblockPopUp</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="130462646"/>
+                                       </object>
+                                       <int key="connectionID">197</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optBetaDeblockPopUp</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="497968468"/>
+                                       </object>
+                                       <int key="connectionID">198</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optAnalyseLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="516451639"/>
+                                       </object>
+                                       <int key="connectionID">199</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optAnalysePopUp</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="473093704"/>
+                                       </object>
+                                       <int key="connectionID">200</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optBframesPopUp</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="463613064"/>
+                                       </object>
+                                       <int key="connectionID">201</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optBframesLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="444018704"/>
+                                       </object>
+                                       <int key="connectionID">202</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optBPyramidSwitch</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="1035779890"/>
+                                       </object>
+                                       <int key="connectionID">205</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optBPyramidLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="34260806"/>
+                                       </object>
+                                       <int key="connectionID">206</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optCabacSwitch</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="612818913"/>
+                                       </object>
+                                       <int key="connectionID">209</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optCabacLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="5114506"/>
+                                       </object>
+                                       <int key="connectionID">210</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optDeblockLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="529644976"/>
+                                       </object>
+                                       <int key="connectionID">211</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optDirectPredPopUp</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="1028233887"/>
+                                       </object>
+                                       <int key="connectionID">212</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optDirectPredLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="751714853"/>
+                                       </object>
+                                       <int key="connectionID">213</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optMixedRefsSwitch</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="977241029"/>
+                                       </object>
+                                       <int key="connectionID">216</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optMixedRefsLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="286114143"/>
+                                       </object>
+                                       <int key="connectionID">217</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optMERangePopUp</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="108597901"/>
+                                       </object>
+                                       <int key="connectionID">218</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optMERangeLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="9309938"/>
+                                       </object>
+                                       <int key="connectionID">219</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optMotionEstPopUp</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="463632258"/>
+                                       </object>
+                                       <int key="connectionID">220</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optMotionEstLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="501486901"/>
+                                       </object>
+                                       <int key="connectionID">221</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optNfpskipLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="570675882"/>
+                                       </object>
+                                       <int key="connectionID">222</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optNfpskipSwitch</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="928128304"/>
+                                       </object>
+                                       <int key="connectionID">223</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optNodctdcmtLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="677509567"/>
+                                       </object>
+                                       <int key="connectionID">224</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optNodctdcmtSwitch</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="140207359"/>
+                                       </object>
+                                       <int key="connectionID">225</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optRefPopUp</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="502806021"/>
+                                       </object>
+                                       <int key="connectionID">226</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optRefLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="496835891"/>
+                                       </object>
+                                       <int key="connectionID">227</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optSubmePopUp</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="1012635724"/>
+                                       </object>
+                                       <int key="connectionID">228</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optSubmeLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="335373847"/>
+                                       </object>
+                                       <int key="connectionID">229</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optTrellisPopUp</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="907540673"/>
+                                       </object>
+                                       <int key="connectionID">230</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optTrellisLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="34095372"/>
+                                       </object>
+                                       <int key="connectionID">231</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optWeightBSwitch</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="749948454"/>
+                                       </object>
+                                       <int key="connectionID">232</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optWeightBLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="677007332"/>
+                                       </object>
+                                       <int key="connectionID">234</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="502806021"/>
+                                       </object>
+                                       <int key="connectionID">235</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="977241029"/>
+                                       </object>
+                                       <int key="connectionID">236</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="463613064"/>
+                                       </object>
+                                       <int key="connectionID">237</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="1028233887"/>
+                                       </object>
+                                       <int key="connectionID">238</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="749948454"/>
+                                       </object>
+                                       <int key="connectionID">239</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="1035779890"/>
+                                       </object>
+                                       <int key="connectionID">242</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="463632258"/>
+                                       </object>
+                                       <int key="connectionID">243</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="108597901"/>
+                                       </object>
+                                       <int key="connectionID">244</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="1012635724"/>
+                                       </object>
+                                       <int key="connectionID">245</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="473093704"/>
+                                       </object>
+                                       <int key="connectionID">246</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="526934709"/>
+                                       </object>
+                                       <int key="connectionID">247</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="130462646"/>
+                                       </object>
+                                       <int key="connectionID">248</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="497968468"/>
+                                       </object>
+                                       <int key="connectionID">249</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="907540673"/>
+                                       </object>
+                                       <int key="connectionID">250</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="928128304"/>
+                                       </object>
+                                       <int key="connectionID">251</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="140207359"/>
+                                       </object>
+                                       <int key="connectionID">252</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">X264AdvancedOptionsChanged:</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="612818913"/>
+                                       </object>
+                                       <int key="connectionID">253</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fEmptyView</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="679064762"/>
+                                       </object>
+                                       <int key="connectionID">256</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fX264optViewTitleLabel</string>
+                                               <reference key="source" ref="674763238"/>
+                                               <reference key="destination" ref="743280560"/>
+                                       </object>
+                                       <int key="connectionID">257</int>
+                               </object>
+                       </object>
+                       <object class="IBMutableOrderedSet" key="objectRecords">
+                               <object class="NSArray" key="orderedObjects">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">0</int>
+                                               <object class="NSArray" key="object" id="181588572">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <reference key="children" ref="658768339"/>
+                                               <nil key="parent"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-2</int>
+                                               <reference key="object" ref="674763238"/>
+                                               <reference key="parent" ref="181588572"/>
+                                               <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-1</int>
+                                               <reference key="object" ref="670200792"/>
+                                               <reference key="parent" ref="181588572"/>
+                                               <string key="objectName">First Responder</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-3</int>
+                                               <reference key="object" ref="620160606"/>
+                                               <reference key="parent" ref="181588572"/>
+                                               <string key="objectName">Application</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5</int>
+                                               <reference key="object" ref="738514360"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="502806021"/>
+                                                       <reference ref="496835891"/>
+                                                       <reference ref="444018704"/>
+                                                       <reference ref="463613064"/>
+                                                       <reference ref="1012635724"/>
+                                                       <reference ref="34095372"/>
+                                                       <reference ref="677509567"/>
+                                                       <reference ref="570675882"/>
+                                                       <reference ref="945084535"/>
+                                                       <reference ref="126101945"/>
+                                                       <reference ref="862092551"/>
+                                                       <reference ref="286114143"/>
+                                                       <reference ref="463632258"/>
+                                                       <reference ref="501486901"/>
+                                                       <reference ref="9309938"/>
+                                                       <reference ref="108597901"/>
+                                                       <reference ref="335373847"/>
+                                                       <reference ref="677007332"/>
+                                                       <reference ref="751714853"/>
+                                                       <reference ref="1028233887"/>
+                                                       <reference ref="498769415"/>
+                                                       <reference ref="130462646"/>
+                                                       <reference ref="497968468"/>
+                                                       <reference ref="529644976"/>
+                                                       <reference ref="977241029"/>
+                                                       <reference ref="749948454"/>
+                                                       <reference ref="928128304"/>
+                                                       <reference ref="140207359"/>
+                                                       <reference ref="907540673"/>
+                                                       <reference ref="523657812"/>
+                                                       <reference ref="473093704"/>
+                                                       <reference ref="516451639"/>
+                                                       <reference ref="526934709"/>
+                                                       <reference ref="180296347"/>
+                                                       <reference ref="612818913"/>
+                                                       <reference ref="5114506"/>
+                                                       <reference ref="34260806"/>
+                                                       <reference ref="1035779890"/>
+                                               </object>
+                                               <reference key="parent" ref="181588572"/>
+                                               <string key="objectName">x264</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">6</int>
+                                               <reference key="object" ref="502806021"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="928228060"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">11</int>
+                                               <reference key="object" ref="496835891"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="621289166"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">12</int>
+                                               <reference key="object" ref="444018704"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="660394934"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">13</int>
+                                               <reference key="object" ref="463613064"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="67902101"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">18</int>
+                                               <reference key="object" ref="1012635724"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="597433555"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">23</int>
+                                               <reference key="object" ref="34095372"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="368733355"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">24</int>
+                                               <reference key="object" ref="677509567"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="652898624"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">25</int>
+                                               <reference key="object" ref="570675882"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="622431002"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">26</int>
+                                               <reference key="object" ref="945084535"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSView" id="223117836">
+                                                               <nil key="NSNextResponder"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <string key="NSFrame">{{2, 2}, {125, 1}}</string>
+                                                       </object>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">27</int>
+                                               <reference key="object" ref="223117836"/>
+                                               <reference key="parent" ref="945084535"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">28</int>
+                                               <reference key="object" ref="126101945"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSView" id="793102985">
+                                                               <nil key="NSNextResponder"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <string key="NSFrame">{{2, 2}, {125, 1}}</string>
+                                                       </object>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">29</int>
+                                               <reference key="object" ref="793102985"/>
+                                               <reference key="parent" ref="126101945"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">30</int>
+                                               <reference key="object" ref="862092551"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="456227852"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">31</int>
+                                               <reference key="object" ref="286114143"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="19206206"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">32</int>
+                                               <reference key="object" ref="463632258"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1015322159"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">37</int>
+                                               <reference key="object" ref="501486901"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="523579964"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">38</int>
+                                               <reference key="object" ref="9309938"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="625397549"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">39</int>
+                                               <reference key="object" ref="108597901"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1015445713"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">44</int>
+                                               <reference key="object" ref="335373847"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="492298910"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">45</int>
+                                               <reference key="object" ref="677007332"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="288316749"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">46</int>
+                                               <reference key="object" ref="34260806"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="124098371"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">49</int>
+                                               <reference key="object" ref="751714853"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="651032081"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">50</int>
+                                               <reference key="object" ref="1028233887"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="96368274"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">55</int>
+                                               <reference key="object" ref="498769415"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="492969921"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">56</int>
+                                               <reference key="object" ref="130462646"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1069442299"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">61</int>
+                                               <reference key="object" ref="497968468"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="691127886"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">66</int>
+                                               <reference key="object" ref="529644976"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="343844477"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">67</int>
+                                               <reference key="object" ref="977241029"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="656145587"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">68</int>
+                                               <reference key="object" ref="749948454"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="98290860"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">71</int>
+                                               <reference key="object" ref="1035779890"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="773053098"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">72</int>
+                                               <reference key="object" ref="928128304"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1016156756"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">73</int>
+                                               <reference key="object" ref="140207359"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="401971973"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">74</int>
+                                               <reference key="object" ref="907540673"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="804220802"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">79</int>
+                                               <reference key="object" ref="523657812"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSView" id="369510067">
+                                                               <nil key="NSNextResponder"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <string key="NSFrame">{{2, 2}, {125, 1}}</string>
+                                                       </object>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">80</int>
+                                               <reference key="object" ref="369510067"/>
+                                               <reference key="parent" ref="523657812"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">81</int>
+                                               <reference key="object" ref="473093704"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="572444645"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">86</int>
+                                               <reference key="object" ref="516451639"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="562573539"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">87</int>
+                                               <reference key="object" ref="526934709"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="273314683"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">88</int>
+                                               <reference key="object" ref="180296347"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="495611013"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">89</int>
+                                               <reference key="object" ref="612818913"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="12489527"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">90</int>
+                                               <reference key="object" ref="5114506"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="894602850"/>
+                                               </object>
+                                               <reference key="parent" ref="738514360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">254</int>
+                                               <reference key="object" ref="679064762"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="743280560"/>
+                                               </object>
+                                               <reference key="parent" ref="181588572"/>
+                                               <string key="objectName">empty</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">255</int>
+                                               <reference key="object" ref="743280560"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="82262124"/>
+                                               </object>
+                                               <reference key="parent" ref="679064762"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">342</int>
+                                               <reference key="object" ref="928228060"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="302593572"/>
+                                               </object>
+                                               <reference key="parent" ref="502806021"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">343</int>
+                                               <reference key="object" ref="621289166"/>
+                                               <reference key="parent" ref="496835891"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">344</int>
+                                               <reference key="object" ref="660394934"/>
+                                               <reference key="parent" ref="444018704"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">345</int>
+                                               <reference key="object" ref="67902101"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="735303444"/>
+                                               </object>
+                                               <reference key="parent" ref="463613064"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">346</int>
+                                               <reference key="object" ref="597433555"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="418397244"/>
+                                               </object>
+                                               <reference key="parent" ref="1012635724"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">347</int>
+                                               <reference key="object" ref="368733355"/>
+                                               <reference key="parent" ref="34095372"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">348</int>
+                                               <reference key="object" ref="652898624"/>
+                                               <reference key="parent" ref="677509567"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">349</int>
+                                               <reference key="object" ref="622431002"/>
+                                               <reference key="parent" ref="570675882"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">350</int>
+                                               <reference key="object" ref="456227852"/>
+                                               <reference key="parent" ref="862092551"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">351</int>
+                                               <reference key="object" ref="19206206"/>
+                                               <reference key="parent" ref="286114143"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">352</int>
+                                               <reference key="object" ref="1015322159"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="4652010"/>
+                                               </object>
+                                               <reference key="parent" ref="463632258"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">353</int>
+                                               <reference key="object" ref="523579964"/>
+                                               <reference key="parent" ref="501486901"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">354</int>
+                                               <reference key="object" ref="625397549"/>
+                                               <reference key="parent" ref="9309938"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">355</int>
+                                               <reference key="object" ref="1015445713"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="945504605"/>
+                                               </object>
+                                               <reference key="parent" ref="108597901"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">356</int>
+                                               <reference key="object" ref="492298910"/>
+                                               <reference key="parent" ref="335373847"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">357</int>
+                                               <reference key="object" ref="288316749"/>
+                                               <reference key="parent" ref="677007332"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">358</int>
+                                               <reference key="object" ref="124098371"/>
+                                               <reference key="parent" ref="34260806"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">361</int>
+                                               <reference key="object" ref="651032081"/>
+                                               <reference key="parent" ref="751714853"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">362</int>
+                                               <reference key="object" ref="96368274"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="359920682"/>
+                                               </object>
+                                               <reference key="parent" ref="1028233887"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">363</int>
+                                               <reference key="object" ref="492969921"/>
+                                               <reference key="parent" ref="498769415"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">364</int>
+                                               <reference key="object" ref="1069442299"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="155689363"/>
+                                               </object>
+                                               <reference key="parent" ref="130462646"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">365</int>
+                                               <reference key="object" ref="691127886"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1069179379"/>
+                                               </object>
+                                               <reference key="parent" ref="497968468"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">366</int>
+                                               <reference key="object" ref="343844477"/>
+                                               <reference key="parent" ref="529644976"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">367</int>
+                                               <reference key="object" ref="656145587"/>
+                                               <reference key="parent" ref="977241029"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">368</int>
+                                               <reference key="object" ref="98290860"/>
+                                               <reference key="parent" ref="749948454"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">371</int>
+                                               <reference key="object" ref="773053098"/>
+                                               <reference key="parent" ref="1035779890"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">372</int>
+                                               <reference key="object" ref="1016156756"/>
+                                               <reference key="parent" ref="928128304"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">373</int>
+                                               <reference key="object" ref="401971973"/>
+                                               <reference key="parent" ref="140207359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">374</int>
+                                               <reference key="object" ref="804220802"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="869830194"/>
+                                               </object>
+                                               <reference key="parent" ref="907540673"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">375</int>
+                                               <reference key="object" ref="572444645"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="838480608"/>
+                                               </object>
+                                               <reference key="parent" ref="473093704"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">376</int>
+                                               <reference key="object" ref="562573539"/>
+                                               <reference key="parent" ref="516451639"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">377</int>
+                                               <reference key="object" ref="273314683"/>
+                                               <reference key="parent" ref="526934709"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">378</int>
+                                               <reference key="object" ref="495611013"/>
+                                               <reference key="parent" ref="180296347"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">379</int>
+                                               <reference key="object" ref="12489527"/>
+                                               <reference key="parent" ref="612818913"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">380</int>
+                                               <reference key="object" ref="894602850"/>
+                                               <reference key="parent" ref="5114506"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">381</int>
+                                               <reference key="object" ref="82262124"/>
+                                               <reference key="parent" ref="743280560"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">7</int>
+                                               <reference key="object" ref="302593572"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="381221882"/>
+                                                       <reference ref="473757651"/>
+                                                       <reference ref="675281532"/>
+                                               </object>
+                                               <reference key="parent" ref="928228060"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">10</int>
+                                               <reference key="object" ref="381221882"/>
+                                               <reference key="parent" ref="302593572"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">9</int>
+                                               <reference key="object" ref="473757651"/>
+                                               <reference key="parent" ref="302593572"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">8</int>
+                                               <reference key="object" ref="675281532"/>
+                                               <reference key="parent" ref="302593572"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">14</int>
+                                               <reference key="object" ref="735303444"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="817763274"/>
+                                                       <reference ref="704690128"/>
+                                                       <reference ref="604338719"/>
+                                               </object>
+                                               <reference key="parent" ref="67902101"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">17</int>
+                                               <reference key="object" ref="817763274"/>
+                                               <reference key="parent" ref="735303444"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">16</int>
+                                               <reference key="object" ref="704690128"/>
+                                               <reference key="parent" ref="735303444"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">15</int>
+                                               <reference key="object" ref="604338719"/>
+                                               <reference key="parent" ref="735303444"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">19</int>
+                                               <reference key="object" ref="418397244"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="193116813"/>
+                                                       <reference ref="87174157"/>
+                                                       <reference ref="138849732"/>
+                                               </object>
+                                               <reference key="parent" ref="597433555"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">22</int>
+                                               <reference key="object" ref="193116813"/>
+                                               <reference key="parent" ref="418397244"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">21</int>
+                                               <reference key="object" ref="87174157"/>
+                                               <reference key="parent" ref="418397244"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">20</int>
+                                               <reference key="object" ref="138849732"/>
+                                               <reference key="parent" ref="418397244"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">33</int>
+                                               <reference key="object" ref="4652010"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="355405826"/>
+                                                       <reference ref="623541927"/>
+                                                       <reference ref="716695777"/>
+                                               </object>
+                                               <reference key="parent" ref="1015322159"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">36</int>
+                                               <reference key="object" ref="355405826"/>
+                                               <reference key="parent" ref="4652010"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">35</int>
+                                               <reference key="object" ref="623541927"/>
+                                               <reference key="parent" ref="4652010"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">34</int>
+                                               <reference key="object" ref="716695777"/>
+                                               <reference key="parent" ref="4652010"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">40</int>
+                                               <reference key="object" ref="945504605"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="712570706"/>
+                                                       <reference ref="42097014"/>
+                                                       <reference ref="664014443"/>
+                                               </object>
+                                               <reference key="parent" ref="1015445713"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">43</int>
+                                               <reference key="object" ref="712570706"/>
+                                               <reference key="parent" ref="945504605"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">42</int>
+                                               <reference key="object" ref="42097014"/>
+                                               <reference key="parent" ref="945504605"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">41</int>
+                                               <reference key="object" ref="664014443"/>
+                                               <reference key="parent" ref="945504605"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">51</int>
+                                               <reference key="object" ref="359920682"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="551923619"/>
+                                                       <reference ref="1005011526"/>
+                                                       <reference ref="836668078"/>
+                                               </object>
+                                               <reference key="parent" ref="96368274"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">54</int>
+                                               <reference key="object" ref="551923619"/>
+                                               <reference key="parent" ref="359920682"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">53</int>
+                                               <reference key="object" ref="1005011526"/>
+                                               <reference key="parent" ref="359920682"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">52</int>
+                                               <reference key="object" ref="836668078"/>
+                                               <reference key="parent" ref="359920682"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">57</int>
+                                               <reference key="object" ref="155689363"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="354770588"/>
+                                                       <reference ref="736037090"/>
+                                                       <reference ref="259498980"/>
+                                               </object>
+                                               <reference key="parent" ref="1069442299"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">60</int>
+                                               <reference key="object" ref="354770588"/>
+                                               <reference key="parent" ref="155689363"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">59</int>
+                                               <reference key="object" ref="736037090"/>
+                                               <reference key="parent" ref="155689363"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">58</int>
+                                               <reference key="object" ref="259498980"/>
+                                               <reference key="parent" ref="155689363"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">62</int>
+                                               <reference key="object" ref="1069179379"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="413956336"/>
+                                                       <reference ref="847739510"/>
+                                                       <reference ref="286317196"/>
+                                               </object>
+                                               <reference key="parent" ref="691127886"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">65</int>
+                                               <reference key="object" ref="413956336"/>
+                                               <reference key="parent" ref="1069179379"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">64</int>
+                                               <reference key="object" ref="847739510"/>
+                                               <reference key="parent" ref="1069179379"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">63</int>
+                                               <reference key="object" ref="286317196"/>
+                                               <reference key="parent" ref="1069179379"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">75</int>
+                                               <reference key="object" ref="869830194"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="6137744"/>
+                                                       <reference ref="169170697"/>
+                                                       <reference ref="1070100923"/>
+                                               </object>
+                                               <reference key="parent" ref="804220802"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">78</int>
+                                               <reference key="object" ref="6137744"/>
+                                               <reference key="parent" ref="869830194"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">77</int>
+                                               <reference key="object" ref="169170697"/>
+                                               <reference key="parent" ref="869830194"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">76</int>
+                                               <reference key="object" ref="1070100923"/>
+                                               <reference key="parent" ref="869830194"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">82</int>
+                                               <reference key="object" ref="838480608"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="946029370"/>
+                                                       <reference ref="894119487"/>
+                                                       <reference ref="19515960"/>
+                                               </object>
+                                               <reference key="parent" ref="572444645"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">85</int>
+                                               <reference key="object" ref="946029370"/>
+                                               <reference key="parent" ref="838480608"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">84</int>
+                                               <reference key="object" ref="894119487"/>
+                                               <reference key="parent" ref="838480608"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">83</int>
+                                               <reference key="object" ref="19515960"/>
+                                               <reference key="parent" ref="838480608"/>
+                                       </object>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="flattenedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>-1.IBPluginDependency</string>
+                                       <string>-2.IBPluginDependency</string>
+                                       <string>-3.IBPluginDependency</string>
+                                       <string>-3.ImportedFromIB2</string>
+                                       <string>10.IBPluginDependency</string>
+                                       <string>10.ImportedFromIB2</string>
+                                       <string>11.IBAttributePlaceholdersKey</string>
+                                       <string>11.IBPluginDependency</string>
+                                       <string>11.ImportedFromIB2</string>
+                                       <string>12.IBAttributePlaceholdersKey</string>
+                                       <string>12.IBPluginDependency</string>
+                                       <string>12.ImportedFromIB2</string>
+                                       <string>13.IBAttributePlaceholdersKey</string>
+                                       <string>13.IBPluginDependency</string>
+                                       <string>13.ImportedFromIB2</string>
+                                       <string>14.IBPluginDependency</string>
+                                       <string>14.ImportedFromIB2</string>
+                                       <string>15.IBPluginDependency</string>
+                                       <string>15.ImportedFromIB2</string>
+                                       <string>16.IBPluginDependency</string>
+                                       <string>16.ImportedFromIB2</string>
+                                       <string>17.IBPluginDependency</string>
+                                       <string>17.ImportedFromIB2</string>
+                                       <string>18.IBAttributePlaceholdersKey</string>
+                                       <string>18.IBPluginDependency</string>
+                                       <string>18.ImportedFromIB2</string>
+                                       <string>19.IBPluginDependency</string>
+                                       <string>19.ImportedFromIB2</string>
+                                       <string>20.IBPluginDependency</string>
+                                       <string>20.ImportedFromIB2</string>
+                                       <string>21.IBPluginDependency</string>
+                                       <string>21.ImportedFromIB2</string>
+                                       <string>22.IBPluginDependency</string>
+                                       <string>22.ImportedFromIB2</string>
+                                       <string>23.IBAttributePlaceholdersKey</string>
+                                       <string>23.IBPluginDependency</string>
+                                       <string>23.ImportedFromIB2</string>
+                                       <string>24.IBAttributePlaceholdersKey</string>
+                                       <string>24.IBPluginDependency</string>
+                                       <string>24.ImportedFromIB2</string>
+                                       <string>25.IBAttributePlaceholdersKey</string>
+                                       <string>25.IBPluginDependency</string>
+                                       <string>25.ImportedFromIB2</string>
+                                       <string>254.IBPluginDependency</string>
+                                       <string>254.ImportedFromIB2</string>
+                                       <string>254.editorWindowContentRectSynchronizationRect</string>
+                                       <string>255.IBPluginDependency</string>
+                                       <string>255.ImportedFromIB2</string>
+                                       <string>26.IBPluginDependency</string>
+                                       <string>26.ImportedFromIB2</string>
+                                       <string>27.IBPluginDependency</string>
+                                       <string>27.ImportedFromIB2</string>
+                                       <string>28.IBPluginDependency</string>
+                                       <string>28.ImportedFromIB2</string>
+                                       <string>29.IBPluginDependency</string>
+                                       <string>29.ImportedFromIB2</string>
+                                       <string>30.IBPluginDependency</string>
+                                       <string>30.ImportedFromIB2</string>
+                                       <string>31.IBAttributePlaceholdersKey</string>
+                                       <string>31.IBPluginDependency</string>
+                                       <string>31.ImportedFromIB2</string>
+                                       <string>32.IBAttributePlaceholdersKey</string>
+                                       <string>32.IBPluginDependency</string>
+                                       <string>32.ImportedFromIB2</string>
+                                       <string>33.IBPluginDependency</string>
+                                       <string>33.ImportedFromIB2</string>
+                                       <string>34.IBPluginDependency</string>
+                                       <string>34.ImportedFromIB2</string>
+                                       <string>35.IBPluginDependency</string>
+                                       <string>35.ImportedFromIB2</string>
+                                       <string>36.IBPluginDependency</string>
+                                       <string>36.ImportedFromIB2</string>
+                                       <string>37.IBAttributePlaceholdersKey</string>
+                                       <string>37.IBPluginDependency</string>
+                                       <string>37.ImportedFromIB2</string>
+                                       <string>38.IBAttributePlaceholdersKey</string>
+                                       <string>38.IBPluginDependency</string>
+                                       <string>38.ImportedFromIB2</string>
+                                       <string>39.IBAttributePlaceholdersKey</string>
+                                       <string>39.IBPluginDependency</string>
+                                       <string>39.ImportedFromIB2</string>
+                                       <string>40.IBPluginDependency</string>
+                                       <string>40.ImportedFromIB2</string>
+                                       <string>41.IBPluginDependency</string>
+                                       <string>41.ImportedFromIB2</string>
+                                       <string>42.IBPluginDependency</string>
+                                       <string>42.ImportedFromIB2</string>
+                                       <string>43.IBPluginDependency</string>
+                                       <string>43.ImportedFromIB2</string>
+                                       <string>44.IBAttributePlaceholdersKey</string>
+                                       <string>44.IBPluginDependency</string>
+                                       <string>44.ImportedFromIB2</string>
+                                       <string>45.IBAttributePlaceholdersKey</string>
+                                       <string>45.IBPluginDependency</string>
+                                       <string>45.ImportedFromIB2</string>
+                                       <string>46.IBAttributePlaceholdersKey</string>
+                                       <string>46.IBPluginDependency</string>
+                                       <string>46.ImportedFromIB2</string>
+                                       <string>49.IBAttributePlaceholdersKey</string>
+                                       <string>49.IBPluginDependency</string>
+                                       <string>49.ImportedFromIB2</string>
+                                       <string>5.IBEditorWindowLastContentRect</string>
+                                       <string>5.IBPluginDependency</string>
+                                       <string>5.ImportedFromIB2</string>
+                                       <string>5.editorWindowContentRectSynchronizationRect</string>
+                                       <string>50.IBAttributePlaceholdersKey</string>
+                                       <string>50.IBPluginDependency</string>
+                                       <string>50.ImportedFromIB2</string>
+                                       <string>51.IBPluginDependency</string>
+                                       <string>51.ImportedFromIB2</string>
+                                       <string>52.IBPluginDependency</string>
+                                       <string>52.ImportedFromIB2</string>
+                                       <string>53.IBPluginDependency</string>
+                                       <string>53.ImportedFromIB2</string>
+                                       <string>54.IBPluginDependency</string>
+                                       <string>54.ImportedFromIB2</string>
+                                       <string>55.IBPluginDependency</string>
+                                       <string>55.ImportedFromIB2</string>
+                                       <string>56.IBAttributePlaceholdersKey</string>
+                                       <string>56.IBPluginDependency</string>
+                                       <string>56.ImportedFromIB2</string>
+                                       <string>57.IBPluginDependency</string>
+                                       <string>57.ImportedFromIB2</string>
+                                       <string>58.IBPluginDependency</string>
+                                       <string>58.ImportedFromIB2</string>
+                                       <string>59.IBPluginDependency</string>
+                                       <string>59.ImportedFromIB2</string>
+                                       <string>6.IBAttributePlaceholdersKey</string>
+                                       <string>6.IBPluginDependency</string>
+                                       <string>6.ImportedFromIB2</string>
+                                       <string>60.IBPluginDependency</string>
+                                       <string>60.ImportedFromIB2</string>
+                                       <string>61.IBAttributePlaceholdersKey</string>
+                                       <string>61.IBPluginDependency</string>
+                                       <string>61.ImportedFromIB2</string>
+                                       <string>62.IBPluginDependency</string>
+                                       <string>62.ImportedFromIB2</string>
+                                       <string>63.IBPluginDependency</string>
+                                       <string>63.ImportedFromIB2</string>
+                                       <string>64.IBPluginDependency</string>
+                                       <string>64.ImportedFromIB2</string>
+                                       <string>65.IBPluginDependency</string>
+                                       <string>65.ImportedFromIB2</string>
+                                       <string>66.IBAttributePlaceholdersKey</string>
+                                       <string>66.IBPluginDependency</string>
+                                       <string>66.ImportedFromIB2</string>
+                                       <string>67.IBAttributePlaceholdersKey</string>
+                                       <string>67.IBPluginDependency</string>
+                                       <string>67.ImportedFromIB2</string>
+                                       <string>68.IBAttributePlaceholdersKey</string>
+                                       <string>68.IBPluginDependency</string>
+                                       <string>68.ImportedFromIB2</string>
+                                       <string>7.IBPluginDependency</string>
+                                       <string>7.ImportedFromIB2</string>
+                                       <string>71.IBAttributePlaceholdersKey</string>
+                                       <string>71.IBPluginDependency</string>
+                                       <string>71.ImportedFromIB2</string>
+                                       <string>72.IBAttributePlaceholdersKey</string>
+                                       <string>72.IBPluginDependency</string>
+                                       <string>72.ImportedFromIB2</string>
+                                       <string>73.IBAttributePlaceholdersKey</string>
+                                       <string>73.IBPluginDependency</string>
+                                       <string>73.ImportedFromIB2</string>
+                                       <string>74.IBAttributePlaceholdersKey</string>
+                                       <string>74.IBPluginDependency</string>
+                                       <string>74.ImportedFromIB2</string>
+                                       <string>75.IBPluginDependency</string>
+                                       <string>75.ImportedFromIB2</string>
+                                       <string>76.IBPluginDependency</string>
+                                       <string>76.ImportedFromIB2</string>
+                                       <string>77.IBPluginDependency</string>
+                                       <string>77.ImportedFromIB2</string>
+                                       <string>78.IBPluginDependency</string>
+                                       <string>78.ImportedFromIB2</string>
+                                       <string>79.IBPluginDependency</string>
+                                       <string>79.ImportedFromIB2</string>
+                                       <string>8.IBPluginDependency</string>
+                                       <string>8.ImportedFromIB2</string>
+                                       <string>80.IBPluginDependency</string>
+                                       <string>80.ImportedFromIB2</string>
+                                       <string>81.IBAttributePlaceholdersKey</string>
+                                       <string>81.IBPluginDependency</string>
+                                       <string>81.ImportedFromIB2</string>
+                                       <string>82.IBPluginDependency</string>
+                                       <string>82.ImportedFromIB2</string>
+                                       <string>83.IBPluginDependency</string>
+                                       <string>83.ImportedFromIB2</string>
+                                       <string>84.IBPluginDependency</string>
+                                       <string>84.ImportedFromIB2</string>
+                                       <string>85.IBPluginDependency</string>
+                                       <string>85.ImportedFromIB2</string>
+                                       <string>86.IBAttributePlaceholdersKey</string>
+                                       <string>86.IBPluginDependency</string>
+                                       <string>86.ImportedFromIB2</string>
+                                       <string>87.IBAttributePlaceholdersKey</string>
+                                       <string>87.IBPluginDependency</string>
+                                       <string>87.ImportedFromIB2</string>
+                                       <string>88.IBAttributePlaceholdersKey</string>
+                                       <string>88.IBPluginDependency</string>
+                                       <string>88.ImportedFromIB2</string>
+                                       <string>89.IBAttributePlaceholdersKey</string>
+                                       <string>89.IBPluginDependency</string>
+                                       <string>89.ImportedFromIB2</string>
+                                       <string>9.IBPluginDependency</string>
+                                       <string>9.ImportedFromIB2</string>
+                                       <string>90.IBAttributePlaceholdersKey</string>
+                                       <string>90.IBPluginDependency</string>
+                                       <string>90.ImportedFromIB2</string>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <integer value="1" id="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="496835891"/>
+                                                       <string type="base64-UTF8" key="toolTip">U2FuZSB2YWx1ZXMgYXJlIDEtNi4gVGhlIG1vcmUgeW91IGFkZCwgdGhlIGhpZ2hlciB0aGUgcXVhbGl0
+eSDigJQgYnV0IHRoZSBzbG93ZXIgdGhlIGVuY29kZS4gQmUgY2FyZWZ1bC4uLnRvbyBtYW55IGFuZCBR
+dWlja1RpbWUgc3RydWdnbGUgdG8gcGxheSB0aGUgdmlkZW8gYmFjay4</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="444018704"/>
+                                                       <string key="toolTip">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.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="463613064"/>
+                                                       <string key="toolTip">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.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="1012635724"/>
+                                                       <string type="base64-UTF8" key="toolTip">VGhpcyBzZXR0aW5nIGlzIGZpbmVyLWdyYWluZWQgdGhhbiB0aGUgbW90aW9uIGVzdGltYXRpb24gc2V0
+dGluZ3MgYWJvdmUuIEluc3RlYWQgb2YgZGVhbGluZyB3aXRoIHdob2xlIHBpeGVscywgaXQgZGVhbHMg
+d2l0aCBmcmFjdGlvbmFsIHBpeGVscy4gNCwgSGFuZEJyYWtlJ3MgZGVmYXVsdCwgbWVhbnMgbG9va2lu
+ZyBhdCBxdWFydGVyIHBpeGVscyAocXBlbCkuIEhpZ2hlciBsZXZlbHMgaW5jcmVhc2UgcXVhbGl0eSBi
+eSBkaXZpZGluZyB0aGUgcGl4ZWwgbW9yZSwgYnV0IHRha2UgbG9uZ2VyIHRvIGVuY29kZS4gVXNpbmcg
+NiBvciA3IHR1cm5zIHVubG9ja3MgdGhlIGFiaWxpdHkgdG8gdHVybiBvbiBtb3JlIGFkdmFuY2VkIGZl
+YXR1cmVzIGxpa2UgQi1GcmFtZSByYXRlIGRpc3RvcnRpb24uA</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="34095372"/>
+                                                       <string key="toolTip">Trellis fine-tunes how bitrate is doled out, so it can reduce file size/bitrate or increase quality. A value of 2 forces it to be used more often than a value of 1.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="677509567"/>
+                                                       <string key="toolTip">Only use this with constant quality encoding. It increases quality but also bitrate/file size.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="570675882"/>
+                                                       <string key="toolTip">This can help with blocking on solid colors like blue skies, but it also slows down the encode.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{42, 754}, {700, 290}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="286114143"/>
+                                                       <string type="base64-UTF8" key="toolTip">V2l0aCB0aGlzIG9uLCBkaWZmZXJlbnQgcGFydHMgb2YgYSBmcmFtZSB3aWxsIHJlZmVyIGJhY2sgdG8g
+ZGlmZmVyZW50IHByaW9yIGZyYW1lcywgZGVwZW5kaW5nIG9uIHdoYXQncyBiZXN0IGZvciB0aGF0IHBh
+cnQgb2YgdGhlIGltYWdlLg</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="463632258"/>
+                                                       <string key="toolTip">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.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="501486901"/>
+                                                       <string key="toolTip">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.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="9309938"/>
+                                                       <string key="toolTip">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.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="108597901"/>
+                                                       <string key="toolTip">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.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="335373847"/>
+                                                       <string type="base64-UTF8" key="toolTip">VGhpcyBzZXR0aW5nIGlzIGZpbmVyLWdyYWluZWQgdGhhbiB0aGUgbW90aW9uIGVzdGltYXRpb24gc2V0
+dGluZ3MgYWJvdmUuIEluc3RlYWQgb2YgZGVhbGluZyB3aXRoIHdob2xlIHBpeGVscywgaXQgZGVhbHMg
+d2l0aCBmcmFjdGlvbmFsIHBpeGVscy4gNCwgSGFuZEJyYWtlJ3MgZGVmYXVsdCwgbWVhbnMgbG9va2lu
+ZyBhdCBxdWFydGVyIHBpeGVscyAocXBlbCkuIEhpZ2hlciBsZXZlbHMgaW5jcmVhc2UgcXVhbGl0eSBi
+eSBkaXZpZGluZyB0aGUgcGl4ZWwgbW9yZSwgYnV0IHRha2UgbG9uZ2VyIHRvIGVuY29kZS4gVXNpbmcg
+NiBvciA3IHR1cm5zIHVubG9ja3MgdGhlIGFiaWxpdHkgdG8gdHVybiBvbiBtb3JlIGFkdmFuY2VkIGZl
+YXR1cmVzIGxpa2UgQi1GcmFtZSByYXRlIGRpc3RvcnRpb24uA</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="677007332"/>
+                                                       <string type="base64-UTF8" key="toolTip">V2l0aCB3ZWlnaHRlZCBCLWZyYW1lIHByZWRpY3Rpb24gZW5hYmxlZCwgeDI2NCB3aWxsIGNvbnNpZGVy
+IGhvdyBmYXIgYXdheSB0aGUgcHJldmlvdXMgYW5kIG5leHQgUC1mcmFtZXMgYXJlLCBiZWZvcmUgZGVj
+aWRpbmcgdG8gbWFrZSBhIGZyYW1lIGEgQi1mcmFtZS4gVGhlIGVmZmVjdCBpcyB0aGF0IHgyNjQgd2ls
+bCB1c2UgZmV3ZXIgQi1mcmFtZXMgd2hlbiB0aGV5J2QgbG9vayBiYWQg4oCUIHdoZW4gaXQgY2FuJ3Qg
+YWNjdXJhdGVseSBwcmVkaWN0IG1vdGlvbi4gT2J2aW91c2x5LCB0aGlzIG9ubHkgd29ya3Mgd2hlbiB5
+b3UgdGVsbCB4MjY0IHRvIHVzZSBtb3JlIHRoYW4gMSBCLWZyYW1lLiA</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="34260806"/>
+                                                       <string type="base64-UTF8" key="toolTip">Qi1mcmFtZSBweXJhbWlkcyBhcmUgYSBIaWdoIFByb2ZpbGUgZmVhdHVyZS4gVGhpcyBtZWFucyB0aGF0
+IGlmIHlvdSBlbmFibGUgaXQsIFlPVVIgVklERU8gV0lMTCBOT1QgUExBWSBJTiBRVUlDS1RJTUUuIFB5
+cmFtaWRhbCBCLWZyYW1lcyBtZWFuIHRoYXQgQi1mcmFtZXMgZG9uJ3QganVzdCByZWZlcmVuY2Ugc3Vy
+cm91bmRpbmcgcmVmZXJlbmNlIGZyYW1lcyDigJQgaW5zdGVhZCwgaXQgYWxzbyB0cmVhdHMgYSBwcmV2
+aW91cyBCLWZyYW1lIGFzIGEgcmVmZXJlbmNlLCBpbXByb3ZpbmcgcXVhbGl0eS9sb3dlcmluZyBiaXRy
+YXRlIGF0IHRoZSBleHBlbnNlIG9mIGNvbXBsZXhpdHkuIExvZ2ljYWxseSwgdG8gcmVmZXJlbmNlIGFu
+IGVhcmxpZXIgQi1mcmFtZSwgeW91IG11c3QgdGVsbCB4MjY0IHRvIHVzZSBhdCBsZWFzdCAyIEItZnJh
+bWVzLg</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="751714853"/>
+                                                       <string type="base64-UTF8" key="toolTip">RGlyZWN0IHByZWRpY3Rpb24gdGVsbHMgeDI2NCB3aGF0IG1ldGhvZCB0byB1c2Ugd2hlbiBndWVzc2lu
+ZyBtb3Rpb24gZm9yIGNlcnRhaW4gcGFydHMgb2YgYSBCLWZyYW1lLiBJdCBjYW4gZWl0aGVyIGxvb2sg
+YXQgb3RoZXIgcGFydHMgb2YgdGhlIGN1cnJlbnQgZnJhbWUgKHNwYXRpYWwpIG9yIGNvbXBhcmUgYWdh
+aW5zdCB0aGUgcHJlY2VkaW5nIGZyYW1lICh0ZW1wb3JhbCkuIFlvdSdyZSBiZXN0IG9mZiBzZXR0aW5n
+IHRoaXMgdG8gYXV0b21hdGljLCBzbyB4MjY0IGRlY2lkZXMgd2hpY2ggbWV0aG9kIGlzIGJlc3Qgb24g
+aXRzIG93bi4gRG9uJ3Qgc2VsZWN0IG5vbmUgYXNzdW1pbmcgaXQgd2lsbCBiZSBmYXN0ZXI7IGluc3Rl
+YWQgaXQgd2lsbCB0YWtlIGxvbmdlciBhbmQgbG9vayB3b3JzZS4gSWYgeW91J3JlIGdvaW5nIHRvIGNo
+b29zZSBiZXR3ZWVuIHNwYXRpYWwgYW5kIHRlbXBvcmFsLCBzcGF0aWFsIGlzIHVzdWFsbHkgYmV0dGVy
+Lg</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{0, 724}, {700, 290}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{692, 501}, {700, 290}}</string>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="1028233887"/>
+                                                       <string type="base64-UTF8" key="toolTip">RGlyZWN0IHByZWRpY3Rpb24gdGVsbHMgeDI2NCB3aGF0IG1ldGhvZCB0byB1c2Ugd2hlbiBndWVzc2lu
+ZyBtb3Rpb24gZm9yIGNlcnRhaW4gcGFydHMgb2YgYSBCLWZyYW1lLiBJdCBjYW4gZWl0aGVyIGxvb2sg
+YXQgb3RoZXIgcGFydHMgb2YgdGhlIGN1cnJlbnQgZnJhbWUgKHNwYXRpYWwpIG9yIGNvbXBhcmUgYWdh
+aW5zdCB0aGUgcHJlY2VkaW5nIGZyYW1lICh0ZW1wb3JhbCkuIFlvdSdyZSBiZXN0IG9mZiBzZXR0aW5n
+IHRoaXMgdG8gYXV0b21hdGljLCBzbyB4MjY0IGRlY2lkZXMgd2hpY2ggbWV0aG9kIGlzIGJlc3Qgb24g
+aXRzIG93bi4gRG9uJ3Qgc2VsZWN0IG5vbmUgYXNzdW1pbmcgaXQgd2lsbCBiZSBmYXN0ZXI7IGluc3Rl
+YWQgaXQgd2lsbCB0YWtlIGxvbmdlciBhbmQgbG9vayB3b3JzZS4gSWYgeW91J3JlIGdvaW5nIHRvIGNo
+b29zZSBiZXR3ZWVuIHNwYXRpYWwgYW5kIHRlbXBvcmFsLCBzcGF0aWFsIGlzIHVzdWFsbHkgYmV0dGVy
+Lg</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="130462646"/>
+                                                       <string type="base64-UTF8" key="toolTip">eDI2NCBpbmNsdWRlcyBhbiBpbi1sb29wIGRlYmxvY2tpbmcgZmlsdGVyLiBXaGF0IHRoaXMgbWVhbnMg
+aXMgdGhhdCBibG9ja3kgY29tcHJlc3Npb24gYXJ0aWZhY3RzIGFyZSBzbW9vdGhlZCBhd2F5IHdoZW4g
+eW91IHBsYXkgYmFjayB0aGUgdmlkZW8uIEl0IGhhcyB0d28gc2V0dGluZ3M6IHN0cmVuZ3RoIGFuZCB0
+aHJlc2hvbGQsIGp1c3QgbGlrZSBhIHNpbXBsZSBmaWx0ZXIgaW4gUGhvdG9zaG9wLiBTdHJlbmd0aCBj
+b250cm9scyB0aGUgYW1vdW50IG9mIGRlYmxvY2tpbmcgYXBwbGllZCB0byB0aGUgd2hvbGUgZnJhbWUu
+IElmIHlvdSBkcm9wIGRvd24gYmVsb3cgMCwgeW91IHJlZHVjZSB0aGUgYW1vdW50IG9mIGJsdXJyaW5n
+LiBHbyB0b28gbmVnYXRpdmUsIGFuZCB5b3UnbGwgZ2V0IGFuIGVmZmVjdCBzb21ld2hhdCBsaWtlIG92
+ZXJzaGFycGVuaW5nIGFuIGltYWdlLiBHbyBpbnRvIHBvc2l0aXZlIHZhbHVlcywgYW5kIHRoZSBpbWFn
+ZSBtYXkgYmVjb21lIHRvbyBzb2Z0LiBUaHJlc2hvbGQgY29udHJvbHMgaG93IHNlbnNpdGl2ZSB0aGUg
+ZmlsdGVyIGlzIHRvIHdoZXRoZXIgc29tZXRoaW5nIGluIGEgYmxvY2sgaXMgZGV0YWlsIHRoYXQgbmVl
+ZHMgdG8gYmUgcHJlc2VydmVkOiBsb3dlciBudW1iZXJzIGJsdXIgZGV0YWlscyBsZXNzLiBUaGUgZGVm
+YXVsdCBkZWJsb2NraW5nIHZhbHVlcyBhcmUgMCBhbmQgMC4gVGhpcyBkb2VzIG5vdCBtZWFuIHplcm8g
+ZGVibG9ja2luZy4gSXQgbWVhbnMgeDI2NCB3aWxsIGFwcGx5IHRoZSByZWd1bGFyIGRlYmxvY2tpbmcg
+c3RyZW5ndGggYW5kIHRocmVzaG9sZHMgdGhlIGNvZGVjIGF1dGhvcnMgaGF2ZSBzZWxlY3RlZCBhcyB3
+b3JraW5nIHRoZSBiZXN0IGluIG1vc3QgY2FzZXMuIFdoaWxlIG1hbnksIG1hbnkgcGVvcGxlIHN0aWNr
+IHdpdGggdGhlIGRlZmF1bHQgZGVibG9ja2luZyB2YWx1ZXMgb2YgMCwwLCBvdGhlciBwZW9wbGUgZGlz
+YWdyZWUuIFNvbWUgcHJlZmVyIGEgc2xpZ2h0bHkgbGVzcyBibHVycmVkIGltYWdlIGZvciBsaXZlIGFj
+dGlvbiBtYXRlcmlhbCwgYW5kIHVzZSB2YWx1ZXMgbGlrZSAtMiwtMSBvciAtMiwtMi4gT3RoZXJzIHdp
+bGwgcmFpc2UgaXQgdG8gMSwxIG9yIGV2ZW4gMywzIGZvciBhbmltYXRpb24uIFdoaWxlIHRoZSB2YWx1
+ZXMgZm9yIGVhY2ggc2V0dGluZyBleHRlbmQgZnJvbSAtNiB0byA2LCB0aGUgY29uc2Vuc3VzIGlzIHRo
+YXQgZ29pbmcgYmVsb3cgLTMgb3IgYWJvdmUgMyBpcyB3b3J0aGxlc3MuA</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="502806021"/>
+                                                       <string type="base64-UTF8" key="toolTip">U2FuZSB2YWx1ZXMgYXJlIDEtNi4gVGhlIG1vcmUgeW91IGFkZCwgdGhlIGhpZ2hlciB0aGUgcXVhbGl0
+eSDigJQgYnV0IHRoZSBzbG93ZXIgdGhlIGVuY29kZS4</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="497968468"/>
+                                                       <string type="base64-UTF8" key="toolTip">eDI2NCBpbmNsdWRlcyBhbiBpbi1sb29wIGRlYmxvY2tpbmcgZmlsdGVyLiBXaGF0IHRoaXMgbWVhbnMg
+aXMgdGhhdCBibG9ja3kgY29tcHJlc3Npb24gYXJ0aWZhY3RzIGFyZSBzbW9vdGhlZCBhd2F5IHdoZW4g
+eW91IHBsYXkgYmFjayB0aGUgdmlkZW8uIEl0IGhhcyB0d28gc2V0dGluZ3M6IHN0cmVuZ3RoIGFuZCB0
+aHJlc2hvbGQsIGp1c3QgbGlrZSBhIHNpbXBsZSBmaWx0ZXIgaW4gUGhvdG9zaG9wLiBTdHJlbmd0aCBj
+b250cm9scyB0aGUgYW1vdW50IG9mIGRlYmxvY2tpbmcgYXBwbGllZCB0byB0aGUgd2hvbGUgZnJhbWUu
+IElmIHlvdSBkcm9wIGRvd24gYmVsb3cgMCwgeW91IHJlZHVjZSB0aGUgYW1vdW50IG9mIGJsdXJyaW5n
+LiBHbyB0b28gbmVnYXRpdmUsIGFuZCB5b3UnbGwgZ2V0IGFuIGVmZmVjdCBzb21ld2hhdCBsaWtlIG92
+ZXJzaGFycGVuaW5nIGFuIGltYWdlLiBHbyBpbnRvIHBvc2l0aXZlIHZhbHVlcywgYW5kIHRoZSBpbWFn
+ZSBtYXkgYmVjb21lIHRvbyBzb2Z0LiBUaHJlc2hvbGQgY29udHJvbHMgaG93IHNlbnNpdGl2ZSB0aGUg
+ZmlsdGVyIGlzIHRvIHdoZXRoZXIgc29tZXRoaW5nIGluIGEgYmxvY2sgaXMgZGV0YWlsIHRoYXQgbmVl
+ZHMgdG8gYmUgcHJlc2VydmVkOiBsb3dlciBudW1iZXJzIGJsdXIgZGV0YWlscyBsZXNzLiBUaGUgZGVm
+YXVsdCBkZWJsb2NraW5nIHZhbHVlcyBhcmUgMCBhbmQgMC4gVGhpcyBkb2VzIG5vdCBtZWFuIHplcm8g
+ZGVibG9ja2luZy4gSXQgbWVhbnMgeDI2NCB3aWxsIGFwcGx5IHRoZSByZWd1bGFyIGRlYmxvY2tpbmcg
+c3RyZW5ndGggYW5kIHRocmVzaG9sZHMgdGhlIGNvZGVjIGF1dGhvcnMgaGF2ZSBzZWxlY3RlZCBhcyB3
+b3JraW5nIHRoZSBiZXN0IGluIG1vc3QgY2FzZXMuIFdoaWxlIG1hbnksIG1hbnkgcGVvcGxlIHN0aWNr
+IHdpdGggdGhlIGRlZmF1bHQgZGVibG9ja2luZyB2YWx1ZXMgb2YgMCwwLCBvdGhlciBwZW9wbGUgZGlz
+YWdyZWUuIFNvbWUgcHJlZmVyIGEgc2xpZ2h0bHkgbGVzcyBibHVycmVkIGltYWdlIGZvciBsaXZlIGFj
+dGlvbiBtYXRlcmlhbCwgYW5kIHVzZSB2YWx1ZXMgbGlrZSAtMiwtMSBvciAtMiwtMi4gT3RoZXJzIHdp
+bGwgcmFpc2UgaXQgdG8gMSwxIG9yIGV2ZW4gMywzIGZvciBhbmltYXRpb24uIFdoaWxlIHRoZSB2YWx1
+ZXMgZm9yIGVhY2ggc2V0dGluZyBleHRlbmQgZnJvbSAtNiB0byA2LCB0aGUgY29uc2Vuc3VzIGlzIHRo
+YXQgZ29pbmcgYmVsb3cgLTMgb3IgYWJvdmUgMyBpcyB3b3J0aGxlc3MuA</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="529644976"/>
+                                                       <string type="base64-UTF8" key="toolTip">eDI2NCBpbmNsdWRlcyBhbiBpbi1sb29wIGRlYmxvY2tpbmcgZmlsdGVyLiBXaGF0IHRoaXMgbWVhbnMg
+aXMgdGhhdCBibG9ja3kgY29tcHJlc3Npb24gYXJ0aWZhY3RzIGFyZSBzbW9vdGhlZCBhd2F5IHdoZW4g
+eW91IHBsYXkgYmFjayB0aGUgdmlkZW8uIEl0IGhhcyB0d28gc2V0dGluZ3M6IHN0cmVuZ3RoIGFuZCB0
+aHJlc2hvbGQsIGp1c3QgbGlrZSBhIHNpbXBsZSBmaWx0ZXIgaW4gUGhvdG9zaG9wLiBTdHJlbmd0aCBj
+b250cm9scyB0aGUgYW1vdW50IG9mIGRlYmxvY2tpbmcgYXBwbGllZCB0byB0aGUgd2hvbGUgZnJhbWUu
+IElmIHlvdSBkcm9wIGRvd24gYmVsb3cgMCwgeW91IHJlZHVjZSB0aGUgYW1vdW50IG9mIGJsdXJyaW5n
+LiBHbyB0b28gbmVnYXRpdmUsIGFuZCB5b3UnbGwgZ2V0IGFuIGVmZmVjdCBzb21ld2hhdCBsaWtlIG92
+ZXJzaGFycGVuaW5nIGFuIGltYWdlLiBHbyBpbnRvIHBvc2l0aXZlIHZhbHVlcywgYW5kIHRoZSBpbWFn
+ZSBtYXkgYmVjb21lIHRvbyBzb2Z0LiBUaHJlc2hvbGQgY29udHJvbHMgaG93IHNlbnNpdGl2ZSB0aGUg
+ZmlsdGVyIGlzIHRvIHdoZXRoZXIgc29tZXRoaW5nIGluIGEgYmxvY2sgaXMgZGV0YWlsIHRoYXQgbmVl
+ZHMgdG8gYmUgcHJlc2VydmVkOiBsb3dlciBudW1iZXJzIGJsdXIgZGV0YWlscyBsZXNzLiBUaGUgZGVm
+YXVsdCBkZWJsb2NraW5nIHZhbHVlcyBhcmUgMCBhbmQgMC4gVGhpcyBkb2VzIG5vdCBtZWFuIHplcm8g
+ZGVibG9ja2luZy4gSXQgbWVhbnMgeDI2NCB3aWxsIGFwcGx5IHRoZSByZWd1bGFyIGRlYmxvY2tpbmcg
+c3RyZW5ndGggYW5kIHRocmVzaG9sZHMgdGhlIGNvZGVjIGF1dGhvcnMgaGF2ZSBzZWxlY3RlZCBhcyB3
+b3JraW5nIHRoZSBiZXN0IGluIG1vc3QgY2FzZXMuIFdoaWxlIG1hbnksIG1hbnkgcGVvcGxlIHN0aWNr
+IHdpdGggdGhlIGRlZmF1bHQgZGVibG9ja2luZyB2YWx1ZXMgb2YgMCwwLCBvdGhlciBwZW9wbGUgZGlz
+YWdyZWUuIFNvbWUgcHJlZmVyIGEgc2xpZ2h0bHkgbGVzcyBibHVycmVkIGltYWdlIGZvciBsaXZlIGFj
+dGlvbiBtYXRlcmlhbCwgYW5kIHVzZSB2YWx1ZXMgbGlrZSAtMiwtMSBvciAtMiwtMi4gT3RoZXJzIHdp
+bGwgcmFpc2UgaXQgdG8gMSwxIG9yIGV2ZW4gMywzIGZvciBhbmltYXRpb24uIFdoaWxlIHRoZSB2YWx1
+ZXMgZm9yIGVhY2ggc2V0dGluZyBleHRlbmQgZnJvbSAtNiB0byA2LCB0aGUgY29uc2Vuc3VzIGlzIHRo
+YXQgZ29pbmcgYmVsb3cgLTMgb3IgYWJvdmUgMyBpcyB3b3J0aGxlc3MuA</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="977241029"/>
+                                                       <string type="base64-UTF8" key="toolTip">V2l0aCB0aGlzIG9uLCBkaWZmZXJlbnQgcGFydHMgb2YgYSBmcmFtZSB3aWxsIHJlZmVyIGJhY2sgdG8g
+ZGlmZmVyZW50IHByaW9yIGZyYW1lcywgZGVwZW5kaW5nIG9uIHdoYXQncyBiZXN0IGZvciB0aGF0IHBh
+cnQgb2YgdGhlIGltYWdlLg</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="749948454"/>
+                                                       <string type="base64-UTF8" key="toolTip">V2l0aCB3ZWlnaHRlZCBCLWZyYW1lIHByZWRpY3Rpb24gZW5hYmxlZCwgeDI2NCB3aWxsIGNvbnNpZGVy
+IGhvdyBmYXIgYXdheSB0aGUgcHJldmlvdXMgYW5kIG5leHQgUC1mcmFtZXMgYXJlLCBiZWZvcmUgZGVj
+aWRpbmcgdG8gbWFrZSBhIGZyYW1lIGEgQi1mcmFtZS4gVGhlIGVmZmVjdCBpcyB0aGF0IHgyNjQgd2ls
+bCB1c2UgZmV3ZXIgQi1mcmFtZXMgd2hlbiB0aGV5J2QgbG9vayBiYWQg4oCUIHdoZW4gaXQgY2FuJ3Qg
+YWNjdXJhdGVseSBwcmVkaWN0IG1vdGlvbi4gT2J2aW91c2x5LCB0aGlzIG9ubHkgd29ya3Mgd2hlbiB5
+b3UgdGVsbCB4MjY0IHRvIHVzZSBtb3JlIHRoYW4gMSBCLWZyYW1lLiA</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="1035779890"/>
+                                                       <string type="base64-UTF8" key="toolTip">Qi1mcmFtZSBweXJhbWlkcyBhcmUgYSBIaWdoIFByb2ZpbGUgZmVhdHVyZS4gVGhpcyBtZWFucyB0aGF0
+IGlmIHlvdSBlbmFibGUgaXQsIFlPVVIgVklERU8gV0lMTCBOT1QgUExBWSBJTiBRVUlDS1RJTUUuIFB5
+cmFtaWRhbCBCLWZyYW1lcyBtZWFuIHRoYXQgQi1mcmFtZXMgZG9uJ3QganVzdCByZWZlcmVuY2Ugc3Vy
+cm91bmRpbmcgcmVmZXJlbmNlIGZyYW1lcyDigJQgaW5zdGVhZCwgaXQgYWxzbyB0cmVhdHMgYSBwcmV2
+aW91cyBCLWZyYW1lIGFzIGEgcmVmZXJlbmNlLCBpbXByb3ZpbmcgcXVhbGl0eS9sb3dlcmluZyBiaXRy
+YXRlIGF0IHRoZSBleHBlbnNlIG9mIGNvbXBsZXhpdHkuIExvZ2ljYWxseSwgdG8gcmVmZXJlbmNlIGFu
+IGVhcmxpZXIgQi1mcmFtZSwgeW91IG11c3QgdGVsbCB4MjY0IHRvIHVzZSBhdCBsZWFzdCAyIEItZnJh
+bWVzLg</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="928128304"/>
+                                                       <string key="toolTip">This can help with blocking on solid colors like blue skies, but it also slows down the encode.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="140207359"/>
+                                                       <string key="toolTip">Only use this with constant quality encoding. It increases quality but also bitrate/file size.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="907540673"/>
+                                                       <string key="toolTip">Trellis fine-tunes how bitrate is doled out, so it can reduce file size/bitrate or increase quality. A value of 2 forces it to be used more often than a value of 1.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="473093704"/>
+                                                       <string type="base64-UTF8" key="toolTip">QW5hbHlzaXMgY29udHJvbHMgaG93IGZpbmVseSB4MjY0IGRpdmlkZXMgdXAgYSBmcmFtZSB0byBjYXB0
+dXJlIGRldGFpbC4gRnVsbCBtYWNyb2Jsb2NrcyBhcmUgMTZ4MTYgcGl4ZWxzLCBidXQgeDI2NCBjYW4g
+Z28gZG93biBhbGwgdGhlIHdheSB0byA0eDQgYmxvY2tzIGlmIGl0IGp1ZGdlcyBpdCBuZWNlc3Nhcnku
+IEJ5IGRlZmF1bHQgaXQgb25seSBicmVha3MgdXAga2V5IGZyYW1lcyB0aGF0IG11Y2guIFRvIGdpdmUg
+eDI2NCB0aGUgZnJlZWRvbSB0byBtYWtlIHRoZSBiZXN0IGRlY2lzaW9ucyBmb3IgYWxsIGZyYW1lcywg
+dXNlICJhbGwiIGFuYWx5c2lzLiBJZiB5b3Ugd2FudCB0byBjcmVhdGUgYSBoaWdoIHByb2ZpbGUgSC4y
+NjQgdmlkZW8gKHdoaWNoIGlzIGxlc3MgY29tcGF0aWJsZSB3aXRoIHRoZSB3b3JsZCBhdCBsYXJnZSB0
+aGFuIG1haW4gcHJvZmlsZSksIGFsc28gY2hlY2sgdGhlICI4eDggRENUIGJsb2NrcyIgYm94IHRvIGFk
+ZCB5ZXQgYW5vdGhlciBibG9jayBzaXplIGZvciBhbmFseXNpcy4</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="516451639"/>
+                                                       <string type="base64-UTF8" key="toolTip">QW5hbHlzaXMgY29udHJvbHMgaG93IGZpbmVseSB4MjY0IGRpdmlkZXMgdXAgYSBmcmFtZSB0byBjYXB0
+dXJlIGRldGFpbC4gRnVsbCBtYWNyb2Jsb2NrcyBhcmUgMTZ4MTYgcGl4ZWxzLCBidXQgeDI2NCBjYW4g
+Z28gZG93biBhbGwgdGhlIHdheSB0byA0eDQgYmxvY2tzIGlmIGl0IGp1ZGdlcyBpdCBuZWNlc3Nhcnku
+IEJ5IGRlZmF1bHQgaXQgb25seSBicmVha3MgdXAga2V5IGZyYW1lcyB0aGF0IG11Y2guIFRvIGdpdmUg
+eDI2NCB0aGUgZnJlZWRvbSB0byBtYWtlIHRoZSBiZXN0IGRlY2lzaW9ucyBmb3IgYWxsIGZyYW1lcywg
+dXNlICJhbGwiIGFuYWx5c2lzLiBJZiB5b3Ugd2FudCB0byBjcmVhdGUgYSBoaWdoIHByb2ZpbGUgSC4y
+NjQgdmlkZW8gKHdoaWNoIGlzIGxlc3MgY29tcGF0aWJsZSB3aXRoIHRoZSB3b3JsZCBhdCBsYXJnZSB0
+aGFuIG1haW4gcHJvZmlsZSksIGFsc28gY2hlY2sgdGhlICI4eDggRENUIGJsb2NrcyIgYm94IHRvIGFk
+ZCB5ZXQgYW5vdGhlciBibG9jayBzaXplIGZvciBhbmFseXNpcy4</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="526934709"/>
+                                                       <string type="base64-UTF8" key="toolTip">V2hlbiBBbmFseXNpcyBpcyBzZXQgdG8gImFsbCwiIGNoZWNraW5nIHRoaXMgYm94IGxldHMgeDI2NCBi
+cmVhayBrZXkgZnJhbWVzIGRvd24gaW50byA4eDggYmxvY2tzIG9mIHBpeGVscyBmb3IgYW5hbHlzaXMu
+IFRoaXMgaXMgYSBoaWdoIHByb2ZpbGUgZmVhdHVyZSBvZiBILjI2NCwgd2hpY2ggbWFrZXMgaXQgbGVz
+cyBjb21wYXRpYmxlLiBJdCBzaG91bGQgc2xpZ2h0bHkgZGVjcmVhc2UgYml0cmF0ZSBvciBpbXByb3Zl
+IHF1YWxpdHkuA</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="180296347"/>
+                                                       <string type="base64-UTF8" key="toolTip">V2hlbiBBbmFseXNpcyBpcyBzZXQgdG8gImFsbCwiIGNoZWNraW5nIHRoaXMgYm94IGxldHMgeDI2NCBi
+cmVhayBrZXkgZnJhbWVzIGRvd24gaW50byA4eDggYmxvY2tzIG9mIHBpeGVscyBmb3IgYW5hbHlzaXMu
+IFRoaXMgaXMgYSBoaWdoIHByb2ZpbGUgZmVhdHVyZSBvZiBILjI2NCwgd2hpY2ggbWFrZXMgaXQgbGVz
+cyBjb21wYXRpYmxlLiBJdCBzaG91bGQgc2xpZ2h0bHkgZGVjcmVhc2UgYml0cmF0ZSBvciBpbXByb3Zl
+IHF1YWxpdHkuA</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="612818913"/>
+                                                       <string type="base64-UTF8" key="toolTip">Q0FCQUMsIG9yIGNvbnRleHQgYWRhcHRpdmUgYmluYXJ5IGFyaXRobWV0aWMgY29kaW5nLCBpcyB1c2Vk
+IGJ5IHgyNjQgdG8gcmVkdWNlIHRoZSBiaXRyYXRlIG5lZWRlZCBmb3IgYSBnaXZlbiBxdWFsaXR5IGJ5
+IDE1JS4gVGhpcyBtYWtlcyBpdCB2ZXJ5IGNvb2wgYW5kIHZlcnkgdXNlZnVsLCBhbmQgaXQgc2hvdWxk
+IGJlIGxlZnQgb24gd2hlbmV2ZXIgcG9zc2libGUuIEhvd2V2ZXIsIGl0IGlzIGluY29tcGF0aWJsZSB3
+aXRoIHRoZSBpUG9kIDUuNUcsIGFuZCBtYWtlcyB0aGUgQXBwbGVUViBzdHJ1Z2dsZS4gU28gdHVybiBp
+dCBvZmYgZm9yIHRob3NlLiBDQUJBQyBpcyBhIGtpbmQgb2YgZW50cm9weSBjb2RpbmcsIHdoaWNoIG1l
+YW5zIHRoYXQgaXQgY29tcHJlc3NlcyBkYXRhIGJ5IG1ha2luZyBzaG9ydGhhbmQgc3ltYm9scyB0byBy
+ZXByZXNlbnQgbG9uZyBzdHJlYW1zIG9mIGRhdGEuIFRoZSAiZW50cm9weSIgcGFydCBtZWFucyB0aGF0
+IHRoZSBzeW1ib2xzIGl0IHVzZXMgdGhlIG1vc3Qgb2Z0ZW4gYXJlIHRoZSBzbWFsbGVzdC4gV2hlbiB5
+b3UgZGlzYWJsZSBDQUJBQywgYW5vdGhlciBlbnRyb3B5IGNvZGluZyBzY2hlbWUgZ2V0cyBlbmFibGVk
+LCBjYWxsZWQgQ0FWTEMgKGNvbnRleHQgYWRhcHRpdmUgdmFyaWFibGUtbGVuZ3RoIGNvZGluZykuIENB
+VkxDIGlzIGEgbG90IGxlc3MgZWZmaWNpZW50LCB3aGljaCBpcyB3aHkgaXQgbmVlZHMgMTUlIG1vcmUg
+Yml0cmF0ZSB0byBhY2hpZXZlIHRoZSBzYW1lIHF1YWxpdHkgYXMgQ0FCQUMuA</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="5114506"/>
+                                                       <string type="base64-UTF8" key="toolTip">Q0FCQUMsIG9yIGNvbnRleHQgYWRhcHRpdmUgYmluYXJ5IGFyaXRobWV0aWMgY29kaW5nLCBpcyB1c2Vk
+IGJ5IHgyNjQgdG8gcmVkdWNlIHRoZSBiaXRyYXRlIG5lZWRlZCBmb3IgYSBnaXZlbiBxdWFsaXR5IGJ5
+IDE1JS4gVGhpcyBtYWtlcyBpdCB2ZXJ5IGNvb2wgYW5kIHZlcnkgdXNlZnVsLCBhbmQgaXQgc2hvdWxk
+IGJlIGxlZnQgb24gd2hlbmV2ZXIgcG9zc2libGUuIEhvd2V2ZXIsIGl0IGlzIGluY29tcGF0aWJsZSB3
+aXRoIHRoZSBpUG9kIDUuNUcsIGFuZCBtYWtlcyB0aGUgQXBwbGVUViBzdHJ1Z2dsZS4gU28gdHVybiBp
+dCBvZmYgZm9yIHRob3NlLiBDQUJBQyBpcyBhIGtpbmQgb2YgZW50cm9weSBjb2RpbmcsIHdoaWNoIG1l
+YW5zIHRoYXQgaXQgY29tcHJlc3NlcyBkYXRhIGJ5IG1ha2luZyBzaG9ydGhhbmQgc3ltYm9scyB0byBy
+ZXByZXNlbnQgbG9uZyBzdHJlYW1zIG9mIGRhdGEuIFRoZSAiZW50cm9weSIgcGFydCBtZWFucyB0aGF0
+IHRoZSBzeW1ib2xzIGl0IHVzZXMgdGhlIG1vc3Qgb2Z0ZW4gYXJlIHRoZSBzbWFsbGVzdC4gV2hlbiB5
+b3UgZGlzYWJsZSBDQUJBQywgYW5vdGhlciBlbnRyb3B5IGNvZGluZyBzY2hlbWUgZ2V0cyBlbmFibGVk
+LCBjYWxsZWQgQ0FWTEMgKGNvbnRleHQgYWRhcHRpdmUgdmFyaWFibGUtbGVuZ3RoIGNvZGluZykuIENB
+VkxDIGlzIGEgbG90IGxlc3MgZWZmaWNpZW50LCB3aGljaCBpcyB3aHkgaXQgbmVlZHMgMTUlIG1vcmUg
+Yml0cmF0ZSB0byBhY2hpZXZlIHRoZSBzYW1lIHF1YWxpdHkgYXMgQ0FCQUMuA</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="unlocalizedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="activeLocalization"/>
+                       <object class="NSMutableDictionary" key="localizations">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="sourceID"/>
+                       <int key="maxID">381</int>
+               </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes">
+                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">FirstResponder</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBAdvancedController</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>X264AdvancedOptionsChanged:</string>
+                                                       <string>X264AdvancedOptionsSet:</string>
+                                                       <string>X264AdvancedOptionsSetCurrentSettings:</string>
+                                                       <string>X264AdvancedOptionsStandardizeOptString:</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>fDisplayX264Options</string>
+                                                       <string>fDisplayX264OptionsLabel</string>
+                                                       <string>fEmptyView</string>
+                                                       <string>fX264opt8x8dctLabel</string>
+                                                       <string>fX264opt8x8dctSwitch</string>
+                                                       <string>fX264optAlphaDeblockPopUp</string>
+                                                       <string>fX264optAnalyseLabel</string>
+                                                       <string>fX264optAnalysePopUp</string>
+                                                       <string>fX264optBPyramidLabel</string>
+                                                       <string>fX264optBPyramidSwitch</string>
+                                                       <string>fX264optBRDOLabel</string>
+                                                       <string>fX264optBRDOSwitch</string>
+                                                       <string>fX264optBetaDeblockPopUp</string>
+                                                       <string>fX264optBframesLabel</string>
+                                                       <string>fX264optBframesPopUp</string>
+                                                       <string>fX264optBiMELabel</string>
+                                                       <string>fX264optBiMESwitch</string>
+                                                       <string>fX264optCabacLabel</string>
+                                                       <string>fX264optCabacSwitch</string>
+                                                       <string>fX264optDeblockLabel</string>
+                                                       <string>fX264optDirectPredLabel</string>
+                                                       <string>fX264optDirectPredPopUp</string>
+                                                       <string>fX264optMERangeLabel</string>
+                                                       <string>fX264optMERangePopUp</string>
+                                                       <string>fX264optMixedRefsLabel</string>
+                                                       <string>fX264optMixedRefsSwitch</string>
+                                                       <string>fX264optMotionEstLabel</string>
+                                                       <string>fX264optMotionEstPopUp</string>
+                                                       <string>fX264optNfpskipLabel</string>
+                                                       <string>fX264optNfpskipSwitch</string>
+                                                       <string>fX264optNodctdcmtLabel</string>
+                                                       <string>fX264optNodctdcmtSwitch</string>
+                                                       <string>fX264optRefLabel</string>
+                                                       <string>fX264optRefPopUp</string>
+                                                       <string>fX264optSubmeLabel</string>
+                                                       <string>fX264optSubmePopUp</string>
+                                                       <string>fX264optTrellisLabel</string>
+                                                       <string>fX264optTrellisPopUp</string>
+                                                       <string>fX264optView</string>
+                                                       <string>fX264optViewTitleLabel</string>
+                                                       <string>fX264optWeightBLabel</string>
+                                                       <string>fX264optWeightBSwitch</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSView</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSView</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">HBAdvancedController.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBAdvancedController</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">PictureController.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                       </object>
+               </object>
+               <int key="IBDocument.localizationMode">0</int>
+               <string key="IBDocument.LastKnownRelativeProjectPath">../../HandBrake.xcodeproj</string>
+               <int key="IBDocument.defaultPropertyAccessControl">3</int>
+       </data>
+</archive>
diff --git a/macosx/English.lproj/InfoPlist.strings b/macosx/English.lproj/InfoPlist.strings
new file mode 100644 (file)
index 0000000..f1eb09d
Binary files /dev/null and b/macosx/English.lproj/InfoPlist.strings differ
diff --git a/macosx/English.lproj/MainMenu.xib b/macosx/English.lproj/MainMenu.xib
new file mode 100644 (file)
index 0000000..ce0ff23
--- /dev/null
@@ -0,0 +1,11842 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+       <data>
+               <int key="IBDocument.SystemTarget">1050</int>
+               <string key="IBDocument.SystemVersion">9F33</string>
+               <string key="IBDocument.InterfaceBuilderVersion">670</string>
+               <string key="IBDocument.AppKitVersion">949.34</string>
+               <string key="IBDocument.HIToolboxVersion">352.00</string>
+               <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <integer value="1478"/>
+               </object>
+               <object class="NSArray" key="IBDocument.PluginDependencies">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+               </object>
+               <object class="NSMutableArray" key="IBDocument.RootObjects" id="411085004">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <object class="NSCustomObject" id="1046316778">
+                               <object class="NSMutableString" key="NSClassName">
+                                       <characters key="NS.bytes">NSApplication</characters>
+                               </object>
+                       </object>
+                       <object class="NSCustomObject" id="952684036">
+                               <string key="NSClassName">FirstResponder</string>
+                       </object>
+                       <object class="NSCustomObject" id="300550588">
+                               <string key="NSClassName">NSApplication</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="192660081">
+                               <int key="NSWindowStyleMask">4103</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{41, 580}, {760, 550}}</string>
+                               <int key="NSWTFlags">1886912512</int>
+                               <string key="NSWindowTitle">HandBrake</string>
+                               <string key="NSWindowClass">NSWindow</string>
+                               <object class="NSMutableString" key="NSViewClass">
+                                       <characters key="NS.bytes">View</characters>
+                               </object>
+                               <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <string key="NSWindowContentMinSize">{213, 107}</string>
+                               <object class="NSView" key="NSWindowView" id="168918359">
+                                       <reference key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <object class="NSMutableArray" key="NSSubviews">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSTextField" id="794651271">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{17, 8}, {588, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="10523918">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">4325376</int>
+                                                               <string type="base64-UTF8" key="NSContents">RE8gTk9UIFRSQU5TTEFURSBUSElTIE5JQiBGSUxFLAo</string>
+                                                               <object class="NSFont" key="NSSupport" id="26">
+                                                                       <string key="NSName">LucidaGrande</string>
+                                                                       <double key="NSSize">1.100000e+01</double>
+                                                                       <int key="NSfFlags">3100</int>
+                                                               </object>
+                                                               <reference key="NSControlView" ref="794651271"/>
+                                                               <object class="NSColor" key="NSBackgroundColor" id="242973447">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">controlColor</string>
+                                                                       <object class="NSColor" key="NSColor" id="458742033">
+                                                                               <int key="NSColorSpace">3</int>
+                                                                               <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSColor" key="NSTextColor" id="701609070">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">controlTextColor</string>
+                                                                       <object class="NSColor" key="NSColor" id="544409939">
+                                                                               <int key="NSColorSpace">3</int>
+                                                                               <bytes key="NSWhite">MAA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                               <object class="NSProgressIndicator" id="222334056">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">1288</int>
+                                                       <object class="NSPSMatrix" key="NSDrawMatrix"/>
+                                                       <string key="NSFrame">{{18, -20}, {721, 20}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <int key="NSpiFlags">16396</int>
+                                                       <double key="NSMaxValue">1.000000e+02</double>
+                                               </object>
+                                               <object class="NSTabView" id="712502892">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{13, 22}, {734, 343}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <object class="NSMutableArray" key="NSTabViewItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSTabViewItem" id="107038816">
+                                                                       <string key="NSIdentifier">1</string>
+                                                                       <object class="NSView" key="NSView" id="1053078401">
+                                                                               <reference key="NSNextResponder" ref="712502892"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSTextField" id="521019277">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{357, 259}, {46, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="200565868">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">4194304</int>
+                                                                                                       <string key="NSContents">Quality:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="521019277"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSMatrix" id="229000833">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{411, 211}, {146, 63}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <int key="NSNumRows">3</int>
+                                                                                               <int key="NSNumCols">1</int>
+                                                                                               <object class="NSMutableArray" key="NSCells">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <object class="NSButtonCell" id="867231800">
+                                                                                                               <int key="NSCellFlags">-2080244224</int>
+                                                                                                               <int key="NSCellFlags2">131072</int>
+                                                                                                               <string key="NSContents">Target size (MB):</string>
+                                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                                               <reference key="NSControlView" ref="229000833"/>
+                                                                                                               <int key="NSButtonFlags">1211912703</int>
+                                                                                                               <int key="NSButtonFlags2">0</int>
+                                                                                                               <object class="NSButtonImageSource" key="NSAlternateImage" id="860784734">
+                                                                                                                       <string key="NSImageName">NSRadioButton</string>
+                                                                                                               </object>
+                                                                                                               <string key="NSAlternateContents"/>
+                                                                                                               <object class="NSMutableString" key="NSKeyEquivalent" id="727008564">
+                                                                                                                       <characters key="NS.bytes"/>
+                                                                                                               </object>
+                                                                                                               <int key="NSPeriodicDelay">200</int>
+                                                                                                               <int key="NSPeriodicInterval">25</int>
+                                                                                                       </object>
+                                                                                                       <object class="NSButtonCell" id="733978413">
+                                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                                               <int key="NSCellFlags2">131072</int>
+                                                                                                               <string key="NSContents">Average bitrate (kbps):</string>
+                                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                                               <int key="NSTag">1</int>
+                                                                                                               <reference key="NSControlView" ref="229000833"/>
+                                                                                                               <int key="NSButtonFlags">1211912703</int>
+                                                                                                               <int key="NSButtonFlags2">0</int>
+                                                                                                               <reference key="NSAlternateImage" ref="860784734"/>
+                                                                                                               <string key="NSAlternateContents"/>
+                                                                                                               <reference key="NSKeyEquivalent" ref="727008564"/>
+                                                                                                               <int key="NSPeriodicDelay">200</int>
+                                                                                                               <int key="NSPeriodicInterval">25</int>
+                                                                                                       </object>
+                                                                                                       <object class="NSButtonCell" id="297078314">
+                                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                                               <int key="NSCellFlags2">131072</int>
+                                                                                                               <string key="NSContents">Constant quality:</string>
+                                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                                               <reference key="NSControlView" ref="229000833"/>
+                                                                                                               <int key="NSButtonFlags">1211912703</int>
+                                                                                                               <int key="NSButtonFlags2">0</int>
+                                                                                                               <reference key="NSAlternateImage" ref="860784734"/>
+                                                                                                               <string key="NSAlternateContents"/>
+                                                                                                               <string key="NSKeyEquivalent"/>
+                                                                                                               <int key="NSPeriodicDelay">400</int>
+                                                                                                               <int key="NSPeriodicInterval">75</int>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <string key="NSCellSize">{146, 15}</string>
+                                                                                               <string key="NSIntercellSpacing">{4, 9}</string>
+                                                                                               <int key="NSMatrixFlags">1143472128</int>
+                                                                                               <string key="NSCellClass">NSActionCell</string>
+                                                                                               <object class="NSButtonCell" key="NSProtoCell" id="779990493">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                       <string key="NSContents">Radio</string>
+                                                                                                       <object class="NSFont" key="NSSupport" id="273283760">
+                                                                                                               <string key="NSName">LucidaGrande</string>
+                                                                                                               <double key="NSSize">1.300000e+01</double>
+                                                                                                               <int key="NSfFlags">1044</int>
+                                                                                                       </object>
+                                                                                                       <int key="NSButtonFlags">1211912703</int>
+                                                                                                       <int key="NSButtonFlags2">0</int>
+                                                                                                       <reference key="NSAlternateImage" ref="860784734"/>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                               </object>
+                                                                                               <reference key="NSSelectedCell" ref="867231800"/>
+                                                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                               <object class="NSColor" key="NSCellBackgroundColor" id="809784795">
+                                                                                                       <int key="NSColorSpace">3</int>
+                                                                                                       <bytes key="NSWhite">MQA</bytes>
+                                                                                               </object>
+                                                                                               <reference key="NSFont" ref="273283760"/>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="127917338">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{562, 257}, {84, 19}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="850340172">
+                                                                                                       <int key="NSCellFlags">-1804468671</int>
+                                                                                                       <int key="NSCellFlags2">4326400</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="127917338"/>
+                                                                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                                                                       <object class="NSColor" key="NSBackgroundColor" id="138233214">
+                                                                                                               <int key="NSColorSpace">6</int>
+                                                                                                               <string key="NSCatalogName">System</string>
+                                                                                                               <string key="NSColorName">textBackgroundColor</string>
+                                                                                                               <reference key="NSColor" ref="809784795"/>
+                                                                                                       </object>
+                                                                                                       <object class="NSColor" key="NSTextColor" id="378140636">
+                                                                                                               <int key="NSColorSpace">6</int>
+                                                                                                               <string key="NSCatalogName">System</string>
+                                                                                                               <string key="NSColorName">textColor</string>
+                                                                                                               <reference key="NSColor" ref="544409939"/>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="783405221">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{562, 233}, {84, 19}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="351953267">
+                                                                                                       <int key="NSCellFlags">-1804468671</int>
+                                                                                                       <int key="NSCellFlags2">4326400</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="783405221"/>
+                                                                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                                                                       <reference key="NSBackgroundColor" ref="138233214"/>
+                                                                                                       <reference key="NSTextColor" ref="378140636"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSSlider" id="239657287">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{433, 185}, {213, 18}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSSliderCell" key="NSCell" id="160453387">
+                                                                                                       <int key="NSCellFlags">67501824</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <object class="NSMutableString" key="NSContents">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <object class="NSFont" key="NSSupport">
+                                                                                                               <string key="NSName">Helvetica-Oblique</string>
+                                                                                                               <double key="NSSize">1.200000e+01</double>
+                                                                                                               <int key="NSfFlags">16</int>
+                                                                                                       </object>
+                                                                                                       <reference key="NSControlView" ref="239657287"/>
+                                                                                                       <double key="NSMaxValue">1.000000e+00</double>
+                                                                                                       <double key="NSMinValue">0.000000e+00</double>
+                                                                                                       <double key="NSValue">5.400000e-01</double>
+                                                                                                       <double key="NSAltIncValue">0.000000e+00</double>
+                                                                                                       <int key="NSNumberOfTickMarks">101</int>
+                                                                                                       <int key="NSTickMarkPosition">1</int>
+                                                                                                       <bool key="NSAllowsTickMarkValuesOnly">YES</bool>
+                                                                                                       <bool key="NSVertical">NO</bool>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="219409733">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{14, 119}, {93, 17}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="215270136">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">272629760</int>
+                                                                                                       <string key="NSContents">Picture Settings</string>
+                                                                                                       <object class="NSFont" key="NSSupport" id="27">
+                                                                                                               <string key="NSName">LucidaGrande-Bold</string>
+                                                                                                               <double key="NSSize">1.100000e+01</double>
+                                                                                                               <int key="NSfFlags">3357</int>
+                                                                                                       </object>
+                                                                                                       <reference key="NSControlView" ref="219409733"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="373965512">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{14, 99}, {96, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="656776160">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Source:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="373965512"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="917474208">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{14, 77}, {96, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="1021257184">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Output:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="917474208"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="946417297">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{246, 99}, {100, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="531090746">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Keep aspect ratio:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="946417297"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="982947780">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{354, 99}, {47, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="86719269">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">272629760</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="982947780"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSBox" id="839994488">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{115, 125}, {582, 5}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <string key="NSOffsets">{0, 0}</string>
+                                                                                               <object class="NSTextFieldCell" key="NSTitleCell">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                       <string key="NSContents">Box</string>
+                                                                                                       <reference key="NSSupport" ref="273283760"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="138233214"/>
+                                                                                                       <object class="NSColor" key="NSTextColor">
+                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                               <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <int key="NSBorderType">3</int>
+                                                                                               <int key="NSBoxType">2</int>
+                                                                                               <int key="NSTitlePosition">0</int>
+                                                                                               <bool key="NSTransparent">NO</bool>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="710962186">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{14, 55}, {96, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="26279285">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Anamorphic:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="710962186"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="145957234">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">-2147483392</int>
+                                                                                               <string key="NSFrame">{{119, 38}, {37, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="497251062">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">4194304</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="145957234"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSButton" id="37121296">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{580, 95}, {122, 28}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSButtonCell" key="NSCell" id="969536223">
+                                                                                                       <int key="NSCellFlags">-2080244224</int>
+                                                                                                       <int key="NSCellFlags2">134348800</int>
+                                                                                                       <string type="base64-UTF8" key="NSContents">UGljdHVyZSBTZXR0aW5nc+KApg</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="37121296"/>
+                                                                                                       <int key="NSButtonFlags">-2038284033</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="26"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">200</int>
+                                                                                                       <int key="NSPeriodicInterval">25</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="690364175">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{312, 77}, {34, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="508148739">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Crop:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="690364175"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="820525517">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{354, 76}, {47, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="76686465">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">272629760</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="820525517"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="585235372">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{503, 79}, {56, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="782049171">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">272629760</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="585235372"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="1068503811">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{503, 60}, {56, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="626403977">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">272629760</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="1068503811"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="1060179806">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{427, 99}, {68, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="344072439">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Denoise:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="1060179806"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="511739402">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{503, 40}, {56, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="315802325">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">272629760</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="511739402"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="458722452">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{427, 40}, {68, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="133553303">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Deblock:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="458722452"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="1072509220">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{503, 99}, {56, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="965262561">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">272629760</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="1072509220"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="43900501">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{427, 79}, {68, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="1005519170">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Detelecine:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="43900501"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="999897202">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{427, 60}, {68, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="749563917">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Deinterlace:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="999897202"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="1017614971">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{119, 99}, {99, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="370959642">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">272629760</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="1017614971"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="580175226">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{119, 77}, {99, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="82054988">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">272629760</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="580175226"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="149133624">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{119, 55}, {155, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="334116173">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">272629760</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="149133624"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="222980245">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{123, 229}, {168, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="343952154">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="222980245"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="26"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="996965095">
+                                                                                                               <reference key="NSMenu" ref="794681411"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <object class="NSCustomResource" key="NSOnImage" id="447995298">
+                                                                                                                       <string key="NSClassName">NSImage</string>
+                                                                                                                       <string key="NSResourceName">NSMenuCheckmark</string>
+                                                                                                               </object>
+                                                                                                               <object class="NSCustomResource" key="NSMixedImage" id="760317610">
+                                                                                                                       <string key="NSClassName">NSImage</string>
+                                                                                                                       <string key="NSResourceName">NSMenuMixedState</string>
+                                                                                                               </object>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="343952154"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="794681411">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="996965095"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSButton" id="1000247853">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{123, 188}, {124, 18}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSButtonCell" key="NSCell" id="860863090">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <string key="NSContents">2-pass encoding</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="1000247853"/>
+                                                                                                       <int key="NSButtonFlags">1211912703</int>
+                                                                                                       <int key="NSButtonFlags2">2</int>
+                                                                                                       <object class="NSButtonImageSource" key="NSAlternateImage" id="624832340">
+                                                                                                               <string key="NSImageName">NSSwitch</string>
+                                                                                                       </object>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <string key="NSKeyEquivalent"/>
+                                                                                                       <int key="NSPeriodicDelay">200</int>
+                                                                                                       <int key="NSPeriodicInterval">25</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSButton" id="447003158">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{140, 170}, {107, 16}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSButtonCell" key="NSCell" id="1070893195">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <string key="NSContents">Turbo first pass</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="447003158"/>
+                                                                                                       <int key="NSButtonFlags">1211912703</int>
+                                                                                                       <int key="NSButtonFlags2">2</int>
+                                                                                                       <object class="NSCustomResource" key="NSNormalImage" id="887198214">
+                                                                                                               <string key="NSClassName">NSImage</string>
+                                                                                                               <string key="NSResourceName">NSSwitch</string>
+                                                                                                       </object>
+                                                                                                       <reference key="NSAlternateImage" ref="624832340"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <string key="NSKeyEquivalent"/>
+                                                                                                       <int key="NSPeriodicDelay">200</int>
+                                                                                                       <int key="NSPeriodicInterval">25</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="12330413">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{123, 254}, {168, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="1018849574">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="12330413"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="26"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="536275725">
+                                                                                                               <reference key="NSMenu" ref="605902924"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="1018849574"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="605902924">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="536275725"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSButton" id="586924601">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{123, 210}, {133, 18}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSButtonCell" key="NSCell" id="531797832">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <string key="NSContents">Grayscale encoding</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="586924601"/>
+                                                                                                       <int key="NSButtonFlags">1211912703</int>
+                                                                                                       <int key="NSButtonFlags2">2</int>
+                                                                                                       <reference key="NSAlternateImage" ref="624832340"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <string key="NSKeyEquivalent"/>
+                                                                                                       <int key="NSPeriodicDelay">200</int>
+                                                                                                       <int key="NSPeriodicInterval">25</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="463960465">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{-1, 231}, {119, 17}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="509250281">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Framerate (FPS):</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="463960465"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="1064150725">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{11, 256}, {107, 17}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="451922400">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Video Codec:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="1064150725"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="946167393">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{503, 21}, {140, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="152262221">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">272629760</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="946167393"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="554762309">
+                                                                                               <reference key="NSNextResponder" ref="1053078401"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{428, 17}, {68, 17}}</string>
+                                                                                               <reference key="NSSuperview" ref="1053078401"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="2157">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Decomb:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="554762309"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <string key="NSFrame">{{10, 25}, {714, 305}}</string>
+                                                                               <reference key="NSSuperview" ref="712502892"/>
+                                                                       </object>
+                                                                       <string key="NSLabel">Video</string>
+                                                                       <reference key="NSColor" ref="242973447"/>
+                                                                       <reference key="NSTabView" ref="712502892"/>
+                                                               </object>
+                                                               <object class="NSTabViewItem" id="157300012">
+                                                                       <string key="NSIdentifier">2</string>
+                                                                       <object class="NSView" key="NSView" id="738554558">
+                                                                               <nil key="NSNextResponder"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSTextField" id="198352083">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{5, 226}, {48, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="93020318"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="51721961">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71434240</int>
+                                                                                                       <string key="NSContents">Track 1:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="198352083"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="641072930">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{54, 191}, {178, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="68754422"/>
+                                                                                               <int key="NSTag">1</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="442718934">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="641072930"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <object class="NSFont" key="NSAlternateImage" id="995413175">
+                                                                                                               <string key="NSName">LucidaGrande</string>
+                                                                                                               <double key="NSSize">1.100000e+01</double>
+                                                                                                               <int key="NSfFlags">16</int>
+                                                                                                       </object>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="484803315">
+                                                                                                               <reference key="NSMenu" ref="417760816"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="442718934"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="417760816">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="484803315"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="290434291">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{5, 196}, {48, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="641072930"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="315823608">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71434240</int>
+                                                                                                       <string key="NSContents">Track 2:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="290434291"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="122023676">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{572, 248}, {80, 13}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="351922892"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="92788757">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">138674176</int>
+                                                                                                       <string key="NSContents">Bitrate (kbps)</string>
+                                                                                                       <object class="NSFont" key="NSSupport" id="22">
+                                                                                                               <string key="NSName">LucidaGrande</string>
+                                                                                                               <double key="NSSize">9.000000e+00</double>
+                                                                                                               <int key="NSfFlags">3614</int>
+                                                                                                       </object>
+                                                                                                       <reference key="NSControlView" ref="122023676"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="351922892">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{578, 221}, {66, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="436388527"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="569025834">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="351922892"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="53010878">
+                                                                                                               <reference key="NSMenu" ref="389043188"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="569025834"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="389043188">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="53010878"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="436388527">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{-10, 48}, {70, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="506492318"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="95314231">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                                       <string key="NSContents">Subtitles:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="436388527"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="506492318">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{65, 42}, {157, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="712502892"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="636153290">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="506492318"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="26"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="432645698">
+                                                                                                               <reference key="NSMenu" ref="121028261"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="636153290"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="121028261">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="432645698"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="64899409">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{362, 220}, {139, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="290434291"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="581778322">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="64899409"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="803452967">
+                                                                                                               <reference key="NSMenu" ref="142584693"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="581778322"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="142584693">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="803452967"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="211624488">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{374, 250}, {81, 11}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="64899409"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="109899703">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">138674176</int>
+                                                                                                       <string key="NSContents">Mixdown</string>
+                                                                                                       <reference key="NSSupport" ref="22"/>
+                                                                                                       <reference key="NSControlView" ref="211624488"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="354208181">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{362, 191}, {139, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="592255786"/>
+                                                                                               <int key="NSTag">1</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="1011395150">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="354208181"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="909780825">
+                                                                                                               <reference key="NSMenu" ref="674797640"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="1011395150"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="674797640">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="909780825"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSButton" id="691038230">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{229, 46}, {147, 17}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSButtonCell" key="NSCell" id="944590907">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <string key="NSContents">Forced Subtitles Only</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="691038230"/>
+                                                                                                       <int key="NSButtonFlags">1211912703</int>
+                                                                                                       <int key="NSButtonFlags2">2</int>
+                                                                                                       <reference key="NSAlternateImage" ref="624832340"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <string key="NSKeyEquivalent"/>
+                                                                                                       <int key="NSPeriodicDelay">200</int>
+                                                                                                       <int key="NSPeriodicInterval">25</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="978534247">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{17, 279}, {79, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="211433572">
+                                                                                                       <int key="NSCellFlags">67239488</int>
+                                                                                                       <int key="NSCellFlags2">272761856</int>
+                                                                                                       <string key="NSContents">Audio Tracks</string>
+                                                                                                       <object class="NSFont" key="NSSupport" id="347509359">
+                                                                                                               <string key="NSName">LucidaGrande-Bold</string>
+                                                                                                               <double key="NSSize">1.100000e+01</double>
+                                                                                                               <int key="NSfFlags">16</int>
+                                                                                                       </object>
+                                                                                                       <reference key="NSControlView" ref="978534247"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSBox" id="460286942">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{104, 283}, {601, 5}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <string key="NSOffsets">{0, 0}</string>
+                                                                                               <object class="NSTextFieldCell" key="NSTitleCell">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                       <string key="NSContents">Box</string>
+                                                                                                       <reference key="NSSupport" ref="273283760"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="138233214"/>
+                                                                                                       <object class="NSColor" key="NSTextColor">
+                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                               <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <int key="NSBorderType">3</int>
+                                                                                               <int key="NSBoxType">2</int>
+                                                                                               <int key="NSTitlePosition">0</int>
+                                                                                               <bool key="NSTransparent">NO</bool>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="68754422">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{90, 250}, {81, 11}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="354208181"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="1013303839">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">138674176</int>
+                                                                                                       <string key="NSContents">Source</string>
+                                                                                                       <reference key="NSSupport" ref="22"/>
+                                                                                                       <reference key="NSControlView" ref="68754422"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSBox" id="124979328">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{86, 84}, {624, 5}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <string key="NSOffsets">{0, 0}</string>
+                                                                                               <object class="NSTextFieldCell" key="NSTitleCell">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                       <string key="NSContents">Box</string>
+                                                                                                       <reference key="NSSupport" ref="273283760"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="138233214"/>
+                                                                                                       <object class="NSColor" key="NSTextColor">
+                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                               <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <int key="NSBorderType">3</int>
+                                                                                               <int key="NSBoxType">2</int>
+                                                                                               <int key="NSTitlePosition">0</int>
+                                                                                               <bool key="NSTransparent">NO</bool>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="844196518">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{17, 79}, {54, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="653177228">
+                                                                                                       <int key="NSCellFlags">67239488</int>
+                                                                                                       <int key="NSCellFlags2">272761856</int>
+                                                                                                       <string key="NSContents">Subtitles</string>
+                                                                                                       <reference key="NSSupport" ref="347509359"/>
+                                                                                                       <reference key="NSControlView" ref="844196518"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="135824882">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{508, 221}, {64, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="122023676"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="47770866">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="135824882"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="122262864">
+                                                                                                               <reference key="NSMenu" ref="80517384"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="47770866"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="80517384">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="122262864"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="592255786">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{483, 245}, {101, 16}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="135824882"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="139205907">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">138674176</int>
+                                                                                                       <string key="NSContents">Samplerate (khz)</string>
+                                                                                                       <reference key="NSSupport" ref="22"/>
+                                                                                                       <reference key="NSControlView" ref="592255786"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="93020318">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{54, 221}, {178, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <reference key="NSNextKeyView" ref="211624488"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="555573644">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="93020318"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="16243588">
+                                                                                                               <reference key="NSMenu" ref="207945181"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="555573644"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="207945181">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="16243588"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="466865421">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{235, 221}, {122, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="546425857">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="466865421"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="780045253">
+                                                                                                               <reference key="NSMenu" ref="637766485"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="546425857"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="637766485">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="780045253"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="905865959">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{235, 191}, {122, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">1</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="597526693">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="905865959"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="839112264">
+                                                                                                               <reference key="NSMenu" ref="587264026"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="597526693"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="587264026">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="839112264"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="759329849">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{251, 250}, {81, 11}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="989243685">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">138674176</int>
+                                                                                                       <string key="NSContents">Audio Codec</string>
+                                                                                                       <reference key="NSSupport" ref="22"/>
+                                                                                                       <reference key="NSControlView" ref="759329849"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="979512783">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{5, 167}, {48, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="89611592">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71434240</int>
+                                                                                                       <string key="NSContents">Track 3:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="979512783"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="822590453">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{5, 139}, {48, 14}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="628539537">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">71434240</int>
+                                                                                                       <string key="NSContents">Track 4:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="822590453"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="59505660">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{54, 162}, {178, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">2</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="62643522">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="59505660"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="1071907387">
+                                                                                                               <reference key="NSMenu" ref="906154976"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="62643522"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="906154976">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="1071907387"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="952272880">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{54, 132}, {178, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">3</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="995278067">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="952272880"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="867303619">
+                                                                                                               <reference key="NSMenu" ref="842863259"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="995278067"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="842863259">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="867303619"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="826012798">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{235, 162}, {122, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">2</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="539072481">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="826012798"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="249799590">
+                                                                                                               <reference key="NSMenu" ref="284493447"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="539072481"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="284493447">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="249799590"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="210973520">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{235, 132}, {122, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">3</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="908345921">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="210973520"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="899331996">
+                                                                                                               <reference key="NSMenu" ref="718591795"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="908345921"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="718591795">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="899331996"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="838524493">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{362, 162}, {139, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">2</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="273746940">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="838524493"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="903801986">
+                                                                                                               <reference key="NSMenu" ref="601838973"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="273746940"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="601838973">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="903801986"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="1068703394">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{362, 132}, {139, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">3</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="376486018">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="1068703394"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="775004825">
+                                                                                                               <reference key="NSMenu" ref="911510427"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="376486018"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="911510427">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="775004825"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="989777035">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{508, 191}, {64, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">1</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="98589714">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="989777035"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="1073059200">
+                                                                                                               <reference key="NSMenu" ref="843839970"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="98589714"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="843839970">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="1073059200"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="21683307">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{508, 162}, {64, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">2</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="27141415">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="21683307"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="848021411">
+                                                                                                               <reference key="NSMenu" ref="218736664"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="27141415"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="218736664">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="848021411"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="82044516">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{508, 132}, {64, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">3</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="828435207">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="82044516"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="306314205">
+                                                                                                               <reference key="NSMenu" ref="884417804"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="828435207"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="884417804">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="306314205"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="511205515">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{578, 191}, {66, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">1</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="631798512">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="511205515"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="395128474">
+                                                                                                               <reference key="NSMenu" ref="827185994"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="631798512"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="827185994">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="395128474"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="362406693">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{578, 162}, {66, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">2</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="494375275">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="362406693"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="509612152">
+                                                                                                               <reference key="NSMenu" ref="74387810"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="494375275"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="74387810">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="509612152"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSPopUpButton" id="596295285">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{578, 132}, {66, 22}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <int key="NSTag">3</int>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="88657835">
+                                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                                       <int key="NSCellFlags2">132096</int>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="596295285"/>
+                                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                                       <reference key="NSAlternateImage" ref="995413175"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="425953784">
+                                                                                                               <reference key="NSMenu" ref="819464815"/>
+                                                                                                               <string key="NSTitle"/>
+                                                                                                               <string key="NSKeyEquiv"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <int key="NSState">1</int>
+                                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="88657835"/>
+                                                                                                       </object>
+                                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                                       <object class="NSMenu" key="NSMenu" id="819464815">
+                                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="425953784"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                                       <int key="NSArrowPosition">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSSlider" id="861218370">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{658, 217}, {26, 31}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSSliderCell" key="NSCell" id="212633849">
+                                                                                                       <int key="NSCellFlags">-2079981824</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="861218370"/>
+                                                                                                       <double key="NSMaxValue">4.000000e+00</double>
+                                                                                                       <double key="NSMinValue">1.000000e+00</double>
+                                                                                                       <double key="NSValue">1.000000e+00</double>
+                                                                                                       <double key="NSAltIncValue">0.000000e+00</double>
+                                                                                                       <int key="NSNumberOfTickMarks">12</int>
+                                                                                                       <int key="NSTickMarkPosition">0</int>
+                                                                                                       <bool key="NSAllowsTickMarkValuesOnly">YES</bool>
+                                                                                                       <bool key="NSVertical">NO</bool>
+                                                                                                       <int key="NSSliderType">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSSlider" id="695663835">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{658, 187}, {26, 31}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSSliderCell" key="NSCell" id="198981160">
+                                                                                                       <int key="NSCellFlags">-2079981824</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <object class="NSFont" key="NSSupport" id="478239882">
+                                                                                                               <string key="NSName">Helvetica</string>
+                                                                                                               <double key="NSSize">1.200000e+01</double>
+                                                                                                               <int key="NSfFlags">16</int>
+                                                                                                       </object>
+                                                                                                       <reference key="NSControlView" ref="695663835"/>
+                                                                                                       <double key="NSMaxValue">4.000000e+00</double>
+                                                                                                       <double key="NSMinValue">1.000000e+00</double>
+                                                                                                       <double key="NSValue">1.000000e+00</double>
+                                                                                                       <double key="NSAltIncValue">0.000000e+00</double>
+                                                                                                       <int key="NSNumberOfTickMarks">12</int>
+                                                                                                       <int key="NSTickMarkPosition">0</int>
+                                                                                                       <bool key="NSAllowsTickMarkValuesOnly">YES</bool>
+                                                                                                       <bool key="NSVertical">NO</bool>
+                                                                                                       <int key="NSSliderType">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSSlider" id="229696812">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{658, 158}, {26, 31}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSSliderCell" key="NSCell" id="805488070">
+                                                                                                       <int key="NSCellFlags">-2079981824</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="478239882"/>
+                                                                                                       <reference key="NSControlView" ref="229696812"/>
+                                                                                                       <double key="NSMaxValue">4.000000e+00</double>
+                                                                                                       <double key="NSMinValue">1.000000e+00</double>
+                                                                                                       <double key="NSValue">1.000000e+00</double>
+                                                                                                       <double key="NSAltIncValue">0.000000e+00</double>
+                                                                                                       <int key="NSNumberOfTickMarks">12</int>
+                                                                                                       <int key="NSTickMarkPosition">0</int>
+                                                                                                       <bool key="NSAllowsTickMarkValuesOnly">YES</bool>
+                                                                                                       <bool key="NSVertical">NO</bool>
+                                                                                                       <int key="NSSliderType">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSSlider" id="927860050">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{658, 128}, {26, 31}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSSliderCell" key="NSCell" id="1037957700">
+                                                                                                       <int key="NSCellFlags">-2079981824</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <string key="NSContents"/>
+                                                                                                       <reference key="NSSupport" ref="478239882"/>
+                                                                                                       <reference key="NSControlView" ref="927860050"/>
+                                                                                                       <double key="NSMaxValue">4.000000e+00</double>
+                                                                                                       <double key="NSMinValue">1.000000e+00</double>
+                                                                                                       <double key="NSValue">1.000000e+00</double>
+                                                                                                       <double key="NSAltIncValue">0.000000e+00</double>
+                                                                                                       <int key="NSNumberOfTickMarks">12</int>
+                                                                                                       <int key="NSTickMarkPosition">0</int>
+                                                                                                       <bool key="NSAllowsTickMarkValuesOnly">YES</bool>
+                                                                                                       <bool key="NSVertical">NO</bool>
+                                                                                                       <int key="NSSliderType">1</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="169748081">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{651, 249}, {40, 11}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="366629849">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">138674176</int>
+                                                                                                       <string key="NSContents">DRC</string>
+                                                                                                       <reference key="NSSupport" ref="22"/>
+                                                                                                       <reference key="NSControlView" ref="169748081"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="532012054">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{685, 227}, {26, 11}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="750019806">
+                                                                                                       <int key="NSCellFlags">67239488</int>
+                                                                                                       <int key="NSCellFlags2">272892928</int>
+                                                                                                       <string key="NSContents">1.0</string>
+                                                                                                       <reference key="NSSupport" ref="22"/>
+                                                                                                       <reference key="NSControlView" ref="532012054"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="850861055">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{685, 197}, {26, 11}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="539528192">
+                                                                                                       <int key="NSCellFlags">67239488</int>
+                                                                                                       <int key="NSCellFlags2">272892928</int>
+                                                                                                       <string key="NSContents">1.0</string>
+                                                                                                       <reference key="NSSupport" ref="22"/>
+                                                                                                       <reference key="NSControlView" ref="850861055"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="988102670">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{686, 168}, {26, 11}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="477201006">
+                                                                                                       <int key="NSCellFlags">67239488</int>
+                                                                                                       <int key="NSCellFlags2">272892928</int>
+                                                                                                       <string key="NSContents">1.0</string>
+                                                                                                       <reference key="NSSupport" ref="22"/>
+                                                                                                       <reference key="NSControlView" ref="988102670"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <object class="NSTextField" id="758473796">
+                                                                                               <reference key="NSNextResponder" ref="738554558"/>
+                                                                                               <int key="NSvFlags">268</int>
+                                                                                               <string key="NSFrame">{{685, 140}, {26, 11}}</string>
+                                                                                               <reference key="NSSuperview" ref="738554558"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSTextFieldCell" key="NSCell" id="941741345">
+                                                                                                       <int key="NSCellFlags">67239488</int>
+                                                                                                       <int key="NSCellFlags2">272892928</int>
+                                                                                                       <string key="NSContents">1.0</string>
+                                                                                                       <reference key="NSSupport" ref="22"/>
+                                                                                                       <reference key="NSControlView" ref="758473796"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="242973447"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <string key="NSFrame">{{10, 25}, {714, 305}}</string>
+                                                                               <reference key="NSNextKeyView" ref="198352083"/>
+                                                                       </object>
+                                                                       <string type="base64-UTF8" key="NSLabel">QXVkaW8gJiBTdWJ0aXRsZXM</string>
+                                                                       <reference key="NSColor" ref="242973447"/>
+                                                                       <reference key="NSTabView" ref="712502892"/>
+                                                               </object>
+                                                               <object class="NSTabViewItem" id="291470012">
+                                                                       <string key="NSIdentifier">3</string>
+                                                                       <object class="NSView" key="NSView" id="440990725">
+                                                                               <nil key="NSNextResponder"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSScrollView" id="307620967">
+                                                                                               <reference key="NSNextResponder" ref="440990725"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <object class="NSClipView" id="272816362">
+                                                                                                               <reference key="NSNextResponder" ref="307620967"/>
+                                                                                                               <int key="NSvFlags">2304</int>
+                                                                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <object class="NSTableView" id="595654978">
+                                                                                                                               <reference key="NSNextResponder" ref="272816362"/>
+                                                                                                                               <int key="NSvFlags">256</int>
+                                                                                                                               <string key="NSFrameSize">{663, 233}</string>
+                                                                                                                               <reference key="NSSuperview" ref="272816362"/>
+                                                                                                                               <reference key="NSNextKeyView" ref="1033243513"/>
+                                                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                                                               <object class="NSTableHeaderView" key="NSHeaderView" id="928480858">
+                                                                                                                                       <reference key="NSNextResponder" ref="814110287"/>
+                                                                                                                                       <int key="NSvFlags">256</int>
+                                                                                                                                       <string key="NSFrameSize">{663, 17}</string>
+                                                                                                                                       <reference key="NSSuperview" ref="814110287"/>
+                                                                                                                                       <reference key="NSNextKeyView" ref="393843623"/>
+                                                                                                                                       <reference key="NSTableView" ref="595654978"/>
+                                                                                                                               </object>
+                                                                                                                               <object class="_NSCornerView" key="NSCornerView" id="393843623">
+                                                                                                                                       <reference key="NSNextResponder" ref="307620967"/>
+                                                                                                                                       <int key="NSvFlags">256</int>
+                                                                                                                                       <string key="NSFrame">{{664, 0}, {16, 17}}</string>
+                                                                                                                                       <reference key="NSSuperview" ref="307620967"/>
+                                                                                                                                       <reference key="NSNextKeyView" ref="272816362"/>
+                                                                                                                               </object>
+                                                                                                                               <object class="NSMutableArray" key="NSTableColumns">
+                                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                                       <object class="NSTableColumn" id="77208310">
+                                                                                                                                               <string key="NSIdentifier">1</string>
+                                                                                                                                               <double key="NSWidth">5.100000e+01</double>
+                                                                                                                                               <double key="NSMinWidth">4.000000e+01</double>
+                                                                                                                                               <double key="NSMaxWidth">1.000000e+03</double>
+                                                                                                                                               <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                                                                       <int key="NSCellFlags">75628032</int>
+                                                                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                                                                       <string key="NSContents">Chapter</string>
+                                                                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                                                                       <object class="NSColor" key="NSBackgroundColor" id="754789485">
+                                                                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                                                                               <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+                                                                                                                                                       </object>
+                                                                                                                                                       <object class="NSColor" key="NSTextColor" id="188451177">
+                                                                                                                                                               <int key="NSColorSpace">6</int>
+                                                                                                                                                               <string key="NSCatalogName">System</string>
+                                                                                                                                                               <string key="NSColorName">headerTextColor</string>
+                                                                                                                                                               <reference key="NSColor" ref="544409939"/>
+                                                                                                                                                       </object>
+                                                                                                                                               </object>
+                                                                                                                                               <object class="NSTextFieldCell" key="NSDataCell" id="686068440">
+                                                                                                                                                       <int key="NSCellFlags">337772096</int>
+                                                                                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                                                                                       <string key="NSContents">Text Cell</string>
+                                                                                                                                                       <reference key="NSSupport" ref="995413175"/>
+                                                                                                                                                       <reference key="NSControlView" ref="595654978"/>
+                                                                                                                                                       <object class="NSColor" key="NSBackgroundColor" id="355843302">
+                                                                                                                                                               <int key="NSColorSpace">6</int>
+                                                                                                                                                               <string key="NSCatalogName">System</string>
+                                                                                                                                                               <string key="NSColorName">controlBackgroundColor</string>
+                                                                                                                                                               <reference key="NSColor" ref="458742033"/>
+                                                                                                                                                       </object>
+                                                                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                                                                               </object>
+                                                                                                                                               <int key="NSResizingMask">3</int>
+                                                                                                                                               <bool key="NSIsResizeable">YES</bool>
+                                                                                                                                               <reference key="NSTableView" ref="595654978"/>
+                                                                                                                                       </object>
+                                                                                                                                       <object class="NSTableColumn" id="932392163">
+                                                                                                                                               <string key="NSIdentifier">2</string>
+                                                                                                                                               <double key="NSWidth">6.060000e+02</double>
+                                                                                                                                               <double key="NSMinWidth">7.721729e+01</double>
+                                                                                                                                               <double key="NSMaxWidth">1.000000e+03</double>
+                                                                                                                                               <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                                                                       <int key="NSCellFlags">75628032</int>
+                                                                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                                                                       <string key="NSContents">Chapter Title</string>
+                                                                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                                                                       <reference key="NSBackgroundColor" ref="754789485"/>
+                                                                                                                                                       <reference key="NSTextColor" ref="188451177"/>
+                                                                                                                                               </object>
+                                                                                                                                               <object class="NSTextFieldCell" key="NSDataCell" id="237660698">
+                                                                                                                                                       <int key="NSCellFlags">337772096</int>
+                                                                                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                                                                                       <string key="NSContents">Text Cell</string>
+                                                                                                                                                       <reference key="NSSupport" ref="995413175"/>
+                                                                                                                                                       <reference key="NSControlView" ref="595654978"/>
+                                                                                                                                                       <reference key="NSBackgroundColor" ref="355843302"/>
+                                                                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                                                                               </object>
+                                                                                                                                               <int key="NSResizingMask">3</int>
+                                                                                                                                               <bool key="NSIsResizeable">YES</bool>
+                                                                                                                                               <bool key="NSIsEditable">YES</bool>
+                                                                                                                                               <reference key="NSTableView" ref="595654978"/>
+                                                                                                                                       </object>
+                                                                                                                               </object>
+                                                                                                                               <double key="NSIntercellSpacingWidth">3.000000e+00</double>
+                                                                                                                               <double key="NSIntercellSpacingHeight">2.000000e+00</double>
+                                                                                                                               <reference key="NSBackgroundColor" ref="809784795"/>
+                                                                                                                               <object class="NSColor" key="NSGridColor" id="156710040">
+                                                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                                                       <string key="NSCatalogName">System</string>
+                                                                                                                                       <string key="NSColorName">gridColor</string>
+                                                                                                                                       <object class="NSColor" key="NSColor">
+                                                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                                                               <bytes key="NSWhite">MC41AA</bytes>
+                                                                                                                                       </object>
+                                                                                                                               </object>
+                                                                                                                               <double key="NSRowHeight">1.700000e+01</double>
+                                                                                                                               <int key="NSTvFlags">-700448768</int>
+                                                                                                                               <int key="NSColumnAutoresizingStyle">4</int>
+                                                                                                                               <int key="NSDraggingSourceMaskForLocal">15</int>
+                                                                                                                               <int key="NSDraggingSourceMaskForNonLocal">0</int>
+                                                                                                                               <bool key="NSAllowsTypeSelect">YES</bool>
+                                                                                                                       </object>
+                                                                                                               </object>
+                                                                                                               <string key="NSFrame">{{1, 17}, {663, 233}}</string>
+                                                                                                               <reference key="NSSuperview" ref="307620967"/>
+                                                                                                               <reference key="NSNextKeyView" ref="595654978"/>
+                                                                                                               <reference key="NSDocView" ref="595654978"/>
+                                                                                                               <reference key="NSBGColor" ref="355843302"/>
+                                                                                                               <int key="NScvFlags">4</int>
+                                                                                                       </object>
+                                                                                                       <object class="NSScroller" id="1046880533">
+                                                                                                               <reference key="NSNextResponder" ref="307620967"/>
+                                                                                                               <int key="NSvFlags">256</int>
+                                                                                                               <string key="NSFrame">{{664, 17}, {15, 233}}</string>
+                                                                                                               <reference key="NSSuperview" ref="307620967"/>
+                                                                                                               <reference key="NSNextKeyView" ref="712502892"/>
+                                                                                                               <reference key="NSTarget" ref="307620967"/>
+                                                                                                               <string key="NSAction">_doScroller:</string>
+                                                                                                               <double key="NSPercent">9.736842e-01</double>
+                                                                                                       </object>
+                                                                                                       <object class="NSScroller" id="1033243513">
+                                                                                                               <reference key="NSNextResponder" ref="307620967"/>
+                                                                                                               <int key="NSvFlags">256</int>
+                                                                                                               <string key="NSFrame">{{-100, -100}, {488, 15}}</string>
+                                                                                                               <reference key="NSSuperview" ref="307620967"/>
+                                                                                                               <reference key="NSNextKeyView" ref="814110287"/>
+                                                                                                               <int key="NSsFlags">1</int>
+                                                                                                               <reference key="NSTarget" ref="307620967"/>
+                                                                                                               <string key="NSAction">_doScroller:</string>
+                                                                                                               <double key="NSPercent">9.904762e-01</double>
+                                                                                                       </object>
+                                                                                                       <object class="NSClipView" id="814110287">
+                                                                                                               <reference key="NSNextResponder" ref="307620967"/>
+                                                                                                               <int key="NSvFlags">2304</int>
+                                                                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <reference ref="928480858"/>
+                                                                                                               </object>
+                                                                                                               <string key="NSFrame">{{1, 0}, {663, 17}}</string>
+                                                                                                               <reference key="NSSuperview" ref="307620967"/>
+                                                                                                               <reference key="NSNextKeyView" ref="928480858"/>
+                                                                                                               <reference key="NSDocView" ref="928480858"/>
+                                                                                                               <reference key="NSBGColor" ref="355843302"/>
+                                                                                                               <int key="NScvFlags">4</int>
+                                                                                                       </object>
+                                                                                                       <reference ref="393843623"/>
+                                                                                               </object>
+                                                                                               <string key="NSFrame">{{17, 17}, {680, 251}}</string>
+                                                                                               <reference key="NSSuperview" ref="440990725"/>
+                                                                                               <reference key="NSNextKeyView" ref="272816362"/>
+                                                                                               <int key="NSsFlags">18</int>
+                                                                                               <reference key="NSVScroller" ref="1046880533"/>
+                                                                                               <reference key="NSHScroller" ref="1033243513"/>
+                                                                                               <reference key="NSContentView" ref="272816362"/>
+                                                                                               <reference key="NSHeaderClipView" ref="814110287"/>
+                                                                                               <reference key="NSCornerView" ref="393843623"/>
+                                                                                               <bytes key="NSScrollAmts">AAAAAAAAAABBmAAAQZgAAA</bytes>
+                                                                                       </object>
+                                                                                       <object class="NSButton" id="262106913">
+                                                                                               <reference key="NSNextResponder" ref="440990725"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{14, 274}, {151, 16}}</string>
+                                                                                               <reference key="NSSuperview" ref="440990725"/>
+                                                                                               <reference key="NSNextKeyView" ref="307620967"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <object class="NSButtonCell" key="NSCell" id="719511430">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <string key="NSContents">Create chapter markers</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="262106913"/>
+                                                                                                       <int key="NSButtonFlags">1211912703</int>
+                                                                                                       <int key="NSButtonFlags2">2</int>
+                                                                                                       <reference key="NSAlternateImage" ref="624832340"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <string key="NSKeyEquivalent"/>
+                                                                                                       <int key="NSPeriodicDelay">200</int>
+                                                                                                       <int key="NSPeriodicInterval">25</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <string key="NSFrame">{{10, 25}, {714, 305}}</string>
+                                                                               <reference key="NSNextKeyView" ref="262106913"/>
+                                                                       </object>
+                                                                       <string key="NSLabel">Chapters</string>
+                                                                       <reference key="NSColor" ref="242973447"/>
+                                                                       <reference key="NSTabView" ref="712502892"/>
+                                                               </object>
+                                                               <object class="NSTabViewItem" id="744678564">
+                                                                       <string key="NSIdentifier">4</string>
+                                                                       <object class="NSView" key="NSView" id="833271282">
+                                                                               <nil key="NSNextResponder"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSBox" id="231506045">
+                                                                                               <reference key="NSNextResponder" ref="833271282"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <object class="NSView" id="815869140">
+                                                                                                               <reference key="NSNextResponder" ref="231506045"/>
+                                                                                                               <int key="NSvFlags">256</int>
+                                                                                                               <string key="NSFrameSize">{700, 290}</string>
+                                                                                                               <reference key="NSSuperview" ref="231506045"/>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <string key="NSFrame">{{7, 8}, {700, 290}}</string>
+                                                                                               <reference key="NSSuperview" ref="833271282"/>
+                                                                                               <string key="NSOffsets">{0, 0}</string>
+                                                                                               <object class="NSTextFieldCell" key="NSTitleCell">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                       <string key="NSContents">Box</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="138233214"/>
+                                                                                                       <object class="NSColor" key="NSTextColor">
+                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                               <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <reference key="NSContentView" ref="815869140"/>
+                                                                                               <int key="NSBorderType">0</int>
+                                                                                               <int key="NSBoxType">3</int>
+                                                                                               <int key="NSTitlePosition">0</int>
+                                                                                               <bool key="NSTransparent">NO</bool>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <string key="NSFrame">{{10, 25}, {714, 305}}</string>
+                                                                       </object>
+                                                                       <string key="NSLabel">Advanced</string>
+                                                                       <reference key="NSColor" ref="242973447"/>
+                                                                       <reference key="NSTabView" ref="712502892"/>
+                                                               </object>
+                                                       </object>
+                                                       <reference key="NSSelectedTabViewItem" ref="107038816"/>
+                                                       <reference key="NSFont" ref="26"/>
+                                                       <int key="NSTvFlags">134217728</int>
+                                                       <bool key="NSAllowTruncatedLabels">YES</bool>
+                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <reference ref="1053078401"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="586321835">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{20, 522}, {45, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="121574898">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">4325376</int>
+                                                               <string key="NSContents">Source:</string>
+                                                               <reference key="NSSupport" ref="27"/>
+                                                               <reference key="NSControlView" ref="586321835"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="806469067">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{39, 495}, {35, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="177567437">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">71303168</int>
+                                                               <string key="NSContents">Title:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="806469067"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSPopUpButton" id="766125203">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{76, 490}, {177, 22}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSPopUpButtonCell" key="NSCell" id="821198683">
+                                                               <int key="NSCellFlags">-2076049856</int>
+                                                               <int key="NSCellFlags2">132096</int>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="766125203"/>
+                                                               <int key="NSButtonFlags">109199615</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <reference key="NSAlternateImage" ref="26"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                       <characters key="NS.bytes"/>
+                                                               </object>
+                                                               <int key="NSPeriodicDelay">400</int>
+                                                               <int key="NSPeriodicInterval">75</int>
+                                                               <object class="NSMenuItem" key="NSMenuItem" id="52855721">
+                                                                       <reference key="NSMenu" ref="793162058"/>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <int key="NSState">1</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                       <reference key="NSTarget" ref="821198683"/>
+                                                               </object>
+                                                               <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                               <object class="NSMenu" key="NSMenu" id="793162058">
+                                                                       <object class="NSMutableString" key="NSTitle">
+                                                                               <characters key="NS.bytes">OtherViews</characters>
+                                                                       </object>
+                                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <reference ref="52855721"/>
+                                                                       </object>
+                                                               </object>
+                                                               <int key="NSPreferredEdge">3</int>
+                                                               <bool key="NSUsesItemFromMenu">YES</bool>
+                                                               <bool key="NSAltersState">YES</bool>
+                                                               <int key="NSArrowPosition">1</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="1053010160">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{321, 495}, {65, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="17369297">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">71303168</int>
+                                                               <string key="NSContents">Chapters:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="1053010160"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSPopUpButton" id="971754180">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{388, 490}, {65, 22}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSPopUpButtonCell" key="NSCell" id="286887304">
+                                                               <int key="NSCellFlags">-2076049856</int>
+                                                               <int key="NSCellFlags2">132096</int>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="971754180"/>
+                                                               <int key="NSButtonFlags">109199615</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <reference key="NSAlternateImage" ref="26"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                       <characters key="NS.bytes"/>
+                                                               </object>
+                                                               <int key="NSPeriodicDelay">400</int>
+                                                               <int key="NSPeriodicInterval">75</int>
+                                                               <object class="NSMenuItem" key="NSMenuItem" id="170826719">
+                                                                       <reference key="NSMenu" ref="493845446"/>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <int key="NSState">1</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                       <reference key="NSTarget" ref="286887304"/>
+                                                               </object>
+                                                               <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                               <object class="NSMenu" key="NSMenu" id="493845446">
+                                                                       <object class="NSMutableString" key="NSTitle">
+                                                                               <characters key="NS.bytes">OtherViews</characters>
+                                                                       </object>
+                                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <reference ref="170826719"/>
+                                                                       </object>
+                                                               </object>
+                                                               <int key="NSPreferredEdge">3</int>
+                                                               <bool key="NSUsesItemFromMenu">YES</bool>
+                                                               <bool key="NSAltersState">YES</bool>
+                                                               <int key="NSArrowPosition">1</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSPopUpButton" id="453345136">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{510, 490}, {65, 22}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSPopUpButtonCell" key="NSCell" id="564669343">
+                                                               <int key="NSCellFlags">-2076049856</int>
+                                                               <int key="NSCellFlags2">132096</int>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="453345136"/>
+                                                               <int key="NSButtonFlags">109199615</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <reference key="NSAlternateImage" ref="26"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                       <characters key="NS.bytes"/>
+                                                               </object>
+                                                               <int key="NSPeriodicDelay">400</int>
+                                                               <int key="NSPeriodicInterval">75</int>
+                                                               <object class="NSMenuItem" key="NSMenuItem" id="1048999115">
+                                                                       <reference key="NSMenu" ref="27255767"/>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <int key="NSState">1</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                       <reference key="NSTarget" ref="564669343"/>
+                                                               </object>
+                                                               <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                               <object class="NSMenu" key="NSMenu" id="27255767">
+                                                                       <object class="NSMutableString" key="NSTitle">
+                                                                               <characters key="NS.bytes">OtherViews</characters>
+                                                                       </object>
+                                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <reference ref="1048999115"/>
+                                                                       </object>
+                                                               </object>
+                                                               <int key="NSPreferredEdge">3</int>
+                                                               <bool key="NSUsesItemFromMenu">YES</bool>
+                                                               <bool key="NSAltersState">YES</bool>
+                                                               <int key="NSArrowPosition">1</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="200266929">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{455, 494}, {51, 15}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="904849236">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">138412032</int>
+                                                               <string key="NSContents">through</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="200266929"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="1023408378">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{27, 440}, {47, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="834340599">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">71303168</int>
+                                                               <string key="NSContents">File:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="1023408378"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="713493964">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{612, 496}, {57, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="1038625481">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">71303168</int>
+                                                               <string key="NSContents">Duration:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="713493964"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="955053416">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{677, 496}, {63, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="362196160">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">71303168</int>
+                                                               <string key="NSContents"/>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="955053416"/>
+                                                               <object class="NSColor" key="NSBackgroundColor">
+                                                                       <int key="NSColorSpace">1</int>
+                                                                       <bytes key="NSRGB">MC43NjYzMDQzNyAtMCAwIDAAA</bytes>
+                                                               </object>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="138115732">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{20, 467}, {70, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="510160694">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">4325376</int>
+                                                               <string key="NSContents">Destination</string>
+                                                               <reference key="NSSupport" ref="27"/>
+                                                               <reference key="NSControlView" ref="138115732"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSPopUpButton" id="732193996">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{76, 380}, {177, 22}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSPopUpButtonCell" key="NSCell" id="264217237">
+                                                               <int key="NSCellFlags">-2076049856</int>
+                                                               <int key="NSCellFlags2">132096</int>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="732193996"/>
+                                                               <int key="NSButtonFlags">109199615</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <reference key="NSAlternateImage" ref="26"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                       <characters key="NS.bytes"/>
+                                                               </object>
+                                                               <int key="NSPeriodicDelay">400</int>
+                                                               <int key="NSPeriodicInterval">75</int>
+                                                               <object class="NSMenuItem" key="NSMenuItem" id="586933029">
+                                                                       <reference key="NSMenu" ref="237152896"/>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <int key="NSState">1</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                       <reference key="NSTarget" ref="264217237"/>
+                                                               </object>
+                                                               <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                               <object class="NSMenu" key="NSMenu" id="237152896">
+                                                                       <string key="NSTitle">OtherViews</string>
+                                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <reference ref="586933029"/>
+                                                                       </object>
+                                                               </object>
+                                                               <int key="NSPreferredEdge">3</int>
+                                                               <bool key="NSUsesItemFromMenu">YES</bool>
+                                                               <bool key="NSAltersState">YES</bool>
+                                                               <int key="NSArrowPosition">1</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="210289606">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{655, 433}, {90, 28}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="295879492">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">134348800</int>
+                                                               <string type="base64-UTF8" key="NSContents">QnJvd3Nl4oCmA</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="210289606"/>
+                                                               <int key="NSButtonFlags">-2038284033</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <reference key="NSAlternateImage" ref="26"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                       <characters key="NS.bytes"/>
+                                                               </object>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSBox" id="10346684">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{98, 471}, {642, 5}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <string key="NSOffsets">{0, 0}</string>
+                                                       <object class="NSTextFieldCell" key="NSTitleCell">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">0</int>
+                                                               <string key="NSContents">Box</string>
+                                                               <reference key="NSSupport" ref="273283760"/>
+                                                               <reference key="NSBackgroundColor" ref="138233214"/>
+                                                               <object class="NSColor" key="NSTextColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSBorderType">3</int>
+                                                       <int key="NSBoxType">2</int>
+                                                       <int key="NSTitlePosition">0</int>
+                                                       <bool key="NSTransparent">NO</bool>
+                                               </object>
+                                               <object class="NSTextField" id="854767306">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{70, 522}, {204, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="689580100">
+                                                               <int key="NSCellFlags">69336641</int>
+                                                               <int key="NSCellFlags2">4327936</int>
+                                                               <string key="NSContents"/>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="854767306"/>
+                                                               <object class="NSColor" key="NSBackgroundColor">
+                                                                       <int key="NSColorSpace">1</int>
+                                                                       <bytes key="NSRGB">MSAxIDEAA</bytes>
+                                                               </object>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="186223550">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{79, 438}, {573, 19}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="988599137">
+                                                               <int key="NSCellFlags">-1804468671</int>
+                                                               <int key="NSCellFlags2">4326400</int>
+                                                               <string key="NSContents"/>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="186223550"/>
+                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                               <reference key="NSBackgroundColor" ref="138233214"/>
+                                                               <reference key="NSTextColor" ref="378140636"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="35106907">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{20, 412}, {96, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="293028864">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">4325376</int>
+                                                               <string key="NSContents">Output Settings:</string>
+                                                               <reference key="NSSupport" ref="27"/>
+                                                               <reference key="NSControlView" ref="35106907"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSBox" id="151388399">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{294, 416}, {446, 5}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <string key="NSOffsets">{0, 0}</string>
+                                                       <object class="NSTextFieldCell" key="NSTitleCell">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">0</int>
+                                                               <string key="NSContents">Box</string>
+                                                               <reference key="NSSupport" ref="273283760"/>
+                                                               <reference key="NSBackgroundColor" ref="138233214"/>
+                                                               <object class="NSColor" key="NSTextColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSBorderType">3</int>
+                                                       <int key="NSBoxType">2</int>
+                                                       <int key="NSTitlePosition">0</int>
+                                                       <bool key="NSTransparent">NO</bool>
+                                               </object>
+                                               <object class="NSTextField" id="574185541">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{124, 412}, {162, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="488791842">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">272629760</int>
+                                                               <string key="NSContents"/>
+                                                               <reference key="NSSupport" ref="27"/>
+                                                               <reference key="NSControlView" ref="574185541"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="1007421233">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{536, 8}, {201, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="224806210">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">71303168</int>
+                                                               <string key="NSContents"/>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="1007421233"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="87961628">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{21, 385}, {53, 14}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="51600927">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">71303168</int>
+                                                               <string key="NSContents">Format:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="87961628"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSBox" id="454206717">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{279, 525}, {461, 5}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <string key="NSOffsets">{0, 0}</string>
+                                                       <object class="NSTextFieldCell" key="NSTitleCell">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">0</int>
+                                                               <string key="NSContents">Box</string>
+                                                               <reference key="NSSupport" ref="273283760"/>
+                                                               <reference key="NSBackgroundColor" ref="138233214"/>
+                                                               <object class="NSColor" key="NSTextColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSBorderType">3</int>
+                                                       <int key="NSBoxType">2</int>
+                                                       <int key="NSTitlePosition">0</int>
+                                                       <bool key="NSTransparent">NO</bool>
+                                               </object>
+                                               <object class="NSProgressIndicator" id="519699512">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">-2147482356</int>
+                                                       <object class="NSPSMatrix" key="NSDrawMatrix"/>
+                                                       <string key="NSFrame">{{278, 524}, {463, 12}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <int key="NSpiFlags">16648</int>
+                                                       <double key="NSMaxValue">1.000000e+02</double>
+                                               </object>
+                                               <object class="NSButton" id="581806074">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{399, 383}, {141, 18}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="832863281">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">131072</int>
+                                                               <string key="NSContents">Web optimized</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="581806074"/>
+                                                               <int key="NSButtonFlags">1211912703</int>
+                                                               <int key="NSButtonFlags2">2</int>
+                                                               <reference key="NSNormalImage" ref="887198214"/>
+                                                               <reference key="NSAlternateImage" ref="624832340"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string key="NSKeyEquivalent"/>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="553453876">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{283, 383}, {102, 18}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="294332300">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">131072</int>
+                                                               <string key="NSContents">Large file size</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="553453876"/>
+                                                               <int key="NSButtonFlags">1211912703</int>
+                                                               <int key="NSButtonFlags2">2</int>
+                                                               <reference key="NSNormalImage" ref="887198214"/>
+                                                               <reference key="NSAlternateImage" ref="624832340"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string key="NSKeyEquivalent"/>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="921877174">
+                                                       <reference key="NSNextResponder" ref="168918359"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{541, 383}, {141, 18}}</string>
+                                                       <reference key="NSSuperview" ref="168918359"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="547085070">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">131072</int>
+                                                               <string key="NSContents">iPod 5G support</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="921877174"/>
+                                                               <int key="NSButtonFlags">1211912703</int>
+                                                               <int key="NSButtonFlags2">2</int>
+                                                               <reference key="NSNormalImage" ref="887198214"/>
+                                                               <reference key="NSAlternateImage" ref="624832340"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string key="NSKeyEquivalent"/>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <string key="NSFrameSize">{760, 550}</string>
+                                       <reference key="NSSuperview"/>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
+                               <string key="NSMinSize">{213, 129}</string>
+                               <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                       </object>
+                       <object class="NSMenu" id="840340181">
+                               <string key="NSTitle">MainMenu</string>
+                               <object class="NSMutableArray" key="NSMenuItems">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSMenuItem" id="116324948">
+                                               <reference key="NSMenu" ref="840340181"/>
+                                               <string key="NSTitle">HandBrake</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="447995298"/>
+                                               <reference key="NSMixedImage" ref="760317610"/>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="1035150210">
+                                                       <string key="NSTitle">HandBrake</string>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="218095211">
+                                                                       <reference key="NSMenu" ref="1035150210"/>
+                                                                       <string key="NSTitle">About HandBrake</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="912853376">
+                                                                       <reference key="NSMenu" ref="1035150210"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="782330144">
+                                                                       <reference key="NSMenu" ref="1035150210"/>
+                                                                       <string key="NSTitle">Preferences...</string>
+                                                                       <string key="NSKeyEquiv">,</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="985983659">
+                                                                       <reference key="NSMenu" ref="1035150210"/>
+                                                                       <string key="NSTitle">Check for updates ...</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="802148601">
+                                                                       <reference key="NSMenu" ref="1035150210"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="981110965">
+                                                                       <reference key="NSMenu" ref="1035150210"/>
+                                                                       <string key="NSTitle">Hide HandBrake</string>
+                                                                       <string key="NSKeyEquiv">h</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="360013803">
+                                                                       <reference key="NSMenu" ref="1035150210"/>
+                                                                       <string key="NSTitle">Hide Others</string>
+                                                                       <string key="NSKeyEquiv">h</string>
+                                                                       <int key="NSKeyEquivModMask">1572864</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="550835954">
+                                                                       <reference key="NSMenu" ref="1035150210"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="680265479">
+                                                                       <reference key="NSMenu" ref="1035150210"/>
+                                                                       <string key="NSTitle">Quit HandBrake</string>
+                                                                       <string key="NSKeyEquiv">q</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSName">_NSAppleMenu</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMenuItem" id="966413586">
+                                               <reference key="NSMenu" ref="840340181"/>
+                                               <string key="NSTitle">File</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="447995298"/>
+                                               <reference key="NSMixedImage" ref="760317610"/>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="567182830">
+                                                       <object class="NSMutableString" key="NSTitle">
+                                                               <characters key="NS.bytes">File</characters>
+                                                       </object>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="595836714">
+                                                                       <reference key="NSMenu" ref="567182830"/>
+                                                                       <string type="base64-UTF8" key="NSTitle">T3BlbiBTb3VyY2XigKY</string>
+                                                                       <string key="NSKeyEquiv">o</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="865776798">
+                                                                       <reference key="NSMenu" ref="567182830"/>
+                                                                       <string key="NSTitle">Open Source (Title Specific) ...</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="417984878">
+                                                                       <reference key="NSMenu" ref="567182830"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="542310438">
+                                                                       <reference key="NSMenu" ref="567182830"/>
+                                                                       <string key="NSTitle">Close</string>
+                                                                       <string key="NSKeyEquiv">w</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="374169999">
+                                                                       <reference key="NSMenu" ref="567182830"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="853234446">
+                                                                       <reference key="NSMenu" ref="567182830"/>
+                                                                       <string key="NSTitle">Add To Queue</string>
+                                                                       <string key="NSKeyEquiv">b</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="17111946">
+                                                                       <reference key="NSMenu" ref="567182830"/>
+                                                                       <string key="NSTitle">Start Encoding</string>
+                                                                       <string key="NSKeyEquiv">s</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="101536867">
+                                                                       <reference key="NSMenu" ref="567182830"/>
+                                                                       <string key="NSTitle">Pause Encoding</string>
+                                                                       <string key="NSKeyEquiv">p</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSMenuItem" id="692187614">
+                                               <reference key="NSMenu" ref="840340181"/>
+                                               <string key="NSTitle">Edit</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="447995298"/>
+                                               <reference key="NSMixedImage" ref="760317610"/>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="1010405502">
+                                                       <object class="NSMutableString" key="NSTitle">
+                                                               <characters key="NS.bytes">Edit</characters>
+                                                       </object>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="587511664">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <string key="NSTitle">Undo</string>
+                                                                       <string key="NSKeyEquiv">z</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="786616983">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <string key="NSTitle">Redo</string>
+                                                                       <string key="NSKeyEquiv">Z</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="134768774">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="84425921">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <string key="NSTitle">Cut</string>
+                                                                       <string key="NSKeyEquiv">x</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="979367247">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <string key="NSTitle">Copy</string>
+                                                                       <string key="NSKeyEquiv">c</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="741953332">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <string key="NSTitle">Paste</string>
+                                                                       <string key="NSKeyEquiv">v</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="1006794292">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <string key="NSTitle">Paste and Match Style</string>
+                                                                       <string key="NSKeyEquiv">V</string>
+                                                                       <int key="NSKeyEquivModMask">1572864</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="494582096">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <string key="NSTitle">Delete</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="695401358">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <string key="NSTitle">Select All</string>
+                                                                       <string key="NSKeyEquiv">a</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="1051795572">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="249090291">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <string key="NSTitle">Find</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                                       <string key="NSAction">submenuAction:</string>
+                                                                       <object class="NSMenu" key="NSSubmenu" id="1067858879">
+                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                       <characters key="NS.bytes">Find</characters>
+                                                                               </object>
+                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSMenuItem" id="49300518">
+                                                                                               <reference key="NSMenu" ref="1067858879"/>
+                                                                                               <string type="base64-UTF8" key="NSTitle">RmluZOKApg</string>
+                                                                                               <string key="NSKeyEquiv">f</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                               <int key="NSTag">1</int>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="323467360">
+                                                                                               <reference key="NSMenu" ref="1067858879"/>
+                                                                                               <string key="NSTitle">Find Next</string>
+                                                                                               <string key="NSKeyEquiv">g</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                               <int key="NSTag">2</int>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="1069789051">
+                                                                                               <reference key="NSMenu" ref="1067858879"/>
+                                                                                               <string key="NSTitle">Find Previous</string>
+                                                                                               <string key="NSKeyEquiv">G</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                               <int key="NSTag">3</int>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="793630765">
+                                                                                               <reference key="NSMenu" ref="1067858879"/>
+                                                                                               <string key="NSTitle">Use Selection for Find</string>
+                                                                                               <string key="NSKeyEquiv">e</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                               <int key="NSTag">7</int>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="541561571">
+                                                                                               <reference key="NSMenu" ref="1067858879"/>
+                                                                                               <string key="NSTitle">Jump to Selection</string>
+                                                                                               <string key="NSKeyEquiv">j</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="1016677230">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <string key="NSTitle">Spelling</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                                       <string key="NSAction">submenuAction:</string>
+                                                                       <object class="NSMenu" key="NSSubmenu" id="650155643">
+                                                                               <string key="NSTitle">Spelling</string>
+                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSMenuItem" id="981624971">
+                                                                                               <reference key="NSMenu" ref="650155643"/>
+                                                                                               <string type="base64-UTF8" key="NSTitle">U3BlbGxpbmfigKY</string>
+                                                                                               <string key="NSKeyEquiv">:</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="301925013">
+                                                                                               <reference key="NSMenu" ref="650155643"/>
+                                                                                               <string key="NSTitle">Check Spelling</string>
+                                                                                               <string key="NSKeyEquiv">;</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="6854324">
+                                                                                               <reference key="NSMenu" ref="650155643"/>
+                                                                                               <string key="NSTitle">Check Spelling as You Type</string>
+                                                                                               <string key="NSKeyEquiv"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="611285451">
+                                                                       <reference key="NSMenu" ref="1010405502"/>
+                                                                       <string key="NSTitle">Speech</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                                       <string key="NSAction">submenuAction:</string>
+                                                                       <object class="NSMenu" key="NSSubmenu" id="654962117">
+                                                                               <string key="NSTitle">Speech</string>
+                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSMenuItem" id="362189914">
+                                                                                               <reference key="NSMenu" ref="654962117"/>
+                                                                                               <string key="NSTitle">Start Speaking</string>
+                                                                                               <string key="NSKeyEquiv"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="496049927">
+                                                                                               <reference key="NSMenu" ref="654962117"/>
+                                                                                               <string key="NSTitle">Stop Speaking</string>
+                                                                                               <string key="NSKeyEquiv"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSMenuItem" id="226787934">
+                                               <reference key="NSMenu" ref="840340181"/>
+                                               <string key="NSTitle">Presets</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="447995298"/>
+                                               <reference key="NSMixedImage" ref="760317610"/>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="112579544">
+                                                       <string key="NSTitle">Presets</string>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="814047217">
+                                                                       <reference key="NSMenu" ref="112579544"/>
+                                                                       <string key="NSTitle">Update Built-in Presets</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="153657129">
+                                                                       <reference key="NSMenu" ref="112579544"/>
+                                                                       <string key="NSTitle">Delete Built-in Presets</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="644928468">
+                                                                       <reference key="NSMenu" ref="112579544"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="180231">
+                                                                       <reference key="NSMenu" ref="112579544"/>
+                                                                       <string key="NSTitle">New Preset ...</string>
+                                                                       <string key="NSKeyEquiv">n</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="454042588">
+                                                                       <reference key="NSMenu" ref="112579544"/>
+                                                                       <string key="NSTitle">Select Default Preset</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSMenuItem" id="610133626">
+                                               <reference key="NSMenu" ref="840340181"/>
+                                               <string key="NSTitle">Window</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="447995298"/>
+                                               <reference key="NSMixedImage" ref="760317610"/>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="919178355">
+                                                       <object class="NSMutableString" key="NSTitle">
+                                                               <characters key="NS.bytes">Window</characters>
+                                                       </object>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="372804054">
+                                                                       <reference key="NSMenu" ref="919178355"/>
+                                                                       <string key="NSTitle">Minimize</string>
+                                                                       <string key="NSKeyEquiv">m</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="998796929">
+                                                                       <reference key="NSMenu" ref="919178355"/>
+                                                                       <string key="NSTitle">Bring All to Front</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="196605560">
+                                                                       <reference key="NSMenu" ref="919178355"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="545622547">
+                                                                       <reference key="NSMenu" ref="919178355"/>
+                                                                       <string key="NSTitle">HandBrake</string>
+                                                                       <string key="NSKeyEquiv">1</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="87484946">
+                                                                       <reference key="NSMenu" ref="919178355"/>
+                                                                       <string key="NSTitle">Queue</string>
+                                                                       <string key="NSKeyEquiv">2</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="1034427275">
+                                                                       <reference key="NSMenu" ref="919178355"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="854594899">
+                                                                       <reference key="NSMenu" ref="919178355"/>
+                                                                       <string key="NSTitle">Presets Drawer</string>
+                                                                       <string key="NSKeyEquiv">t</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="849279674">
+                                                                       <reference key="NSMenu" ref="919178355"/>
+                                                                       <string key="NSTitle">Picture Settings</string>
+                                                                       <string key="NSKeyEquiv">P</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="302989927">
+                                                                       <reference key="NSMenu" ref="919178355"/>
+                                                                       <string key="NSTitle">Activity Window</string>
+                                                                       <string key="NSKeyEquiv">D</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSName">_NSWindowsMenu</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMenuItem" id="487283590">
+                                               <reference key="NSMenu" ref="840340181"/>
+                                               <string key="NSTitle">Help</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="447995298"/>
+                                               <reference key="NSMixedImage" ref="760317610"/>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="371757683">
+                                                       <string key="NSTitle">Help</string>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="911007118">
+                                                                       <reference key="NSMenu" ref="371757683"/>
+                                                                       <string key="NSTitle">HandBrake User Guide</string>
+                                                                       <string key="NSKeyEquiv">?</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="265609219">
+                                                                       <reference key="NSMenu" ref="371757683"/>
+                                                                       <string key="NSTitle">HandBrake Homepage</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="757350989">
+                                                                       <reference key="NSMenu" ref="371757683"/>
+                                                                       <string key="NSTitle">HandBrake Forums</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSName">_NSMainMenu</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="526140766">
+                               <int key="NSWindowStyleMask">3</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{57, 765}, {300, 233}}</string>
+                               <int key="NSWTFlags">1886912512</int>
+                               <object class="NSMutableString" key="NSWindowTitle">
+                                       <characters key="NS.bytes">Panel</characters>
+                               </object>
+                               <string key="NSWindowClass">NSPanel</string>
+                               <object class="NSMutableString" key="NSViewClass">
+                                       <characters key="NS.bytes">View</characters>
+                               </object>
+                               <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <string key="NSWindowContentMinSize">{213, 107}</string>
+                               <object class="NSView" key="NSWindowView" id="168254512">
+                                       <nil key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <object class="NSMutableArray" key="NSSubviews">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSImageView" id="940804962">
+                                                       <reference key="NSNextResponder" ref="168254512"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <object class="NSMutableSet" key="NSDragTypes">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMutableArray" key="set.sortedObjects">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <string>Apple PDF pasteboard type</string>
+                                                                       <string>Apple PICT pasteboard type</string>
+                                                                       <string>Apple PNG pasteboard type</string>
+                                                                       <string>NSFilenamesPboardType</string>
+                                                                       <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
+                                                                       <string>NeXT TIFF v4.0 pasteboard type</string>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSFrame">{{83, 82}, {134, 134}}</string>
+                                                       <reference key="NSSuperview" ref="168254512"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSImageCell" key="NSCell" id="72412547">
+                                                               <int key="NSCellFlags">130560</int>
+                                                               <int key="NSCellFlags2">33554432</int>
+                                                               <object class="NSCustomResource" key="NSContents">
+                                                                       <string key="NSClassName">NSImage</string>
+                                                                       <string key="NSResourceName">HandBrake.icns</string>
+                                                               </object>
+                                                               <int key="NSAlign">0</int>
+                                                               <int key="NSScale">0</int>
+                                                               <int key="NSStyle">0</int>
+                                                               <bool key="NSAnimates">NO</bool>
+                                                       </object>
+                                                       <bool key="NSEditable">YES</bool>
+                                               </object>
+                                               <object class="NSButton" id="764659803">
+                                                       <reference key="NSNextResponder" ref="168254512"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <string key="NSFrame">{{202, 12}, {84, 32}}</string>
+                                                       <reference key="NSSuperview" ref="168254512"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="938246142">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">137887744</int>
+                                                               <string key="NSContents">Ahuh !</string>
+                                                               <reference key="NSSupport" ref="273283760"/>
+                                                               <reference key="NSControlView" ref="764659803"/>
+                                                               <int key="NSButtonFlags">-2038284033</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <object class="NSFont" key="NSAlternateImage">
+                                                                       <string key="NSName">Helvetica</string>
+                                                                       <double key="NSSize">1.300000e+01</double>
+                                                                       <int key="NSfFlags">16</int>
+                                                               </object>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="640205151">
+                                                       <reference key="NSNextResponder" ref="168254512"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <string key="NSFrame">{{82, 60}, {134, 17}}</string>
+                                                       <reference key="NSSuperview" ref="168254512"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="160092001">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">138412032</int>
+                                                               <string key="NSContents">Rip done !</string>
+                                                               <reference key="NSSupport" ref="273283760"/>
+                                                               <reference key="NSControlView" ref="640205151"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <string key="NSFrameSize">{300, 233}</string>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
+                               <string key="NSMinSize">{213, 129}</string>
+                               <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                       </object>
+                       <object class="NSDrawer" id="972647787">
+                               <nil key="NSNextResponder"/>
+                               <string key="NSContentSize">{240, 550}</string>
+                               <string key="NSMinContentSize">{100, 50}</string>
+                               <string key="NSMaxContentSize">{280, 550}</string>
+                               <int key="NSPreferredEdge">2</int>
+                               <double key="NSLeadingOffset">0.000000e+00</double>
+                               <double key="NSTrailingOffset">1.500000e+01</double>
+                               <nil key="NSParentWindow"/>
+                               <nil key="NSDelegate"/>
+                       </object>
+                       <object class="NSCustomView" id="621751818">
+                               <nil key="NSNextResponder"/>
+                               <int key="NSvFlags">256</int>
+                               <object class="NSMutableArray" key="NSSubviews">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSScrollView" id="33643505">
+                                               <reference key="NSNextResponder" ref="621751818"/>
+                                               <int key="NSvFlags">274</int>
+                                               <object class="NSMutableArray" key="NSSubviews">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSClipView" id="421228634">
+                                                               <reference key="NSNextResponder" ref="33643505"/>
+                                                               <int key="NSvFlags">2304</int>
+                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <object class="NSOutlineView" id="807972370">
+                                                                               <reference key="NSNextResponder" ref="421228634"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrameSize">{247, 506}</string>
+                                                                               <reference key="NSSuperview" ref="421228634"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="_NSCornerView" key="NSCornerView">
+                                                                                       <nil key="NSNextResponder"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{184, 0}, {16, 17}}</string>
+                                                                               </object>
+                                                                               <object class="NSMutableArray" key="NSTableColumns">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSTableColumn" id="658438499">
+                                                                                               <string key="NSIdentifier">PresetName</string>
+                                                                                               <double key="NSWidth">2.440000e+02</double>
+                                                                                               <double key="NSMinWidth">4.000000e+01</double>
+                                                                                               <double key="NSMaxWidth">1.000000e+03</double>
+                                                                                               <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                       <int key="NSCellFlags">75628032</int>
+                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                       <string key="NSContents">Presets</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <object class="NSColor" key="NSBackgroundColor">
+                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                               <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+                                                                                                       </object>
+                                                                                                       <reference key="NSTextColor" ref="188451177"/>
+                                                                                               </object>
+                                                                                               <object class="NSTextFieldCell" key="NSDataCell" id="384895213">
+                                                                                                       <int key="NSCellFlags">337772096</int>
+                                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                                       <string key="NSContents">Text Cell</string>
+                                                                                                       <reference key="NSSupport" ref="995413175"/>
+                                                                                                       <reference key="NSControlView" ref="807972370"/>
+                                                                                                       <reference key="NSBackgroundColor" ref="355843302"/>
+                                                                                                       <reference key="NSTextColor" ref="701609070"/>
+                                                                                               </object>
+                                                                                               <int key="NSResizingMask">1</int>
+                                                                                               <bool key="NSIsResizeable">YES</bool>
+                                                                                               <bool key="NSIsEditable">YES</bool>
+                                                                                               <reference key="NSTableView" ref="807972370"/>
+                                                                                               <object class="NSSortDescriptor" key="NSSortDescriptorPrototype">
+                                                                                                       <string key="NSKey">PresetName</string>
+                                                                                                       <bool key="NSAscending">YES</bool>
+                                                                                                       <string key="NSSelector">compare:</string>
+                                                                                               </object>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <double key="NSIntercellSpacingWidth">3.000000e+00</double>
+                                                                               <double key="NSIntercellSpacingHeight">2.000000e+00</double>
+                                                                               <reference key="NSBackgroundColor" ref="809784795"/>
+                                                                               <reference key="NSGridColor" ref="156710040"/>
+                                                                               <double key="NSRowHeight">1.400000e+01</double>
+                                                                               <int key="NSTvFlags">314572800</int>
+                                                                               <int key="NSColumnAutoresizingStyle">4</int>
+                                                                               <int key="NSDraggingSourceMaskForLocal">15</int>
+                                                                               <int key="NSDraggingSourceMaskForNonLocal">0</int>
+                                                                               <bool key="NSAllowsTypeSelect">YES</bool>
+                                                                               <float key="NSOutlineViewIndentationPerLevelKey">1.200000e+01</float>
+                                                                       </object>
+                                                               </object>
+                                                               <string key="NSFrame">{{1, 1}, {247, 506}}</string>
+                                                               <reference key="NSSuperview" ref="33643505"/>
+                                                               <reference key="NSNextKeyView" ref="807972370"/>
+                                                               <reference key="NSDocView" ref="807972370"/>
+                                                               <reference key="NSBGColor" ref="355843302"/>
+                                                               <int key="NScvFlags">4</int>
+                                                       </object>
+                                                       <object class="NSScroller" id="475123229">
+                                                               <reference key="NSNextResponder" ref="33643505"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <string key="NSFrame">{{248, 1}, {11, 506}}</string>
+                                                               <reference key="NSSuperview" ref="33643505"/>
+                                                               <int key="NSsFlags">256</int>
+                                                               <reference key="NSTarget" ref="33643505"/>
+                                                               <string key="NSAction">_doScroller:</string>
+                                                               <double key="NSPercent">9.977012e-01</double>
+                                                       </object>
+                                                       <object class="NSScroller" id="573337548">
+                                                               <reference key="NSNextResponder" ref="33643505"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <string key="NSFrame">{{-100, -100}, {183, 15}}</string>
+                                                               <reference key="NSSuperview" ref="33643505"/>
+                                                               <int key="NSsFlags">1</int>
+                                                               <reference key="NSTarget" ref="33643505"/>
+                                                               <string key="NSAction">_doScroller:</string>
+                                                               <double key="NSPercent">9.945652e-01</double>
+                                                       </object>
+                                               </object>
+                                               <string key="NSFrame">{{4, 31}, {260, 508}}</string>
+                                               <reference key="NSSuperview" ref="621751818"/>
+                                               <reference key="NSNextKeyView" ref="421228634"/>
+                                               <int key="NSsFlags">18</int>
+                                               <reference key="NSVScroller" ref="475123229"/>
+                                               <reference key="NSHScroller" ref="573337548"/>
+                                               <reference key="NSContentView" ref="421228634"/>
+                                               <bytes key="NSScrollAmts">QSAAAEEgAABBgAAAQYAAAA</bytes>
+                                       </object>
+                                       <object class="NSButton" id="241719587">
+                                               <reference key="NSNextResponder" ref="621751818"/>
+                                               <int key="NSvFlags">292</int>
+                                               <string key="NSFrame">{{27, 1}, {24, 23}}</string>
+                                               <reference key="NSSuperview" ref="621751818"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="501219161">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents"/>
+                                                       <object class="NSFont" key="NSSupport" id="575851035">
+                                                               <string key="NSName">LucidaGrande-Bold</string>
+                                                               <double key="NSSize">1.300000e+01</double>
+                                                               <int key="NSfFlags">2072</int>
+                                                       </object>
+                                                       <reference key="NSControlView" ref="241719587"/>
+                                                       <int key="NSButtonFlags">-2030804737</int>
+                                                       <int key="NSButtonFlags2">34</int>
+                                                       <object class="NSCustomResource" key="NSNormalImage">
+                                                               <string key="NSClassName">NSImage</string>
+                                                               <string key="NSResourceName">NSRemoveTemplate</string>
+                                                       </object>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="699919504">
+                                               <reference key="NSNextResponder" ref="621751818"/>
+                                               <int key="NSvFlags">292</int>
+                                               <string key="NSFrame">{{4, 1}, {24, 23}}</string>
+                                               <reference key="NSSuperview" ref="621751818"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="489159603">
+                                                       <int key="NSCellFlags">-2080244224</int>
+                                                       <int key="NSCellFlags2">134217728</int>
+                                                       <string key="NSContents"/>
+                                                       <reference key="NSSupport" ref="575851035"/>
+                                                       <reference key="NSControlView" ref="699919504"/>
+                                                       <int key="NSButtonFlags">-2032901889</int>
+                                                       <int key="NSButtonFlags2">34</int>
+                                                       <object class="NSCustomResource" key="NSNormalImage">
+                                                               <string key="NSClassName">NSImage</string>
+                                                               <string key="NSResourceName">NSAddTemplate</string>
+                                                       </object>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSPopUpButton" id="886184281">
+                                               <reference key="NSNextResponder" ref="621751818"/>
+                                               <int key="NSvFlags">292</int>
+                                               <string key="NSFrame">{{59, 1}, {33, 23}}</string>
+                                               <reference key="NSSuperview" ref="621751818"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="492120702">
+                                                       <int key="NSCellFlags">71433792</int>
+                                                       <int key="NSCellFlags2">2048</int>
+                                                       <reference key="NSSupport" ref="273283760"/>
+                                                       <reference key="NSControlView" ref="886184281"/>
+                                                       <int key="NSButtonFlags">-2031075073</int>
+                                                       <int key="NSButtonFlags2">162</int>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="228547440">
+                                                               <reference key="NSMenu" ref="717227898"/>
+                                                               <bool key="NSIsHidden">YES</bool>
+                                                               <string key="NSTitle"/>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <object class="NSCustomResource" key="NSImage">
+                                                                       <string key="NSClassName">NSImage</string>
+                                                                       <string key="NSResourceName">NSActionTemplate</string>
+                                                               </object>
+                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="492120702"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="717227898">
+                                                               <string key="NSTitle">Presets Action Menu</string>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <reference ref="228547440"/>
+                                                                       <object class="NSMenuItem" id="950937431">
+                                                                               <reference key="NSMenu" ref="717227898"/>
+                                                                               <string key="NSTitle">Make Default</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="492120702"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="583192244">
+                                                                               <reference key="NSMenu" ref="717227898"/>
+                                                                               <string key="NSTitle">Update Built-in Presets</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="447995298"/>
+                                                                               <reference key="NSMixedImage" ref="760317610"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="492120702"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <bool key="NSPullDown">YES</bool>
+                                                       <int key="NSPreferredEdge">1</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">2</int>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSFrameSize">{270, 550}</string>
+                               <string key="NSClassName">NSView</string>
+                               <string key="NSExtension">NSResponder</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="888992113">
+                               <int key="NSWindowStyleMask">1</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{421, 536}, {338, 318}}</string>
+                               <int key="NSWTFlags">1886912512</int>
+                               <string key="NSWindowTitle">Create A New Preset</string>
+                               <string key="NSWindowClass">NSPanel</string>
+                               <object class="NSMutableString" key="NSViewClass">
+                                       <characters key="NS.bytes">View</characters>
+                               </object>
+                               <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <string key="NSWindowContentMinSize">{338, 232}</string>
+                               <object class="NSView" key="NSWindowView" id="69290042">
+                                       <nil key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <object class="NSMutableArray" key="NSSubviews">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSButton" id="636581183">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">289</int>
+                                                       <string key="NSFrame">{{239, 12}, {85, 32}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="107603394">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">134217728</int>
+                                                               <string key="NSContents">Add</string>
+                                                               <reference key="NSSupport" ref="273283760"/>
+                                                               <reference key="NSControlView" ref="636581183"/>
+                                                               <int key="NSButtonFlags">-2038284033</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <object class="NSFont" key="NSAlternateImage" id="212993004">
+                                                                       <string key="NSName">LucidaGrande</string>
+                                                                       <double key="NSSize">1.300000e+01</double>
+                                                                       <int key="NSfFlags">16</int>
+                                                               </object>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="586136427">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">289</int>
+                                                       <string key="NSFrame">{{155, 12}, {84, 32}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="231870318">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">134217728</int>
+                                                               <string key="NSContents">Cancel</string>
+                                                               <reference key="NSSupport" ref="273283760"/>
+                                                               <reference key="NSControlView" ref="586136427"/>
+                                                               <int key="NSButtonFlags">-2038284033</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <reference key="NSAlternateImage" ref="212993004"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="978853241">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">266</int>
+                                                       <string key="NSFrame">{{20, 264}, {298, 19}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="479246832">
+                                                               <int key="NSCellFlags">-1804468671</int>
+                                                               <int key="NSCellFlags2">272761856</int>
+                                                               <string key="NSContents"/>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="978853241"/>
+                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                               <reference key="NSBackgroundColor" ref="138233214"/>
+                                                               <reference key="NSTextColor" ref="378140636"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSPopUpButton" id="167356719">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">266</int>
+                                                       <string key="NSFrame">{{166, 183}, {155, 22}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSPopUpButtonCell" key="NSCell" id="17688962">
+                                                               <int key="NSCellFlags">-2076049856</int>
+                                                               <int key="NSCellFlags2">133120</int>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="167356719"/>
+                                                               <int key="NSButtonFlags">109199615</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <reference key="NSAlternateImage" ref="995413175"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                       <characters key="NS.bytes"/>
+                                                               </object>
+                                                               <int key="NSPeriodicDelay">400</int>
+                                                               <int key="NSPeriodicInterval">75</int>
+                                                               <object class="NSMenuItem" key="NSMenuItem" id="12791251">
+                                                                       <reference key="NSMenu" ref="521597821"/>
+                                                                       <string key="NSTitle">Item1</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <int key="NSState">1</int>
+                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                       <reference key="NSTarget" ref="17688962"/>
+                                                               </object>
+                                                               <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                               <object class="NSMenu" key="NSMenu" id="521597821">
+                                                                       <object class="NSMutableString" key="NSTitle">
+                                                                               <characters key="NS.bytes">OtherViews</characters>
+                                                                       </object>
+                                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <reference ref="12791251"/>
+                                                                               <object class="NSMenuItem" id="802910491">
+                                                                                       <reference key="NSMenu" ref="521597821"/>
+                                                                                       <string key="NSTitle">Item2</string>
+                                                                                       <string key="NSKeyEquiv"/>
+                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                       <reference key="NSTarget" ref="17688962"/>
+                                                                               </object>
+                                                                               <object class="NSMenuItem" id="962314470">
+                                                                                       <reference key="NSMenu" ref="521597821"/>
+                                                                                       <string key="NSTitle">Item3</string>
+                                                                                       <string key="NSKeyEquiv"/>
+                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                       <reference key="NSOnImage" ref="447995298"/>
+                                                                                       <reference key="NSMixedImage" ref="760317610"/>
+                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                       <reference key="NSTarget" ref="17688962"/>
+                                                                               </object>
+                                                                       </object>
+                                                               </object>
+                                                               <int key="NSPreferredEdge">3</int>
+                                                               <bool key="NSUsesItemFromMenu">YES</bool>
+                                                               <bool key="NSAltersState">YES</bool>
+                                                               <int key="NSArrowPosition">1</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="343391844">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{17, 286}, {114, 17}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="658438349">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">272760832</int>
+                                                               <string type="base64-UTF8" key="NSContents">UHJlc2V0IE5hbWU6Cg</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="343391844"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="340554114">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{17, 217}, {91, 14}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="70981869">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">272760832</int>
+                                                               <string key="NSContents">Picture Settings:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="340554114"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="384547934">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{17, 100}, {114, 14}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="207651610">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">272760832</int>
+                                                               <string key="NSContents">Description:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="384547934"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="511645357">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">274</int>
+                                                       <string key="NSFrame">{{20, 51}, {298, 41}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="855042909">
+                                                               <int key="NSCellFlags">-1805517311</int>
+                                                               <int key="NSCellFlags2">272760832</int>
+                                                               <string key="NSContents"/>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="511645357"/>
+                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                               <reference key="NSBackgroundColor" ref="138233214"/>
+                                                               <reference key="NSTextColor" ref="378140636"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="31472093">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{17, 187}, {147, 14}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="31665321">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">71434240</int>
+                                                               <string key="NSContents">Use Picture Size:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="31472093"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="1024752086">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{166, 157}, {24, 18}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="625635488">
+                                                               <int key="NSCellFlags">-2080244224</int>
+                                                               <int key="NSCellFlags2">131072</int>
+                                                               <string key="NSContents"/>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="1024752086"/>
+                                                               <int key="NSButtonFlags">1211912703</int>
+                                                               <int key="NSButtonFlags2">2</int>
+                                                               <reference key="NSNormalImage" ref="887198214"/>
+                                                               <reference key="NSAlternateImage" ref="624832340"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string key="NSKeyEquivalent"/>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="786415813">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">-2147483380</int>
+                                                       <string key="NSFrame">{{17, 240}, {303, 18}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="977106207">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">131072</int>
+                                                               <string key="NSContents">Preset Folder ( if checked disregard below )</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="786415813"/>
+                                                               <int key="NSButtonFlags">1211912703</int>
+                                                               <int key="NSButtonFlags2">2</int>
+                                                               <reference key="NSNormalImage" ref="887198214"/>
+                                                               <reference key="NSAlternateImage" ref="624832340"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string key="NSKeyEquivalent"/>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSBox" id="5085381">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{113, 220}, {205, 5}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <string key="NSOffsets">{0, 0}</string>
+                                                       <object class="NSTextFieldCell" key="NSTitleCell">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">0</int>
+                                                               <string key="NSContents">Box</string>
+                                                               <reference key="NSSupport" ref="273283760"/>
+                                                               <reference key="NSBackgroundColor" ref="138233214"/>
+                                                               <object class="NSColor" key="NSTextColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSBorderType">3</int>
+                                                       <int key="NSBoxType">2</int>
+                                                       <int key="NSTitlePosition">0</int>
+                                                       <bool key="NSTransparent">NO</bool>
+                                               </object>
+                                               <object class="NSBox" id="988499754">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{20, 130}, {298, 5}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <string key="NSOffsets">{0, 0}</string>
+                                                       <object class="NSTextFieldCell" key="NSTitleCell">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">0</int>
+                                                               <string key="NSContents">Box</string>
+                                                               <reference key="NSSupport" ref="273283760"/>
+                                                               <reference key="NSBackgroundColor" ref="138233214"/>
+                                                               <object class="NSColor" key="NSTextColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSBorderType">3</int>
+                                                       <int key="NSBoxType">2</int>
+                                                       <int key="NSTitlePosition">0</int>
+                                                       <bool key="NSTransparent">NO</bool>
+                                               </object>
+                                               <object class="NSTextField" id="59653352">
+                                                       <reference key="NSNextResponder" ref="69290042"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{17, 159}, {147, 15}}</string>
+                                                       <reference key="NSSuperview" ref="69290042"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="155469085">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">71434240</int>
+                                                               <string key="NSContents">Use Current Picture Filters:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="59653352"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <string key="NSFrameSize">{338, 318}</string>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
+                               <string key="NSMinSize">{338, 254}</string>
+                               <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="687953568">
+                               <int key="NSWindowStyleMask">1</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{302, 989}, {392, 144}}</string>
+                               <int key="NSWTFlags">1886912512</int>
+                               <string key="NSWindowTitle">SourceTitlePanel</string>
+                               <object class="NSMutableString" key="NSWindowClass">
+                                       <characters key="NS.bytes">NSPanel</characters>
+                               </object>
+                               <object class="NSMutableString" key="NSViewClass">
+                                       <characters key="NS.bytes">View</characters>
+                               </object>
+                               <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <string key="NSWindowContentMinSize">{213, 107}</string>
+                               <object class="NSView" key="NSWindowView" id="867624722">
+                                       <nil key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <object class="NSMutableArray" key="NSSubviews">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSTextField" id="133861013">
+                                                       <reference key="NSNextResponder" ref="867624722"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <string key="NSFrame">{{96, 45}, {279, 38}}</string>
+                                                       <reference key="NSSuperview" ref="867624722"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="874724779">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">272629760</int>
+                                                               <string key="NSContents">Source Path Here</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="133861013"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="293908248">
+                                                       <reference key="NSNextResponder" ref="867624722"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <string key="NSFrame">{{155, 106}, {26, 14}}</string>
+                                                       <reference key="NSSuperview" ref="867624722"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="290236859">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">272629760</int>
+                                                               <string key="NSContents">for</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="293908248"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="535532677">
+                                                       <reference key="NSNextResponder" ref="867624722"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <string key="NSFrame">{{17, 106}, {104, 15}}</string>
+                                                       <reference key="NSSuperview" ref="867624722"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="1026393301">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">71303168</int>
+                                                               <string key="NSContents">Scan title number</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="535532677"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="290568055">
+                                                       <reference key="NSNextResponder" ref="867624722"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <string key="NSFrame">{{126, 105}, {24, 19}}</string>
+                                                       <reference key="NSSuperview" ref="867624722"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="412266408">
+                                                               <int key="NSCellFlags">-1804468671</int>
+                                                               <int key="NSCellFlags2">138544128</int>
+                                                               <string key="NSContents">0</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="290568055"/>
+                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                               <reference key="NSBackgroundColor" ref="138233214"/>
+                                                               <reference key="NSTextColor" ref="378140636"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="35126402">
+                                                       <reference key="NSNextResponder" ref="867624722"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <string key="NSFrame">{{15, 13}, {80, 28}}</string>
+                                                       <reference key="NSSuperview" ref="867624722"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="935162329">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">134348800</int>
+                                                               <string key="NSContents">Cancel</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="35126402"/>
+                                                               <int key="NSButtonFlags">-2038284033</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <reference key="NSAlternateImage" ref="995413175"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                       <characters key="NS.bytes"/>
+                                                               </object>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="1029080172">
+                                                       <reference key="NSNextResponder" ref="867624722"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <string key="NSFrame">{{290, 13}, {87, 28}}</string>
+                                                       <reference key="NSSuperview" ref="867624722"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="1020926636">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">134348800</int>
+                                                               <string key="NSContents">Open Title</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="1029080172"/>
+                                                               <int key="NSButtonFlags">-2038284033</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <reference key="NSAlternateImage" ref="995413175"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="1010749064">
+                                                       <reference key="NSNextResponder" ref="867624722"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <string key="NSFrame">{{17, 83}, {455, 19}}</string>
+                                                       <reference key="NSSuperview" ref="867624722"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="938406174">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">4194304</int>
+                                                               <string key="NSContents">Note: (entering 0 or leaving blank will result in a full source scan)</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="1010749064"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="610976437">
+                                                       <reference key="NSNextResponder" ref="867624722"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <string key="NSFrame">{{17, 69}, {77, 14}}</string>
+                                                       <reference key="NSSuperview" ref="867624722"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="802225466">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">272629760</int>
+                                                               <string key="NSContents">Source Path:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="610976437"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="655257851">
+                                                       <reference key="NSNextResponder" ref="867624722"/>
+                                                       <int key="NSvFlags">256</int>
+                                                       <string key="NSFrame">{{177, 106}, {198, 14}}</string>
+                                                       <reference key="NSSuperview" ref="867624722"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="19595360">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">272629760</int>
+                                                               <string key="NSContents">Small System Font Text</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="655257851"/>
+                                                               <reference key="NSBackgroundColor" ref="242973447"/>
+                                                               <reference key="NSTextColor" ref="701609070"/>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <string key="NSFrameSize">{392, 144}</string>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
+                               <string key="NSMinSize">{213, 129}</string>
+                               <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                       </object>
+                       <object class="NSCustomObject" id="2258723">
+                               <string key="NSClassName">HBController</string>
+                       </object>
+                       <object class="NSCustomObject" id="159095366">
+                               <string key="NSClassName">SUUpdater</string>
+                       </object>
+               </object>
+               <object class="IBObjectContainer" key="IBDocument.Objects">
+                       <object class="NSMutableArray" key="connectionRecords">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">terminate:</string>
+                                               <reference key="source" ref="1046316778"/>
+                                               <reference key="destination" ref="680265479"/>
+                                       </object>
+                                       <int key="connectionID">139</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">orderFrontStandardAboutPanel:</string>
+                                               <reference key="source" ref="1046316778"/>
+                                               <reference key="destination" ref="218095211"/>
+                                       </object>
+                                       <int key="connectionID">142</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">delegate</string>
+                                               <reference key="source" ref="1046316778"/>
+                                               <reference key="destination" ref="2258723"/>
+                                       </object>
+                                       <int key="connectionID">247</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fWindow</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="192660081"/>
+                                       </object>
+                                       <int key="connectionID">350</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">delegate</string>
+                                               <reference key="source" ref="192660081"/>
+                                               <reference key="destination" ref="2258723"/>
+                                       </object>
+                                       <int key="connectionID">433</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">hide:</string>
+                                               <reference key="source" ref="1046316778"/>
+                                               <reference key="destination" ref="981110965"/>
+                                       </object>
+                                       <int key="connectionID">972</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">hideOtherApplications:</string>
+                                               <reference key="source" ref="1046316778"/>
+                                               <reference key="destination" ref="360013803"/>
+                                       </object>
+                                       <int key="connectionID">975</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">arrangeInFront:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="998796929"/>
+                                       </object>
+                                       <int key="connectionID">1194</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">performMiniaturize:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="372804054"/>
+                                       </object>
+                                       <int key="connectionID">1195</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fStatusField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="794651271"/>
+                                       </object>
+                                       <int key="connectionID">1238</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fRipIndicator</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="222334056"/>
+                                       </object>
+                                       <int key="connectionID">1374</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">openHomepage:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="265609219"/>
+                                       </object>
+                                       <int key="connectionID">1434</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">openForums:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="757350989"/>
+                                       </object>
+                                       <int key="connectionID">1435</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">titlePopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="766125203"/>
+                                       </object>
+                                       <int key="connectionID">1567</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSrcChapterStartPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="971754180"/>
+                                       </object>
+                                       <int key="connectionID">1568</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSrcChapterEndPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="453345136"/>
+                                       </object>
+                                       <int key="connectionID">1569</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudLang1PopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="93020318"/>
+                                       </object>
+                                       <int key="connectionID">1573</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudLang2PopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="641072930"/>
+                                       </object>
+                                       <int key="connectionID">1575</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDstBrowseButton</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="210289606"/>
+                                       </object>
+                                       <int key="connectionID">1578</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">browseFile:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="210289606"/>
+                                       </object>
+                                       <int key="connectionID">1579</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDstFormatField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="87961628"/>
+                                       </object>
+                                       <int key="connectionID">1583</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDstFormatPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="732193996"/>
+                                       </object>
+                                       <int key="connectionID">1584</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDstFile2Field</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="186223550"/>
+                                       </object>
+                                       <int key="connectionID">1585</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSrcChapterField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1053010160"/>
+                                       </object>
+                                       <int key="connectionID">1587</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSrcChapterToField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="200266929"/>
+                                       </object>
+                                       <int key="connectionID">1588</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSrcDuration1Field</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="713493964"/>
+                                       </object>
+                                       <int key="connectionID">1589</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSrcDuration2Field</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="955053416"/>
+                                       </object>
+                                       <int key="connectionID">1590</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSrcDVD2Field</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="854767306"/>
+                                       </object>
+                                       <int key="connectionID">1591</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSrcTitleField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="806469067"/>
+                                       </object>
+                                       <int key="connectionID">1592</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSrcTitlePopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="766125203"/>
+                                       </object>
+                                       <int key="connectionID">1593</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDstFile1Field</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1023408378"/>
+                                       </object>
+                                       <int key="connectionID">1596</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidBitrateCell</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="733978413"/>
+                                       </object>
+                                       <int key="connectionID">1598</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidBitrateField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="783405221"/>
+                                       </object>
+                                       <int key="connectionID">1599</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidConstantCell</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="297078314"/>
+                                       </object>
+                                       <int key="connectionID">1600</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidEncoderPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="12330413"/>
+                                       </object>
+                                       <int key="connectionID">1602</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidGrayscaleCheck</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="586924601"/>
+                                       </object>
+                                       <int key="connectionID">1603</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidQualityField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="521019277"/>
+                                       </object>
+                                       <int key="connectionID">1604</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidQualityMatrix</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="229000833"/>
+                                       </object>
+                                       <int key="connectionID">1605</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidQualitySlider</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="239657287"/>
+                                       </object>
+                                       <int key="connectionID">1606</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidRateField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="463960465"/>
+                                       </object>
+                                       <int key="connectionID">1607</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidRatePopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="222980245"/>
+                                       </object>
+                                       <int key="connectionID">1608</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidTargetCell</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="867231800"/>
+                                       </object>
+                                       <int key="connectionID">1609</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidTargetSizeField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="127917338"/>
+                                       </object>
+                                       <int key="connectionID">1610</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidTwoPassCheck</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1000247853"/>
+                                       </object>
+                                       <int key="connectionID">1611</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">videoMatrixChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="229000833"/>
+                                       </object>
+                                       <int key="connectionID">1612</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">formatPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="732193996"/>
+                                       </object>
+                                       <int key="connectionID">1614</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">chapterPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="971754180"/>
+                                       </object>
+                                       <int key="connectionID">1615</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">chapterPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="453345136"/>
+                                       </object>
+                                       <int key="connectionID">1616</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">qualitySliderChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="239657287"/>
+                                       </object>
+                                       <int key="connectionID">1617</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">calculateBitrate:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="351922892"/>
+                                       </object>
+                                       <int key="connectionID">1620</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSubPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="506492318"/>
+                                       </object>
+                                       <int key="connectionID">1637</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">showPicturePanel:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="37121296"/>
+                                       </object>
+                                       <int key="connectionID">1735</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicLabelSrc</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="373965512"/>
+                                       </object>
+                                       <int key="connectionID">1743</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicLabelSettings</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="219409733"/>
+                                       </object>
+                                       <int key="connectionID">1744</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicLabelOutp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="917474208"/>
+                                       </object>
+                                       <int key="connectionID">1745</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicLabelAr</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="946417297"/>
+                                       </object>
+                                       <int key="connectionID">1748</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPictureButton</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="37121296"/>
+                                       </object>
+                                       <int key="connectionID">1750</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSubField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="436388527"/>
+                                       </object>
+                                       <int key="connectionID">1758</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicLabelAnamorphic</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="710962186"/>
+                                       </object>
+                                       <int key="connectionID">1783</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">performFindPanelAction:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="793630765"/>
+                                       </object>
+                                       <int key="connectionID">1823</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">startSpeaking:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="362189914"/>
+                                       </object>
+                                       <int key="connectionID">1824</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">toggleContinuousSpellChecking:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="6854324"/>
+                                       </object>
+                                       <int key="connectionID">1825</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">undo:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="587511664"/>
+                                       </object>
+                                       <int key="connectionID">1826</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">stopSpeaking:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="496049927"/>
+                                       </object>
+                                       <int key="connectionID">1827</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">performFindPanelAction:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="49300518"/>
+                                       </object>
+                                       <int key="connectionID">1828</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">redo:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="786616983"/>
+                                       </object>
+                                       <int key="connectionID">1829</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">performFindPanelAction:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="1069789051"/>
+                                       </object>
+                                       <int key="connectionID">1830</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">cut:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="84425921"/>
+                                       </object>
+                                       <int key="connectionID">1831</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">paste:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="741953332"/>
+                                       </object>
+                                       <int key="connectionID">1832</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">pasteAsPlainText:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="1006794292"/>
+                                       </object>
+                                       <int key="connectionID">1833</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">selectAll:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="695401358"/>
+                                       </object>
+                                       <int key="connectionID">1834</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">performFindPanelAction:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="323467360"/>
+                                       </object>
+                                       <int key="connectionID">1835</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">copy:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="979367247"/>
+                                       </object>
+                                       <int key="connectionID">1836</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">checkSpelling:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="301925013"/>
+                                       </object>
+                                       <int key="connectionID">1837</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">centerSelectionInVisibleArea:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="541561571"/>
+                                       </object>
+                                       <int key="connectionID">1838</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">showGuessPanel:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="981624971"/>
+                                       </object>
+                                       <int key="connectionID">1839</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">delete:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="494582096"/>
+                                       </object>
+                                       <int key="connectionID">1840</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">parentWindow</string>
+                                               <reference key="source" ref="972647787"/>
+                                               <reference key="destination" ref="192660081"/>
+                                       </object>
+                                       <int key="connectionID">1842</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">contentView</string>
+                                               <reference key="source" ref="972647787"/>
+                                               <reference key="destination" ref="621751818"/>
+                                       </object>
+                                       <int key="connectionID">1844</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAddPresetPanel</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="888992113"/>
+                                       </object>
+                                       <int key="connectionID">1869</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPresetNewName</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="978853241"/>
+                                       </object>
+                                       <int key="connectionID">1875</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">closeAddPresetPanel:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="586136427"/>
+                                       </object>
+                                       <int key="connectionID">1878</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPresetSelectedDisplay</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="574185541"/>
+                                       </object>
+                                       <int key="connectionID">1883</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">toggle:</string>
+                                               <reference key="source" ref="972647787"/>
+                                               <reference key="destination" ref="854594899"/>
+                                       </object>
+                                       <int key="connectionID">1885</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPresetDrawer</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="972647787"/>
+                                       </object>
+                                       <int key="connectionID">1889</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">addUserPreset:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="636581183"/>
+                                       </object>
+                                       <int key="connectionID">1907</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">customSettingUsed:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="586924601"/>
+                                       </object>
+                                       <int key="connectionID">1912</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">customSettingUsed:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="135824882"/>
+                                       </object>
+                                       <int key="connectionID">1914</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">addFactoryPresets:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="814047217"/>
+                                       </object>
+                                       <int key="connectionID">1952</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">deleteFactoryPresets:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="153657129"/>
+                                       </object>
+                                       <int key="connectionID">1953</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">showAddPresetPanel:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="180231"/>
+                                       </object>
+                                       <int key="connectionID">1956</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack1MixPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="64899409"/>
+                                       </object>
+                                       <int key="connectionID">1965</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack2MixPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="354208181"/>
+                                       </object>
+                                       <int key="connectionID">1969</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="93020318"/>
+                                       </object>
+                                       <int key="connectionID">1974</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="641072930"/>
+                                       </object>
+                                       <int key="connectionID">1975</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">openUserGuide:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="911007118"/>
+                                       </object>
+                                       <int key="connectionID">1986</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackMixdownChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="64899409"/>
+                                       </object>
+                                       <int key="connectionID">1987</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackMixdownChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="354208181"/>
+                                       </object>
+                                       <int key="connectionID">1988</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fCreateChapterMarkers</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="262106913"/>
+                                       </object>
+                                       <int key="connectionID">2004</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fChapterTable</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="595654978"/>
+                                       </object>
+                                       <int key="connectionID">2005</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fQueueStatus</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1007421233"/>
+                                       </object>
+                                       <int key="connectionID">2007</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPresetNewPicSettingsPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="167356719"/>
+                                       </object>
+                                       <int key="connectionID">2013</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">showDebugOutputPanel:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="302989927"/>
+                                       </object>
+                                       <int key="connectionID">2296</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidTurboPassCheck</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="447003158"/>
+                                       </object>
+                                       <int key="connectionID">2362</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">twoPassCheckboxChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1000247853"/>
+                                       </object>
+                                       <int key="connectionID">2363</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">customSettingUsed:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="553453876"/>
+                                       </object>
+                                       <int key="connectionID">2366</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">customSettingUsed:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="447003158"/>
+                                       </object>
+                                       <int key="connectionID">2367</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">openMainWindow:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="545622547"/>
+                                       </object>
+                                       <int key="connectionID">2369</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">selectDefaultPreset:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="454042588"/>
+                                       </object>
+                                       <int key="connectionID">2422</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">showQueueWindow:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="87484946"/>
+                                       </object>
+                                       <int key="connectionID">2446</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">addToQueue:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="853234446"/>
+                                       </object>
+                                       <int key="connectionID">2447</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">Rip:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="17111946"/>
+                                       </object>
+                                       <int key="connectionID">2448</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicSettingDetelecine</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="585235372"/>
+                                       </object>
+                                       <int key="connectionID">2459</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">videoFrameRateChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="222980245"/>
+                                       </object>
+                                       <int key="connectionID">2462</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">showPicturePanel:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="849279674"/>
+                                       </object>
+                                       <int key="connectionID">2493</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">Pause:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="101536867"/>
+                                       </object>
+                                       <int key="connectionID">2496</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSubForcedCheck</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="691038230"/>
+                                       </object>
+                                       <int key="connectionID">2505</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">subtitleSelectionChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="506492318"/>
+                                       </object>
+                                       <int key="connectionID">2506</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">performClose:</string>
+                                               <reference key="source" ref="952684036"/>
+                                               <reference key="destination" ref="542310438"/>
+                                       </object>
+                                       <int key="connectionID">2509</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAdvancedView</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="231506045"/>
+                                       </object>
+                                       <int key="connectionID">2516</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">showPreferencesWindow:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="782330144"/>
+                                       </object>
+                                       <int key="connectionID">2517</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicLabelDetelecine</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="43900501"/>
+                                       </object>
+                                       <int key="connectionID">2520</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicLabelAutoCrop</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="690364175"/>
+                                       </object>
+                                       <int key="connectionID">2521</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicLabelDenoise</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1060179806"/>
+                                       </object>
+                                       <int key="connectionID">2522</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicLabelDeinterlace</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="999897202"/>
+                                       </object>
+                                       <int key="connectionID">2523</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicSettingDeinterlace</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1068503811"/>
+                                       </object>
+                                       <int key="connectionID">2524</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicSettingARkeep</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="982947780"/>
+                                       </object>
+                                       <int key="connectionID">2526</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicSettingAutoCrop</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="820525517"/>
+                                       </object>
+                                       <int key="connectionID">2527</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicSettingDenoise</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1072509220"/>
+                                       </object>
+                                       <int key="connectionID">2529</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicSettingPAR</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="145957234"/>
+                                       </object>
+                                       <int key="connectionID">2531</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPresetNewDesc</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="511645357"/>
+                                       </object>
+                                       <int key="connectionID">2674</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">calculateBitrate:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="127917338"/>
+                                       </object>
+                                       <int key="connectionID">2689</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">customSettingUsed:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="783405221"/>
+                                       </object>
+                                       <int key="connectionID">2691</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">delegate</string>
+                                               <reference key="source" ref="127917338"/>
+                                               <reference key="destination" ref="2258723"/>
+                                       </object>
+                                       <int key="connectionID">2692</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicLabelDeblock</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="458722452"/>
+                                       </object>
+                                       <int key="connectionID">2696</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicSettingDeblock</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="511739402"/>
+                                       </object>
+                                       <int key="connectionID">2697</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fOpenSourceTitleMMenu</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="865776798"/>
+                                       </object>
+                                       <int key="connectionID">2700</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fScanSrcTitlePathField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="133861013"/>
+                                       </object>
+                                       <int key="connectionID">2709</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fScanSrcTitleNumField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="290568055"/>
+                                       </object>
+                                       <int key="connectionID">2710</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fScanSrcTitleCancelButton</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="35126402"/>
+                                       </object>
+                                       <int key="connectionID">2711</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fScanSrcTitleOpenButton</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1029080172"/>
+                                       </object>
+                                       <int key="connectionID">2712</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fScanSrcTitlePanel</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="687953568"/>
+                                       </object>
+                                       <int key="connectionID">2713</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">closeSourceTitleScanPanel:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="35126402"/>
+                                       </object>
+                                       <int key="connectionID">2714</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">closeSourceTitleScanPanel:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1029080172"/>
+                                       </object>
+                                       <int key="connectionID">2715</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">browseSources:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="865776798"/>
+                                       </object>
+                                       <int key="connectionID">2717</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">browseSources:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="595836714"/>
+                                       </object>
+                                       <int key="connectionID">2718</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fSrcDsplyNameTitleScan</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="655257851"/>
+                                       </object>
+                                       <int key="connectionID">2721</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPresetNewPicFiltersCheck</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1024752086"/>
+                                       </object>
+                                       <int key="connectionID">2841</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fScanIndicator</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="519699512"/>
+                                       </object>
+                                       <int key="connectionID">3204</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPresetsOutlineView</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="807972370"/>
+                                       </object>
+                                       <int key="connectionID">4187</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">dataSource</string>
+                                               <reference key="source" ref="807972370"/>
+                                               <reference key="destination" ref="2258723"/>
+                                       </object>
+                                       <int key="connectionID">4188</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">delegate</string>
+                                               <reference key="source" ref="807972370"/>
+                                               <reference key="destination" ref="2258723"/>
+                                       </object>
+                                       <int key="connectionID">4189</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">selectPreset:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="807972370"/>
+                                       </object>
+                                       <int key="connectionID">4312</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPresetsDelete</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="241719587"/>
+                                       </object>
+                                       <int key="connectionID">4319</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">deletePreset:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="241719587"/>
+                                       </object>
+                                       <int key="connectionID">4321</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPresetsAdd</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="699919504"/>
+                                       </object>
+                                       <int key="connectionID">4324</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">showAddPresetPanel:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="699919504"/>
+                                       </object>
+                                       <int key="connectionID">4325</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDstMp4LargeFileCheck</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="553453876"/>
+                                       </object>
+                                       <int key="connectionID">4578</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDstMp4HttpOptFileCheck</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="581806074"/>
+                                       </object>
+                                       <int key="connectionID">4581</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicSettingsSrc</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1017614971"/>
+                                       </object>
+                                       <int key="connectionID">4842</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicSettingsOutp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="580175226"/>
+                                       </object>
+                                       <int key="connectionID">4843</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicSettingsAnamorphic</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="149133624"/>
+                                       </object>
+                                       <int key="connectionID">4844</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">checkForUpdates:</string>
+                                               <reference key="source" ref="159095366"/>
+                                               <reference key="destination" ref="985983659"/>
+                                       </object>
+                                       <int key="connectionID">4966</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDstMp4iPodFileCheck</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="921877174"/>
+                                       </object>
+                                       <int key="connectionID">4969</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">customSettingUsed:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="921877174"/>
+                                       </object>
+                                       <int key="connectionID">4970</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">customSettingUsed:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="581806074"/>
+                                       </object>
+                                       <int key="connectionID">4971</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack1CodecPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="466865421"/>
+                                       </object>
+                                       <int key="connectionID">4990</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack2CodecPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="905865959"/>
+                                       </object>
+                                       <int key="connectionID">4991</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudLang3PopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="59505660"/>
+                                       </object>
+                                       <int key="connectionID">5020</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudLang4PopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="952272880"/>
+                                       </object>
+                                       <int key="connectionID">5021</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack3CodecPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="826012798"/>
+                                       </object>
+                                       <int key="connectionID">5022</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack4CodecPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="210973520"/>
+                                       </object>
+                                       <int key="connectionID">5023</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack3MixPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="838524493"/>
+                                       </object>
+                                       <int key="connectionID">5024</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack4MixPopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1068703394"/>
+                                       </object>
+                                       <int key="connectionID">5025</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="59505660"/>
+                                       </object>
+                                       <int key="connectionID">5026</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="952272880"/>
+                                       </object>
+                                       <int key="connectionID">5027</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="466865421"/>
+                                       </object>
+                                       <int key="connectionID">5036</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="905865959"/>
+                                       </object>
+                                       <int key="connectionID">5037</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="826012798"/>
+                                       </object>
+                                       <int key="connectionID">5038</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="210973520"/>
+                                       </object>
+                                       <int key="connectionID">5039</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack2RatePopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="989777035"/>
+                                       </object>
+                                       <int key="connectionID">5065</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack3RatePopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="21683307"/>
+                                       </object>
+                                       <int key="connectionID">5066</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack4RatePopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="82044516"/>
+                                       </object>
+                                       <int key="connectionID">5067</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack2BitratePopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="511205515"/>
+                                       </object>
+                                       <int key="connectionID">5069</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack3BitratePopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="362406693"/>
+                                       </object>
+                                       <int key="connectionID">5070</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack4BitratePopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="596295285"/>
+                                       </object>
+                                       <int key="connectionID">5071</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackMixdownChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="838524493"/>
+                                       </object>
+                                       <int key="connectionID">5072</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioTrackMixdownChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1068703394"/>
+                                       </object>
+                                       <int key="connectionID">5073</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">videoEncoderPopUpChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="12330413"/>
+                                       </object>
+                                       <int key="connectionID">5075</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudSourceLabel</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="68754422"/>
+                                       </object>
+                                       <int key="connectionID">5076</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudCodecLabel</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="759329849"/>
+                                       </object>
+                                       <int key="connectionID">5077</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudMixdownLabel</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="211624488"/>
+                                       </object>
+                                       <int key="connectionID">5078</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudSamplerateLabel</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="592255786"/>
+                                       </object>
+                                       <int key="connectionID">5079</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudBitrateLabel</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="122023676"/>
+                                       </object>
+                                       <int key="connectionID">5080</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack1Label</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="198352083"/>
+                                       </object>
+                                       <int key="connectionID">5081</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack2Label</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="290434291"/>
+                                       </object>
+                                       <int key="connectionID">5082</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack3Label</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="979512783"/>
+                                       </object>
+                                       <int key="connectionID">5083</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack4Label</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="822590453"/>
+                                       </object>
+                                       <int key="connectionID">5084</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack1RatePopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="135824882"/>
+                                       </object>
+                                       <int key="connectionID">5085</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack1BitratePopUp</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="351922892"/>
+                                       </object>
+                                       <int key="connectionID">5086</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudDrcLabel</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="169748081"/>
+                                       </object>
+                                       <int key="connectionID">5109</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack1DrcSlider</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="861218370"/>
+                                       </object>
+                                       <int key="connectionID">5110</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack2DrcSlider</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="695663835"/>
+                                       </object>
+                                       <int key="connectionID">5111</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack3DrcSlider</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="229696812"/>
+                                       </object>
+                                       <int key="connectionID">5112</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack4DrcSlider</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="927860050"/>
+                                       </object>
+                                       <int key="connectionID">5113</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack1DrcField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="532012054"/>
+                                       </object>
+                                       <int key="connectionID">5114</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack2DrcField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="850861055"/>
+                                       </object>
+                                       <int key="connectionID">5115</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack3DrcField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="988102670"/>
+                                       </object>
+                                       <int key="connectionID">5116</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudTrack4DrcField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="758473796"/>
+                                       </object>
+                                       <int key="connectionID">5117</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioDRCSliderChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="861218370"/>
+                                       </object>
+                                       <int key="connectionID">5118</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioDRCSliderChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="695663835"/>
+                                       </object>
+                                       <int key="connectionID">5119</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioDRCSliderChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="229696812"/>
+                                       </object>
+                                       <int key="connectionID">5120</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">audioDRCSliderChanged:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="927860050"/>
+                                       </object>
+                                       <int key="connectionID">5121</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicSettingDecomb</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="946167393"/>
+                                       </object>
+                                       <int key="connectionID">5126</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPicLabelDecomb</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="554762309"/>
+                                       </object>
+                                       <int key="connectionID">5127</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">setDefaultPreset:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="950937431"/>
+                                       </object>
+                                       <int key="connectionID">5138</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">addFactoryPresets:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="583192244"/>
+                                       </object>
+                                       <int key="connectionID">5139</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">autoSetM4vExtension:</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="719511430"/>
+                                       </object>
+                                       <int key="connectionID">5152</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPresetNewFolderCheck</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="786415813"/>
+                                       </object>
+                                       <int key="connectionID">5155</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fVidEncoderField</string>
+                                               <reference key="source" ref="2258723"/>
+                                               <reference key="destination" ref="1064150725"/>
+                                       </object>
+                                       <int key="connectionID">5156</int>
+                               </object>
+                       </object>
+                       <object class="IBMutableOrderedSet" key="objectRecords">
+                               <object class="NSArray" key="orderedObjects">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">0</int>
+                                               <object class="NSArray" key="object" id="836211765">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <reference key="children" ref="411085004"/>
+                                               <nil key="parent"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-2</int>
+                                               <reference key="object" ref="1046316778"/>
+                                               <reference key="parent" ref="836211765"/>
+                                               <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-1</int>
+                                               <reference key="object" ref="952684036"/>
+                                               <reference key="parent" ref="836211765"/>
+                                               <string key="objectName">First Responder</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-3</int>
+                                               <reference key="object" ref="300550588"/>
+                                               <reference key="parent" ref="836211765"/>
+                                               <string key="objectName">Application</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">21</int>
+                                               <reference key="object" ref="192660081"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="168918359"/>
+                                               </object>
+                                               <reference key="parent" ref="836211765"/>
+                                               <string key="objectName">MainWindow</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2</int>
+                                               <reference key="object" ref="168918359"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="794651271"/>
+                                                       <reference ref="222334056"/>
+                                                       <reference ref="712502892"/>
+                                                       <reference ref="586321835"/>
+                                                       <reference ref="854767306"/>
+                                                       <reference ref="806469067"/>
+                                                       <reference ref="766125203"/>
+                                                       <reference ref="1053010160"/>
+                                                       <reference ref="971754180"/>
+                                                       <reference ref="453345136"/>
+                                                       <reference ref="200266929"/>
+                                                       <reference ref="1023408378"/>
+                                                       <reference ref="713493964"/>
+                                                       <reference ref="955053416"/>
+                                                       <reference ref="138115732"/>
+                                                       <reference ref="87961628"/>
+                                                       <reference ref="732193996"/>
+                                                       <reference ref="186223550"/>
+                                                       <reference ref="210289606"/>
+                                                       <reference ref="10346684"/>
+                                                       <reference ref="35106907"/>
+                                                       <reference ref="151388399"/>
+                                                       <reference ref="574185541"/>
+                                                       <reference ref="1007421233"/>
+                                                       <reference ref="519699512"/>
+                                                       <reference ref="454206717"/>
+                                                       <reference ref="581806074"/>
+                                                       <reference ref="553453876"/>
+                                                       <reference ref="921877174"/>
+                                               </object>
+                                               <reference key="parent" ref="192660081"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1123</int>
+                                               <reference key="object" ref="794651271"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="10523918"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1373</int>
+                                               <reference key="object" ref="222334056"/>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1474</int>
+                                               <reference key="object" ref="712502892"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="157300012"/>
+                                                       <reference ref="107038816"/>
+                                                       <reference ref="291470012"/>
+                                                       <reference ref="744678564"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1475</int>
+                                               <reference key="object" ref="157300012"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="738554558"/>
+                                               </object>
+                                               <reference key="parent" ref="712502892"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1476</int>
+                                               <reference key="object" ref="738554558"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="198352083"/>
+                                                       <reference ref="641072930"/>
+                                                       <reference ref="290434291"/>
+                                                       <reference ref="122023676"/>
+                                                       <reference ref="351922892"/>
+                                                       <reference ref="506492318"/>
+                                                       <reference ref="436388527"/>
+                                                       <reference ref="64899409"/>
+                                                       <reference ref="354208181"/>
+                                                       <reference ref="211624488"/>
+                                                       <reference ref="68754422"/>
+                                                       <reference ref="691038230"/>
+                                                       <reference ref="978534247"/>
+                                                       <reference ref="460286942"/>
+                                                       <reference ref="124979328"/>
+                                                       <reference ref="844196518"/>
+                                                       <reference ref="135824882"/>
+                                                       <reference ref="592255786"/>
+                                                       <reference ref="466865421"/>
+                                                       <reference ref="905865959"/>
+                                                       <reference ref="759329849"/>
+                                                       <reference ref="979512783"/>
+                                                       <reference ref="822590453"/>
+                                                       <reference ref="59505660"/>
+                                                       <reference ref="952272880"/>
+                                                       <reference ref="826012798"/>
+                                                       <reference ref="210973520"/>
+                                                       <reference ref="838524493"/>
+                                                       <reference ref="1068703394"/>
+                                                       <reference ref="989777035"/>
+                                                       <reference ref="21683307"/>
+                                                       <reference ref="82044516"/>
+                                                       <reference ref="511205515"/>
+                                                       <reference ref="362406693"/>
+                                                       <reference ref="596295285"/>
+                                                       <reference ref="861218370"/>
+                                                       <reference ref="695663835"/>
+                                                       <reference ref="229696812"/>
+                                                       <reference ref="927860050"/>
+                                                       <reference ref="169748081"/>
+                                                       <reference ref="532012054"/>
+                                                       <reference ref="850861055"/>
+                                                       <reference ref="988102670"/>
+                                                       <reference ref="758473796"/>
+                                                       <reference ref="93020318"/>
+                                               </object>
+                                               <reference key="parent" ref="157300012"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1518</int>
+                                               <reference key="object" ref="93020318"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="555573644"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1521</int>
+                                               <reference key="object" ref="198352083"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="51721961"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1522</int>
+                                               <reference key="object" ref="641072930"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="442718934"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1525</int>
+                                               <reference key="object" ref="290434291"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="315823608"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1526</int>
+                                               <reference key="object" ref="122023676"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="92788757"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1527</int>
+                                               <reference key="object" ref="351922892"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="569025834"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1530</int>
+                                               <reference key="object" ref="135824882"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="47770866"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1533</int>
+                                               <reference key="object" ref="592255786"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="139205907"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1634</int>
+                                               <reference key="object" ref="506492318"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="636153290"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1638</int>
+                                               <reference key="object" ref="436388527"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="95314231"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1962</int>
+                                               <reference key="object" ref="64899409"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="581778322"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1966</int>
+                                               <reference key="object" ref="354208181"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1011395150"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1970</int>
+                                               <reference key="object" ref="211624488"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="109899703"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1972</int>
+                                               <reference key="object" ref="68754422"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1013303839"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2504</int>
+                                               <reference key="object" ref="691038230"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="944590907"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">3075</int>
+                                               <reference key="object" ref="978534247"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="211433572"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">3077</int>
+                                               <reference key="object" ref="460286942"/>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">3081</int>
+                                               <reference key="object" ref="124979328"/>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">3082</int>
+                                               <reference key="object" ref="844196518"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="653177228"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1477</int>
+                                               <reference key="object" ref="107038816"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1053078401"/>
+                                               </object>
+                                               <reference key="parent" ref="712502892"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1478</int>
+                                               <reference key="object" ref="1053078401"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="521019277"/>
+                                                       <reference ref="229000833"/>
+                                                       <reference ref="127917338"/>
+                                                       <reference ref="783405221"/>
+                                                       <reference ref="239657287"/>
+                                                       <reference ref="222980245"/>
+                                                       <reference ref="1000247853"/>
+                                                       <reference ref="447003158"/>
+                                                       <reference ref="12330413"/>
+                                                       <reference ref="586924601"/>
+                                                       <reference ref="463960465"/>
+                                                       <reference ref="1064150725"/>
+                                                       <reference ref="373965512"/>
+                                                       <reference ref="917474208"/>
+                                                       <reference ref="946417297"/>
+                                                       <reference ref="982947780"/>
+                                                       <reference ref="839994488"/>
+                                                       <reference ref="710962186"/>
+                                                       <reference ref="145957234"/>
+                                                       <reference ref="690364175"/>
+                                                       <reference ref="820525517"/>
+                                                       <reference ref="585235372"/>
+                                                       <reference ref="1068503811"/>
+                                                       <reference ref="1060179806"/>
+                                                       <reference ref="511739402"/>
+                                                       <reference ref="458722452"/>
+                                                       <reference ref="1072509220"/>
+                                                       <reference ref="43900501"/>
+                                                       <reference ref="999897202"/>
+                                                       <reference ref="1017614971"/>
+                                                       <reference ref="580175226"/>
+                                                       <reference ref="149133624"/>
+                                                       <reference ref="946167393"/>
+                                                       <reference ref="554762309"/>
+                                                       <reference ref="219409733"/>
+                                                       <reference ref="37121296"/>
+                                               </object>
+                                               <reference key="parent" ref="107038816"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1499</int>
+                                               <reference key="object" ref="521019277"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="200565868"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1500</int>
+                                               <reference key="object" ref="229000833"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="867231800"/>
+                                                       <reference ref="297078314"/>
+                                                       <reference ref="733978413"/>
+                                                       <reference ref="779990493"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1501</int>
+                                               <reference key="object" ref="867231800"/>
+                                               <reference key="parent" ref="229000833"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1502</int>
+                                               <reference key="object" ref="297078314"/>
+                                               <reference key="parent" ref="229000833"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1503</int>
+                                               <reference key="object" ref="733978413"/>
+                                               <reference key="parent" ref="229000833"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1504</int>
+                                               <reference key="object" ref="127917338"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="850340172"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1505</int>
+                                               <reference key="object" ref="783405221"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="351953267"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1506</int>
+                                               <reference key="object" ref="239657287"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="160453387"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1507</int>
+                                               <reference key="object" ref="1000247853"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="860863090"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1508</int>
+                                               <reference key="object" ref="463960465"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="509250281"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1509</int>
+                                               <reference key="object" ref="12330413"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1018849574"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1512</int>
+                                               <reference key="object" ref="222980245"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="343952154"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1515</int>
+                                               <reference key="object" ref="1064150725"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="451922400"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1516</int>
+                                               <reference key="object" ref="586924601"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="531797832"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1713</int>
+                                               <reference key="object" ref="37121296"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="969536223"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1714</int>
+                                               <reference key="object" ref="219409733"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="215270136"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1717</int>
+                                               <reference key="object" ref="373965512"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="656776160"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1723</int>
+                                               <reference key="object" ref="917474208"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1021257184"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1729</int>
+                                               <reference key="object" ref="946417297"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="531090746"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1731</int>
+                                               <reference key="object" ref="999897202"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="749563917"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1739</int>
+                                               <reference key="object" ref="982947780"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="86719269"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1740</int>
+                                               <reference key="object" ref="1068503811"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="626403977"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1753</int>
+                                               <reference key="object" ref="839994488"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSView" id="859460623">
+                                                               <nil key="NSNextResponder"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <string key="NSFrame">{{2, 2}, {125, 1}}</string>
+                                                               <reference key="NSNextKeyView" ref="946417297"/>
+                                                       </object>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1754</int>
+                                               <reference key="object" ref="859460623"/>
+                                               <reference key="parent" ref="839994488"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1772</int>
+                                               <reference key="object" ref="710962186"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="26279285"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1773</int>
+                                               <reference key="object" ref="145957234"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="497251062"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2361</int>
+                                               <reference key="object" ref="447003158"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1070893195"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2375</int>
+                                               <reference key="object" ref="690364175"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="508148739"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2377</int>
+                                               <reference key="object" ref="820525517"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="76686465"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2451</int>
+                                               <reference key="object" ref="43900501"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1005519170"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2452</int>
+                                               <reference key="object" ref="585235372"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="782049171"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2472</int>
+                                               <reference key="object" ref="1060179806"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="344072439"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2473</int>
+                                               <reference key="object" ref="1072509220"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="965262561"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2694</int>
+                                               <reference key="object" ref="511739402"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="315802325"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2695</int>
+                                               <reference key="object" ref="458722452"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="133553303"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4836</int>
+                                               <reference key="object" ref="1017614971"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="370959642"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4838</int>
+                                               <reference key="object" ref="580175226"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="82054988"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4840</int>
+                                               <reference key="object" ref="149133624"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="334116173"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1989</int>
+                                               <reference key="object" ref="291470012"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="440990725"/>
+                                               </object>
+                                               <reference key="parent" ref="712502892"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1990</int>
+                                               <reference key="object" ref="440990725"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="307620967"/>
+                                                       <reference ref="262106913"/>
+                                               </object>
+                                               <reference key="parent" ref="291470012"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1999</int>
+                                               <reference key="object" ref="307620967"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="595654978"/>
+                                                       <reference ref="1046880533"/>
+                                                       <reference ref="1033243513"/>
+                                                       <reference ref="928480858"/>
+                                               </object>
+                                               <reference key="parent" ref="440990725"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2000</int>
+                                               <reference key="object" ref="595654978"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="77208310"/>
+                                                       <reference ref="932392163"/>
+                                               </object>
+                                               <reference key="parent" ref="307620967"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2001</int>
+                                               <reference key="object" ref="77208310"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="686068440"/>
+                                               </object>
+                                               <reference key="parent" ref="595654978"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2002</int>
+                                               <reference key="object" ref="932392163"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="237660698"/>
+                                               </object>
+                                               <reference key="parent" ref="595654978"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2003</int>
+                                               <reference key="object" ref="262106913"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="719511430"/>
+                                               </object>
+                                               <reference key="parent" ref="440990725"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2015</int>
+                                               <reference key="object" ref="744678564"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="833271282"/>
+                                               </object>
+                                               <reference key="parent" ref="712502892"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2016</int>
+                                               <reference key="object" ref="833271282"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="231506045"/>
+                                               </object>
+                                               <reference key="parent" ref="744678564"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2513</int>
+                                               <reference key="object" ref="231506045"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <reference key="parent" ref="833271282"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1538</int>
+                                               <reference key="object" ref="586321835"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="121574898"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1539</int>
+                                               <reference key="object" ref="854767306"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="689580100"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1540</int>
+                                               <reference key="object" ref="806469067"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="177567437"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1541</int>
+                                               <reference key="object" ref="766125203"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="821198683"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1544</int>
+                                               <reference key="object" ref="1053010160"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="17369297"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1545</int>
+                                               <reference key="object" ref="971754180"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="286887304"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1548</int>
+                                               <reference key="object" ref="453345136"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="564669343"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1551</int>
+                                               <reference key="object" ref="200266929"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="904849236"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1552</int>
+                                               <reference key="object" ref="1023408378"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="834340599"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1553</int>
+                                               <reference key="object" ref="713493964"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1038625481"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1554</int>
+                                               <reference key="object" ref="955053416"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="362196160"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1555</int>
+                                               <reference key="object" ref="138115732"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="510160694"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1556</int>
+                                               <reference key="object" ref="87961628"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="51600927"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1557</int>
+                                               <reference key="object" ref="732193996"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="264217237"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1561</int>
+                                               <reference key="object" ref="186223550"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="988599137"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1562</int>
+                                               <reference key="object" ref="210289606"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="295879492"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1623</int>
+                                               <reference key="object" ref="10346684"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSView" id="412106376">
+                                                               <nil key="NSNextResponder"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <string key="NSFrame">{{2, 2}, {125, 1}}</string>
+                                                       </object>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1624</int>
+                                               <reference key="object" ref="412106376"/>
+                                               <reference key="parent" ref="10346684"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1627</int>
+                                               <reference key="object" ref="35106907"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="293028864"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1628</int>
+                                               <reference key="object" ref="151388399"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSView" id="586026952">
+                                                               <nil key="NSNextResponder"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <string key="NSFrame">{{2, 2}, {125, 1}}</string>
+                                                       </object>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1629</int>
+                                               <reference key="object" ref="586026952"/>
+                                               <reference key="parent" ref="151388399"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1882</int>
+                                               <reference key="object" ref="574185541"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="488791842"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2006</int>
+                                               <reference key="object" ref="1007421233"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="224806210"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2364</int>
+                                               <reference key="object" ref="553453876"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="294332300"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">3203</int>
+                                               <reference key="object" ref="519699512"/>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">3205</int>
+                                               <reference key="object" ref="454206717"/>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4579</int>
+                                               <reference key="object" ref="581806074"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="832863281"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">29</int>
+                                               <reference key="object" ref="840340181"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="116324948"/>
+                                                       <reference ref="610133626"/>
+                                                       <reference ref="966413586"/>
+                                                       <reference ref="487283590"/>
+                                                       <reference ref="692187614"/>
+                                                       <reference ref="226787934"/>
+                                               </object>
+                                               <reference key="parent" ref="836211765"/>
+                                               <string key="objectName">MainMenu</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">56</int>
+                                               <reference key="object" ref="116324948"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1035150210"/>
+                                               </object>
+                                               <reference key="parent" ref="840340181"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">57</int>
+                                               <reference key="object" ref="1035150210"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="218095211"/>
+                                                       <reference ref="680265479"/>
+                                                       <reference ref="550835954"/>
+                                                       <reference ref="912853376"/>
+                                                       <reference ref="981110965"/>
+                                                       <reference ref="360013803"/>
+                                                       <reference ref="782330144"/>
+                                                       <reference ref="802148601"/>
+                                                       <reference ref="985983659"/>
+                                               </object>
+                                               <reference key="parent" ref="116324948"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">58</int>
+                                               <reference key="object" ref="218095211"/>
+                                               <reference key="parent" ref="1035150210"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">136</int>
+                                               <reference key="object" ref="680265479"/>
+                                               <reference key="parent" ref="1035150210"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">196</int>
+                                               <reference key="object" ref="550835954"/>
+                                               <reference key="parent" ref="1035150210"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">970</int>
+                                               <reference key="object" ref="912853376"/>
+                                               <reference key="parent" ref="1035150210"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">971</int>
+                                               <reference key="object" ref="981110965"/>
+                                               <reference key="parent" ref="1035150210"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">973</int>
+                                               <reference key="object" ref="360013803"/>
+                                               <reference key="parent" ref="1035150210"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1445</int>
+                                               <reference key="object" ref="782330144"/>
+                                               <reference key="parent" ref="1035150210"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1900</int>
+                                               <reference key="object" ref="802148601"/>
+                                               <reference key="parent" ref="1035150210"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1189</int>
+                                               <reference key="object" ref="610133626"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="919178355"/>
+                                               </object>
+                                               <reference key="parent" ref="840340181"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1192</int>
+                                               <reference key="object" ref="919178355"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="998796929"/>
+                                                       <reference ref="372804054"/>
+                                                       <reference ref="196605560"/>
+                                                       <reference ref="854594899"/>
+                                                       <reference ref="302989927"/>
+                                                       <reference ref="545622547"/>
+                                                       <reference ref="87484946"/>
+                                                       <reference ref="849279674"/>
+                                                       <reference ref="1034427275"/>
+                                               </object>
+                                               <reference key="parent" ref="610133626"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1190</int>
+                                               <reference key="object" ref="998796929"/>
+                                               <reference key="parent" ref="919178355"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1191</int>
+                                               <reference key="object" ref="372804054"/>
+                                               <reference key="parent" ref="919178355"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1193</int>
+                                               <reference key="object" ref="196605560"/>
+                                               <reference key="parent" ref="919178355"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1884</int>
+                                               <reference key="object" ref="854594899"/>
+                                               <reference key="parent" ref="919178355"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2295</int>
+                                               <reference key="object" ref="302989927"/>
+                                               <reference key="parent" ref="919178355"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2368</int>
+                                               <reference key="object" ref="545622547"/>
+                                               <reference key="parent" ref="919178355"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2445</int>
+                                               <reference key="object" ref="87484946"/>
+                                               <reference key="parent" ref="919178355"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2488</int>
+                                               <reference key="object" ref="849279674"/>
+                                               <reference key="parent" ref="919178355"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2519</int>
+                                               <reference key="object" ref="1034427275"/>
+                                               <reference key="parent" ref="919178355"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1200</int>
+                                               <reference key="object" ref="966413586"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="567182830"/>
+                                               </object>
+                                               <reference key="parent" ref="840340181"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1209</int>
+                                               <reference key="object" ref="567182830"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="595836714"/>
+                                                       <reference ref="853234446"/>
+                                                       <reference ref="17111946"/>
+                                                       <reference ref="101536867"/>
+                                                       <reference ref="417984878"/>
+                                                       <reference ref="542310438"/>
+                                                       <reference ref="374169999"/>
+                                                       <reference ref="865776798"/>
+                                               </object>
+                                               <reference key="parent" ref="966413586"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1198</int>
+                                               <reference key="object" ref="595836714"/>
+                                               <reference key="parent" ref="567182830"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2443</int>
+                                               <reference key="object" ref="853234446"/>
+                                               <reference key="parent" ref="567182830"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2444</int>
+                                               <reference key="object" ref="17111946"/>
+                                               <reference key="parent" ref="567182830"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2494</int>
+                                               <reference key="object" ref="101536867"/>
+                                               <reference key="parent" ref="567182830"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2507</int>
+                                               <reference key="object" ref="417984878"/>
+                                               <reference key="parent" ref="567182830"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2508</int>
+                                               <reference key="object" ref="542310438"/>
+                                               <reference key="parent" ref="567182830"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2518</int>
+                                               <reference key="object" ref="374169999"/>
+                                               <reference key="parent" ref="567182830"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2698</int>
+                                               <reference key="object" ref="865776798"/>
+                                               <reference key="parent" ref="567182830"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1431</int>
+                                               <reference key="object" ref="487283590"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="371757683"/>
+                                               </object>
+                                               <reference key="parent" ref="840340181"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1429</int>
+                                               <reference key="object" ref="371757683"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="265609219"/>
+                                                       <reference ref="757350989"/>
+                                                       <reference ref="911007118"/>
+                                               </object>
+                                               <reference key="parent" ref="487283590"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1432</int>
+                                               <reference key="object" ref="265609219"/>
+                                               <reference key="parent" ref="371757683"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1433</int>
+                                               <reference key="object" ref="757350989"/>
+                                               <reference key="parent" ref="371757683"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1985</int>
+                                               <reference key="object" ref="911007118"/>
+                                               <reference key="parent" ref="371757683"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1795</int>
+                                               <reference key="object" ref="692187614"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1010405502"/>
+                                               </object>
+                                               <reference key="parent" ref="840340181"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1796</int>
+                                               <reference key="object" ref="1010405502"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="494582096"/>
+                                                       <reference ref="695401358"/>
+                                                       <reference ref="587511664"/>
+                                                       <reference ref="1051795572"/>
+                                                       <reference ref="786616983"/>
+                                                       <reference ref="249090291"/>
+                                                       <reference ref="134768774"/>
+                                                       <reference ref="1016677230"/>
+                                                       <reference ref="84425921"/>
+                                                       <reference ref="979367247"/>
+                                                       <reference ref="611285451"/>
+                                                       <reference ref="741953332"/>
+                                                       <reference ref="1006794292"/>
+                                               </object>
+                                               <reference key="parent" ref="692187614"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1797</int>
+                                               <reference key="object" ref="494582096"/>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1798</int>
+                                               <reference key="object" ref="695401358"/>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1799</int>
+                                               <reference key="object" ref="587511664"/>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1800</int>
+                                               <reference key="object" ref="1051795572"/>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1801</int>
+                                               <reference key="object" ref="786616983"/>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1802</int>
+                                               <reference key="object" ref="249090291"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1067858879"/>
+                                               </object>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1803</int>
+                                               <reference key="object" ref="1067858879"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="541561571"/>
+                                                       <reference ref="49300518"/>
+                                                       <reference ref="323467360"/>
+                                                       <reference ref="1069789051"/>
+                                                       <reference ref="793630765"/>
+                                               </object>
+                                               <reference key="parent" ref="249090291"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1804</int>
+                                               <reference key="object" ref="541561571"/>
+                                               <reference key="parent" ref="1067858879"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1805</int>
+                                               <reference key="object" ref="49300518"/>
+                                               <reference key="parent" ref="1067858879"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1806</int>
+                                               <reference key="object" ref="323467360"/>
+                                               <reference key="parent" ref="1067858879"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1807</int>
+                                               <reference key="object" ref="1069789051"/>
+                                               <reference key="parent" ref="1067858879"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1808</int>
+                                               <reference key="object" ref="793630765"/>
+                                               <reference key="parent" ref="1067858879"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1809</int>
+                                               <reference key="object" ref="134768774"/>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1810</int>
+                                               <reference key="object" ref="1016677230"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="650155643"/>
+                                               </object>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1811</int>
+                                               <reference key="object" ref="650155643"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="981624971"/>
+                                                       <reference ref="301925013"/>
+                                                       <reference ref="6854324"/>
+                                               </object>
+                                               <reference key="parent" ref="1016677230"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1812</int>
+                                               <reference key="object" ref="981624971"/>
+                                               <reference key="parent" ref="650155643"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1813</int>
+                                               <reference key="object" ref="301925013"/>
+                                               <reference key="parent" ref="650155643"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1814</int>
+                                               <reference key="object" ref="6854324"/>
+                                               <reference key="parent" ref="650155643"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1815</int>
+                                               <reference key="object" ref="84425921"/>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1816</int>
+                                               <reference key="object" ref="979367247"/>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1817</int>
+                                               <reference key="object" ref="611285451"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="654962117"/>
+                                               </object>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1818</int>
+                                               <reference key="object" ref="654962117"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="496049927"/>
+                                                       <reference ref="362189914"/>
+                                               </object>
+                                               <reference key="parent" ref="611285451"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1819</int>
+                                               <reference key="object" ref="496049927"/>
+                                               <reference key="parent" ref="654962117"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1820</int>
+                                               <reference key="object" ref="362189914"/>
+                                               <reference key="parent" ref="654962117"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1821</int>
+                                               <reference key="object" ref="741953332"/>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1822</int>
+                                               <reference key="object" ref="1006794292"/>
+                                               <reference key="parent" ref="1010405502"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1948</int>
+                                               <reference key="object" ref="226787934"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="112579544"/>
+                                               </object>
+                                               <reference key="parent" ref="840340181"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1949</int>
+                                               <reference key="object" ref="112579544"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="814047217"/>
+                                                       <reference ref="153657129"/>
+                                                       <reference ref="644928468"/>
+                                                       <reference ref="180231"/>
+                                                       <reference ref="454042588"/>
+                                               </object>
+                                               <reference key="parent" ref="226787934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1950</int>
+                                               <reference key="object" ref="814047217"/>
+                                               <reference key="parent" ref="112579544"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1951</int>
+                                               <reference key="object" ref="153657129"/>
+                                               <reference key="parent" ref="112579544"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1954</int>
+                                               <reference key="object" ref="644928468"/>
+                                               <reference key="parent" ref="112579544"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1955</int>
+                                               <reference key="object" ref="180231"/>
+                                               <reference key="parent" ref="112579544"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2421</int>
+                                               <reference key="object" ref="454042588"/>
+                                               <reference key="parent" ref="112579544"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">240</int>
+                                               <reference key="object" ref="2258723"/>
+                                               <reference key="parent" ref="836211765"/>
+                                               <string key="objectName">HBController</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">434</int>
+                                               <reference key="object" ref="526140766"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="168254512"/>
+                                               </object>
+                                               <reference key="parent" ref="836211765"/>
+                                               <string key="objectName">DonePanel</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">435</int>
+                                               <reference key="object" ref="168254512"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="940804962"/>
+                                                       <reference ref="764659803"/>
+                                                       <reference ref="640205151"/>
+                                               </object>
+                                               <reference key="parent" ref="526140766"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">436</int>
+                                               <reference key="object" ref="940804962"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="72412547"/>
+                                               </object>
+                                               <reference key="parent" ref="168254512"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">437</int>
+                                               <reference key="object" ref="764659803"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="938246142"/>
+                                               </object>
+                                               <reference key="parent" ref="168254512"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">438</int>
+                                               <reference key="object" ref="640205151"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="160092001"/>
+                                               </object>
+                                               <reference key="parent" ref="168254512"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1841</int>
+                                               <reference key="object" ref="972647787"/>
+                                               <reference key="parent" ref="836211765"/>
+                                               <string key="objectName">PresetsDrawer</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1843</int>
+                                               <reference key="object" ref="621751818"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="33643505"/>
+                                                       <reference ref="241719587"/>
+                                                       <reference ref="699919504"/>
+                                                       <reference ref="886184281"/>
+                                               </object>
+                                               <reference key="parent" ref="836211765"/>
+                                               <string key="objectName">PresetsView</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4179</int>
+                                               <reference key="object" ref="33643505"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="807972370"/>
+                                                       <reference ref="475123229"/>
+                                                       <reference ref="573337548"/>
+                                               </object>
+                                               <reference key="parent" ref="621751818"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4182</int>
+                                               <reference key="object" ref="807972370"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="658438499"/>
+                                               </object>
+                                               <reference key="parent" ref="33643505"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4183</int>
+                                               <reference key="object" ref="658438499"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="384895213"/>
+                                               </object>
+                                               <reference key="parent" ref="807972370"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4186</int>
+                                               <reference key="object" ref="384895213"/>
+                                               <reference key="parent" ref="658438499"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4317</int>
+                                               <reference key="object" ref="241719587"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="501219161"/>
+                                               </object>
+                                               <reference key="parent" ref="621751818"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4322</int>
+                                               <reference key="object" ref="699919504"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="489159603"/>
+                                               </object>
+                                               <reference key="parent" ref="621751818"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1867</int>
+                                               <reference key="object" ref="888992113"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="69290042"/>
+                                               </object>
+                                               <reference key="parent" ref="836211765"/>
+                                               <string key="objectName">AddPresetPanel</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1868</int>
+                                               <reference key="object" ref="69290042"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="636581183"/>
+                                                       <reference ref="586136427"/>
+                                                       <reference ref="978853241"/>
+                                                       <reference ref="167356719"/>
+                                                       <reference ref="343391844"/>
+                                                       <reference ref="340554114"/>
+                                                       <reference ref="511645357"/>
+                                                       <reference ref="31472093"/>
+                                                       <reference ref="1024752086"/>
+                                                       <reference ref="5085381"/>
+                                                       <reference ref="988499754"/>
+                                                       <reference ref="59653352"/>
+                                                       <reference ref="384547934"/>
+                                                       <reference ref="786415813"/>
+                                               </object>
+                                               <reference key="parent" ref="888992113"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1870</int>
+                                               <reference key="object" ref="636581183"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="107603394"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1871</int>
+                                               <reference key="object" ref="586136427"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="231870318"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1872</int>
+                                               <reference key="object" ref="978853241"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="479246832"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2008</int>
+                                               <reference key="object" ref="167356719"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="17688962"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2670</int>
+                                               <reference key="object" ref="343391844"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="658438349"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2671</int>
+                                               <reference key="object" ref="340554114"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="70981869"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2672</int>
+                                               <reference key="object" ref="384547934"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="207651610"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2673</int>
+                                               <reference key="object" ref="511645357"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="855042909"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2833</int>
+                                               <reference key="object" ref="31472093"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="31665321"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2837</int>
+                                               <reference key="object" ref="1024752086"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="625635488"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2839</int>
+                                               <reference key="object" ref="5085381"/>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2840</int>
+                                               <reference key="object" ref="988499754"/>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2957</int>
+                                               <reference key="object" ref="59653352"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="155469085"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2701</int>
+                                               <reference key="object" ref="687953568"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="867624722"/>
+                                               </object>
+                                               <reference key="parent" ref="836211765"/>
+                                               <string key="objectName">SourceTitlePanel</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2702</int>
+                                               <reference key="object" ref="867624722"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="133861013"/>
+                                                       <reference ref="293908248"/>
+                                                       <reference ref="535532677"/>
+                                                       <reference ref="290568055"/>
+                                                       <reference ref="35126402"/>
+                                                       <reference ref="1029080172"/>
+                                                       <reference ref="1010749064"/>
+                                                       <reference ref="610976437"/>
+                                                       <reference ref="655257851"/>
+                                               </object>
+                                               <reference key="parent" ref="687953568"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2703</int>
+                                               <reference key="object" ref="133861013"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="874724779"/>
+                                               </object>
+                                               <reference key="parent" ref="867624722"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2704</int>
+                                               <reference key="object" ref="293908248"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="290236859"/>
+                                               </object>
+                                               <reference key="parent" ref="867624722"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2705</int>
+                                               <reference key="object" ref="535532677"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1026393301"/>
+                                               </object>
+                                               <reference key="parent" ref="867624722"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2706</int>
+                                               <reference key="object" ref="290568055"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="412266408"/>
+                                               </object>
+                                               <reference key="parent" ref="867624722"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2707</int>
+                                               <reference key="object" ref="35126402"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="935162329"/>
+                                               </object>
+                                               <reference key="parent" ref="867624722"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2708</int>
+                                               <reference key="object" ref="1029080172"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1020926636"/>
+                                               </object>
+                                               <reference key="parent" ref="867624722"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2716</int>
+                                               <reference key="object" ref="1010749064"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="938406174"/>
+                                               </object>
+                                               <reference key="parent" ref="867624722"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2719</int>
+                                               <reference key="object" ref="610976437"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="802225466"/>
+                                               </object>
+                                               <reference key="parent" ref="867624722"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2720</int>
+                                               <reference key="object" ref="655257851"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="19595360"/>
+                                               </object>
+                                               <reference key="parent" ref="867624722"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4846</int>
+                                               <reference key="object" ref="10523918"/>
+                                               <reference key="parent" ref="794651271"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4847</int>
+                                               <reference key="object" ref="555573644"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="207945181"/>
+                                               </object>
+                                               <reference key="parent" ref="93020318"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4848</int>
+                                               <reference key="object" ref="51721961"/>
+                                               <reference key="parent" ref="198352083"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4849</int>
+                                               <reference key="object" ref="442718934"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="417760816"/>
+                                               </object>
+                                               <reference key="parent" ref="641072930"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4850</int>
+                                               <reference key="object" ref="315823608"/>
+                                               <reference key="parent" ref="290434291"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4851</int>
+                                               <reference key="object" ref="92788757"/>
+                                               <reference key="parent" ref="122023676"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4852</int>
+                                               <reference key="object" ref="569025834"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="389043188"/>
+                                               </object>
+                                               <reference key="parent" ref="351922892"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4853</int>
+                                               <reference key="object" ref="47770866"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="80517384"/>
+                                               </object>
+                                               <reference key="parent" ref="135824882"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4854</int>
+                                               <reference key="object" ref="139205907"/>
+                                               <reference key="parent" ref="592255786"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4855</int>
+                                               <reference key="object" ref="636153290"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="121028261"/>
+                                               </object>
+                                               <reference key="parent" ref="506492318"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4856</int>
+                                               <reference key="object" ref="95314231"/>
+                                               <reference key="parent" ref="436388527"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4857</int>
+                                               <reference key="object" ref="581778322"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="142584693"/>
+                                               </object>
+                                               <reference key="parent" ref="64899409"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4858</int>
+                                               <reference key="object" ref="1011395150"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="674797640"/>
+                                               </object>
+                                               <reference key="parent" ref="354208181"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4859</int>
+                                               <reference key="object" ref="109899703"/>
+                                               <reference key="parent" ref="211624488"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4860</int>
+                                               <reference key="object" ref="1013303839"/>
+                                               <reference key="parent" ref="68754422"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4861</int>
+                                               <reference key="object" ref="944590907"/>
+                                               <reference key="parent" ref="691038230"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4862</int>
+                                               <reference key="object" ref="211433572"/>
+                                               <reference key="parent" ref="978534247"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4864</int>
+                                               <reference key="object" ref="653177228"/>
+                                               <reference key="parent" ref="844196518"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4872</int>
+                                               <reference key="object" ref="200565868"/>
+                                               <reference key="parent" ref="521019277"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4873</int>
+                                               <reference key="object" ref="850340172"/>
+                                               <reference key="parent" ref="127917338"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4874</int>
+                                               <reference key="object" ref="351953267"/>
+                                               <reference key="parent" ref="783405221"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4875</int>
+                                               <reference key="object" ref="160453387"/>
+                                               <reference key="parent" ref="239657287"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4876</int>
+                                               <reference key="object" ref="860863090"/>
+                                               <reference key="parent" ref="1000247853"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4877</int>
+                                               <reference key="object" ref="509250281"/>
+                                               <reference key="parent" ref="463960465"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4878</int>
+                                               <reference key="object" ref="1018849574"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="605902924"/>
+                                               </object>
+                                               <reference key="parent" ref="12330413"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4879</int>
+                                               <reference key="object" ref="343952154"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="794681411"/>
+                                               </object>
+                                               <reference key="parent" ref="222980245"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4880</int>
+                                               <reference key="object" ref="451922400"/>
+                                               <reference key="parent" ref="1064150725"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4881</int>
+                                               <reference key="object" ref="531797832"/>
+                                               <reference key="parent" ref="586924601"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4882</int>
+                                               <reference key="object" ref="969536223"/>
+                                               <reference key="parent" ref="37121296"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4883</int>
+                                               <reference key="object" ref="215270136"/>
+                                               <reference key="parent" ref="219409733"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4884</int>
+                                               <reference key="object" ref="656776160"/>
+                                               <reference key="parent" ref="373965512"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4885</int>
+                                               <reference key="object" ref="1021257184"/>
+                                               <reference key="parent" ref="917474208"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4886</int>
+                                               <reference key="object" ref="531090746"/>
+                                               <reference key="parent" ref="946417297"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4887</int>
+                                               <reference key="object" ref="749563917"/>
+                                               <reference key="parent" ref="999897202"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4888</int>
+                                               <reference key="object" ref="86719269"/>
+                                               <reference key="parent" ref="982947780"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4889</int>
+                                               <reference key="object" ref="626403977"/>
+                                               <reference key="parent" ref="1068503811"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4890</int>
+                                               <reference key="object" ref="26279285"/>
+                                               <reference key="parent" ref="710962186"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4891</int>
+                                               <reference key="object" ref="497251062"/>
+                                               <reference key="parent" ref="145957234"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4892</int>
+                                               <reference key="object" ref="1070893195"/>
+                                               <reference key="parent" ref="447003158"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4893</int>
+                                               <reference key="object" ref="508148739"/>
+                                               <reference key="parent" ref="690364175"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4894</int>
+                                               <reference key="object" ref="76686465"/>
+                                               <reference key="parent" ref="820525517"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4895</int>
+                                               <reference key="object" ref="1005519170"/>
+                                               <reference key="parent" ref="43900501"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4896</int>
+                                               <reference key="object" ref="782049171"/>
+                                               <reference key="parent" ref="585235372"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4897</int>
+                                               <reference key="object" ref="344072439"/>
+                                               <reference key="parent" ref="1060179806"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4898</int>
+                                               <reference key="object" ref="965262561"/>
+                                               <reference key="parent" ref="1072509220"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4899</int>
+                                               <reference key="object" ref="315802325"/>
+                                               <reference key="parent" ref="511739402"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4900</int>
+                                               <reference key="object" ref="133553303"/>
+                                               <reference key="parent" ref="458722452"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4901</int>
+                                               <reference key="object" ref="370959642"/>
+                                               <reference key="parent" ref="1017614971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4902</int>
+                                               <reference key="object" ref="82054988"/>
+                                               <reference key="parent" ref="580175226"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4903</int>
+                                               <reference key="object" ref="334116173"/>
+                                               <reference key="parent" ref="149133624"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4904</int>
+                                               <reference key="object" ref="719511430"/>
+                                               <reference key="parent" ref="262106913"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4905</int>
+                                               <reference key="object" ref="121574898"/>
+                                               <reference key="parent" ref="586321835"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4906</int>
+                                               <reference key="object" ref="689580100"/>
+                                               <reference key="parent" ref="854767306"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4907</int>
+                                               <reference key="object" ref="177567437"/>
+                                               <reference key="parent" ref="806469067"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4908</int>
+                                               <reference key="object" ref="821198683"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="793162058"/>
+                                               </object>
+                                               <reference key="parent" ref="766125203"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4909</int>
+                                               <reference key="object" ref="17369297"/>
+                                               <reference key="parent" ref="1053010160"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4910</int>
+                                               <reference key="object" ref="286887304"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="493845446"/>
+                                               </object>
+                                               <reference key="parent" ref="971754180"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4911</int>
+                                               <reference key="object" ref="564669343"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="27255767"/>
+                                               </object>
+                                               <reference key="parent" ref="453345136"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4912</int>
+                                               <reference key="object" ref="904849236"/>
+                                               <reference key="parent" ref="200266929"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4913</int>
+                                               <reference key="object" ref="834340599"/>
+                                               <reference key="parent" ref="1023408378"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4914</int>
+                                               <reference key="object" ref="1038625481"/>
+                                               <reference key="parent" ref="713493964"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4915</int>
+                                               <reference key="object" ref="362196160"/>
+                                               <reference key="parent" ref="955053416"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4916</int>
+                                               <reference key="object" ref="510160694"/>
+                                               <reference key="parent" ref="138115732"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4917</int>
+                                               <reference key="object" ref="51600927"/>
+                                               <reference key="parent" ref="87961628"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4918</int>
+                                               <reference key="object" ref="264217237"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="237152896"/>
+                                               </object>
+                                               <reference key="parent" ref="732193996"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4919</int>
+                                               <reference key="object" ref="988599137"/>
+                                               <reference key="parent" ref="186223550"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4920</int>
+                                               <reference key="object" ref="295879492"/>
+                                               <reference key="parent" ref="210289606"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4923</int>
+                                               <reference key="object" ref="293028864"/>
+                                               <reference key="parent" ref="35106907"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4924</int>
+                                               <reference key="object" ref="488791842"/>
+                                               <reference key="parent" ref="574185541"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4925</int>
+                                               <reference key="object" ref="224806210"/>
+                                               <reference key="parent" ref="1007421233"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4926</int>
+                                               <reference key="object" ref="294332300"/>
+                                               <reference key="parent" ref="553453876"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4927</int>
+                                               <reference key="object" ref="832863281"/>
+                                               <reference key="parent" ref="581806074"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4928</int>
+                                               <reference key="object" ref="72412547"/>
+                                               <reference key="parent" ref="940804962"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4929</int>
+                                               <reference key="object" ref="938246142"/>
+                                               <reference key="parent" ref="764659803"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4930</int>
+                                               <reference key="object" ref="160092001"/>
+                                               <reference key="parent" ref="640205151"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4932</int>
+                                               <reference key="object" ref="501219161"/>
+                                               <reference key="parent" ref="241719587"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4933</int>
+                                               <reference key="object" ref="489159603"/>
+                                               <reference key="parent" ref="699919504"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4934</int>
+                                               <reference key="object" ref="107603394"/>
+                                               <reference key="parent" ref="636581183"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4935</int>
+                                               <reference key="object" ref="231870318"/>
+                                               <reference key="parent" ref="586136427"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4936</int>
+                                               <reference key="object" ref="479246832"/>
+                                               <reference key="parent" ref="978853241"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4937</int>
+                                               <reference key="object" ref="17688962"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="521597821"/>
+                                               </object>
+                                               <reference key="parent" ref="167356719"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4938</int>
+                                               <reference key="object" ref="658438349"/>
+                                               <reference key="parent" ref="343391844"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4939</int>
+                                               <reference key="object" ref="70981869"/>
+                                               <reference key="parent" ref="340554114"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4940</int>
+                                               <reference key="object" ref="207651610"/>
+                                               <reference key="parent" ref="384547934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4941</int>
+                                               <reference key="object" ref="855042909"/>
+                                               <reference key="parent" ref="511645357"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4942</int>
+                                               <reference key="object" ref="31665321"/>
+                                               <reference key="parent" ref="31472093"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4943</int>
+                                               <reference key="object" ref="625635488"/>
+                                               <reference key="parent" ref="1024752086"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4944</int>
+                                               <reference key="object" ref="155469085"/>
+                                               <reference key="parent" ref="59653352"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4945</int>
+                                               <reference key="object" ref="874724779"/>
+                                               <reference key="parent" ref="133861013"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4946</int>
+                                               <reference key="object" ref="290236859"/>
+                                               <reference key="parent" ref="293908248"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4947</int>
+                                               <reference key="object" ref="1026393301"/>
+                                               <reference key="parent" ref="535532677"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4948</int>
+                                               <reference key="object" ref="412266408"/>
+                                               <reference key="parent" ref="290568055"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4949</int>
+                                               <reference key="object" ref="935162329"/>
+                                               <reference key="parent" ref="35126402"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4950</int>
+                                               <reference key="object" ref="1020926636"/>
+                                               <reference key="parent" ref="1029080172"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4951</int>
+                                               <reference key="object" ref="938406174"/>
+                                               <reference key="parent" ref="1010749064"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4952</int>
+                                               <reference key="object" ref="802225466"/>
+                                               <reference key="parent" ref="610976437"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4953</int>
+                                               <reference key="object" ref="19595360"/>
+                                               <reference key="parent" ref="655257851"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4954</int>
+                                               <reference key="object" ref="779990493"/>
+                                               <reference key="parent" ref="229000833"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4955</int>
+                                               <reference key="object" ref="686068440"/>
+                                               <reference key="parent" ref="77208310"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4956</int>
+                                               <reference key="object" ref="237660698"/>
+                                               <reference key="parent" ref="932392163"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1519</int>
+                                               <reference key="object" ref="207945181"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="16243588"/>
+                                               </object>
+                                               <reference key="parent" ref="555573644"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1520</int>
+                                               <reference key="object" ref="16243588"/>
+                                               <reference key="parent" ref="207945181"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1523</int>
+                                               <reference key="object" ref="417760816"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="484803315"/>
+                                               </object>
+                                               <reference key="parent" ref="442718934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1524</int>
+                                               <reference key="object" ref="484803315"/>
+                                               <reference key="parent" ref="417760816"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1528</int>
+                                               <reference key="object" ref="389043188"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="53010878"/>
+                                               </object>
+                                               <reference key="parent" ref="569025834"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1529</int>
+                                               <reference key="object" ref="53010878"/>
+                                               <reference key="parent" ref="389043188"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1531</int>
+                                               <reference key="object" ref="80517384"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="122262864"/>
+                                               </object>
+                                               <reference key="parent" ref="47770866"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1532</int>
+                                               <reference key="object" ref="122262864"/>
+                                               <reference key="parent" ref="80517384"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1635</int>
+                                               <reference key="object" ref="121028261"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="432645698"/>
+                                               </object>
+                                               <reference key="parent" ref="636153290"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1636</int>
+                                               <reference key="object" ref="432645698"/>
+                                               <reference key="parent" ref="121028261"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1963</int>
+                                               <reference key="object" ref="142584693"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="803452967"/>
+                                               </object>
+                                               <reference key="parent" ref="581778322"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1964</int>
+                                               <reference key="object" ref="803452967"/>
+                                               <reference key="parent" ref="142584693"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1967</int>
+                                               <reference key="object" ref="674797640"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="909780825"/>
+                                               </object>
+                                               <reference key="parent" ref="1011395150"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1968</int>
+                                               <reference key="object" ref="909780825"/>
+                                               <reference key="parent" ref="674797640"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1510</int>
+                                               <reference key="object" ref="605902924"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="536275725"/>
+                                               </object>
+                                               <reference key="parent" ref="1018849574"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1511</int>
+                                               <reference key="object" ref="536275725"/>
+                                               <reference key="parent" ref="605902924"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1513</int>
+                                               <reference key="object" ref="794681411"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="996965095"/>
+                                               </object>
+                                               <reference key="parent" ref="343952154"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1514</int>
+                                               <reference key="object" ref="996965095"/>
+                                               <reference key="parent" ref="794681411"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1542</int>
+                                               <reference key="object" ref="793162058"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="52855721"/>
+                                               </object>
+                                               <reference key="parent" ref="821198683"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1543</int>
+                                               <reference key="object" ref="52855721"/>
+                                               <reference key="parent" ref="793162058"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1546</int>
+                                               <reference key="object" ref="493845446"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="170826719"/>
+                                               </object>
+                                               <reference key="parent" ref="286887304"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1547</int>
+                                               <reference key="object" ref="170826719"/>
+                                               <reference key="parent" ref="493845446"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1549</int>
+                                               <reference key="object" ref="27255767"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1048999115"/>
+                                               </object>
+                                               <reference key="parent" ref="564669343"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1550</int>
+                                               <reference key="object" ref="1048999115"/>
+                                               <reference key="parent" ref="27255767"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1558</int>
+                                               <reference key="object" ref="237152896"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="586933029"/>
+                                               </object>
+                                               <reference key="parent" ref="264217237"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1559</int>
+                                               <reference key="object" ref="586933029"/>
+                                               <reference key="parent" ref="237152896"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2009</int>
+                                               <reference key="object" ref="521597821"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="12791251"/>
+                                                       <reference ref="802910491"/>
+                                                       <reference ref="962314470"/>
+                                               </object>
+                                               <reference key="parent" ref="17688962"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2012</int>
+                                               <reference key="object" ref="12791251"/>
+                                               <reference key="parent" ref="521597821"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2011</int>
+                                               <reference key="object" ref="802910491"/>
+                                               <reference key="parent" ref="521597821"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2010</int>
+                                               <reference key="object" ref="962314470"/>
+                                               <reference key="parent" ref="521597821"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4957</int>
+                                               <reference key="object" ref="1046880533"/>
+                                               <reference key="parent" ref="307620967"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4958</int>
+                                               <reference key="object" ref="1033243513"/>
+                                               <reference key="parent" ref="307620967"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4959</int>
+                                               <reference key="object" ref="928480858"/>
+                                               <reference key="parent" ref="307620967"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4960</int>
+                                               <reference key="object" ref="475123229"/>
+                                               <reference key="parent" ref="33643505"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4961</int>
+                                               <reference key="object" ref="573337548"/>
+                                               <reference key="parent" ref="33643505"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4963</int>
+                                               <reference key="object" ref="159095366"/>
+                                               <reference key="parent" ref="836211765"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4964</int>
+                                               <reference key="object" ref="985983659"/>
+                                               <reference key="parent" ref="1035150210"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4967</int>
+                                               <reference key="object" ref="921877174"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="547085070"/>
+                                               </object>
+                                               <reference key="parent" ref="168918359"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4968</int>
+                                               <reference key="object" ref="547085070"/>
+                                               <reference key="parent" ref="921877174"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4980</int>
+                                               <reference key="object" ref="466865421"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="546425857"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4981</int>
+                                               <reference key="object" ref="546425857"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="637766485"/>
+                                               </object>
+                                               <reference key="parent" ref="466865421"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4982</int>
+                                               <reference key="object" ref="637766485"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="780045253"/>
+                                               </object>
+                                               <reference key="parent" ref="546425857"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4983</int>
+                                               <reference key="object" ref="780045253"/>
+                                               <reference key="parent" ref="637766485"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4984</int>
+                                               <reference key="object" ref="905865959"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="597526693"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4985</int>
+                                               <reference key="object" ref="597526693"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="587264026"/>
+                                               </object>
+                                               <reference key="parent" ref="905865959"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4986</int>
+                                               <reference key="object" ref="587264026"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="839112264"/>
+                                               </object>
+                                               <reference key="parent" ref="597526693"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4987</int>
+                                               <reference key="object" ref="839112264"/>
+                                               <reference key="parent" ref="587264026"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4988</int>
+                                               <reference key="object" ref="759329849"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="989243685"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4989</int>
+                                               <reference key="object" ref="989243685"/>
+                                               <reference key="parent" ref="759329849"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4992</int>
+                                               <reference key="object" ref="979512783"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="89611592"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4993</int>
+                                               <reference key="object" ref="89611592"/>
+                                               <reference key="parent" ref="979512783"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4994</int>
+                                               <reference key="object" ref="822590453"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="628539537"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4995</int>
+                                               <reference key="object" ref="628539537"/>
+                                               <reference key="parent" ref="822590453"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4996</int>
+                                               <reference key="object" ref="59505660"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="62643522"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4997</int>
+                                               <reference key="object" ref="62643522"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="906154976"/>
+                                               </object>
+                                               <reference key="parent" ref="59505660"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4998</int>
+                                               <reference key="object" ref="906154976"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1071907387"/>
+                                               </object>
+                                               <reference key="parent" ref="62643522"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">4999</int>
+                                               <reference key="object" ref="1071907387"/>
+                                               <reference key="parent" ref="906154976"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5000</int>
+                                               <reference key="object" ref="952272880"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="995278067"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5001</int>
+                                               <reference key="object" ref="995278067"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="842863259"/>
+                                               </object>
+                                               <reference key="parent" ref="952272880"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5002</int>
+                                               <reference key="object" ref="842863259"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="867303619"/>
+                                               </object>
+                                               <reference key="parent" ref="995278067"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5003</int>
+                                               <reference key="object" ref="867303619"/>
+                                               <reference key="parent" ref="842863259"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5004</int>
+                                               <reference key="object" ref="826012798"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="539072481"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5005</int>
+                                               <reference key="object" ref="539072481"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="284493447"/>
+                                               </object>
+                                               <reference key="parent" ref="826012798"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5006</int>
+                                               <reference key="object" ref="284493447"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="249799590"/>
+                                               </object>
+                                               <reference key="parent" ref="539072481"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5007</int>
+                                               <reference key="object" ref="249799590"/>
+                                               <reference key="parent" ref="284493447"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5008</int>
+                                               <reference key="object" ref="210973520"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="908345921"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5009</int>
+                                               <reference key="object" ref="908345921"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="718591795"/>
+                                               </object>
+                                               <reference key="parent" ref="210973520"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5010</int>
+                                               <reference key="object" ref="718591795"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="899331996"/>
+                                               </object>
+                                               <reference key="parent" ref="908345921"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5011</int>
+                                               <reference key="object" ref="899331996"/>
+                                               <reference key="parent" ref="718591795"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5012</int>
+                                               <reference key="object" ref="838524493"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="273746940"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5013</int>
+                                               <reference key="object" ref="273746940"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="601838973"/>
+                                               </object>
+                                               <reference key="parent" ref="838524493"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5014</int>
+                                               <reference key="object" ref="601838973"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="903801986"/>
+                                               </object>
+                                               <reference key="parent" ref="273746940"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5015</int>
+                                               <reference key="object" ref="903801986"/>
+                                               <reference key="parent" ref="601838973"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5016</int>
+                                               <reference key="object" ref="1068703394"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="376486018"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5017</int>
+                                               <reference key="object" ref="376486018"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="911510427"/>
+                                               </object>
+                                               <reference key="parent" ref="1068703394"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5018</int>
+                                               <reference key="object" ref="911510427"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="775004825"/>
+                                               </object>
+                                               <reference key="parent" ref="376486018"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5019</int>
+                                               <reference key="object" ref="775004825"/>
+                                               <reference key="parent" ref="911510427"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5040</int>
+                                               <reference key="object" ref="989777035"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="98589714"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5041</int>
+                                               <reference key="object" ref="98589714"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="843839970"/>
+                                               </object>
+                                               <reference key="parent" ref="989777035"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5042</int>
+                                               <reference key="object" ref="843839970"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1073059200"/>
+                                               </object>
+                                               <reference key="parent" ref="98589714"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5043</int>
+                                               <reference key="object" ref="1073059200"/>
+                                               <reference key="parent" ref="843839970"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5044</int>
+                                               <reference key="object" ref="21683307"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="27141415"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5045</int>
+                                               <reference key="object" ref="27141415"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="218736664"/>
+                                               </object>
+                                               <reference key="parent" ref="21683307"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5046</int>
+                                               <reference key="object" ref="218736664"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="848021411"/>
+                                               </object>
+                                               <reference key="parent" ref="27141415"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5047</int>
+                                               <reference key="object" ref="848021411"/>
+                                               <reference key="parent" ref="218736664"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5048</int>
+                                               <reference key="object" ref="82044516"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="828435207"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5049</int>
+                                               <reference key="object" ref="828435207"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="884417804"/>
+                                               </object>
+                                               <reference key="parent" ref="82044516"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5050</int>
+                                               <reference key="object" ref="884417804"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="306314205"/>
+                                               </object>
+                                               <reference key="parent" ref="828435207"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5051</int>
+                                               <reference key="object" ref="306314205"/>
+                                               <reference key="parent" ref="884417804"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5052</int>
+                                               <reference key="object" ref="511205515"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="631798512"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5053</int>
+                                               <reference key="object" ref="631798512"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="827185994"/>
+                                               </object>
+                                               <reference key="parent" ref="511205515"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5054</int>
+                                               <reference key="object" ref="827185994"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="395128474"/>
+                                               </object>
+                                               <reference key="parent" ref="631798512"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5055</int>
+                                               <reference key="object" ref="395128474"/>
+                                               <reference key="parent" ref="827185994"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5056</int>
+                                               <reference key="object" ref="362406693"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="494375275"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5057</int>
+                                               <reference key="object" ref="494375275"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="74387810"/>
+                                               </object>
+                                               <reference key="parent" ref="362406693"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5058</int>
+                                               <reference key="object" ref="74387810"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="509612152"/>
+                                               </object>
+                                               <reference key="parent" ref="494375275"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5059</int>
+                                               <reference key="object" ref="509612152"/>
+                                               <reference key="parent" ref="74387810"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5060</int>
+                                               <reference key="object" ref="596295285"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="88657835"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5061</int>
+                                               <reference key="object" ref="88657835"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="819464815"/>
+                                               </object>
+                                               <reference key="parent" ref="596295285"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5062</int>
+                                               <reference key="object" ref="819464815"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="425953784"/>
+                                               </object>
+                                               <reference key="parent" ref="88657835"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5063</int>
+                                               <reference key="object" ref="425953784"/>
+                                               <reference key="parent" ref="819464815"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5091</int>
+                                               <reference key="object" ref="861218370"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="212633849"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5092</int>
+                                               <reference key="object" ref="212633849"/>
+                                               <reference key="parent" ref="861218370"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5093</int>
+                                               <reference key="object" ref="695663835"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="198981160"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5094</int>
+                                               <reference key="object" ref="198981160"/>
+                                               <reference key="parent" ref="695663835"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5095</int>
+                                               <reference key="object" ref="229696812"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="805488070"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5096</int>
+                                               <reference key="object" ref="805488070"/>
+                                               <reference key="parent" ref="229696812"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5097</int>
+                                               <reference key="object" ref="927860050"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1037957700"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5098</int>
+                                               <reference key="object" ref="1037957700"/>
+                                               <reference key="parent" ref="927860050"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5099</int>
+                                               <reference key="object" ref="169748081"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="366629849"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5100</int>
+                                               <reference key="object" ref="366629849"/>
+                                               <reference key="parent" ref="169748081"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5101</int>
+                                               <reference key="object" ref="532012054"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="750019806"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5102</int>
+                                               <reference key="object" ref="750019806"/>
+                                               <reference key="parent" ref="532012054"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5103</int>
+                                               <reference key="object" ref="850861055"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="539528192"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5104</int>
+                                               <reference key="object" ref="539528192"/>
+                                               <reference key="parent" ref="850861055"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5105</int>
+                                               <reference key="object" ref="988102670"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="477201006"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5106</int>
+                                               <reference key="object" ref="477201006"/>
+                                               <reference key="parent" ref="988102670"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5107</int>
+                                               <reference key="object" ref="758473796"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="941741345"/>
+                                               </object>
+                                               <reference key="parent" ref="738554558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5108</int>
+                                               <reference key="object" ref="941741345"/>
+                                               <reference key="parent" ref="758473796"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5122</int>
+                                               <reference key="object" ref="946167393"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="152262221"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5123</int>
+                                               <reference key="object" ref="152262221"/>
+                                               <reference key="parent" ref="946167393"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5124</int>
+                                               <reference key="object" ref="554762309"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="2157"/>
+                                               </object>
+                                               <reference key="parent" ref="1053078401"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5125</int>
+                                               <reference key="object" ref="2157"/>
+                                               <reference key="parent" ref="554762309"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5130</int>
+                                               <reference key="object" ref="886184281"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="492120702"/>
+                                               </object>
+                                               <reference key="parent" ref="621751818"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5131</int>
+                                               <reference key="object" ref="492120702"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="717227898"/>
+                                               </object>
+                                               <reference key="parent" ref="886184281"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5132</int>
+                                               <reference key="object" ref="717227898"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="228547440"/>
+                                                       <reference ref="950937431"/>
+                                                       <reference ref="583192244"/>
+                                               </object>
+                                               <reference key="parent" ref="492120702"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5133</int>
+                                               <reference key="object" ref="228547440"/>
+                                               <reference key="parent" ref="717227898"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5134</int>
+                                               <reference key="object" ref="950937431"/>
+                                               <reference key="parent" ref="717227898"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5135</int>
+                                               <reference key="object" ref="583192244"/>
+                                               <reference key="parent" ref="717227898"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5153</int>
+                                               <reference key="object" ref="786415813"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="977106207"/>
+                                               </object>
+                                               <reference key="parent" ref="69290042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5154</int>
+                                               <reference key="object" ref="977106207"/>
+                                               <reference key="parent" ref="786415813"/>
+                                       </object>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="flattenedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>-1.IBPluginDependency</string>
+                                       <string>-2.IBPluginDependency</string>
+                                       <string>-3.IBPluginDependency</string>
+                                       <string>-3.ImportedFromIB2</string>
+                                       <string>1123.IBPluginDependency</string>
+                                       <string>1123.ImportedFromIB2</string>
+                                       <string>1189.IBPluginDependency</string>
+                                       <string>1189.ImportedFromIB2</string>
+                                       <string>1190.IBPluginDependency</string>
+                                       <string>1190.ImportedFromIB2</string>
+                                       <string>1191.IBPluginDependency</string>
+                                       <string>1191.ImportedFromIB2</string>
+                                       <string>1192.IBPluginDependency</string>
+                                       <string>1192.ImportedFromIB2</string>
+                                       <string>1193.IBPluginDependency</string>
+                                       <string>1193.ImportedFromIB2</string>
+                                       <string>1198.IBPluginDependency</string>
+                                       <string>1198.ImportedFromIB2</string>
+                                       <string>1200.IBPluginDependency</string>
+                                       <string>1200.ImportedFromIB2</string>
+                                       <string>1209.IBPluginDependency</string>
+                                       <string>1209.ImportedFromIB2</string>
+                                       <string>136.IBPluginDependency</string>
+                                       <string>136.ImportedFromIB2</string>
+                                       <string>1373.IBPluginDependency</string>
+                                       <string>1373.ImportedFromIB2</string>
+                                       <string>1429.IBPluginDependency</string>
+                                       <string>1429.ImportedFromIB2</string>
+                                       <string>1431.IBPluginDependency</string>
+                                       <string>1431.ImportedFromIB2</string>
+                                       <string>1432.IBPluginDependency</string>
+                                       <string>1432.ImportedFromIB2</string>
+                                       <string>1433.IBPluginDependency</string>
+                                       <string>1433.ImportedFromIB2</string>
+                                       <string>1445.IBPluginDependency</string>
+                                       <string>1445.ImportedFromIB2</string>
+                                       <string>1474.IBAttributePlaceholdersKey</string>
+                                       <string>1474.IBPluginDependency</string>
+                                       <string>1474.ImportedFromIB2</string>
+                                       <string>1475.IBPluginDependency</string>
+                                       <string>1475.ImportedFromIB2</string>
+                                       <string>1476.IBPluginDependency</string>
+                                       <string>1476.ImportedFromIB2</string>
+                                       <string>1477.IBPluginDependency</string>
+                                       <string>1477.ImportedFromIB2</string>
+                                       <string>1478.IBPluginDependency</string>
+                                       <string>1478.ImportedFromIB2</string>
+                                       <string>1499.IBPluginDependency</string>
+                                       <string>1499.ImportedFromIB2</string>
+                                       <string>1500.IBPluginDependency</string>
+                                       <string>1500.ImportedFromIB2</string>
+                                       <string>1501.IBPluginDependency</string>
+                                       <string>1501.ImportedFromIB2</string>
+                                       <string>1502.IBPluginDependency</string>
+                                       <string>1502.ImportedFromIB2</string>
+                                       <string>1503.IBPluginDependency</string>
+                                       <string>1503.ImportedFromIB2</string>
+                                       <string>1504.IBPluginDependency</string>
+                                       <string>1504.ImportedFromIB2</string>
+                                       <string>1505.IBPluginDependency</string>
+                                       <string>1505.ImportedFromIB2</string>
+                                       <string>1506.IBPluginDependency</string>
+                                       <string>1506.ImportedFromIB2</string>
+                                       <string>1507.IBPluginDependency</string>
+                                       <string>1507.ImportedFromIB2</string>
+                                       <string>1508.IBPluginDependency</string>
+                                       <string>1508.ImportedFromIB2</string>
+                                       <string>1509.IBPluginDependency</string>
+                                       <string>1509.ImportedFromIB2</string>
+                                       <string>1510.IBPluginDependency</string>
+                                       <string>1510.ImportedFromIB2</string>
+                                       <string>1511.IBPluginDependency</string>
+                                       <string>1511.ImportedFromIB2</string>
+                                       <string>1512.IBPluginDependency</string>
+                                       <string>1512.ImportedFromIB2</string>
+                                       <string>1513.IBPluginDependency</string>
+                                       <string>1513.ImportedFromIB2</string>
+                                       <string>1514.IBPluginDependency</string>
+                                       <string>1514.ImportedFromIB2</string>
+                                       <string>1515.IBPluginDependency</string>
+                                       <string>1515.ImportedFromIB2</string>
+                                       <string>1516.IBPluginDependency</string>
+                                       <string>1516.ImportedFromIB2</string>
+                                       <string>1518.IBPluginDependency</string>
+                                       <string>1518.ImportedFromIB2</string>
+                                       <string>1519.IBPluginDependency</string>
+                                       <string>1519.ImportedFromIB2</string>
+                                       <string>1520.IBPluginDependency</string>
+                                       <string>1520.ImportedFromIB2</string>
+                                       <string>1521.IBPluginDependency</string>
+                                       <string>1521.ImportedFromIB2</string>
+                                       <string>1522.IBPluginDependency</string>
+                                       <string>1522.ImportedFromIB2</string>
+                                       <string>1523.IBPluginDependency</string>
+                                       <string>1523.ImportedFromIB2</string>
+                                       <string>1524.IBPluginDependency</string>
+                                       <string>1524.ImportedFromIB2</string>
+                                       <string>1525.IBPluginDependency</string>
+                                       <string>1525.ImportedFromIB2</string>
+                                       <string>1526.IBPluginDependency</string>
+                                       <string>1526.ImportedFromIB2</string>
+                                       <string>1527.IBPluginDependency</string>
+                                       <string>1527.ImportedFromIB2</string>
+                                       <string>1528.IBPluginDependency</string>
+                                       <string>1528.ImportedFromIB2</string>
+                                       <string>1528.editorWindowContentRectSynchronizationRect</string>
+                                       <string>1529.IBPluginDependency</string>
+                                       <string>1529.ImportedFromIB2</string>
+                                       <string>1530.IBPluginDependency</string>
+                                       <string>1530.ImportedFromIB2</string>
+                                       <string>1531.IBPluginDependency</string>
+                                       <string>1531.ImportedFromIB2</string>
+                                       <string>1532.IBPluginDependency</string>
+                                       <string>1532.ImportedFromIB2</string>
+                                       <string>1533.IBPluginDependency</string>
+                                       <string>1533.ImportedFromIB2</string>
+                                       <string>1538.IBPluginDependency</string>
+                                       <string>1538.ImportedFromIB2</string>
+                                       <string>1539.IBPluginDependency</string>
+                                       <string>1539.ImportedFromIB2</string>
+                                       <string>1540.IBPluginDependency</string>
+                                       <string>1540.ImportedFromIB2</string>
+                                       <string>1541.IBPluginDependency</string>
+                                       <string>1541.ImportedFromIB2</string>
+                                       <string>1542.IBPluginDependency</string>
+                                       <string>1542.ImportedFromIB2</string>
+                                       <string>1543.IBPluginDependency</string>
+                                       <string>1543.ImportedFromIB2</string>
+                                       <string>1544.IBPluginDependency</string>
+                                       <string>1544.ImportedFromIB2</string>
+                                       <string>1545.IBPluginDependency</string>
+                                       <string>1545.ImportedFromIB2</string>
+                                       <string>1546.IBPluginDependency</string>
+                                       <string>1546.ImportedFromIB2</string>
+                                       <string>1547.IBPluginDependency</string>
+                                       <string>1547.ImportedFromIB2</string>
+                                       <string>1548.IBPluginDependency</string>
+                                       <string>1548.ImportedFromIB2</string>
+                                       <string>1549.IBPluginDependency</string>
+                                       <string>1549.ImportedFromIB2</string>
+                                       <string>1550.IBPluginDependency</string>
+                                       <string>1550.ImportedFromIB2</string>
+                                       <string>1551.IBPluginDependency</string>
+                                       <string>1551.ImportedFromIB2</string>
+                                       <string>1552.IBPluginDependency</string>
+                                       <string>1552.ImportedFromIB2</string>
+                                       <string>1553.IBPluginDependency</string>
+                                       <string>1553.ImportedFromIB2</string>
+                                       <string>1554.IBPluginDependency</string>
+                                       <string>1554.ImportedFromIB2</string>
+                                       <string>1555.IBPluginDependency</string>
+                                       <string>1555.ImportedFromIB2</string>
+                                       <string>1556.IBPluginDependency</string>
+                                       <string>1556.ImportedFromIB2</string>
+                                       <string>1557.IBPluginDependency</string>
+                                       <string>1557.ImportedFromIB2</string>
+                                       <string>1558.IBPluginDependency</string>
+                                       <string>1558.ImportedFromIB2</string>
+                                       <string>1559.IBPluginDependency</string>
+                                       <string>1559.ImportedFromIB2</string>
+                                       <string>1561.IBPluginDependency</string>
+                                       <string>1561.ImportedFromIB2</string>
+                                       <string>1562.IBPluginDependency</string>
+                                       <string>1562.ImportedFromIB2</string>
+                                       <string>1623.IBPluginDependency</string>
+                                       <string>1623.ImportedFromIB2</string>
+                                       <string>1624.IBPluginDependency</string>
+                                       <string>1624.ImportedFromIB2</string>
+                                       <string>1627.IBPluginDependency</string>
+                                       <string>1627.ImportedFromIB2</string>
+                                       <string>1628.IBPluginDependency</string>
+                                       <string>1628.ImportedFromIB2</string>
+                                       <string>1629.IBPluginDependency</string>
+                                       <string>1629.ImportedFromIB2</string>
+                                       <string>1634.IBPluginDependency</string>
+                                       <string>1634.ImportedFromIB2</string>
+                                       <string>1635.IBPluginDependency</string>
+                                       <string>1635.ImportedFromIB2</string>
+                                       <string>1636.IBPluginDependency</string>
+                                       <string>1636.ImportedFromIB2</string>
+                                       <string>1638.IBPluginDependency</string>
+                                       <string>1638.ImportedFromIB2</string>
+                                       <string>1713.IBPluginDependency</string>
+                                       <string>1713.ImportedFromIB2</string>
+                                       <string>1714.IBPluginDependency</string>
+                                       <string>1714.ImportedFromIB2</string>
+                                       <string>1717.IBPluginDependency</string>
+                                       <string>1717.ImportedFromIB2</string>
+                                       <string>1723.IBPluginDependency</string>
+                                       <string>1723.ImportedFromIB2</string>
+                                       <string>1729.IBPluginDependency</string>
+                                       <string>1729.ImportedFromIB2</string>
+                                       <string>1731.IBPluginDependency</string>
+                                       <string>1731.ImportedFromIB2</string>
+                                       <string>1739.IBPluginDependency</string>
+                                       <string>1739.ImportedFromIB2</string>
+                                       <string>1740.IBPluginDependency</string>
+                                       <string>1740.ImportedFromIB2</string>
+                                       <string>1753.IBPluginDependency</string>
+                                       <string>1753.ImportedFromIB2</string>
+                                       <string>1754.IBPluginDependency</string>
+                                       <string>1754.ImportedFromIB2</string>
+                                       <string>1772.IBPluginDependency</string>
+                                       <string>1772.ImportedFromIB2</string>
+                                       <string>1773.IBPluginDependency</string>
+                                       <string>1773.ImportedFromIB2</string>
+                                       <string>1795.IBPluginDependency</string>
+                                       <string>1795.ImportedFromIB2</string>
+                                       <string>1796.IBPluginDependency</string>
+                                       <string>1796.ImportedFromIB2</string>
+                                       <string>1797.IBPluginDependency</string>
+                                       <string>1797.ImportedFromIB2</string>
+                                       <string>1798.IBPluginDependency</string>
+                                       <string>1798.ImportedFromIB2</string>
+                                       <string>1799.IBPluginDependency</string>
+                                       <string>1799.ImportedFromIB2</string>
+                                       <string>1800.IBPluginDependency</string>
+                                       <string>1800.ImportedFromIB2</string>
+                                       <string>1801.IBPluginDependency</string>
+                                       <string>1801.ImportedFromIB2</string>
+                                       <string>1802.IBPluginDependency</string>
+                                       <string>1802.ImportedFromIB2</string>
+                                       <string>1803.IBPluginDependency</string>
+                                       <string>1803.ImportedFromIB2</string>
+                                       <string>1804.IBPluginDependency</string>
+                                       <string>1804.ImportedFromIB2</string>
+                                       <string>1805.IBPluginDependency</string>
+                                       <string>1805.ImportedFromIB2</string>
+                                       <string>1806.IBPluginDependency</string>
+                                       <string>1806.ImportedFromIB2</string>
+                                       <string>1807.IBPluginDependency</string>
+                                       <string>1807.ImportedFromIB2</string>
+                                       <string>1808.IBPluginDependency</string>
+                                       <string>1808.ImportedFromIB2</string>
+                                       <string>1809.IBPluginDependency</string>
+                                       <string>1809.ImportedFromIB2</string>
+                                       <string>1810.IBPluginDependency</string>
+                                       <string>1810.ImportedFromIB2</string>
+                                       <string>1811.IBPluginDependency</string>
+                                       <string>1811.ImportedFromIB2</string>
+                                       <string>1812.IBPluginDependency</string>
+                                       <string>1812.ImportedFromIB2</string>
+                                       <string>1813.IBPluginDependency</string>
+                                       <string>1813.ImportedFromIB2</string>
+                                       <string>1814.IBPluginDependency</string>
+                                       <string>1814.ImportedFromIB2</string>
+                                       <string>1815.IBPluginDependency</string>
+                                       <string>1815.ImportedFromIB2</string>
+                                       <string>1816.IBPluginDependency</string>
+                                       <string>1816.ImportedFromIB2</string>
+                                       <string>1817.IBPluginDependency</string>
+                                       <string>1817.ImportedFromIB2</string>
+                                       <string>1818.IBPluginDependency</string>
+                                       <string>1818.ImportedFromIB2</string>
+                                       <string>1819.IBPluginDependency</string>
+                                       <string>1819.ImportedFromIB2</string>
+                                       <string>1820.IBPluginDependency</string>
+                                       <string>1820.ImportedFromIB2</string>
+                                       <string>1821.IBPluginDependency</string>
+                                       <string>1821.ImportedFromIB2</string>
+                                       <string>1822.IBPluginDependency</string>
+                                       <string>1822.ImportedFromIB2</string>
+                                       <string>1841.IBPluginDependency</string>
+                                       <string>1841.ImportedFromIB2</string>
+                                       <string>1843.IBEditorWindowLastContentRect</string>
+                                       <string>1843.IBPluginDependency</string>
+                                       <string>1843.IBViewEditorWindowController.showingLayoutRectangles</string>
+                                       <string>1843.ImportedFromIB2</string>
+                                       <string>1843.editorWindowContentRectSynchronizationRect</string>
+                                       <string>1867.IBEditorWindowLastContentRect</string>
+                                       <string>1867.IBPluginDependency</string>
+                                       <string>1867.IBWindowTemplateEditedContentRect</string>
+                                       <string>1867.ImportedFromIB2</string>
+                                       <string>1867.editorWindowContentRectSynchronizationRect</string>
+                                       <string>1867.windowTemplate.hasMaxSize</string>
+                                       <string>1867.windowTemplate.hasMinSize</string>
+                                       <string>1867.windowTemplate.maxSize</string>
+                                       <string>1867.windowTemplate.minSize</string>
+                                       <string>1868.IBPluginDependency</string>
+                                       <string>1868.ImportedFromIB2</string>
+                                       <string>1870.IBPluginDependency</string>
+                                       <string>1870.ImportedFromIB2</string>
+                                       <string>1871.IBPluginDependency</string>
+                                       <string>1871.ImportedFromIB2</string>
+                                       <string>1872.IBPluginDependency</string>
+                                       <string>1872.ImportedFromIB2</string>
+                                       <string>1882.IBPluginDependency</string>
+                                       <string>1882.ImportedFromIB2</string>
+                                       <string>1884.IBPluginDependency</string>
+                                       <string>1884.ImportedFromIB2</string>
+                                       <string>1900.IBPluginDependency</string>
+                                       <string>1900.ImportedFromIB2</string>
+                                       <string>1948.IBPluginDependency</string>
+                                       <string>1948.ImportedFromIB2</string>
+                                       <string>1949.IBPluginDependency</string>
+                                       <string>1949.ImportedFromIB2</string>
+                                       <string>1950.IBPluginDependency</string>
+                                       <string>1950.ImportedFromIB2</string>
+                                       <string>1951.IBPluginDependency</string>
+                                       <string>1951.ImportedFromIB2</string>
+                                       <string>1954.IBPluginDependency</string>
+                                       <string>1954.ImportedFromIB2</string>
+                                       <string>1955.IBPluginDependency</string>
+                                       <string>1955.ImportedFromIB2</string>
+                                       <string>196.IBPluginDependency</string>
+                                       <string>196.ImportedFromIB2</string>
+                                       <string>1962.IBPluginDependency</string>
+                                       <string>1962.ImportedFromIB2</string>
+                                       <string>1963.IBPluginDependency</string>
+                                       <string>1963.ImportedFromIB2</string>
+                                       <string>1964.IBPluginDependency</string>
+                                       <string>1964.ImportedFromIB2</string>
+                                       <string>1966.IBPluginDependency</string>
+                                       <string>1966.ImportedFromIB2</string>
+                                       <string>1967.IBPluginDependency</string>
+                                       <string>1967.ImportedFromIB2</string>
+                                       <string>1967.editorWindowContentRectSynchronizationRect</string>
+                                       <string>1968.IBPluginDependency</string>
+                                       <string>1968.ImportedFromIB2</string>
+                                       <string>1970.IBPluginDependency</string>
+                                       <string>1970.ImportedFromIB2</string>
+                                       <string>1972.IBPluginDependency</string>
+                                       <string>1972.ImportedFromIB2</string>
+                                       <string>1985.IBPluginDependency</string>
+                                       <string>1985.ImportedFromIB2</string>
+                                       <string>1989.IBPluginDependency</string>
+                                       <string>1989.ImportedFromIB2</string>
+                                       <string>1990.IBPluginDependency</string>
+                                       <string>1990.ImportedFromIB2</string>
+                                       <string>1999.IBPluginDependency</string>
+                                       <string>1999.ImportedFromIB2</string>
+                                       <string>2.IBPluginDependency</string>
+                                       <string>2.ImportedFromIB2</string>
+                                       <string>2000.IBPluginDependency</string>
+                                       <string>2000.ImportedFromIB2</string>
+                                       <string>2001.IBPluginDependency</string>
+                                       <string>2001.ImportedFromIB2</string>
+                                       <string>2002.IBPluginDependency</string>
+                                       <string>2002.ImportedFromIB2</string>
+                                       <string>2003.IBPluginDependency</string>
+                                       <string>2003.ImportedFromIB2</string>
+                                       <string>2006.IBPluginDependency</string>
+                                       <string>2006.ImportedFromIB2</string>
+                                       <string>2008.IBPluginDependency</string>
+                                       <string>2008.ImportedFromIB2</string>
+                                       <string>2009.IBPluginDependency</string>
+                                       <string>2009.ImportedFromIB2</string>
+                                       <string>2010.IBPluginDependency</string>
+                                       <string>2010.ImportedFromIB2</string>
+                                       <string>2011.IBPluginDependency</string>
+                                       <string>2011.ImportedFromIB2</string>
+                                       <string>2012.IBPluginDependency</string>
+                                       <string>2012.ImportedFromIB2</string>
+                                       <string>2015.IBPluginDependency</string>
+                                       <string>2015.ImportedFromIB2</string>
+                                       <string>2016.IBPluginDependency</string>
+                                       <string>2016.ImportedFromIB2</string>
+                                       <string>21.IBEditorWindowLastContentRect</string>
+                                       <string>21.IBPluginDependency</string>
+                                       <string>21.IBViewEditorWindowController.showingLayoutRectangles</string>
+                                       <string>21.IBWindowTemplateEditedContentRect</string>
+                                       <string>21.ImportedFromIB2</string>
+                                       <string>21.editorWindowContentRectSynchronizationRect</string>
+                                       <string>21.windowTemplate.hasMaxSize</string>
+                                       <string>21.windowTemplate.hasMinSize</string>
+                                       <string>21.windowTemplate.maxSize</string>
+                                       <string>21.windowTemplate.minSize</string>
+                                       <string>2295.IBPluginDependency</string>
+                                       <string>2295.ImportedFromIB2</string>
+                                       <string>2361.IBPluginDependency</string>
+                                       <string>2361.ImportedFromIB2</string>
+                                       <string>2364.IBAttributePlaceholdersKey</string>
+                                       <string>2364.IBPluginDependency</string>
+                                       <string>2364.ImportedFromIB2</string>
+                                       <string>2368.IBPluginDependency</string>
+                                       <string>2368.ImportedFromIB2</string>
+                                       <string>2375.IBPluginDependency</string>
+                                       <string>2375.ImportedFromIB2</string>
+                                       <string>2377.IBPluginDependency</string>
+                                       <string>2377.ImportedFromIB2</string>
+                                       <string>240.IBPluginDependency</string>
+                                       <string>240.ImportedFromIB2</string>
+                                       <string>2421.IBPluginDependency</string>
+                                       <string>2421.ImportedFromIB2</string>
+                                       <string>2443.IBPluginDependency</string>
+                                       <string>2443.ImportedFromIB2</string>
+                                       <string>2444.IBPluginDependency</string>
+                                       <string>2444.ImportedFromIB2</string>
+                                       <string>2445.IBPluginDependency</string>
+                                       <string>2445.ImportedFromIB2</string>
+                                       <string>2451.IBPluginDependency</string>
+                                       <string>2451.ImportedFromIB2</string>
+                                       <string>2452.IBPluginDependency</string>
+                                       <string>2452.ImportedFromIB2</string>
+                                       <string>2472.IBPluginDependency</string>
+                                       <string>2472.ImportedFromIB2</string>
+                                       <string>2473.IBPluginDependency</string>
+                                       <string>2473.ImportedFromIB2</string>
+                                       <string>2488.IBPluginDependency</string>
+                                       <string>2488.ImportedFromIB2</string>
+                                       <string>2494.IBPluginDependency</string>
+                                       <string>2494.ImportedFromIB2</string>
+                                       <string>2504.IBPluginDependency</string>
+                                       <string>2504.ImportedFromIB2</string>
+                                       <string>2507.IBPluginDependency</string>
+                                       <string>2507.ImportedFromIB2</string>
+                                       <string>2508.IBPluginDependency</string>
+                                       <string>2508.ImportedFromIB2</string>
+                                       <string>2513.IBPluginDependency</string>
+                                       <string>2513.ImportedFromIB2</string>
+                                       <string>2518.IBPluginDependency</string>
+                                       <string>2518.ImportedFromIB2</string>
+                                       <string>2519.IBPluginDependency</string>
+                                       <string>2519.ImportedFromIB2</string>
+                                       <string>2670.IBPluginDependency</string>
+                                       <string>2670.ImportedFromIB2</string>
+                                       <string>2671.IBPluginDependency</string>
+                                       <string>2671.ImportedFromIB2</string>
+                                       <string>2672.IBPluginDependency</string>
+                                       <string>2672.ImportedFromIB2</string>
+                                       <string>2673.IBPluginDependency</string>
+                                       <string>2673.ImportedFromIB2</string>
+                                       <string>2694.IBPluginDependency</string>
+                                       <string>2694.ImportedFromIB2</string>
+                                       <string>2695.IBPluginDependency</string>
+                                       <string>2695.ImportedFromIB2</string>
+                                       <string>2698.IBPluginDependency</string>
+                                       <string>2698.ImportedFromIB2</string>
+                                       <string>2701.IBEditorWindowLastContentRect</string>
+                                       <string>2701.IBPluginDependency</string>
+                                       <string>2701.IBWindowTemplateEditedContentRect</string>
+                                       <string>2701.ImportedFromIB2</string>
+                                       <string>2701.editorWindowContentRectSynchronizationRect</string>
+                                       <string>2701.windowTemplate.hasMaxSize</string>
+                                       <string>2701.windowTemplate.hasMinSize</string>
+                                       <string>2701.windowTemplate.maxSize</string>
+                                       <string>2701.windowTemplate.minSize</string>
+                                       <string>2702.IBPluginDependency</string>
+                                       <string>2702.ImportedFromIB2</string>
+                                       <string>2703.IBPluginDependency</string>
+                                       <string>2703.ImportedFromIB2</string>
+                                       <string>2704.IBPluginDependency</string>
+                                       <string>2704.ImportedFromIB2</string>
+                                       <string>2705.IBPluginDependency</string>
+                                       <string>2705.ImportedFromIB2</string>
+                                       <string>2706.IBPluginDependency</string>
+                                       <string>2706.ImportedFromIB2</string>
+                                       <string>2707.IBPluginDependency</string>
+                                       <string>2707.ImportedFromIB2</string>
+                                       <string>2708.IBPluginDependency</string>
+                                       <string>2708.ImportedFromIB2</string>
+                                       <string>2716.IBPluginDependency</string>
+                                       <string>2716.ImportedFromIB2</string>
+                                       <string>2719.IBPluginDependency</string>
+                                       <string>2719.ImportedFromIB2</string>
+                                       <string>2720.IBPluginDependency</string>
+                                       <string>2720.ImportedFromIB2</string>
+                                       <string>2833.IBPluginDependency</string>
+                                       <string>2833.ImportedFromIB2</string>
+                                       <string>2837.IBPluginDependency</string>
+                                       <string>2837.ImportedFromIB2</string>
+                                       <string>2839.IBPluginDependency</string>
+                                       <string>2839.ImportedFromIB2</string>
+                                       <string>2840.IBPluginDependency</string>
+                                       <string>2840.ImportedFromIB2</string>
+                                       <string>29.IBPluginDependency</string>
+                                       <string>29.ImportedFromIB2</string>
+                                       <string>29.editorWindowContentRectSynchronizationRect</string>
+                                       <string>2957.IBPluginDependency</string>
+                                       <string>2957.ImportedFromIB2</string>
+                                       <string>3075.IBPluginDependency</string>
+                                       <string>3075.ImportedFromIB2</string>
+                                       <string>3077.IBPluginDependency</string>
+                                       <string>3077.ImportedFromIB2</string>
+                                       <string>3081.IBPluginDependency</string>
+                                       <string>3081.ImportedFromIB2</string>
+                                       <string>3082.IBPluginDependency</string>
+                                       <string>3082.ImportedFromIB2</string>
+                                       <string>3203.IBPluginDependency</string>
+                                       <string>3203.ImportedFromIB2</string>
+                                       <string>3205.IBPluginDependency</string>
+                                       <string>3205.ImportedFromIB2</string>
+                                       <string>4179.IBPluginDependency</string>
+                                       <string>4179.ImportedFromIB2</string>
+                                       <string>4182.CustomClassName</string>
+                                       <string>4182.IBPluginDependency</string>
+                                       <string>4182.ImportedFromIB2</string>
+                                       <string>4183.IBPluginDependency</string>
+                                       <string>4183.ImportedFromIB2</string>
+                                       <string>4186.IBPluginDependency</string>
+                                       <string>4186.ImportedFromIB2</string>
+                                       <string>4317.IBPluginDependency</string>
+                                       <string>4317.ImportedFromIB2</string>
+                                       <string>4322.IBPluginDependency</string>
+                                       <string>4322.ImportedFromIB2</string>
+                                       <string>434.IBPluginDependency</string>
+                                       <string>434.IBWindowTemplateEditedContentRect</string>
+                                       <string>434.ImportedFromIB2</string>
+                                       <string>434.editorWindowContentRectSynchronizationRect</string>
+                                       <string>434.windowTemplate.hasMaxSize</string>
+                                       <string>434.windowTemplate.hasMinSize</string>
+                                       <string>434.windowTemplate.maxSize</string>
+                                       <string>434.windowTemplate.minSize</string>
+                                       <string>435.IBPluginDependency</string>
+                                       <string>435.ImportedFromIB2</string>
+                                       <string>436.IBPluginDependency</string>
+                                       <string>436.ImportedFromIB2</string>
+                                       <string>437.IBPluginDependency</string>
+                                       <string>437.ImportedFromIB2</string>
+                                       <string>438.IBPluginDependency</string>
+                                       <string>438.ImportedFromIB2</string>
+                                       <string>4579.IBAttributePlaceholdersKey</string>
+                                       <string>4579.IBPluginDependency</string>
+                                       <string>4579.ImportedFromIB2</string>
+                                       <string>4836.IBPluginDependency</string>
+                                       <string>4836.ImportedFromIB2</string>
+                                       <string>4838.IBPluginDependency</string>
+                                       <string>4838.ImportedFromIB2</string>
+                                       <string>4840.IBPluginDependency</string>
+                                       <string>4840.ImportedFromIB2</string>
+                                       <string>4955.IBShouldRemoveOnLegacySave</string>
+                                       <string>4956.IBShouldRemoveOnLegacySave</string>
+                                       <string>4957.IBShouldRemoveOnLegacySave</string>
+                                       <string>4958.IBShouldRemoveOnLegacySave</string>
+                                       <string>4959.IBShouldRemoveOnLegacySave</string>
+                                       <string>4960.IBShouldRemoveOnLegacySave</string>
+                                       <string>4961.IBShouldRemoveOnLegacySave</string>
+                                       <string>4963.IBPluginDependency</string>
+                                       <string>4964.IBPluginDependency</string>
+                                       <string>4967.IBAttributePlaceholdersKey</string>
+                                       <string>4967.IBPluginDependency</string>
+                                       <string>4967.ImportedFromIB2</string>
+                                       <string>4980.IBPluginDependency</string>
+                                       <string>4980.ImportedFromIB2</string>
+                                       <string>4982.IBPluginDependency</string>
+                                       <string>4982.ImportedFromIB2</string>
+                                       <string>4983.IBPluginDependency</string>
+                                       <string>4983.ImportedFromIB2</string>
+                                       <string>4984.IBPluginDependency</string>
+                                       <string>4984.ImportedFromIB2</string>
+                                       <string>4986.IBPluginDependency</string>
+                                       <string>4986.ImportedFromIB2</string>
+                                       <string>4987.IBPluginDependency</string>
+                                       <string>4987.ImportedFromIB2</string>
+                                       <string>4988.IBPluginDependency</string>
+                                       <string>4988.ImportedFromIB2</string>
+                                       <string>4992.IBPluginDependency</string>
+                                       <string>4992.ImportedFromIB2</string>
+                                       <string>4994.IBPluginDependency</string>
+                                       <string>4994.ImportedFromIB2</string>
+                                       <string>4996.IBPluginDependency</string>
+                                       <string>4996.ImportedFromIB2</string>
+                                       <string>4998.IBPluginDependency</string>
+                                       <string>4998.ImportedFromIB2</string>
+                                       <string>4999.IBPluginDependency</string>
+                                       <string>4999.ImportedFromIB2</string>
+                                       <string>5000.IBPluginDependency</string>
+                                       <string>5000.ImportedFromIB2</string>
+                                       <string>5002.IBPluginDependency</string>
+                                       <string>5002.ImportedFromIB2</string>
+                                       <string>5003.IBPluginDependency</string>
+                                       <string>5003.ImportedFromIB2</string>
+                                       <string>5004.IBPluginDependency</string>
+                                       <string>5004.ImportedFromIB2</string>
+                                       <string>5006.IBPluginDependency</string>
+                                       <string>5006.ImportedFromIB2</string>
+                                       <string>5007.IBPluginDependency</string>
+                                       <string>5007.ImportedFromIB2</string>
+                                       <string>5008.IBPluginDependency</string>
+                                       <string>5008.ImportedFromIB2</string>
+                                       <string>5010.IBPluginDependency</string>
+                                       <string>5010.ImportedFromIB2</string>
+                                       <string>5011.IBPluginDependency</string>
+                                       <string>5011.ImportedFromIB2</string>
+                                       <string>5012.IBPluginDependency</string>
+                                       <string>5012.ImportedFromIB2</string>
+                                       <string>5014.IBPluginDependency</string>
+                                       <string>5014.ImportedFromIB2</string>
+                                       <string>5014.editorWindowContentRectSynchronizationRect</string>
+                                       <string>5015.IBPluginDependency</string>
+                                       <string>5015.ImportedFromIB2</string>
+                                       <string>5016.IBPluginDependency</string>
+                                       <string>5016.ImportedFromIB2</string>
+                                       <string>5018.IBPluginDependency</string>
+                                       <string>5018.ImportedFromIB2</string>
+                                       <string>5018.editorWindowContentRectSynchronizationRect</string>
+                                       <string>5019.IBPluginDependency</string>
+                                       <string>5019.ImportedFromIB2</string>
+                                       <string>5040.IBPluginDependency</string>
+                                       <string>5040.ImportedFromIB2</string>
+                                       <string>5042.IBPluginDependency</string>
+                                       <string>5042.ImportedFromIB2</string>
+                                       <string>5043.IBPluginDependency</string>
+                                       <string>5043.ImportedFromIB2</string>
+                                       <string>5044.IBPluginDependency</string>
+                                       <string>5044.ImportedFromIB2</string>
+                                       <string>5046.IBPluginDependency</string>
+                                       <string>5046.ImportedFromIB2</string>
+                                       <string>5047.IBPluginDependency</string>
+                                       <string>5047.ImportedFromIB2</string>
+                                       <string>5048.IBPluginDependency</string>
+                                       <string>5048.ImportedFromIB2</string>
+                                       <string>5050.IBPluginDependency</string>
+                                       <string>5050.ImportedFromIB2</string>
+                                       <string>5050.editorWindowContentRectSynchronizationRect</string>
+                                       <string>5051.IBPluginDependency</string>
+                                       <string>5051.ImportedFromIB2</string>
+                                       <string>5052.IBPluginDependency</string>
+                                       <string>5052.ImportedFromIB2</string>
+                                       <string>5054.IBPluginDependency</string>
+                                       <string>5054.ImportedFromIB2</string>
+                                       <string>5054.editorWindowContentRectSynchronizationRect</string>
+                                       <string>5055.IBPluginDependency</string>
+                                       <string>5055.ImportedFromIB2</string>
+                                       <string>5056.IBPluginDependency</string>
+                                       <string>5056.ImportedFromIB2</string>
+                                       <string>5058.IBPluginDependency</string>
+                                       <string>5058.ImportedFromIB2</string>
+                                       <string>5058.editorWindowContentRectSynchronizationRect</string>
+                                       <string>5059.IBPluginDependency</string>
+                                       <string>5059.ImportedFromIB2</string>
+                                       <string>5060.IBPluginDependency</string>
+                                       <string>5060.ImportedFromIB2</string>
+                                       <string>5062.IBPluginDependency</string>
+                                       <string>5062.ImportedFromIB2</string>
+                                       <string>5062.editorWindowContentRectSynchronizationRect</string>
+                                       <string>5063.IBPluginDependency</string>
+                                       <string>5063.ImportedFromIB2</string>
+                                       <string>5091.IBPluginDependency</string>
+                                       <string>5092.IBPluginDependency</string>
+                                       <string>5093.IBPluginDependency</string>
+                                       <string>5094.IBPluginDependency</string>
+                                       <string>5095.IBPluginDependency</string>
+                                       <string>5096.IBPluginDependency</string>
+                                       <string>5097.IBPluginDependency</string>
+                                       <string>5098.IBPluginDependency</string>
+                                       <string>5099.IBPluginDependency</string>
+                                       <string>5099.ImportedFromIB2</string>
+                                       <string>5101.IBPluginDependency</string>
+                                       <string>5101.ImportedFromIB2</string>
+                                       <string>5103.IBPluginDependency</string>
+                                       <string>5103.ImportedFromIB2</string>
+                                       <string>5105.IBPluginDependency</string>
+                                       <string>5105.ImportedFromIB2</string>
+                                       <string>5107.IBPluginDependency</string>
+                                       <string>5107.ImportedFromIB2</string>
+                                       <string>5122.IBPluginDependency</string>
+                                       <string>5122.ImportedFromIB2</string>
+                                       <string>5124.IBPluginDependency</string>
+                                       <string>5124.ImportedFromIB2</string>
+                                       <string>5130.IBPluginDependency</string>
+                                       <string>5131.IBPluginDependency</string>
+                                       <string>5132.IBEditorWindowLastContentRect</string>
+                                       <string>5132.IBPluginDependency</string>
+                                       <string>5132.editorWindowContentRectSynchronizationRect</string>
+                                       <string>5133.IBPluginDependency</string>
+                                       <string>5134.IBPluginDependency</string>
+                                       <string>5135.IBPluginDependency</string>
+                                       <string>5153.IBPluginDependency</string>
+                                       <string>5153.ImportedFromIB2</string>
+                                       <string>56.IBPluginDependency</string>
+                                       <string>56.ImportedFromIB2</string>
+                                       <string>57.IBPluginDependency</string>
+                                       <string>57.ImportedFromIB2</string>
+                                       <string>57.editorWindowContentRectSynchronizationRect</string>
+                                       <string>58.IBPluginDependency</string>
+                                       <string>58.ImportedFromIB2</string>
+                                       <string>970.IBPluginDependency</string>
+                                       <string>970.ImportedFromIB2</string>
+                                       <string>971.IBPluginDependency</string>
+                                       <string>971.ImportedFromIB2</string>
+                                       <string>973.IBPluginDependency</string>
+                                       <string>973.ImportedFromIB2</string>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <integer value="1" id="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">InitialTabViewItem</string>
+                                               <object class="IBInitialTabViewItemAttribute" key="NS.object.0">
+                                                       <string key="name">InitialTabViewItem</string>
+                                                       <reference key="object" ref="712502892"/>
+                                                       <reference key="initialTabViewItem" ref="107038816"/>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{673, 530}, {83, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{454, 306}, {270, 550}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <integer value="0" id="8"/>
+                                       <reference ref="9"/>
+                                       <string>{{720, 261}, {270, 550}}</string>
+                                       <string>{{275, 198}, {338, 318}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{{275, 198}, {338, 318}}</string>
+                                       <reference ref="9"/>
+                                       <string>{{421, 536}, {338, 318}}</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>{3.40282e+38, 3.40282e+38}</string>
+                                       <string>{338, 232}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{418, 529}, {122, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{171, 168}, {760, 550}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="8"/>
+                                       <string>{{171, 168}, {760, 550}}</string>
+                                       <reference ref="9"/>
+                                       <string>{{65, 541}, {760, 550}}</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>{3.40282e+38, 3.40282e+38}</string>
+                                       <string>{213, 107}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="553453876"/>
+                                                       <string key="toolTip">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.</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{72, 851}, {392, 144}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{{72, 851}, {392, 144}}</string>
+                                       <reference ref="9"/>
+                                       <string>{{303, 988}, {392, 144}}</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>{3.40282e+38, 3.40282e+38}</string>
+                                       <string>{213, 107}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{63, 836}, {394, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>HBPresetsOutlineView</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{{57, 766}, {300, 233}}</string>
+                                       <reference ref="9"/>
+                                       <string>{{57, 766}, {300, 233}}</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>{3.40282e+38, 3.40282e+38}</string>
+                                       <string>{213, 107}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="581806074"/>
+                                                       <string key="toolTip">Mixed</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <object class="NSMutableDictionary">
+                                               <string key="NS.key.0">ToolTip</string>
+                                               <object class="IBToolTipAttribute" key="NS.object.0">
+                                                       <string key="name">ToolTip</string>
+                                                       <reference key="object" ref="921877174"/>
+                                                       <string key="toolTip">Mixed</string>
+                                               </object>
+                                       </object>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{418, 529}, {122, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{418, 529}, {122, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{601, 501}, {79, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{673, 530}, {83, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{673, 530}, {83, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{673, 530}, {83, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{{304, 383}, {226, 63}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{{923, 222}, {226, 63}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{75, 683}, {235, 153}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="unlocalizedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="activeLocalization"/>
+                       <object class="NSMutableDictionary" key="localizations">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="sourceID"/>
+                       <int key="maxID">5156</int>
+               </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes">
+                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBController</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>Cancel:</string>
+                                                       <string>Pause:</string>
+                                                       <string>Rip:</string>
+                                                       <string>addAllAudioTracksToPopUp:</string>
+                                                       <string>addFactoryPresets:</string>
+                                                       <string>addToQueue:</string>
+                                                       <string>addUserPreset:</string>
+                                                       <string>applyQueueSettings:</string>
+                                                       <string>audioAddAudioTrackCodecs:</string>
+                                                       <string>audioCodecsPopUpChanged:</string>
+                                                       <string>audioDRCSliderChanged:</string>
+                                                       <string>audioTrackMixdownChanged:</string>
+                                                       <string>audioTrackPopUpChanged:</string>
+                                                       <string>autoSetM4vExtension:</string>
+                                                       <string>browseFile:</string>
+                                                       <string>browseSources:</string>
+                                                       <string>calculateBitrate:</string>
+                                                       <string>calculatePictureSizing:</string>
+                                                       <string>chapterPopUpChanged:</string>
+                                                       <string>closeAddPresetPanel:</string>
+                                                       <string>closeSourceTitleScanPanel:</string>
+                                                       <string>customSettingUsed:</string>
+                                                       <string>deleteFactoryPresets:</string>
+                                                       <string>deletePreset:</string>
+                                                       <string>formatPopUpChanged:</string>
+                                                       <string>getDefaultPresets:</string>
+                                                       <string>insertPreset:</string>
+                                                       <string>openForums:</string>
+                                                       <string>openHomepage:</string>
+                                                       <string>openMainWindow:</string>
+                                                       <string>openUserGuide:</string>
+                                                       <string>qualitySliderChanged:</string>
+                                                       <string>revertPictureSizeToMax:</string>
+                                                       <string>selectDefaultPreset:</string>
+                                                       <string>selectPreset:</string>
+                                                       <string>setDefaultPreset:</string>
+                                                       <string>setEnabledStateOfAudioMixdownControls:</string>
+                                                       <string>showAddPresetPanel:</string>
+                                                       <string>showDebugOutputPanel:</string>
+                                                       <string>showNewScan:</string>
+                                                       <string>showPicturePanel:</string>
+                                                       <string>showPreferencesWindow:</string>
+                                                       <string>showQueueWindow:</string>
+                                                       <string>showSourceTitleScanPanel:</string>
+                                                       <string>subtitleSelectionChanged:</string>
+                                                       <string>titlePopUpChanged:</string>
+                                                       <string>twoPassCheckboxChanged:</string>
+                                                       <string>videoEncoderPopUpChanged:</string>
+                                                       <string>videoFrameRateChanged:</string>
+                                                       <string>videoMatrixChanged:</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>fAddPresetPanel</string>
+                                                       <string>fAdvancedView</string>
+                                                       <string>fAudBitrateLabel</string>
+                                                       <string>fAudCodecLabel</string>
+                                                       <string>fAudDrcLabel</string>
+                                                       <string>fAudLang1PopUp</string>
+                                                       <string>fAudLang2PopUp</string>
+                                                       <string>fAudLang3PopUp</string>
+                                                       <string>fAudLang4PopUp</string>
+                                                       <string>fAudMixdownLabel</string>
+                                                       <string>fAudSamplerateLabel</string>
+                                                       <string>fAudSourceLabel</string>
+                                                       <string>fAudTrack1BitratePopUp</string>
+                                                       <string>fAudTrack1CodecPopUp</string>
+                                                       <string>fAudTrack1DrcField</string>
+                                                       <string>fAudTrack1DrcSlider</string>
+                                                       <string>fAudTrack1Label</string>
+                                                       <string>fAudTrack1MixPopUp</string>
+                                                       <string>fAudTrack1RatePopUp</string>
+                                                       <string>fAudTrack2BitratePopUp</string>
+                                                       <string>fAudTrack2CodecPopUp</string>
+                                                       <string>fAudTrack2DrcField</string>
+                                                       <string>fAudTrack2DrcSlider</string>
+                                                       <string>fAudTrack2Label</string>
+                                                       <string>fAudTrack2MixPopUp</string>
+                                                       <string>fAudTrack2RatePopUp</string>
+                                                       <string>fAudTrack3BitratePopUp</string>
+                                                       <string>fAudTrack3CodecPopUp</string>
+                                                       <string>fAudTrack3DrcField</string>
+                                                       <string>fAudTrack3DrcSlider</string>
+                                                       <string>fAudTrack3Label</string>
+                                                       <string>fAudTrack3MixPopUp</string>
+                                                       <string>fAudTrack3RatePopUp</string>
+                                                       <string>fAudTrack4BitratePopUp</string>
+                                                       <string>fAudTrack4CodecPopUp</string>
+                                                       <string>fAudTrack4DrcField</string>
+                                                       <string>fAudTrack4DrcSlider</string>
+                                                       <string>fAudTrack4Label</string>
+                                                       <string>fAudTrack4MixPopUp</string>
+                                                       <string>fAudTrack4RatePopUp</string>
+                                                       <string>fChapterTable</string>
+                                                       <string>fCreateChapterMarkers</string>
+                                                       <string>fDstBrowseButton</string>
+                                                       <string>fDstFile1Field</string>
+                                                       <string>fDstFile2Field</string>
+                                                       <string>fDstFormatField</string>
+                                                       <string>fDstFormatPopUp</string>
+                                                       <string>fDstMp4HttpOptFileCheck</string>
+                                                       <string>fDstMp4LargeFileCheck</string>
+                                                       <string>fDstMp4iPodFileCheck</string>
+                                                       <string>fPicLabelAnamorphic</string>
+                                                       <string>fPicLabelAr</string>
+                                                       <string>fPicLabelAutoCrop</string>
+                                                       <string>fPicLabelDeblock</string>
+                                                       <string>fPicLabelDecomb</string>
+                                                       <string>fPicLabelDeinterlace</string>
+                                                       <string>fPicLabelDenoise</string>
+                                                       <string>fPicLabelDetelecine</string>
+                                                       <string>fPicLabelOutp</string>
+                                                       <string>fPicLabelSettings</string>
+                                                       <string>fPicLabelSrc</string>
+                                                       <string>fPicSettingARkeep</string>
+                                                       <string>fPicSettingAutoCrop</string>
+                                                       <string>fPicSettingDeblock</string>
+                                                       <string>fPicSettingDecomb</string>
+                                                       <string>fPicSettingDeinterlace</string>
+                                                       <string>fPicSettingDenoise</string>
+                                                       <string>fPicSettingDetelecine</string>
+                                                       <string>fPicSettingPAR</string>
+                                                       <string>fPicSettingsAnamorphic</string>
+                                                       <string>fPicSettingsOutp</string>
+                                                       <string>fPicSettingsSrc</string>
+                                                       <string>fPictureButton</string>
+                                                       <string>fPresetDrawer</string>
+                                                       <string>fPresetNewDesc</string>
+                                                       <string>fPresetNewFolderCheck</string>
+                                                       <string>fPresetNewName</string>
+                                                       <string>fPresetNewPicFiltersCheck</string>
+                                                       <string>fPresetNewPicSettingsPopUp</string>
+                                                       <string>fPresetSelectedDisplay</string>
+                                                       <string>fPresetsActionButton</string>
+                                                       <string>fPresetsAdd</string>
+                                                       <string>fPresetsDelete</string>
+                                                       <string>fPresetsOutlineView</string>
+                                                       <string>fQueueStatus</string>
+                                                       <string>fRipIndicator</string>
+                                                       <string>fScanIndicator</string>
+                                                       <string>fScanSrcTitleCancelButton</string>
+                                                       <string>fScanSrcTitleNumField</string>
+                                                       <string>fScanSrcTitleOpenButton</string>
+                                                       <string>fScanSrcTitlePanel</string>
+                                                       <string>fScanSrcTitlePathField</string>
+                                                       <string>fSrcChapterEndPopUp</string>
+                                                       <string>fSrcChapterField</string>
+                                                       <string>fSrcChapterStartPopUp</string>
+                                                       <string>fSrcChapterToField</string>
+                                                       <string>fSrcDVD2Field</string>
+                                                       <string>fSrcDsplyNameTitleScan</string>
+                                                       <string>fSrcDuration1Field</string>
+                                                       <string>fSrcDuration2Field</string>
+                                                       <string>fSrcTitleField</string>
+                                                       <string>fSrcTitlePopUp</string>
+                                                       <string>fStatusField</string>
+                                                       <string>fSubField</string>
+                                                       <string>fSubForcedCheck</string>
+                                                       <string>fSubPopUp</string>
+                                                       <string>fVidBitrateCell</string>
+                                                       <string>fVidBitrateField</string>
+                                                       <string>fVidConstantCell</string>
+                                                       <string>fVidEncoderField</string>
+                                                       <string>fVidEncoderPopUp</string>
+                                                       <string>fVidGrayscaleCheck</string>
+                                                       <string>fVidQualityField</string>
+                                                       <string>fVidQualityMatrix</string>
+                                                       <string>fVidQualitySlider</string>
+                                                       <string>fVidRateField</string>
+                                                       <string>fVidRatePopUp</string>
+                                                       <string>fVidTargetCell</string>
+                                                       <string>fVidTargetSizeField</string>
+                                                       <string>fVidTurboPassCheck</string>
+                                                       <string>fVidTwoPassCheck</string>
+                                                       <string>fWindow</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>NSPanel</string>
+                                                       <string>NSBox</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSSlider</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSSlider</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSSlider</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSSlider</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTableView</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSDrawer</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSButton</string>
+                                                       <string>HBPresetsOutlineView</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSProgressIndicator</string>
+                                                       <string>NSProgressIndicator</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSPanel</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSButtonCell</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButtonCell</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSMatrix</string>
+                                                       <string>NSSlider</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSButtonCell</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSWindow</string>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier" id="896678678">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">Controller.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBController</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>presetSelected:</string>
+                                                       <string>showScanPanel:</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>fOpenSourceTitleMMenu</string>
+                                                       <string>tableView</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>NSMenuItem</string>
+                                                       <string>NSTableView</string>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBPresetsOutlineView</string>
+                                       <string key="superclassName">NSOutlineView</string>
+                                       <reference key="sourceIdentifier" ref="896678678"/>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">PictureController.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">SUUpdater</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <string key="NS.key.0">checkForUpdates:</string>
+                                               <string key="NS.object.0">id</string>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                       </object>
+               </object>
+               <int key="IBDocument.localizationMode">0</int>
+               <string key="IBDocument.LastKnownRelativeProjectPath">../HandBrake.xcodeproj</string>
+               <int key="IBDocument.defaultPropertyAccessControl">3</int>
+       </data>
+</archive>
diff --git a/macosx/English.lproj/OutputPanel.xib b/macosx/English.lproj/OutputPanel.xib
new file mode 100644 (file)
index 0000000..6fcd19c
--- /dev/null
@@ -0,0 +1,653 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+       <data>
+               <int key="IBDocument.SystemTarget">1050</int>
+               <string key="IBDocument.SystemVersion">9F33</string>
+               <string key="IBDocument.InterfaceBuilderVersion">670</string>
+               <string key="IBDocument.AppKitVersion">949.34</string>
+               <string key="IBDocument.HIToolboxVersion">352.00</string>
+               <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <integer value="11"/>
+               </object>
+               <object class="NSArray" key="IBDocument.PluginDependencies">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+               </object>
+               <object class="NSMutableArray" key="IBDocument.RootObjects" id="640353287">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <object class="NSCustomObject" id="282956917">
+                               <string key="NSClassName">HBOutputPanelController</string>
+                       </object>
+                       <object class="NSCustomObject" id="531893577">
+                               <string key="NSClassName">FirstResponder</string>
+                       </object>
+                       <object class="NSCustomObject" id="602845690">
+                               <string key="NSClassName">NSApplication</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="1026712888">
+                               <int key="NSWindowStyleMask">15</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{155, 772}, {379, 371}}</string>
+                               <int key="NSWTFlags">-260571136</int>
+                               <string key="NSWindowTitle">Activity Window - HandBrake</string>
+                               <string key="NSWindowClass">NSPanel</string>
+                               <object class="NSMutableString" key="NSViewClass">
+                                       <characters key="NS.bytes">View</characters>
+                               </object>
+                               <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <string key="NSWindowContentMinSize">{214.502, 107}</string>
+                               <object class="NSView" key="NSWindowView" id="1055997608">
+                                       <nil key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <object class="NSMutableArray" key="NSSubviews">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSScrollView" id="777989256">
+                                                       <reference key="NSNextResponder" ref="1055997608"/>
+                                                       <int key="NSvFlags">274</int>
+                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSClipView" id="630219039">
+                                                                       <reference key="NSNextResponder" ref="777989256"/>
+                                                                       <int key="NSvFlags">2304</int>
+                                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <object class="NSTextView" id="123567529">
+                                                                                       <reference key="NSNextResponder" ref="630219039"/>
+                                                                                       <int key="NSvFlags">2322</int>
+                                                                                       <string key="NSFrameSize">{363, 14}</string>
+                                                                                       <reference key="NSSuperview" ref="630219039"/>
+                                                                                       <object class="NSTextContainer" key="NSTextContainer" id="431112540">
+                                                                                               <object class="NSLayoutManager" key="NSLayoutManager">
+                                                                                                       <object class="NSTextStorage" key="NSTextStorage">
+                                                                                                               <object class="NSMutableString" key="NSString">
+                                                                                                                       <characters key="NS.bytes"/>
+                                                                                                               </object>
+                                                                                                               <nil key="NSDelegate"/>
+                                                                                                       </object>
+                                                                                                       <object class="NSMutableArray" key="NSTextContainers">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <reference ref="431112540"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSLMFlags">6</int>
+                                                                                                       <nil key="NSDelegate"/>
+                                                                                               </object>
+                                                                                               <reference key="NSTextView" ref="123567529"/>
+                                                                                               <double key="NSWidth">3.630000e+02</double>
+                                                                                               <int key="NSTCFlags">1</int>
+                                                                                       </object>
+                                                                                       <object class="NSTextViewSharedData" key="NSSharedData">
+                                                                                               <int key="NSFlags">11109</int>
+                                                                                               <object class="NSColor" key="NSBackgroundColor" id="913007966">
+                                                                                                       <int key="NSColorSpace">3</int>
+                                                                                                       <bytes key="NSWhite">MQA</bytes>
+                                                                                               </object>
+                                                                                               <object class="NSColor" key="NSInsertionColor" id="76040784">
+                                                                                                       <int key="NSColorSpace">3</int>
+                                                                                                       <bytes key="NSWhite">MAA</bytes>
+                                                                                               </object>
+                                                                                               <object class="NSDictionary" key="NSSelectedAttributes">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <object class="NSMutableArray" key="dict.sortedKeys">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <string>NSBackgroundColor</string>
+                                                                                                               <string>NSColor</string>
+                                                                                                       </object>
+                                                                                                       <object class="NSMutableArray" key="dict.values">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <object class="NSColor">
+                                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                                       <string key="NSCatalogName">System</string>
+                                                                                                                       <string key="NSColorName">selectedTextBackgroundColor</string>
+                                                                                                                       <object class="NSColor" key="NSColor">
+                                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                                               <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+                                                                                                                       </object>
+                                                                                                               </object>
+                                                                                                               <object class="NSColor">
+                                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                                       <string key="NSCatalogName">System</string>
+                                                                                                                       <string key="NSColorName">selectedTextColor</string>
+                                                                                                                       <reference key="NSColor" ref="76040784"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <nil key="NSMarkedAttributes"/>
+                                                                                               <object class="NSDictionary" key="NSLinkAttributes">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <object class="NSMutableArray" key="dict.sortedKeys">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <string>NSColor</string>
+                                                                                                               <string>NSUnderline</string>
+                                                                                                       </object>
+                                                                                                       <object class="NSMutableArray" key="dict.values">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <object class="NSColor">
+                                                                                                                       <int key="NSColorSpace">1</int>
+                                                                                                                       <bytes key="NSRGB">MCAwIDEAA</bytes>
+                                                                                                               </object>
+                                                                                                               <integer value="1" id="9"/>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <nil key="NSDefaultParagraphStyle"/>
+                                                                                       </object>
+                                                                                       <int key="NSTVFlags">6</int>
+                                                                                       <string key="NSMaxSize">{743, 1e+07}</string>
+                                                                                       <string key="NSMinize">{83, 0}</string>
+                                                                                       <nil key="NSDelegate"/>
+                                                                               </object>
+                                                                       </object>
+                                                                       <string key="NSFrame">{{1, 1}, {363, 371}}</string>
+                                                                       <reference key="NSSuperview" ref="777989256"/>
+                                                                       <reference key="NSNextKeyView" ref="123567529"/>
+                                                                       <reference key="NSDocView" ref="123567529"/>
+                                                                       <reference key="NSBGColor" ref="913007966"/>
+                                                                       <object class="NSCursor" key="NSCursor">
+                                                                               <string key="NSHotSpot">{4, -5}</string>
+                                                                               <int key="NSCursorType">1</int>
+                                                                       </object>
+                                                                       <int key="NScvFlags">4</int>
+                                                               </object>
+                                                               <object class="NSScroller" id="821320990">
+                                                                       <reference key="NSNextResponder" ref="777989256"/>
+                                                                       <int key="NSvFlags">256</int>
+                                                                       <string key="NSFrame">{{364, 1}, {15, 371}}</string>
+                                                                       <reference key="NSSuperview" ref="777989256"/>
+                                                                       <reference key="NSTarget" ref="777989256"/>
+                                                                       <string key="NSAction">_doScroller:</string>
+                                                                       <double key="NSPercent">6.003236e-01</double>
+                                                               </object>
+                                                               <object class="NSScroller" id="446620405">
+                                                                       <reference key="NSNextResponder" ref="777989256"/>
+                                                                       <int key="NSvFlags">256</int>
+                                                                       <string key="NSFrame">{{-100, -100}, {87, 18}}</string>
+                                                                       <reference key="NSSuperview" ref="777989256"/>
+                                                                       <int key="NSsFlags">1</int>
+                                                                       <reference key="NSTarget" ref="777989256"/>
+                                                                       <string key="NSAction">_doScroller:</string>
+                                                                       <double key="NSCurValue">1.000000e+00</double>
+                                                                       <double key="NSPercent">9.456522e-01</double>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSFrame">{{0, -1}, {380, 373}}</string>
+                                                       <reference key="NSSuperview" ref="1055997608"/>
+                                                       <reference key="NSNextKeyView" ref="630219039"/>
+                                                       <int key="NSsFlags">18</int>
+                                                       <reference key="NSVScroller" ref="821320990"/>
+                                                       <reference key="NSHScroller" ref="446620405"/>
+                                                       <reference key="NSContentView" ref="630219039"/>
+                                                       <bytes key="NSScrollAmts">AAAAAAAAAAAAAAAAAAAAAA</bytes>
+                                               </object>
+                                       </object>
+                                       <string key="NSFrameSize">{379, 371}</string>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
+                               <string key="NSMinSize">{214.502, 129}</string>
+                               <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                       </object>
+                       <object class="NSMenu" id="391216144">
+                               <string key="NSTitle">Menu</string>
+                               <object class="NSMutableArray" key="NSMenuItems">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSMenuItem" id="190531161">
+                                               <reference key="NSMenu" ref="391216144"/>
+                                               <string key="NSTitle">Copy Window Contents</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <object class="NSCustomResource" key="NSOnImage" id="914385192">
+                                                       <string key="NSClassName">NSImage</string>
+                                                       <string key="NSResourceName">NSMenuCheckmark</string>
+                                               </object>
+                                               <object class="NSCustomResource" key="NSMixedImage" id="397103719">
+                                                       <string key="NSClassName">NSImage</string>
+                                                       <string key="NSResourceName">NSMenuMixedState</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMenuItem" id="780868037">
+                                               <reference key="NSMenu" ref="391216144"/>
+                                               <string key="NSTitle">Clear Window Contents</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="914385192"/>
+                                               <reference key="NSMixedImage" ref="397103719"/>
+                                       </object>
+                                       <object class="NSMenuItem" id="292074454">
+                                               <reference key="NSMenu" ref="391216144"/>
+                                               <bool key="NSIsDisabled">YES</bool>
+                                               <bool key="NSIsSeparator">YES</bool>
+                                               <string key="NSTitle"/>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="914385192"/>
+                                               <reference key="NSMixedImage" ref="397103719"/>
+                                       </object>
+                                       <object class="NSMenuItem" id="1041053003">
+                                               <reference key="NSMenu" ref="391216144"/>
+                                               <string key="NSTitle">Open Log File For This Session</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="914385192"/>
+                                               <reference key="NSMixedImage" ref="397103719"/>
+                                       </object>
+                                       <object class="NSMenuItem" id="405725939">
+                                               <reference key="NSMenu" ref="391216144"/>
+                                               <string key="NSTitle">Clear Log File For This Session</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="914385192"/>
+                                               <reference key="NSMixedImage" ref="397103719"/>
+                                       </object>
+                                       <object class="NSMenuItem" id="851442803">
+                                               <reference key="NSMenu" ref="391216144"/>
+                                               <bool key="NSIsDisabled">YES</bool>
+                                               <bool key="NSIsSeparator">YES</bool>
+                                               <string key="NSTitle"/>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="914385192"/>
+                                               <reference key="NSMixedImage" ref="397103719"/>
+                                       </object>
+                                       <object class="NSMenuItem" id="541567733">
+                                               <reference key="NSMenu" ref="391216144"/>
+                                               <string key="NSTitle">Open Individual Log File Directory</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="914385192"/>
+                                               <reference key="NSMixedImage" ref="397103719"/>
+                                       </object>
+                               </object>
+                               <string key="NSName"/>
+                       </object>
+               </object>
+               <object class="IBObjectContainer" key="IBDocument.Objects">
+                       <object class="NSMutableArray" key="connectionRecords">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">delegate</string>
+                                               <reference key="source" ref="1026712888"/>
+                                               <reference key="destination" ref="282956917"/>
+                                       </object>
+                                       <int key="connectionID">17</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">delegate</string>
+                                               <reference key="source" ref="123567529"/>
+                                               <reference key="destination" ref="282956917"/>
+                                       </object>
+                                       <int key="connectionID">21</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">menu</string>
+                                               <reference key="source" ref="123567529"/>
+                                               <reference key="destination" ref="391216144"/>
+                                       </object>
+                                       <int key="connectionID">22</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">textView</string>
+                                               <reference key="source" ref="282956917"/>
+                                               <reference key="destination" ref="123567529"/>
+                                       </object>
+                                       <int key="connectionID">23</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">clearOutput:</string>
+                                               <reference key="source" ref="282956917"/>
+                                               <reference key="destination" ref="780868037"/>
+                                       </object>
+                                       <int key="connectionID">27</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">copyAllOutputToPasteboard:</string>
+                                               <reference key="source" ref="282956917"/>
+                                               <reference key="destination" ref="190531161"/>
+                                       </object>
+                                       <int key="connectionID">32</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">openActivityLogFile:</string>
+                                               <reference key="source" ref="282956917"/>
+                                               <reference key="destination" ref="1041053003"/>
+                                       </object>
+                                       <int key="connectionID">34</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">clearActivityLogFile:</string>
+                                               <reference key="source" ref="282956917"/>
+                                               <reference key="destination" ref="405725939"/>
+                                       </object>
+                                       <int key="connectionID">36</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">window</string>
+                                               <reference key="source" ref="282956917"/>
+                                               <reference key="destination" ref="1026712888"/>
+                                       </object>
+                                       <int key="connectionID">41</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">openEncodeLogDirectory:</string>
+                                               <reference key="source" ref="282956917"/>
+                                               <reference key="destination" ref="541567733"/>
+                                       </object>
+                                       <int key="connectionID">44</int>
+                               </object>
+                       </object>
+                       <object class="IBMutableOrderedSet" key="objectRecords">
+                               <object class="NSArray" key="orderedObjects">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">0</int>
+                                               <object class="NSArray" key="object" id="650019074">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <reference key="children" ref="640353287"/>
+                                               <nil key="parent"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-2</int>
+                                               <reference key="object" ref="282956917"/>
+                                               <reference key="parent" ref="650019074"/>
+                                               <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-1</int>
+                                               <reference key="object" ref="531893577"/>
+                                               <reference key="parent" ref="650019074"/>
+                                               <string key="objectName">First Responder</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-3</int>
+                                               <reference key="object" ref="602845690"/>
+                                               <reference key="parent" ref="650019074"/>
+                                               <string key="objectName">Application</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5</int>
+                                               <reference key="object" ref="1026712888"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1055997608"/>
+                                               </object>
+                                               <reference key="parent" ref="650019074"/>
+                                               <string key="objectName">OutputPanel</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">6</int>
+                                               <reference key="object" ref="1055997608"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="777989256"/>
+                                               </object>
+                                               <reference key="parent" ref="1026712888"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">19</int>
+                                               <reference key="object" ref="777989256"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="123567529"/>
+                                                       <reference ref="821320990"/>
+                                                       <reference ref="446620405"/>
+                                               </object>
+                                               <reference key="parent" ref="1055997608"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">20</int>
+                                               <reference key="object" ref="123567529"/>
+                                               <reference key="parent" ref="777989256"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">11</int>
+                                               <reference key="object" ref="391216144"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="780868037"/>
+                                                       <reference ref="190531161"/>
+                                                       <reference ref="1041053003"/>
+                                                       <reference ref="405725939"/>
+                                                       <reference ref="292074454"/>
+                                                       <reference ref="541567733"/>
+                                                       <reference ref="851442803"/>
+                                               </object>
+                                               <reference key="parent" ref="650019074"/>
+                                               <string key="objectName">ContextMenu</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">12</int>
+                                               <reference key="object" ref="780868037"/>
+                                               <reference key="parent" ref="391216144"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">24</int>
+                                               <reference key="object" ref="190531161"/>
+                                               <reference key="parent" ref="391216144"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">33</int>
+                                               <reference key="object" ref="1041053003"/>
+                                               <reference key="parent" ref="391216144"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">35</int>
+                                               <reference key="object" ref="405725939"/>
+                                               <reference key="parent" ref="391216144"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">37</int>
+                                               <reference key="object" ref="292074454"/>
+                                               <reference key="parent" ref="391216144"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">39</int>
+                                               <reference key="object" ref="821320990"/>
+                                               <reference key="parent" ref="777989256"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">40</int>
+                                               <reference key="object" ref="446620405"/>
+                                               <reference key="parent" ref="777989256"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">42</int>
+                                               <reference key="object" ref="851442803"/>
+                                               <reference key="parent" ref="391216144"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">43</int>
+                                               <reference key="object" ref="541567733"/>
+                                               <reference key="parent" ref="391216144"/>
+                                       </object>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="flattenedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>-1.IBPluginDependency</string>
+                                       <string>-2.IBPluginDependency</string>
+                                       <string>-3.IBPluginDependency</string>
+                                       <string>-3.ImportedFromIB2</string>
+                                       <string>11.IBEditorWindowLastContentRect</string>
+                                       <string>11.IBPluginDependency</string>
+                                       <string>11.ImportedFromIB2</string>
+                                       <string>12.IBPluginDependency</string>
+                                       <string>12.ImportedFromIB2</string>
+                                       <string>19.IBPluginDependency</string>
+                                       <string>19.ImportedFromIB2</string>
+                                       <string>20.IBPluginDependency</string>
+                                       <string>20.ImportedFromIB2</string>
+                                       <string>24.IBPluginDependency</string>
+                                       <string>24.ImportedFromIB2</string>
+                                       <string>33.IBPluginDependency</string>
+                                       <string>33.ImportedFromIB2</string>
+                                       <string>35.IBPluginDependency</string>
+                                       <string>35.ImportedFromIB2</string>
+                                       <string>37.IBPluginDependency</string>
+                                       <string>37.ImportedFromIB2</string>
+                                       <string>39.IBShouldRemoveOnLegacySave</string>
+                                       <string>40.IBShouldRemoveOnLegacySave</string>
+                                       <string>42.IBPluginDependency</string>
+                                       <string>42.ImportedFromIB2</string>
+                                       <string>43.IBPluginDependency</string>
+                                       <string>43.ImportedFromIB2</string>
+                                       <string>5.IBPluginDependency</string>
+                                       <string>5.ImportedFromIB2</string>
+                                       <string>5.windowTemplate.hasMaxSize</string>
+                                       <string>5.windowTemplate.hasMinSize</string>
+                                       <string>5.windowTemplate.maxSize</string>
+                                       <string>5.windowTemplate.minSize</string>
+                                       <string>6.IBPluginDependency</string>
+                                       <string>6.ImportedFromIB2</string>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{319, 676}, {358, 123}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>{3.40282e+38, 3.40282e+38}</string>
+                                       <string>{214.502, 107}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="unlocalizedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="activeLocalization"/>
+                       <object class="NSMutableDictionary" key="localizations">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="sourceID"/>
+                       <int key="maxID">44</int>
+               </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes">
+                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">FirstResponder</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBOutputPanelController</string>
+                                       <string key="superclassName">NSWindowController</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>clearActivityLogFile:</string>
+                                                       <string>clearOutput:</string>
+                                                       <string>copyAllOutputToPasteboard:</string>
+                                                       <string>openActivityLogFile:</string>
+                                                       <string>openEncodeLogDirectory:</string>
+                                                       <string>showOutputPanel:</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <string key="NS.key.0">textView</string>
+                                               <string key="NS.object.0">NSTextView</string>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">HBOutputPanelController.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBOutputPanelController</string>
+                                       <string key="superclassName">NSWindowController</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">PictureController.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                       </object>
+               </object>
+               <int key="IBDocument.localizationMode">0</int>
+               <string key="IBDocument.LastKnownRelativeProjectPath">../HandBrake.xcodeproj</string>
+               <int key="IBDocument.defaultPropertyAccessControl">3</int>
+       </data>
+</archive>
diff --git a/macosx/English.lproj/PictureSettings.xib b/macosx/English.lproj/PictureSettings.xib
new file mode 100644 (file)
index 0000000..aa3cd14
--- /dev/null
@@ -0,0 +1,2722 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+       <data>
+               <int key="IBDocument.SystemTarget">1050</int>
+               <string key="IBDocument.SystemVersion">9F33</string>
+               <string key="IBDocument.InterfaceBuilderVersion">670</string>
+               <string key="IBDocument.AppKitVersion">949.34</string>
+               <string key="IBDocument.HIToolboxVersion">352.00</string>
+               <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <integer value="23"/>
+               </object>
+               <object class="NSArray" key="IBDocument.PluginDependencies">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+               </object>
+               <object class="NSMutableArray" key="IBDocument.RootObjects" id="273418435">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <object class="NSCustomObject" id="355312334">
+                               <string key="NSClassName">PictureController</string>
+                       </object>
+                       <object class="NSCustomObject" id="844574444">
+                               <string key="NSClassName">FirstResponder</string>
+                       </object>
+                       <object class="NSCustomObject" id="837220151">
+                               <string key="NSClassName">NSApplication</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="616825745">
+                               <int key="NSWindowStyleMask">1</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{482, 298}, {453, 558}}</string>
+                               <int key="NSWTFlags">1886912512</int>
+                               <string key="NSWindowTitle">Picture Settings</string>
+                               <string key="NSWindowClass">NSPanel</string>
+                               <object class="NSMutableString" key="NSViewClass">
+                                       <characters key="NS.bytes">View</characters>
+                               </object>
+                               <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <string key="NSWindowContentMinSize">{453, 558}</string>
+                               <object class="NSView" key="NSWindowView" id="49161063">
+                                       <reference key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <object class="NSMutableArray" key="NSSubviews">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSButton" id="41752677">
+                                                       <reference key="NSNextResponder" ref="49161063"/>
+                                                       <int key="NSvFlags">289</int>
+                                                       <string key="NSFrame">{{346, 58}, {92, 28}}</string>
+                                                       <reference key="NSSuperview" ref="49161063"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="785935474">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">134348800</int>
+                                                               <string key="NSContents">Next</string>
+                                                               <object class="NSFont" key="NSSupport" id="26">
+                                                                       <string key="NSName">LucidaGrande</string>
+                                                                       <double key="NSSize">1.100000e+01</double>
+                                                                       <int key="NSfFlags">3100</int>
+                                                               </object>
+                                                               <reference key="NSControlView" ref="41752677"/>
+                                                               <int key="NSButtonFlags">-2038284033</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <object class="NSFont" key="NSAlternateImage" id="687090323">
+                                                                       <string key="NSName">LucidaGrande</string>
+                                                                       <double key="NSSize">1.100000e+01</double>
+                                                                       <int key="NSfFlags">16</int>
+                                                               </object>
+                                                               <string key="NSAlternateContents"/>
+                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                       <characters key="NS.bytes"/>
+                                                               </object>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="862464620">
+                                                       <reference key="NSNextResponder" ref="49161063"/>
+                                                       <int key="NSvFlags">289</int>
+                                                       <string key="NSFrame">{{241, 59}, {101, 28}}</string>
+                                                       <reference key="NSSuperview" ref="49161063"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="212457967">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">134348800</int>
+                                                               <string key="NSContents">Previous</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="862464620"/>
+                                                               <int key="NSButtonFlags">-2038284033</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <reference key="NSAlternateImage" ref="687090323"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                       <characters key="NS.bytes"/>
+                                                               </object>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSBox" id="574970834">
+                                                       <reference key="NSNextResponder" ref="49161063"/>
+                                                       <int key="NSvFlags">290</int>
+                                                       <string key="NSFrame">{{20, 58}, {413, 5}}</string>
+                                                       <reference key="NSSuperview" ref="49161063"/>
+                                                       <string key="NSOffsets">{0, 0}</string>
+                                                       <object class="NSTextFieldCell" key="NSTitleCell">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">0</int>
+                                                               <string key="NSContents">Box</string>
+                                                               <object class="NSFont" key="NSSupport" id="1003998324">
+                                                                       <string key="NSName">LucidaGrande</string>
+                                                                       <double key="NSSize">1.300000e+01</double>
+                                                                       <int key="NSfFlags">1044</int>
+                                                               </object>
+                                                               <object class="NSColor" key="NSBackgroundColor" id="406287577">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">textBackgroundColor</string>
+                                                                       <object class="NSColor" key="NSColor" id="45357611">
+                                                                               <int key="NSColorSpace">3</int>
+                                                                               <bytes key="NSWhite">MQA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSColor" key="NSTextColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSBorderType">3</int>
+                                                       <int key="NSBoxType">2</int>
+                                                       <int key="NSTitlePosition">0</int>
+                                                       <bool key="NSTransparent">NO</bool>
+                                               </object>
+                                               <object class="NSTextField" id="628196212">
+                                                       <reference key="NSNextResponder" ref="49161063"/>
+                                                       <int key="NSvFlags">290</int>
+                                                       <string key="NSFrame">{{17, 22}, {320, 17}}</string>
+                                                       <reference key="NSSuperview" ref="49161063"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="921881842">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">4194304</int>
+                                                               <string key="NSContents"/>
+                                                               <reference key="NSSupport" ref="1003998324"/>
+                                                               <reference key="NSControlView" ref="628196212"/>
+                                                               <object class="NSColor" key="NSBackgroundColor" id="407686733">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">controlColor</string>
+                                                                       <object class="NSColor" key="NSColor">
+                                                                               <int key="NSColorSpace">3</int>
+                                                                               <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSColor" key="NSTextColor" id="1053668690">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">controlTextColor</string>
+                                                                       <object class="NSColor" key="NSColor" id="590886446">
+                                                                               <int key="NSColorSpace">3</int>
+                                                                               <bytes key="NSWhite">MAA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="345100891">
+                                                       <reference key="NSNextResponder" ref="49161063"/>
+                                                       <int key="NSvFlags">289</int>
+                                                       <string key="NSFrame">{{339, 12}, {100, 32}}</string>
+                                                       <reference key="NSSuperview" ref="49161063"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="352183359">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">134217728</int>
+                                                               <string key="NSContents">Close</string>
+                                                               <reference key="NSSupport" ref="1003998324"/>
+                                                               <reference key="NSControlView" ref="345100891"/>
+                                                               <int key="NSButtonFlags">-2038284033</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <reference key="NSAlternateImage" ref="1003998324"/>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSBox" id="1064912113">
+                                                       <reference key="NSNextResponder" ref="49161063"/>
+                                                       <int key="NSvFlags">265</int>
+                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSView" id="114416973">
+                                                                       <reference key="NSNextResponder" ref="1064912113"/>
+                                                                       <int key="NSvFlags">256</int>
+                                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <object class="NSStepper" id="580805308">
+                                                                                       <reference key="NSNextResponder" ref="114416973"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{112, 65}, {19, 28}}</string>
+                                                                                       <reference key="NSSuperview" ref="114416973"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSStepperCell" key="NSCell" id="44321990">
+                                                                                               <int key="NSCellFlags">917024</int>
+                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                               <reference key="NSControlView" ref="580805308"/>
+                                                                                               <double key="NSMaxValue">5.900000e+01</double>
+                                                                                               <double key="NSIncrement">2.000000e+00</double>
+                                                                                               <bool key="NSAutorepeat">YES</bool>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSStepper" id="510144318">
+                                                                                       <reference key="NSNextResponder" ref="114416973"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{155, 35}, {19, 28}}</string>
+                                                                                       <reference key="NSSuperview" ref="114416973"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSStepperCell" key="NSCell" id="759792686">
+                                                                                               <int key="NSCellFlags">917024</int>
+                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                               <reference key="NSControlView" ref="510144318"/>
+                                                                                               <double key="NSMaxValue">5.900000e+01</double>
+                                                                                               <double key="NSIncrement">2.000000e+00</double>
+                                                                                               <bool key="NSAutorepeat">YES</bool>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSMatrix" id="1032624817">
+                                                                                       <reference key="NSNextResponder" ref="114416973"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{18, 96}, {77, 40}}</string>
+                                                                                       <reference key="NSSuperview" ref="114416973"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <int key="NSNumRows">2</int>
+                                                                                       <int key="NSNumCols">1</int>
+                                                                                       <object class="NSMutableArray" key="NSCells">
+                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                               <object class="NSButtonCell" id="660067650">
+                                                                                                       <int key="NSCellFlags">-2080244224</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <string key="NSContents">Automatic</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="1032624817"/>
+                                                                                                       <int key="NSButtonFlags">1211912703</int>
+                                                                                                       <int key="NSButtonFlags2">0</int>
+                                                                                                       <object class="NSButtonImageSource" key="NSAlternateImage" id="216523553">
+                                                                                                               <string key="NSImageName">NSRadioButton</string>
+                                                                                                       </object>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                               <characters key="NS.bytes"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSPeriodicDelay">200</int>
+                                                                                                       <int key="NSPeriodicInterval">25</int>
+                                                                                               </object>
+                                                                                               <object class="NSButtonCell" id="288116155">
+                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                       <int key="NSCellFlags2">131072</int>
+                                                                                                       <string key="NSContents">Custom:</string>
+                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                       <reference key="NSControlView" ref="1032624817"/>
+                                                                                                       <int key="NSButtonFlags">1211912703</int>
+                                                                                                       <int key="NSButtonFlags2">0</int>
+                                                                                                       <reference key="NSAlternateImage" ref="216523553"/>
+                                                                                                       <string key="NSAlternateContents"/>
+                                                                                                       <string key="NSKeyEquivalent"/>
+                                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <string key="NSCellSize">{77, 18}</string>
+                                                                                       <string key="NSIntercellSpacing">{4, 4}</string>
+                                                                                       <int key="NSMatrixFlags">1143472128</int>
+                                                                                       <string key="NSCellClass">NSActionCell</string>
+                                                                                       <object class="NSButtonCell" key="NSProtoCell" id="643930266">
+                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                               <string key="NSContents">Radio</string>
+                                                                                               <reference key="NSSupport" ref="1003998324"/>
+                                                                                               <int key="NSButtonFlags">1211912703</int>
+                                                                                               <int key="NSButtonFlags2">0</int>
+                                                                                               <object class="NSImage" key="NSNormalImage">
+                                                                                                       <int key="NSImageFlags">549453824</int>
+                                                                                                       <string key="NSSize">{18, 18}</string>
+                                                                                                       <object class="NSMutableArray" key="NSReps">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <object class="NSArray">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <integer value="0" id="8"/>
+                                                                                                                       <object class="NSBitmapImageRep">
+                                                                                                                               <object class="NSData" key="NSTIFFRepresentation">
+                                                                                                                                       <bytes key="NS.bytes">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
+AAAAAGB8AAA5DAAABbxYWVogAAAAAAAAb3IAALBfAAAciVhZWiAAAAAAAAAm6AAAFq8AALDfWFlaIAAA
+AAAAAPNSAAEAAAABFs9zZjMyAAAAAAABDEIAAAXe///zJgAAB5IAAP2R///7ov///aMAAAPcAADAbGN1
+cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAAD
+AQAAAgAAAB4AaQDaAV8B/ALQA9sFIAbTCNMLPA4EEJ8THxVuF6EZnxt9HT8e4CBzIf8jfCT7JnUn5ilV
+KsIsKS2QLvkwYjHTM0g0wTY3N544/TpWO6Y88D41P3ZAt0H6Qz1Eg0XERvhIIklLSmpLhUycTbBOxE/Z
+UPBSC1MpVFJVfFasV9tZClo1W1lcc12AXoVfgGBzYZJivGPrZR1mVGeIaMJp+msvbGJtj26qb5NwZ3FE
+citzGnQRdRF2F3cfeCh5L3o0ezx8Q31HfkZ/QoA4gSqCG4MMg/yE7oXihtaHyYi5iaaKkIt5jGGNS444
+jyiQG5EQkgWS9JPflMiVrJaPl22YS5krmgya8JvXnL6dnp52n0ugHqDuobuihqNSpB+k7qXAppKndKhb
+qUWqMasdrAes7q3RrquvfLBFsROx77Lcs860wbW6tq+3pbiauYu6e7tkvD+9Bb25vnO/NL/8wMvBo8KA
+w2DEQcUixgPG48fGyKPJfMpRyyPL8sy8zYbOTs8Wz97QpdFn0ifS59Oj1F7VGtXV1pTXVNgX2N3Zo9pj
+2yHb3tyV3U3eBN6733TgMODv4bLic+My4+/kpuVa5gzmuudo6BboxOl16ifq3euc7FTtA+2a7iXuoe8Y
+74bv+fCc8WLyRfMM84/0EfSM9Qr1lfYq9tb3qfiu+f78YP//AAAAFwBQAKcBGQGsAmkDWQR+BdsHiQl9
+C7gOGxCeExsVbReKGX8bQxzZHjsfkSDjIjwjmST8JlknvCkmKo0r8y1aLsEwJTGEMuA0PjWRNuM4NDl4
+Ors79D0sPls/i0C3Qd5DBEQgRUBGVkdqSHpJhkqPS5hMn02kTqhPqVCrUbJSxVPdVPJWBlcYWChZM1o+
+W0dcT11WXl5fY2BuYXZigWOQZJ9lr2bDZ85ox2m0ap9riWx0bWJuUG8+cC1xHnIQcwNz93TudeZ233fa
+eNh513rUe818u32dfnp/WoA9gSOCC4L0g9+EzIW5hqWHj4h6iWeKT4s3jByM/43gjsCPnpCKkW6SVpM7
+lB+VAJXflr2XmJhxmUiaHprzm8WclZ1mnjWfAp/PoJ+hcaJVoz2kJaUOpfam3afDqKipjKpwq1SsOK0b
+rfyu3q+/sKKxgrJks0W0I7T6tcu2mbdsuD+5E7npusG7nbx6vVm+Or8ewAPA6cHNwrjDnsSIxXPGWsc5
+yA/I48m3ypPLb8xNzSzODc7uz9DQr9GN0mfTPtQS1OTVr9Z31zvX/NjC2a3amtuH3HHdV9473xrf9ODP
+4aPic+M/5Ank0uWW5lnnHOfd6J3pXOoh6vTryeyS7VfuGu7X75TwT/EH8cTygfNB9AT00vWq9o/3hviV
++cn7Tv1t//8AAAAOADAAYwCnAPkBYwHcAoUDXgR4BdEHjQlsCzoM7g6KEA0RbBK7E/0VKRZMF2sYexmC
+GoYbjRyWHaIerR+5IMMhyyLPI9EkyiW8JqonlSh8KWEqRSsqLBEs+y3nLtQvvjCfMXkyUTMiM+40tzV/
+NkY3CzfUOJ85bjpFOyE8AjzlPcg+qj+HQGBBMEH3QrhDe0RSRTdGHkcIR/NI30nMSrhLoEyGTWdORE7p
+T41QM1DhUZZSUFMUU9tUpFVuVjdXAFfMWJpZZlowWvZbulx7XT1d/l7BX4VgTGETYdlinWNeZBxk2WWW
+ZlJnEmfUaJdpXWogat9rnGxXbQ9txm5+bzdv8nCwcXFyNnL4c7Z0cHUkddd2hncyd914iHk0eeJ6kntF
+fAZ8z32bfmp/O4ALgNmBo4JmgyGD14SJhVmGMIcNh+yIzomxipSLeIxXjTWOD47Yj42QJJC9kV6SB5K0
+k2qUJJThlaCWX5cfl+SYrJlzmjea+Zu5nHedNZ30nrSfdaA5oP6hxaKLo1GkFqTbpaGmaac2qAao2qmy
+qo6raqxErR6t967Tr7CwkLF4smSzV7RPtUi2PrcxuCC5CrnwutS7trycvYC+Z79SwEHBOMI0wzTENsU5
+xjrHOMgyySbKFMr6y+DNLc6p0EjSDtQN1mPZFtxo4Ijlxuzn933//wAAbmRpbgAAAAAAAAY2AACX6QAA
+W1AAAFSbAACOVgAAJ6QAABVgAABQDQAAVDkAAlwoAAIhRwABRR4AAwEAAAIAAAAaADgAUgBpAH8AkQCj
+ALQAxADTAOIA8AD+AQwBGwEsATwBTgFgAXQBiAGeAbQBzAHmAgICHwI+Al8CggKoAs8C+AMiA08DfAOr
+A9sEDQRBBHYErATkBR4FWQWUBdEGDwZNBosGygcJB0oHjAfRCBkIYwivCP4JTwmjCfkKUQqrCwULYQu+
+DBsMegzdDUYNsg4gDpMPCQ+CD/8QfRD9EX4SABKBEwMTgRQBFIAVABWCFgUWjBcYF6kYQhjiGYoaPRrV
+G2kb/ByOHSEdsx5IHtsfcCAHIKEhPSHdIoAjTiQ4JRol9CbHJ5UoXikmKe4qtyuFLFUtJC32Ls0vqTCL
+MXQyYjNTNEY1OzYuNyQ4GzkYOho7IjwtPTs+ST9UQF5BZ0JuQ31ElUWxRtZIAEkxSmVLmEzKTfpPKVBl
+Ua9TAFRaVbxXJliQWfpbYFzGXhVfXmClYexjNmSHZd9nS2jIalxr1G0sbn5v0HEccm5zwHUWdnR31nlF
+ett8uX6LgEWB7oOGhRaGoogwicCLVIzljoOQK5Hfk5+VbJc+mRWa8JzPnsGgt6K7pMOmz6jSqtOsyq7E
+sNSy7bUXt0O5drugvcG/2cH4xCfGaMi8yyPNjM/60l/Uutb22V/cOt/A47bmauhQ6mLtyfFy9LX3XPlz
++xH8Yf0t/fj+iv8G/4P//wAAACIAQgBdAHYAjQCjALcAygDdAO4BAAERASIBNAFFAVcBaQF8AY8BpAG5
+AdAB6QIDAh8CPQJeAoICqQLXAwYDOANrA54D0gQHBDwEdASsBOUFHgVZBZQF0gYQBk8GkAbSBxYHXAej
+B+sINgiDCNEJIQl1CcoKIgp+CtsLPAueDAIMagzUDUANsg4jDpoPEw+QEBAQlBEaEaISLhK7E00T4BR1
+FQQVkBYfFrEXRRfbGHUZExmyGlUa+huhHEkc9R2fHk0e+h+nIFUhBSGzImMjIiPyJMYlniZ3J08oKSkG
+KeMqwCufLH4tXi49Lx4v/zDfMb8yojOINHk1fjaMN5c4ojmpOrM7vDzDPc0+2j/rQP1CDkMqREVFaEaQ
+R7xI70oQSz1MZ02YTs1QClFJUpFT3VUwVoZX5FlIWq5cGl2NXv1gaWG1YwVkVGWnZvxoVmm0axVsd23d
+b0RwsXIfc5F1A3Z6d/B5a3rzfI9+Mn/OgWyDCYSjhjmHzIleiu2Meo4Hj5mRIZK0lEKVzpdomR2a3Zyf
+nlGgBaG3o2qlGqbNqIaqRawQreSvwrGys621v7fGuXK7Jrzbvp3AY8I3xBnF/sf0yfnMC84k0E7Se9Sw
+1u3ZLNs63UXfduGy5AXmXOjF6yTtfu/S8gT0F/YK99H5b/rf/Bb9Bv3d/p3/Tv//AAAAOQBtAJQAtADQ
+AOoBAAEWASwBQwFcAXcBkwGxAdIB9QIcAkYCcwKjAtgDEANKA4kDzQQVBF4EqQT1BUMFkwXlBjoGkgbt
+B0sHsAgZCIcI+QlvCekKZQriC2AL3wxgDOcNeA4ODqwPUQ/9EK0RYRIVEsoTeRQmFNEVfhYtFuIXnhhl
+GTkaHBrnG6ccZx0nHegeqx9vIDkhByHcIrgj5yUVJjQnSChRKVgqXitqLHgtgi6RL6cwxjHtMxg0RTVz
+Np43zTkAOj47gzzOPh0/aECyQfpDSESmRgpHd0joSlpLx00wTpRQAVGCUw9UqlZTWAJZslteXQNegl/6
+YW5i4WRbZdxnc2kfauVsa23gb1FwvnIsc5p1CnaDeAF5jHtmfaV/wIG+g6SFfYdRiSeK+oy/jouQYZJB
+lCqWFpgAmeqbz52wn5WhfaNspVmnQqkgqvesxK6MsFSyJLP3tci3l7lhux280L55wBzBwsNwxSbG6Mi0
+yorMZM460BTR59O21XnXL9jg2o/cO93p35/hW+Mk5Pnm4ujf6kPrfOyh7bnuwu+/8Kjxi/JV8xjzzvR2
+9R/1r/Y59sT3QPev+B/4jvjz+Ur5ovn5+lD6pPrk+yT7Zful++b8Jvxm/JH8vfzo/RP9P/1q/ZX9wf3s
+/hj+SP5//rb+7P8j/1r/kf/I//8AAGRlc2MAAAAAAAAACkNvbG9yIExDRAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AABtbHVjAAAAAAAAAAIAAAAMZW5VUwAAABIAAAAoaXRJVAAAABQAAAA6AEMAbwBsAG8AcgAgAEwAQwBE
+AEwAQwBEACAAYwBvAGwAbwByAGkAAG1tb2QAAAAAAAAGEAAAnGgAAAAAwhEOAAAAAAAAAAAAAAAAAAAA
+AAB0ZXh0AAAAAENvcHlyaWdodCBBcHBsZSBDb21wdXRlciwgSW5jLiwgMjAwNQAAAAA</bytes>
+                                                                                                                               </object>
+                                                                                                                       </object>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <object class="NSColor" key="NSColor">
+                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                               <bytes key="NSWhite">MCAwAA</bytes>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <reference key="NSAlternateImage" ref="216523553"/>
+                                                                                               <int key="NSPeriodicDelay">400</int>
+                                                                                               <int key="NSPeriodicInterval">75</int>
+                                                                                       </object>
+                                                                                       <reference key="NSSelectedCell" ref="660067650"/>
+                                                                                       <reference key="NSBackgroundColor" ref="407686733"/>
+                                                                                       <reference key="NSCellBackgroundColor" ref="45357611"/>
+                                                                                       <reference key="NSFont" ref="1003998324"/>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="897162141">
+                                                                                       <reference key="NSNextResponder" ref="114416973"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{54, 69}, {56, 19}}</string>
+                                                                                       <reference key="NSSuperview" ref="114416973"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="936113070">
+                                                                                               <int key="NSCellFlags">-2075001280</int>
+                                                                                               <int key="NSCellFlags2">4195328</int>
+                                                                                               <string key="NSContents"/>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="897162141"/>
+                                                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                                                               <reference key="NSBackgroundColor" ref="406287577"/>
+                                                                                               <object class="NSColor" key="NSTextColor" id="446986434">
+                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                       <string key="NSCatalogName">System</string>
+                                                                                                       <string key="NSColorName">textColor</string>
+                                                                                                       <reference key="NSColor" ref="590886446"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="773085513">
+                                                                                       <reference key="NSNextResponder" ref="114416973"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{54, 10}, {56, 19}}</string>
+                                                                                       <reference key="NSSuperview" ref="114416973"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="634956024">
+                                                                                               <int key="NSCellFlags">-2075001280</int>
+                                                                                               <int key="NSCellFlags2">4195328</int>
+                                                                                               <string key="NSContents"/>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="773085513"/>
+                                                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                                                               <reference key="NSBackgroundColor" ref="406287577"/>
+                                                                                               <reference key="NSTextColor" ref="446986434"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSStepper" id="1067684983">
+                                                                                       <reference key="NSNextResponder" ref="114416973"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{76, 35}, {19, 28}}</string>
+                                                                                       <reference key="NSSuperview" ref="114416973"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSStepperCell" key="NSCell" id="996643427">
+                                                                                               <int key="NSCellFlags">917024</int>
+                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                               <reference key="NSControlView" ref="1067684983"/>
+                                                                                               <double key="NSMaxValue">5.900000e+01</double>
+                                                                                               <double key="NSIncrement">2.000000e+00</double>
+                                                                                               <bool key="NSAutorepeat">YES</bool>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="411931143">
+                                                                                       <reference key="NSNextResponder" ref="114416973"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{97, 40}, {56, 19}}</string>
+                                                                                       <reference key="NSSuperview" ref="114416973"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="1050606643">
+                                                                                               <int key="NSCellFlags">-2075001280</int>
+                                                                                               <int key="NSCellFlags2">4195328</int>
+                                                                                               <string key="NSContents"/>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="411931143"/>
+                                                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                                                               <reference key="NSBackgroundColor" ref="406287577"/>
+                                                                                               <reference key="NSTextColor" ref="446986434"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="842452881">
+                                                                                       <reference key="NSNextResponder" ref="114416973"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{18, 40}, {56, 19}}</string>
+                                                                                       <reference key="NSSuperview" ref="114416973"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="904241294">
+                                                                                               <int key="NSCellFlags">-2075001280</int>
+                                                                                               <int key="NSCellFlags2">4195328</int>
+                                                                                               <string key="NSContents"/>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="842452881"/>
+                                                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                                                               <reference key="NSBackgroundColor" ref="406287577"/>
+                                                                                               <reference key="NSTextColor" ref="446986434"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSStepper" id="133033963">
+                                                                                       <reference key="NSNextResponder" ref="114416973"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{113, 5}, {19, 28}}</string>
+                                                                                       <reference key="NSSuperview" ref="114416973"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSStepperCell" key="NSCell" id="71578223">
+                                                                                               <int key="NSCellFlags">917024</int>
+                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                               <reference key="NSControlView" ref="133033963"/>
+                                                                                               <double key="NSMaxValue">5.900000e+01</double>
+                                                                                               <double key="NSIncrement">2.000000e+00</double>
+                                                                                               <bool key="NSAutorepeat">YES</bool>
+                                                                                       </object>
+                                                                               </object>
+                                                                       </object>
+                                                                       <string key="NSFrame">{{2, 2}, {189, 146}}</string>
+                                                                       <reference key="NSSuperview" ref="1064912113"/>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSFrame">{{243, 235}, {193, 163}}</string>
+                                                       <reference key="NSSuperview" ref="49161063"/>
+                                                       <string key="NSOffsets">{0, 0}</string>
+                                                       <object class="NSTextFieldCell" key="NSTitleCell">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">0</int>
+                                                               <string key="NSContents">Crop</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSBackgroundColor" ref="406287577"/>
+                                                               <object class="NSColor" key="NSTextColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <reference key="NSContentView" ref="114416973"/>
+                                                       <int key="NSBorderType">3</int>
+                                                       <int key="NSBoxType">0</int>
+                                                       <int key="NSTitlePosition">2</int>
+                                                       <bool key="NSTransparent">NO</bool>
+                                               </object>
+                                               <object class="NSBox" id="1011917013">
+                                                       <reference key="NSNextResponder" ref="49161063"/>
+                                                       <int key="NSvFlags">265</int>
+                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSView" id="278260513">
+                                                                       <reference key="NSNextResponder" ref="1011917013"/>
+                                                                       <int key="NSvFlags">256</int>
+                                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <object class="NSTextField" id="513894170">
+                                                                                       <reference key="NSNextResponder" ref="278260513"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{14, 64}, {55, 14}}</string>
+                                                                                       <reference key="NSSuperview" ref="278260513"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="863668536">
+                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                               <int key="NSCellFlags2">71303168</int>
+                                                                                               <string key="NSContents">Height:</string>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="513894170"/>
+                                                                                               <reference key="NSBackgroundColor" ref="407686733"/>
+                                                                                               <reference key="NSTextColor" ref="1053668690"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="443002022">
+                                                                                       <reference key="NSNextResponder" ref="278260513"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{77, 62}, {62, 19}}</string>
+                                                                                       <reference key="NSSuperview" ref="278260513"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="649389918">
+                                                                                               <int key="NSCellFlags">-2075001280</int>
+                                                                                               <int key="NSCellFlags2">4195328</int>
+                                                                                               <string key="NSContents"/>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="443002022"/>
+                                                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                                                               <reference key="NSBackgroundColor" ref="406287577"/>
+                                                                                               <reference key="NSTextColor" ref="446986434"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSButton" id="302614967">
+                                                                                       <reference key="NSNextResponder" ref="278260513"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{7, 36}, {152, 18}}</string>
+                                                                                       <reference key="NSSuperview" ref="278260513"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSButtonCell" key="NSCell" id="595088069">
+                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                               <int key="NSCellFlags2">67239936</int>
+                                                                                               <string key="NSContents">Keep aspect ratio:</string>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="302614967"/>
+                                                                                               <int key="NSButtonFlags">1210864127</int>
+                                                                                               <int key="NSButtonFlags2">2</int>
+                                                                                               <object class="NSButtonImageSource" key="NSAlternateImage" id="931738615">
+                                                                                                       <string key="NSImageName">NSSwitch</string>
+                                                                                               </object>
+                                                                                               <string key="NSAlternateContents"/>
+                                                                                               <string key="NSKeyEquivalent"/>
+                                                                                               <int key="NSPeriodicDelay">200</int>
+                                                                                               <int key="NSPeriodicInterval">25</int>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSStepper" id="667015191">
+                                                                                       <reference key="NSNextResponder" ref="278260513"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{141, 57}, {19, 28}}</string>
+                                                                                       <reference key="NSSuperview" ref="278260513"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSStepperCell" key="NSCell" id="634499157">
+                                                                                               <int key="NSCellFlags">917024</int>
+                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                               <reference key="NSControlView" ref="667015191"/>
+                                                                                               <double key="NSValue">5.900000e+01</double>
+                                                                                               <double key="NSMinValue">6.400000e+01</double>
+                                                                                               <double key="NSMaxValue">5.900000e+01</double>
+                                                                                               <double key="NSIncrement">1.600000e+01</double>
+                                                                                               <bool key="NSAutorepeat">YES</bool>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="569671425">
+                                                                                       <reference key="NSNextResponder" ref="278260513"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{14, 91}, {55, 14}}</string>
+                                                                                       <reference key="NSSuperview" ref="278260513"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="412868245">
+                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                               <int key="NSCellFlags2">71303168</int>
+                                                                                               <string key="NSContents">Width:</string>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="569671425"/>
+                                                                                               <reference key="NSBackgroundColor" ref="407686733"/>
+                                                                                               <reference key="NSTextColor" ref="1053668690"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="232869468">
+                                                                                       <reference key="NSNextResponder" ref="278260513"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{77, 89}, {62, 19}}</string>
+                                                                                       <reference key="NSSuperview" ref="278260513"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="96315080">
+                                                                                               <int key="NSCellFlags">-2075001280</int>
+                                                                                               <int key="NSCellFlags2">4195328</int>
+                                                                                               <string key="NSContents"/>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="232869468"/>
+                                                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                                                               <reference key="NSBackgroundColor" ref="406287577"/>
+                                                                                               <reference key="NSTextColor" ref="446986434"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSStepper" id="221469578">
+                                                                                       <reference key="NSNextResponder" ref="278260513"/>
+                                                                                       <int key="NSvFlags">292</int>
+                                                                                       <string key="NSFrame">{{141, 84}, {19, 28}}</string>
+                                                                                       <reference key="NSSuperview" ref="278260513"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSStepperCell" key="NSCell" id="714433793">
+                                                                                               <int key="NSCellFlags">917024</int>
+                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                               <reference key="NSControlView" ref="221469578"/>
+                                                                                               <double key="NSValue">6.400000e+01</double>
+                                                                                               <double key="NSMinValue">6.400000e+01</double>
+                                                                                               <double key="NSMaxValue">5.900000e+01</double>
+                                                                                               <double key="NSIncrement">1.600000e+01</double>
+                                                                                               <bool key="NSAutorepeat">YES</bool>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSPopUpButton" id="147098438">
+                                                                                       <reference key="NSNextResponder" ref="278260513"/>
+                                                                                       <int key="NSvFlags">268</int>
+                                                                                       <string key="NSFrame">{{82, 16}, {100, 15}}</string>
+                                                                                       <reference key="NSSuperview" ref="278260513"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSPopUpButtonCell" key="NSCell" id="261514411">
+                                                                                               <int key="NSCellFlags">-2076049856</int>
+                                                                                               <int key="NSCellFlags2">264192</int>
+                                                                                               <object class="NSFont" key="NSSupport" id="22">
+                                                                                                       <string key="NSName">LucidaGrande</string>
+                                                                                                       <double key="NSSize">9.000000e+00</double>
+                                                                                                       <int key="NSfFlags">3614</int>
+                                                                                               </object>
+                                                                                               <reference key="NSControlView" ref="147098438"/>
+                                                                                               <int key="NSButtonFlags">109199615</int>
+                                                                                               <int key="NSButtonFlags2">1</int>
+                                                                                               <string key="NSAlternateContents"/>
+                                                                                               <string key="NSKeyEquivalent"/>
+                                                                                               <int key="NSPeriodicDelay">400</int>
+                                                                                               <int key="NSPeriodicInterval">75</int>
+                                                                                               <object class="NSMenuItem" key="NSMenuItem" id="85032843">
+                                                                                                       <reference key="NSMenu" ref="577969360"/>
+                                                                                                       <string key="NSTitle">Item 1</string>
+                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                       <int key="NSState">1</int>
+                                                                                                       <object class="NSCustomResource" key="NSOnImage" id="315488983">
+                                                                                                               <string key="NSClassName">NSImage</string>
+                                                                                                               <string key="NSResourceName">NSMenuCheckmark</string>
+                                                                                                       </object>
+                                                                                                       <object class="NSCustomResource" key="NSMixedImage" id="216289096">
+                                                                                                               <string key="NSClassName">NSImage</string>
+                                                                                                               <string key="NSResourceName">NSMenuMixedState</string>
+                                                                                                       </object>
+                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                       <reference key="NSTarget" ref="261514411"/>
+                                                                                               </object>
+                                                                                               <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                               <object class="NSMenu" key="NSMenu" id="577969360">
+                                                                                                       <string key="NSTitle">OtherViews</string>
+                                                                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <reference ref="85032843"/>
+                                                                                                               <object class="NSMenuItem" id="804424712">
+                                                                                                                       <reference key="NSMenu" ref="577969360"/>
+                                                                                                                       <string key="NSTitle">Item 2</string>
+                                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                                       <reference key="NSOnImage" ref="315488983"/>
+                                                                                                                       <reference key="NSMixedImage" ref="216289096"/>
+                                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                                       <reference key="NSTarget" ref="261514411"/>
+                                                                                                               </object>
+                                                                                                               <object class="NSMenuItem" id="1018195923">
+                                                                                                                       <reference key="NSMenu" ref="577969360"/>
+                                                                                                                       <string key="NSTitle">Item 3</string>
+                                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                                       <reference key="NSOnImage" ref="315488983"/>
+                                                                                                                       <reference key="NSMixedImage" ref="216289096"/>
+                                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                                       <reference key="NSTarget" ref="261514411"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <int key="NSPreferredEdge">1</int>
+                                                                                               <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                               <bool key="NSAltersState">YES</bool>
+                                                                                               <int key="NSArrowPosition">2</int>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="301555397">
+                                                                                       <reference key="NSNextResponder" ref="278260513"/>
+                                                                                       <int key="NSvFlags">268</int>
+                                                                                       <string key="NSFrame">{{7, 15}, {73, 14}}</string>
+                                                                                       <reference key="NSSuperview" ref="278260513"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="926890760">
+                                                                                               <int key="NSCellFlags">67239488</int>
+                                                                                               <int key="NSCellFlags2">272761856</int>
+                                                                                               <string key="NSContents">Anamorphic:</string>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="301555397"/>
+                                                                                               <reference key="NSBackgroundColor" ref="407686733"/>
+                                                                                               <reference key="NSTextColor" ref="1053668690"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                       </object>
+                                                                       <string key="NSFrame">{{2, 2}, {189, 119}}</string>
+                                                                       <reference key="NSSuperview" ref="1011917013"/>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSFrame">{{245, 402}, {193, 136}}</string>
+                                                       <reference key="NSSuperview" ref="49161063"/>
+                                                       <string key="NSOffsets">{0, 0}</string>
+                                                       <object class="NSTextFieldCell" key="NSTitleCell">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">0</int>
+                                                               <string key="NSContents">Size</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSBackgroundColor" ref="406287577"/>
+                                                               <object class="NSColor" key="NSTextColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <reference key="NSContentView" ref="278260513"/>
+                                                       <int key="NSBorderType">3</int>
+                                                       <int key="NSBoxType">0</int>
+                                                       <int key="NSTitlePosition">2</int>
+                                                       <bool key="NSTransparent">NO</bool>
+                                               </object>
+                                               <object class="NSBox" id="309105014">
+                                                       <reference key="NSNextResponder" ref="49161063"/>
+                                                       <int key="NSvFlags">265</int>
+                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSView" id="628081139">
+                                                                       <reference key="NSNextResponder" ref="309105014"/>
+                                                                       <int key="NSvFlags">256</int>
+                                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <object class="NSPopUpButton" id="346912008">
+                                                                                       <reference key="NSNextResponder" ref="628081139"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{73, 79}, {110, 15}}</string>
+                                                                                       <reference key="NSSuperview" ref="628081139"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSPopUpButtonCell" key="NSCell" id="1034367716">
+                                                                                               <int key="NSCellFlags">-2076049856</int>
+                                                                                               <int key="NSCellFlags2">264192</int>
+                                                                                               <reference key="NSSupport" ref="22"/>
+                                                                                               <reference key="NSControlView" ref="346912008"/>
+                                                                                               <int key="NSButtonFlags">109199615</int>
+                                                                                               <int key="NSButtonFlags2">1</int>
+                                                                                               <object class="NSFont" key="NSAlternateImage" id="826709342">
+                                                                                                       <string key="NSName">LucidaGrande</string>
+                                                                                                       <double key="NSSize">9.000000e+00</double>
+                                                                                                       <int key="NSfFlags">16</int>
+                                                                                               </object>
+                                                                                               <string key="NSAlternateContents"/>
+                                                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                       <characters key="NS.bytes"/>
+                                                                                               </object>
+                                                                                               <int key="NSPeriodicDelay">400</int>
+                                                                                               <int key="NSPeriodicInterval">75</int>
+                                                                                               <object class="NSMenuItem" key="NSMenuItem" id="937797455">
+                                                                                                       <reference key="NSMenu" ref="132523332"/>
+                                                                                                       <string key="NSTitle">Item1</string>
+                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                       <int key="NSState">1</int>
+                                                                                                       <reference key="NSOnImage" ref="315488983"/>
+                                                                                                       <reference key="NSMixedImage" ref="216289096"/>
+                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                       <reference key="NSTarget" ref="1034367716"/>
+                                                                                               </object>
+                                                                                               <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                               <object class="NSMenu" key="NSMenu" id="132523332">
+                                                                                                       <object class="NSMutableString" key="NSTitle">
+                                                                                                               <characters key="NS.bytes">OtherViews</characters>
+                                                                                                       </object>
+                                                                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <reference ref="937797455"/>
+                                                                                                               <object class="NSMenuItem" id="71282261">
+                                                                                                                       <reference key="NSMenu" ref="132523332"/>
+                                                                                                                       <string key="NSTitle">Item2</string>
+                                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                                       <reference key="NSOnImage" ref="315488983"/>
+                                                                                                                       <reference key="NSMixedImage" ref="216289096"/>
+                                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                                       <reference key="NSTarget" ref="1034367716"/>
+                                                                                                               </object>
+                                                                                                               <object class="NSMenuItem" id="542784764">
+                                                                                                                       <reference key="NSMenu" ref="132523332"/>
+                                                                                                                       <string key="NSTitle">Item3</string>
+                                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                                       <reference key="NSOnImage" ref="315488983"/>
+                                                                                                                       <reference key="NSMixedImage" ref="216289096"/>
+                                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                                       <reference key="NSTarget" ref="1034367716"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <int key="NSPreferredEdge">3</int>
+                                                                                               <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                               <bool key="NSAltersState">YES</bool>
+                                                                                               <int key="NSArrowPosition">1</int>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="905607845">
+                                                                                       <reference key="NSNextResponder" ref="628081139"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{2, 77}, {68, 17}}</string>
+                                                                                       <reference key="NSSuperview" ref="628081139"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="522867811">
+                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                               <int key="NSCellFlags2">71303168</int>
+                                                                                               <string key="NSContents">Deinterlace:</string>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="905607845"/>
+                                                                                               <reference key="NSBackgroundColor" ref="407686733"/>
+                                                                                               <reference key="NSTextColor" ref="1053668690"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSButton" id="407610327">
+                                                                                       <reference key="NSNextResponder" ref="628081139"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{6, 100}, {82, 18}}</string>
+                                                                                       <reference key="NSSuperview" ref="628081139"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSButtonCell" key="NSCell" id="832714893">
+                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                               <int key="NSCellFlags2">67239936</int>
+                                                                                               <string key="NSContents">Detelecine:</string>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="407610327"/>
+                                                                                               <int key="NSButtonFlags">1210864127</int>
+                                                                                               <int key="NSButtonFlags2">2</int>
+                                                                                               <reference key="NSAlternateImage" ref="931738615"/>
+                                                                                               <string key="NSAlternateContents"/>
+                                                                                               <string key="NSKeyEquivalent"/>
+                                                                                               <int key="NSPeriodicDelay">200</int>
+                                                                                               <int key="NSPeriodicInterval">25</int>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSPopUpButton" id="243795165">
+                                                                                       <reference key="NSNextResponder" ref="628081139"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{74, 54}, {109, 15}}</string>
+                                                                                       <reference key="NSSuperview" ref="628081139"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSPopUpButtonCell" key="NSCell" id="708528272">
+                                                                                               <int key="NSCellFlags">-2076049856</int>
+                                                                                               <int key="NSCellFlags2">264192</int>
+                                                                                               <reference key="NSSupport" ref="22"/>
+                                                                                               <reference key="NSControlView" ref="243795165"/>
+                                                                                               <int key="NSButtonFlags">109199615</int>
+                                                                                               <int key="NSButtonFlags2">1</int>
+                                                                                               <reference key="NSAlternateImage" ref="826709342"/>
+                                                                                               <string key="NSAlternateContents"/>
+                                                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                       <characters key="NS.bytes"/>
+                                                                                               </object>
+                                                                                               <int key="NSPeriodicDelay">400</int>
+                                                                                               <int key="NSPeriodicInterval">75</int>
+                                                                                               <object class="NSMenuItem" key="NSMenuItem" id="114494573">
+                                                                                                       <reference key="NSMenu" ref="176321383"/>
+                                                                                                       <string key="NSTitle">Item1</string>
+                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                       <int key="NSState">1</int>
+                                                                                                       <reference key="NSOnImage" ref="315488983"/>
+                                                                                                       <reference key="NSMixedImage" ref="216289096"/>
+                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                       <reference key="NSTarget" ref="708528272"/>
+                                                                                               </object>
+                                                                                               <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                               <object class="NSMenu" key="NSMenu" id="176321383">
+                                                                                                       <object class="NSMutableString" key="NSTitle">
+                                                                                                               <characters key="NS.bytes">OtherViews</characters>
+                                                                                                       </object>
+                                                                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <reference ref="114494573"/>
+                                                                                                               <object class="NSMenuItem" id="750998660">
+                                                                                                                       <reference key="NSMenu" ref="176321383"/>
+                                                                                                                       <string key="NSTitle">Item2</string>
+                                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                                       <reference key="NSOnImage" ref="315488983"/>
+                                                                                                                       <reference key="NSMixedImage" ref="216289096"/>
+                                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                                       <reference key="NSTarget" ref="708528272"/>
+                                                                                                               </object>
+                                                                                                               <object class="NSMenuItem" id="133285043">
+                                                                                                                       <reference key="NSMenu" ref="176321383"/>
+                                                                                                                       <string key="NSTitle">Item3</string>
+                                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                                       <reference key="NSOnImage" ref="315488983"/>
+                                                                                                                       <reference key="NSMixedImage" ref="216289096"/>
+                                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                                       <reference key="NSTarget" ref="708528272"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <int key="NSPreferredEdge">3</int>
+                                                                                               <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                               <bool key="NSAltersState">YES</bool>
+                                                                                               <int key="NSArrowPosition">1</int>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="94419441">
+                                                                                       <reference key="NSNextResponder" ref="628081139"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{19, 53}, {51, 17}}</string>
+                                                                                       <reference key="NSSuperview" ref="628081139"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="741873280">
+                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                               <int key="NSCellFlags2">71303168</int>
+                                                                                               <string key="NSContents">Denoise:</string>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="94419441"/>
+                                                                                               <reference key="NSBackgroundColor" ref="407686733"/>
+                                                                                               <reference key="NSTextColor" ref="1053668690"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="1069536323">
+                                                                                       <reference key="NSNextResponder" ref="628081139"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{10, 31}, {51, 17}}</string>
+                                                                                       <reference key="NSSuperview" ref="628081139"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="728722104">
+                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                               <int key="NSCellFlags2">71303168</int>
+                                                                                               <string key="NSContents">Deblock:</string>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="1069536323"/>
+                                                                                               <reference key="NSBackgroundColor" ref="407686733"/>
+                                                                                               <reference key="NSTextColor" ref="1053668690"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="314638156">
+                                                                                       <reference key="NSNextResponder" ref="628081139"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{56, 33}, {31, 14}}</string>
+                                                                                       <reference key="NSSuperview" ref="628081139"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="350598908">
+                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                               <int key="NSCellFlags2">138543104</int>
+                                                                                               <string key="NSContents">Off</string>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="314638156"/>
+                                                                                               <reference key="NSBackgroundColor" ref="407686733"/>
+                                                                                               <reference key="NSTextColor" ref="1053668690"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSPopUpButton" id="878291110">
+                                                                                       <reference key="NSNextResponder" ref="628081139"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{75, 9}, {110, 15}}</string>
+                                                                                       <reference key="NSSuperview" ref="628081139"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSPopUpButtonCell" key="NSCell" id="162356603">
+                                                                                               <int key="NSCellFlags">-2076049856</int>
+                                                                                               <int key="NSCellFlags2">264192</int>
+                                                                                               <reference key="NSSupport" ref="22"/>
+                                                                                               <reference key="NSControlView" ref="878291110"/>
+                                                                                               <int key="NSButtonFlags">109199615</int>
+                                                                                               <int key="NSButtonFlags2">1</int>
+                                                                                               <reference key="NSAlternateImage" ref="826709342"/>
+                                                                                               <string key="NSAlternateContents"/>
+                                                                                               <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                                       <characters key="NS.bytes"/>
+                                                                                               </object>
+                                                                                               <int key="NSPeriodicDelay">400</int>
+                                                                                               <int key="NSPeriodicInterval">75</int>
+                                                                                               <object class="NSMenuItem" key="NSMenuItem" id="170535567">
+                                                                                                       <reference key="NSMenu" ref="146867052"/>
+                                                                                                       <string key="NSTitle">Item1</string>
+                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                       <int key="NSState">1</int>
+                                                                                                       <reference key="NSOnImage" ref="315488983"/>
+                                                                                                       <reference key="NSMixedImage" ref="216289096"/>
+                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                       <reference key="NSTarget" ref="162356603"/>
+                                                                                               </object>
+                                                                                               <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                               <object class="NSMenu" key="NSMenu" id="146867052">
+                                                                                                       <object class="NSMutableString" key="NSTitle">
+                                                                                                               <characters key="NS.bytes">OtherViews</characters>
+                                                                                                       </object>
+                                                                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <reference ref="170535567"/>
+                                                                                                               <object class="NSMenuItem" id="226508779">
+                                                                                                                       <reference key="NSMenu" ref="146867052"/>
+                                                                                                                       <string key="NSTitle">Item2</string>
+                                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                                       <reference key="NSOnImage" ref="315488983"/>
+                                                                                                                       <reference key="NSMixedImage" ref="216289096"/>
+                                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                                       <reference key="NSTarget" ref="162356603"/>
+                                                                                                               </object>
+                                                                                                               <object class="NSMenuItem" id="43352374">
+                                                                                                                       <reference key="NSMenu" ref="146867052"/>
+                                                                                                                       <string key="NSTitle">Item3</string>
+                                                                                                                       <string key="NSKeyEquiv"/>
+                                                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                                       <reference key="NSOnImage" ref="315488983"/>
+                                                                                                                       <reference key="NSMixedImage" ref="216289096"/>
+                                                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                                                       <reference key="NSTarget" ref="162356603"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <int key="NSPreferredEdge">3</int>
+                                                                                               <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                               <bool key="NSAltersState">YES</bool>
+                                                                                               <int key="NSArrowPosition">1</int>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSTextField" id="742513844">
+                                                                                       <reference key="NSNextResponder" ref="628081139"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{18, 7}, {52, 17}}</string>
+                                                                                       <reference key="NSSuperview" ref="628081139"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTextFieldCell" key="NSCell" id="604349861">
+                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                               <int key="NSCellFlags2">71303168</int>
+                                                                                               <string key="NSContents">Decomb:</string>
+                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                               <reference key="NSControlView" ref="742513844"/>
+                                                                                               <reference key="NSBackgroundColor" ref="407686733"/>
+                                                                                               <reference key="NSTextColor" ref="1053668690"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <object class="NSSlider" id="581126685">
+                                                                                       <reference key="NSNextResponder" ref="628081139"/>
+                                                                                       <int key="NSvFlags">268</int>
+                                                                                       <string key="NSFrame">{{88, 31}, {96, 16}}</string>
+                                                                                       <reference key="NSSuperview" ref="628081139"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSSliderCell" key="NSCell" id="257047106">
+                                                                                               <int key="NSCellFlags">-2079981824</int>
+                                                                                               <int key="NSCellFlags2">262144</int>
+                                                                                               <string key="NSContents"/>
+                                                                                               <reference key="NSSupport" ref="22"/>
+                                                                                               <reference key="NSControlView" ref="581126685"/>
+                                                                                               <double key="NSMaxValue">1.500000e+01</double>
+                                                                                               <double key="NSMinValue">4.000000e+00</double>
+                                                                                               <double key="NSValue">4.000000e+00</double>
+                                                                                               <double key="NSAltIncValue">0.000000e+00</double>
+                                                                                               <int key="NSNumberOfTickMarks">12</int>
+                                                                                               <int key="NSTickMarkPosition">0</int>
+                                                                                               <bool key="NSAllowsTickMarkValuesOnly">YES</bool>
+                                                                                               <bool key="NSVertical">NO</bool>
+                                                                                       </object>
+                                                                               </object>
+                                                                       </object>
+                                                                       <string key="NSFrame">{{2, 2}, {189, 127}}</string>
+                                                                       <reference key="NSSuperview" ref="309105014"/>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSFrame">{{243, 87}, {193, 144}}</string>
+                                                       <reference key="NSSuperview" ref="49161063"/>
+                                                       <string key="NSOffsets">{0, 0}</string>
+                                                       <object class="NSTextFieldCell" key="NSTitleCell">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">0</int>
+                                                               <string key="NSContents">Filters</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSBackgroundColor" ref="406287577"/>
+                                                               <object class="NSColor" key="NSTextColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <reference key="NSContentView" ref="628081139"/>
+                                                       <int key="NSBorderType">3</int>
+                                                       <int key="NSBoxType">0</int>
+                                                       <int key="NSTitlePosition">2</int>
+                                                       <bool key="NSTransparent">NO</bool>
+                                               </object>
+                                               <object class="NSBox" id="208214895">
+                                                       <reference key="NSNextResponder" ref="49161063"/>
+                                                       <int key="NSvFlags">-2147483374</int>
+                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSView" id="982902210">
+                                                                       <reference key="NSNextResponder" ref="208214895"/>
+                                                                       <int key="NSvFlags">256</int>
+                                                                       <string key="NSFrameSize">{208, 451}</string>
+                                                                       <reference key="NSSuperview" ref="208214895"/>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSFrame">{{20, 75}, {208, 451}}</string>
+                                                       <reference key="NSSuperview" ref="49161063"/>
+                                                       <string key="NSOffsets">{0, 0}</string>
+                                                       <object class="NSTextFieldCell" key="NSTitleCell">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">0</int>
+                                                               <string key="NSContents">Box</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSBackgroundColor" ref="406287577"/>
+                                                               <object class="NSColor" key="NSTextColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <reference key="NSContentView" ref="982902210"/>
+                                                       <int key="NSBorderType">0</int>
+                                                       <int key="NSBoxType">3</int>
+                                                       <int key="NSTitlePosition">0</int>
+                                                       <bool key="NSTransparent">NO</bool>
+                                               </object>
+                                               <object class="NSImageView" id="844127024">
+                                                       <reference key="NSNextResponder" ref="49161063"/>
+                                                       <int key="NSvFlags">274</int>
+                                                       <object class="NSMutableSet" key="NSDragTypes">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMutableArray" key="set.sortedObjects">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <string>Apple PDF pasteboard type</string>
+                                                                       <string>Apple PICT pasteboard type</string>
+                                                                       <string>Apple PNG pasteboard type</string>
+                                                                       <string>NSFilenamesPboardType</string>
+                                                                       <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
+                                                                       <string>NeXT TIFF v4.0 pasteboard type</string>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSFrame">{{20, 66}, {208, 460}}</string>
+                                                       <reference key="NSSuperview" ref="49161063"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSImageCell" key="NSCell" id="955430771">
+                                                               <int key="NSCellFlags">130560</int>
+                                                               <int key="NSCellFlags2">33554432</int>
+                                                               <int key="NSAlign">0</int>
+                                                               <int key="NSScale">1</int>
+                                                               <int key="NSStyle">0</int>
+                                                               <bool key="NSAnimates">NO</bool>
+                                                       </object>
+                                                       <bool key="NSEditable">YES</bool>
+                                               </object>
+                                       </object>
+                                       <string key="NSFrameSize">{453, 558}</string>
+                                       <reference key="NSSuperview"/>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+                               <string key="NSMinSize">{453, 580}</string>
+                               <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                       </object>
+               </object>
+               <object class="IBObjectContainer" key="IBDocument.Objects">
+                       <object class="NSMutableArray" key="connectionRecords">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fCropBottomField</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="773085513"/>
+                                       </object>
+                                       <int key="connectionID">53</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fCropBottomStepper</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="133033963"/>
+                                       </object>
+                                       <int key="connectionID">54</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fCropLeftField</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="842452881"/>
+                                       </object>
+                                       <int key="connectionID">55</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fCropLeftStepper</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="1067684983"/>
+                                       </object>
+                                       <int key="connectionID">56</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fCropMatrix</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="1032624817"/>
+                                       </object>
+                                       <int key="connectionID">57</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fCropRightField</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="411931143"/>
+                                       </object>
+                                       <int key="connectionID">58</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fCropRightStepper</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="510144318"/>
+                                       </object>
+                                       <int key="connectionID">59</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fCropTopField</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="897162141"/>
+                                       </object>
+                                       <int key="connectionID">60</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fCropTopStepper</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="580805308"/>
+                                       </object>
+                                       <int key="connectionID">61</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDeinterlacePopUp</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="346912008"/>
+                                       </object>
+                                       <int key="connectionID">62</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDenoisePopUp</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="243795165"/>
+                                       </object>
+                                       <int key="connectionID">63</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDetelecineCheck</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="407610327"/>
+                                       </object>
+                                       <int key="connectionID">64</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fHeightField</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="443002022"/>
+                                       </object>
+                                       <int key="connectionID">66</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fHeightStepper</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="667015191"/>
+                                       </object>
+                                       <int key="connectionID">67</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fWidthField</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="232869468"/>
+                                       </object>
+                                       <int key="connectionID">68</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fWidthStepper</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="221469578"/>
+                                       </object>
+                                       <int key="connectionID">69</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fNextButton</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="41752677"/>
+                                       </object>
+                                       <int key="connectionID">71</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPrevButton</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="862464620"/>
+                                       </object>
+                                       <int key="connectionID">72</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fInfoField</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="628196212"/>
+                                       </object>
+                                       <int key="connectionID">73</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fRatioCheck</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="302614967"/>
+                                       </object>
+                                       <int key="connectionID">74</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="221469578"/>
+                                       </object>
+                                       <int key="connectionID">76</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">ClosePanel:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="345100891"/>
+                                       </object>
+                                       <int key="connectionID">77</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">NextPicture:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="41752677"/>
+                                       </object>
+                                       <int key="connectionID">78</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">PreviousPicture:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="862464620"/>
+                                       </object>
+                                       <int key="connectionID">79</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="243795165"/>
+                                       </object>
+                                       <int key="connectionID">80</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="346912008"/>
+                                       </object>
+                                       <int key="connectionID">81</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="407610327"/>
+                                       </object>
+                                       <int key="connectionID">82</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="133033963"/>
+                                       </object>
+                                       <int key="connectionID">83</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="510144318"/>
+                                       </object>
+                                       <int key="connectionID">84</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="1067684983"/>
+                                       </object>
+                                       <int key="connectionID">85</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="580805308"/>
+                                       </object>
+                                       <int key="connectionID">86</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="1032624817"/>
+                                       </object>
+                                       <int key="connectionID">87</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="302614967"/>
+                                       </object>
+                                       <int key="connectionID">89</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="667015191"/>
+                                       </object>
+                                       <int key="connectionID">90</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAnamorphicPopUp</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="147098438"/>
+                                       </object>
+                                       <int key="connectionID">140</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="147098438"/>
+                                       </object>
+                                       <int key="connectionID">142</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPictureView</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="844127024"/>
+                                       </object>
+                                       <int key="connectionID">181</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPictureViewArea</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="208214895"/>
+                                       </object>
+                                       <int key="connectionID">183</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">window</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="616825745"/>
+                                       </object>
+                                       <int key="connectionID">184</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDecombPopUp</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="878291110"/>
+                                       </object>
+                                       <int key="connectionID">193</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">SettingsChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="878291110"/>
+                                       </object>
+                                       <int key="connectionID">194</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDeblockSlider</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="581126685"/>
+                                       </object>
+                                       <int key="connectionID">202</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">deblockSliderChanged:</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="581126685"/>
+                                       </object>
+                                       <int key="connectionID">203</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fDeblockField</string>
+                                               <reference key="source" ref="355312334"/>
+                                               <reference key="destination" ref="314638156"/>
+                                       </object>
+                                       <int key="connectionID">206</int>
+                               </object>
+                       </object>
+                       <object class="IBMutableOrderedSet" key="objectRecords">
+                               <object class="NSArray" key="orderedObjects">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">0</int>
+                                               <object class="NSArray" key="object" id="48079043">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <reference key="children" ref="273418435"/>
+                                               <nil key="parent"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-2</int>
+                                               <reference key="object" ref="355312334"/>
+                                               <reference key="parent" ref="48079043"/>
+                                               <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-1</int>
+                                               <reference key="object" ref="844574444"/>
+                                               <reference key="parent" ref="48079043"/>
+                                               <string key="objectName">First Responder</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-3</int>
+                                               <reference key="object" ref="837220151"/>
+                                               <reference key="parent" ref="48079043"/>
+                                               <string key="objectName">Application</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5</int>
+                                               <reference key="object" ref="616825745"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="49161063"/>
+                                               </object>
+                                               <reference key="parent" ref="48079043"/>
+                                               <string key="objectName">PicturePanel</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">6</int>
+                                               <reference key="object" ref="49161063"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1064912113"/>
+                                                       <reference ref="309105014"/>
+                                                       <reference ref="208214895"/>
+                                                       <reference ref="844127024"/>
+                                                       <reference ref="41752677"/>
+                                                       <reference ref="862464620"/>
+                                                       <reference ref="574970834"/>
+                                                       <reference ref="628196212"/>
+                                                       <reference ref="345100891"/>
+                                                       <reference ref="1011917013"/>
+                                               </object>
+                                               <reference key="parent" ref="616825745"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">7</int>
+                                               <reference key="object" ref="1064912113"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="580805308"/>
+                                                       <reference ref="510144318"/>
+                                                       <reference ref="1032624817"/>
+                                                       <reference ref="897162141"/>
+                                                       <reference ref="773085513"/>
+                                                       <reference ref="1067684983"/>
+                                                       <reference ref="411931143"/>
+                                                       <reference ref="842452881"/>
+                                                       <reference ref="133033963"/>
+                                               </object>
+                                               <reference key="parent" ref="49161063"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">21</int>
+                                               <reference key="object" ref="574970834"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSView" id="391559465">
+                                                               <nil key="NSNextResponder"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <string key="NSFrame">{{2, 2}, {734, 1}}</string>
+                                                       </object>
+                                               </object>
+                                               <reference key="parent" ref="49161063"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">22</int>
+                                               <reference key="object" ref="391559465"/>
+                                               <reference key="parent" ref="574970834"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">23</int>
+                                               <reference key="object" ref="309105014"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="407610327"/>
+                                                       <reference ref="243795165"/>
+                                                       <reference ref="346912008"/>
+                                                       <reference ref="905607845"/>
+                                                       <reference ref="94419441"/>
+                                                       <reference ref="878291110"/>
+                                                       <reference ref="742513844"/>
+                                                       <reference ref="581126685"/>
+                                                       <reference ref="1069536323"/>
+                                                       <reference ref="314638156"/>
+                                               </object>
+                                               <reference key="parent" ref="49161063"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">38</int>
+                                               <reference key="object" ref="628196212"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="921881842"/>
+                                               </object>
+                                               <reference key="parent" ref="49161063"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">39</int>
+                                               <reference key="object" ref="1011917013"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="513894170"/>
+                                                       <reference ref="443002022"/>
+                                                       <reference ref="302614967"/>
+                                                       <reference ref="667015191"/>
+                                                       <reference ref="569671425"/>
+                                                       <reference ref="232869468"/>
+                                                       <reference ref="221469578"/>
+                                                       <reference ref="147098438"/>
+                                                       <reference ref="301555397"/>
+                                               </object>
+                                               <reference key="parent" ref="49161063"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">49</int>
+                                               <reference key="object" ref="862464620"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="212457967"/>
+                                               </object>
+                                               <reference key="parent" ref="49161063"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">50</int>
+                                               <reference key="object" ref="345100891"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="352183359"/>
+                                               </object>
+                                               <reference key="parent" ref="49161063"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">52</int>
+                                               <reference key="object" ref="41752677"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="785935474"/>
+                                               </object>
+                                               <reference key="parent" ref="49161063"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">92</int>
+                                               <reference key="object" ref="208214895"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <reference key="parent" ref="49161063"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">165</int>
+                                               <reference key="object" ref="921881842"/>
+                                               <reference key="parent" ref="628196212"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">175</int>
+                                               <reference key="object" ref="212457967"/>
+                                               <reference key="parent" ref="862464620"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">176</int>
+                                               <reference key="object" ref="352183359"/>
+                                               <reference key="parent" ref="345100891"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">177</int>
+                                               <reference key="object" ref="785935474"/>
+                                               <reference key="parent" ref="41752677"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">12</int>
+                                               <reference key="object" ref="580805308"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="44321990"/>
+                                               </object>
+                                               <reference key="parent" ref="1064912113"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">152</int>
+                                               <reference key="object" ref="44321990"/>
+                                               <reference key="parent" ref="580805308"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">15</int>
+                                               <reference key="object" ref="510144318"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="759792686"/>
+                                               </object>
+                                               <reference key="parent" ref="1064912113"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">155</int>
+                                               <reference key="object" ref="759792686"/>
+                                               <reference key="parent" ref="510144318"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">16</int>
+                                               <reference key="object" ref="1032624817"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="643930266"/>
+                                                       <reference ref="288116155"/>
+                                                       <reference ref="660067650"/>
+                                               </object>
+                                               <reference key="parent" ref="1064912113"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">178</int>
+                                               <reference key="object" ref="643930266"/>
+                                               <reference key="parent" ref="1032624817"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">18</int>
+                                               <reference key="object" ref="288116155"/>
+                                               <reference key="parent" ref="1032624817"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">17</int>
+                                               <reference key="object" ref="660067650"/>
+                                               <reference key="parent" ref="1032624817"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">13</int>
+                                               <reference key="object" ref="897162141"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="936113070"/>
+                                               </object>
+                                               <reference key="parent" ref="1064912113"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">153</int>
+                                               <reference key="object" ref="936113070"/>
+                                               <reference key="parent" ref="897162141"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">10</int>
+                                               <reference key="object" ref="773085513"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="634956024"/>
+                                               </object>
+                                               <reference key="parent" ref="1064912113"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">150</int>
+                                               <reference key="object" ref="634956024"/>
+                                               <reference key="parent" ref="773085513"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">19</int>
+                                               <reference key="object" ref="1067684983"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="996643427"/>
+                                               </object>
+                                               <reference key="parent" ref="1064912113"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">156</int>
+                                               <reference key="object" ref="996643427"/>
+                                               <reference key="parent" ref="1067684983"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">9</int>
+                                               <reference key="object" ref="411931143"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1050606643"/>
+                                               </object>
+                                               <reference key="parent" ref="1064912113"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">149</int>
+                                               <reference key="object" ref="1050606643"/>
+                                               <reference key="parent" ref="411931143"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">11</int>
+                                               <reference key="object" ref="842452881"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="904241294"/>
+                                               </object>
+                                               <reference key="parent" ref="1064912113"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">151</int>
+                                               <reference key="object" ref="904241294"/>
+                                               <reference key="parent" ref="842452881"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">14</int>
+                                               <reference key="object" ref="133033963"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="71578223"/>
+                                               </object>
+                                               <reference key="parent" ref="1064912113"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">154</int>
+                                               <reference key="object" ref="71578223"/>
+                                               <reference key="parent" ref="133033963"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">32</int>
+                                               <reference key="object" ref="346912008"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1034367716"/>
+                                               </object>
+                                               <reference key="parent" ref="309105014"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">161</int>
+                                               <reference key="object" ref="1034367716"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="132523332"/>
+                                               </object>
+                                               <reference key="parent" ref="346912008"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">33</int>
+                                               <reference key="object" ref="132523332"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="937797455"/>
+                                                       <reference ref="71282261"/>
+                                                       <reference ref="542784764"/>
+                                               </object>
+                                               <reference key="parent" ref="1034367716"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">34</int>
+                                               <reference key="object" ref="937797455"/>
+                                               <reference key="parent" ref="132523332"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">35</int>
+                                               <reference key="object" ref="71282261"/>
+                                               <reference key="parent" ref="132523332"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">36</int>
+                                               <reference key="object" ref="542784764"/>
+                                               <reference key="parent" ref="132523332"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">30</int>
+                                               <reference key="object" ref="905607845"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="522867811"/>
+                                               </object>
+                                               <reference key="parent" ref="309105014"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">159</int>
+                                               <reference key="object" ref="522867811"/>
+                                               <reference key="parent" ref="905607845"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">37</int>
+                                               <reference key="object" ref="407610327"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="832714893"/>
+                                               </object>
+                                               <reference key="parent" ref="309105014"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">162</int>
+                                               <reference key="object" ref="832714893"/>
+                                               <reference key="parent" ref="407610327"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">25</int>
+                                               <reference key="object" ref="243795165"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="708528272"/>
+                                               </object>
+                                               <reference key="parent" ref="309105014"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">158</int>
+                                               <reference key="object" ref="708528272"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="176321383"/>
+                                               </object>
+                                               <reference key="parent" ref="243795165"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">26</int>
+                                               <reference key="object" ref="176321383"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="114494573"/>
+                                                       <reference ref="750998660"/>
+                                                       <reference ref="133285043"/>
+                                               </object>
+                                               <reference key="parent" ref="708528272"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">27</int>
+                                               <reference key="object" ref="114494573"/>
+                                               <reference key="parent" ref="176321383"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">28</int>
+                                               <reference key="object" ref="750998660"/>
+                                               <reference key="parent" ref="176321383"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">29</int>
+                                               <reference key="object" ref="133285043"/>
+                                               <reference key="parent" ref="176321383"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">31</int>
+                                               <reference key="object" ref="94419441"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="741873280"/>
+                                               </object>
+                                               <reference key="parent" ref="309105014"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">160</int>
+                                               <reference key="object" ref="741873280"/>
+                                               <reference key="parent" ref="94419441"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">41</int>
+                                               <reference key="object" ref="513894170"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="863668536"/>
+                                               </object>
+                                               <reference key="parent" ref="1011917013"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">166</int>
+                                               <reference key="object" ref="863668536"/>
+                                               <reference key="parent" ref="513894170"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">43</int>
+                                               <reference key="object" ref="443002022"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="649389918"/>
+                                               </object>
+                                               <reference key="parent" ref="1011917013"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">168</int>
+                                               <reference key="object" ref="649389918"/>
+                                               <reference key="parent" ref="443002022"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">45</int>
+                                               <reference key="object" ref="302614967"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="595088069"/>
+                                               </object>
+                                               <reference key="parent" ref="1011917013"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">170</int>
+                                               <reference key="object" ref="595088069"/>
+                                               <reference key="parent" ref="302614967"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">46</int>
+                                               <reference key="object" ref="667015191"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="634499157"/>
+                                               </object>
+                                               <reference key="parent" ref="1011917013"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">171</int>
+                                               <reference key="object" ref="634499157"/>
+                                               <reference key="parent" ref="667015191"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">47</int>
+                                               <reference key="object" ref="569671425"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="412868245"/>
+                                               </object>
+                                               <reference key="parent" ref="1011917013"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">172</int>
+                                               <reference key="object" ref="412868245"/>
+                                               <reference key="parent" ref="569671425"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">42</int>
+                                               <reference key="object" ref="232869468"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="96315080"/>
+                                               </object>
+                                               <reference key="parent" ref="1011917013"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">167</int>
+                                               <reference key="object" ref="96315080"/>
+                                               <reference key="parent" ref="232869468"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">44</int>
+                                               <reference key="object" ref="221469578"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="714433793"/>
+                                               </object>
+                                               <reference key="parent" ref="1011917013"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">169</int>
+                                               <reference key="object" ref="714433793"/>
+                                               <reference key="parent" ref="221469578"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">132</int>
+                                               <reference key="object" ref="147098438"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="261514411"/>
+                                               </object>
+                                               <reference key="parent" ref="1011917013"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">173</int>
+                                               <reference key="object" ref="261514411"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="577969360"/>
+                                               </object>
+                                               <reference key="parent" ref="147098438"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">134</int>
+                                               <reference key="object" ref="577969360"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="85032843"/>
+                                                       <reference ref="804424712"/>
+                                                       <reference ref="1018195923"/>
+                                               </object>
+                                               <reference key="parent" ref="261514411"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">135</int>
+                                               <reference key="object" ref="85032843"/>
+                                               <reference key="parent" ref="577969360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">136</int>
+                                               <reference key="object" ref="804424712"/>
+                                               <reference key="parent" ref="577969360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">137</int>
+                                               <reference key="object" ref="1018195923"/>
+                                               <reference key="parent" ref="577969360"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">138</int>
+                                               <reference key="object" ref="301555397"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="926890760"/>
+                                               </object>
+                                               <reference key="parent" ref="1011917013"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">174</int>
+                                               <reference key="object" ref="926890760"/>
+                                               <reference key="parent" ref="301555397"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">179</int>
+                                               <reference key="object" ref="844127024"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="955430771"/>
+                                               </object>
+                                               <reference key="parent" ref="49161063"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">180</int>
+                                               <reference key="object" ref="955430771"/>
+                                               <reference key="parent" ref="844127024"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">185</int>
+                                               <reference key="object" ref="878291110"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="162356603"/>
+                                               </object>
+                                               <reference key="parent" ref="309105014"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">186</int>
+                                               <reference key="object" ref="742513844"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="604349861"/>
+                                               </object>
+                                               <reference key="parent" ref="309105014"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">187</int>
+                                               <reference key="object" ref="604349861"/>
+                                               <reference key="parent" ref="742513844"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">188</int>
+                                               <reference key="object" ref="162356603"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="146867052"/>
+                                               </object>
+                                               <reference key="parent" ref="878291110"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">189</int>
+                                               <reference key="object" ref="146867052"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="43352374"/>
+                                                       <reference ref="226508779"/>
+                                                       <reference ref="170535567"/>
+                                               </object>
+                                               <reference key="parent" ref="162356603"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">190</int>
+                                               <reference key="object" ref="43352374"/>
+                                               <reference key="parent" ref="146867052"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">191</int>
+                                               <reference key="object" ref="226508779"/>
+                                               <reference key="parent" ref="146867052"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">192</int>
+                                               <reference key="object" ref="170535567"/>
+                                               <reference key="parent" ref="146867052"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">195</int>
+                                               <reference key="object" ref="581126685"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="257047106"/>
+                                               </object>
+                                               <reference key="parent" ref="309105014"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">196</int>
+                                               <reference key="object" ref="257047106"/>
+                                               <reference key="parent" ref="581126685"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">197</int>
+                                               <reference key="object" ref="1069536323"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="728722104"/>
+                                               </object>
+                                               <reference key="parent" ref="309105014"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">198</int>
+                                               <reference key="object" ref="728722104"/>
+                                               <reference key="parent" ref="1069536323"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">204</int>
+                                               <reference key="object" ref="314638156"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="350598908"/>
+                                               </object>
+                                               <reference key="parent" ref="309105014"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">205</int>
+                                               <reference key="object" ref="350598908"/>
+                                               <reference key="parent" ref="314638156"/>
+                                       </object>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="flattenedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>-1.IBPluginDependency</string>
+                                       <string>-2.IBPluginDependency</string>
+                                       <string>-3.IBPluginDependency</string>
+                                       <string>-3.ImportedFromIB2</string>
+                                       <string>10.IBPluginDependency</string>
+                                       <string>10.ImportedFromIB2</string>
+                                       <string>11.IBPluginDependency</string>
+                                       <string>11.ImportedFromIB2</string>
+                                       <string>12.IBPluginDependency</string>
+                                       <string>12.ImportedFromIB2</string>
+                                       <string>13.IBPluginDependency</string>
+                                       <string>13.ImportedFromIB2</string>
+                                       <string>132.IBPluginDependency</string>
+                                       <string>132.ImportedFromIB2</string>
+                                       <string>134.IBPluginDependency</string>
+                                       <string>134.ImportedFromIB2</string>
+                                       <string>135.IBPluginDependency</string>
+                                       <string>135.ImportedFromIB2</string>
+                                       <string>136.IBPluginDependency</string>
+                                       <string>136.ImportedFromIB2</string>
+                                       <string>137.IBPluginDependency</string>
+                                       <string>137.ImportedFromIB2</string>
+                                       <string>138.IBPluginDependency</string>
+                                       <string>138.ImportedFromIB2</string>
+                                       <string>14.IBPluginDependency</string>
+                                       <string>14.ImportedFromIB2</string>
+                                       <string>15.IBPluginDependency</string>
+                                       <string>15.ImportedFromIB2</string>
+                                       <string>16.IBPluginDependency</string>
+                                       <string>16.ImportedFromIB2</string>
+                                       <string>17.IBPluginDependency</string>
+                                       <string>17.ImportedFromIB2</string>
+                                       <string>179.IBPluginDependency</string>
+                                       <string>18.IBPluginDependency</string>
+                                       <string>18.ImportedFromIB2</string>
+                                       <string>180.IBPluginDependency</string>
+                                       <string>185.IBPluginDependency</string>
+                                       <string>185.ImportedFromIB2</string>
+                                       <string>186.IBPluginDependency</string>
+                                       <string>186.ImportedFromIB2</string>
+                                       <string>189.IBPluginDependency</string>
+                                       <string>189.ImportedFromIB2</string>
+                                       <string>19.IBPluginDependency</string>
+                                       <string>19.ImportedFromIB2</string>
+                                       <string>190.IBPluginDependency</string>
+                                       <string>190.ImportedFromIB2</string>
+                                       <string>191.IBPluginDependency</string>
+                                       <string>191.ImportedFromIB2</string>
+                                       <string>192.IBPluginDependency</string>
+                                       <string>192.ImportedFromIB2</string>
+                                       <string>195.IBPluginDependency</string>
+                                       <string>196.IBPluginDependency</string>
+                                       <string>197.IBPluginDependency</string>
+                                       <string>197.ImportedFromIB2</string>
+                                       <string>204.IBPluginDependency</string>
+                                       <string>204.ImportedFromIB2</string>
+                                       <string>21.IBPluginDependency</string>
+                                       <string>21.ImportedFromIB2</string>
+                                       <string>22.IBPluginDependency</string>
+                                       <string>22.ImportedFromIB2</string>
+                                       <string>23.IBPluginDependency</string>
+                                       <string>23.ImportedFromIB2</string>
+                                       <string>25.IBPluginDependency</string>
+                                       <string>25.ImportedFromIB2</string>
+                                       <string>26.IBPluginDependency</string>
+                                       <string>26.ImportedFromIB2</string>
+                                       <string>27.IBPluginDependency</string>
+                                       <string>27.ImportedFromIB2</string>
+                                       <string>28.IBPluginDependency</string>
+                                       <string>28.ImportedFromIB2</string>
+                                       <string>29.IBPluginDependency</string>
+                                       <string>29.ImportedFromIB2</string>
+                                       <string>30.IBPluginDependency</string>
+                                       <string>30.ImportedFromIB2</string>
+                                       <string>31.IBPluginDependency</string>
+                                       <string>31.ImportedFromIB2</string>
+                                       <string>32.IBPluginDependency</string>
+                                       <string>32.ImportedFromIB2</string>
+                                       <string>33.IBPluginDependency</string>
+                                       <string>33.ImportedFromIB2</string>
+                                       <string>34.IBPluginDependency</string>
+                                       <string>34.ImportedFromIB2</string>
+                                       <string>35.IBPluginDependency</string>
+                                       <string>35.ImportedFromIB2</string>
+                                       <string>36.IBPluginDependency</string>
+                                       <string>36.ImportedFromIB2</string>
+                                       <string>37.IBPluginDependency</string>
+                                       <string>37.ImportedFromIB2</string>
+                                       <string>38.IBPluginDependency</string>
+                                       <string>38.ImportedFromIB2</string>
+                                       <string>39.IBPluginDependency</string>
+                                       <string>39.ImportedFromIB2</string>
+                                       <string>41.IBPluginDependency</string>
+                                       <string>41.ImportedFromIB2</string>
+                                       <string>42.IBPluginDependency</string>
+                                       <string>42.ImportedFromIB2</string>
+                                       <string>43.IBPluginDependency</string>
+                                       <string>43.ImportedFromIB2</string>
+                                       <string>44.IBPluginDependency</string>
+                                       <string>44.ImportedFromIB2</string>
+                                       <string>45.IBPluginDependency</string>
+                                       <string>45.ImportedFromIB2</string>
+                                       <string>46.IBPluginDependency</string>
+                                       <string>46.ImportedFromIB2</string>
+                                       <string>47.IBPluginDependency</string>
+                                       <string>47.ImportedFromIB2</string>
+                                       <string>49.IBPluginDependency</string>
+                                       <string>49.ImportedFromIB2</string>
+                                       <string>5.IBEditorWindowLastContentRect</string>
+                                       <string>5.IBPluginDependency</string>
+                                       <string>5.IBViewEditorWindowController.showingLayoutRectangles</string>
+                                       <string>5.IBWindowTemplateEditedContentRect</string>
+                                       <string>5.ImportedFromIB2</string>
+                                       <string>5.editorWindowContentRectSynchronizationRect</string>
+                                       <string>5.windowTemplate.hasMaxSize</string>
+                                       <string>5.windowTemplate.hasMinSize</string>
+                                       <string>5.windowTemplate.maxSize</string>
+                                       <string>5.windowTemplate.minSize</string>
+                                       <string>50.IBPluginDependency</string>
+                                       <string>50.ImportedFromIB2</string>
+                                       <string>52.IBPluginDependency</string>
+                                       <string>52.ImportedFromIB2</string>
+                                       <string>6.IBPluginDependency</string>
+                                       <string>6.ImportedFromIB2</string>
+                                       <string>7.IBPluginDependency</string>
+                                       <string>7.ImportedFromIB2</string>
+                                       <string>9.IBPluginDependency</string>
+                                       <string>9.ImportedFromIB2</string>
+                                       <string>92.IBPluginDependency</string>
+                                       <string>92.ImportedFromIB2</string>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <integer value="1" id="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{462, 298}, {453, 558}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="8"/>
+                                       <string>{{462, 298}, {453, 558}}</string>
+                                       <reference ref="9"/>
+                                       <string>{{221, 276}, {533, 580}}</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>{3.40282e+38, 3.40282e+38}</string>
+                                       <string>{453, 558}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="unlocalizedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="activeLocalization"/>
+                       <object class="NSMutableDictionary" key="localizations">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="sourceID"/>
+                       <int key="maxID">206</int>
+               </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes">
+                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">FirstResponder</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier" id="251078365">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">PictureController.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">PictureController</string>
+                                       <string key="superclassName">NSWindowController</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>ClosePanel:</string>
+                                                       <string>NextPicture:</string>
+                                                       <string>PreviousPicture:</string>
+                                                       <string>SettingsChanged:</string>
+                                                       <string>deblockSliderChanged:</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>delegate</string>
+                                                       <string>fAnamorphicPopUp</string>
+                                                       <string>fCropBottomField</string>
+                                                       <string>fCropBottomStepper</string>
+                                                       <string>fCropLeftField</string>
+                                                       <string>fCropLeftStepper</string>
+                                                       <string>fCropMatrix</string>
+                                                       <string>fCropRightField</string>
+                                                       <string>fCropRightStepper</string>
+                                                       <string>fCropTopField</string>
+                                                       <string>fCropTopStepper</string>
+                                                       <string>fDeblockCheck</string>
+                                                       <string>fDeblockField</string>
+                                                       <string>fDeblockSlider</string>
+                                                       <string>fDecombPopUp</string>
+                                                       <string>fDeinterlacePopUp</string>
+                                                       <string>fDenoisePopUp</string>
+                                                       <string>fDetelecineCheck</string>
+                                                       <string>fHeightField</string>
+                                                       <string>fHeightStepper</string>
+                                                       <string>fInfoField</string>
+                                                       <string>fNextButton</string>
+                                                       <string>fPictureView</string>
+                                                       <string>fPictureViewArea</string>
+                                                       <string>fPrevButton</string>
+                                                       <string>fRatioCheck</string>
+                                                       <string>fWidthField</string>
+                                                       <string>fWidthStepper</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>id</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSStepper</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSStepper</string>
+                                                       <string>NSMatrix</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSStepper</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSStepper</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSSlider</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSPopUpButton</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSStepper</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSImageView</string>
+                                                       <string>NSBox</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSStepper</string>
+                                               </object>
+                                       </object>
+                                       <reference key="sourceIdentifier" ref="251078365"/>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">PictureController</string>
+                                       <string key="superclassName">NSWindowController</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                       </object>
+               </object>
+               <int key="IBDocument.localizationMode">0</int>
+               <string key="IBDocument.LastKnownRelativeProjectPath">../HandBrake.xcodeproj</string>
+               <int key="IBDocument.defaultPropertyAccessControl">3</int>
+       </data>
+</archive>
diff --git a/macosx/English.lproj/Preferences.xib b/macosx/English.lproj/Preferences.xib
new file mode 100644 (file)
index 0000000..800d408
--- /dev/null
@@ -0,0 +1,1652 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+       <data>
+               <int key="IBDocument.SystemTarget">1050</int>
+               <string key="IBDocument.SystemVersion">9F33</string>
+               <string key="IBDocument.InterfaceBuilderVersion">670</string>
+               <string key="IBDocument.AppKitVersion">949.34</string>
+               <string key="IBDocument.HIToolboxVersion">352.00</string>
+               <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <integer value="236"/>
+                       <integer value="234"/>
+                       <integer value="233"/>
+               </object>
+               <object class="NSArray" key="IBDocument.PluginDependencies">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+               </object>
+               <object class="NSMutableArray" key="IBDocument.RootObjects" id="185275739">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <object class="NSCustomObject" id="169862212">
+                               <string key="NSClassName">HBPreferencesController</string>
+                       </object>
+                       <object class="NSCustomObject" id="941647215">
+                               <string key="NSClassName">FirstResponder</string>
+                       </object>
+                       <object class="NSCustomObject" id="559784606">
+                               <string key="NSClassName">NSApplication</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="123373831">
+                               <int key="NSWindowStyleMask">3</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{136, 318}, {500, 200}}</string>
+                               <int key="NSWTFlags">813170688</int>
+                               <string key="NSWindowTitle">Preferences</string>
+                               <string key="NSWindowClass">NSPanel</string>
+                               <object class="NSMutableString" key="NSViewClass">
+                                       <characters key="NS.bytes">View</characters>
+                               </object>
+                               <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <string key="NSWindowContentMinSize">{213, 107}</string>
+                               <object class="NSView" key="NSWindowView" id="496214002">
+                                       <nil key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <string key="NSFrame">{{1, 1}, {500, 200}}</string>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+                               <string key="NSMinSize">{213, 129}</string>
+                               <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                       </object>
+                       <object class="NSUserDefaultsController" id="580534391">
+                               <bool key="NSSharedInstance">YES</bool>
+                       </object>
+                       <object class="NSCustomView" id="1048779201">
+                               <reference key="NSNextResponder"/>
+                               <int key="NSvFlags">256</int>
+                               <object class="NSMutableArray" key="NSSubviews">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSButton" id="906899216">
+                                               <reference key="NSNextResponder" ref="1048779201"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{110, 18}, {364, 18}}</string>
+                                               <reference key="NSSuperview" ref="1048779201"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="36851657">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents">Use iPod/iTunes friendly (.m4v) file extension for MP4</string>
+                                                       <object class="NSFont" key="NSSupport" id="964910696">
+                                                               <string key="NSName">LucidaGrande</string>
+                                                               <double key="NSSize">1.300000e+01</double>
+                                                               <int key="NSfFlags">1044</int>
+                                                       </object>
+                                                       <reference key="NSControlView" ref="906899216"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <object class="NSButtonImageSource" key="NSAlternateImage" id="1056213191">
+                                                               <string key="NSImageName">NSSwitch</string>
+                                                       </object>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="636306431">
+                                               <reference key="NSNextResponder" ref="1048779201"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{110, 131}, {251, 18}}</string>
+                                               <reference key="NSSuperview" ref="1048779201"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="448858755">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents">Show Presets Drawer</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="636306431"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="1056213191"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="965044526">
+                                               <reference key="NSNextResponder" ref="1048779201"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{110, 38}, {354, 18}}</string>
+                                               <reference key="NSSuperview" ref="1048779201"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="419322096">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents">Use Auto Naming (uses DVD name and title number)</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="965044526"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="1056213191"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="315188467">
+                                               <reference key="NSNextResponder" ref="1048779201"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{26, 95}, {80, 17}}</string>
+                                               <reference key="NSSuperview" ref="1048779201"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="718672066">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">272629760</int>
+                                                       <string key="NSContents">When Done:</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="315188467"/>
+                                                       <object class="NSColor" key="NSBackgroundColor" id="525377782">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName">System</string>
+                                                               <string key="NSColorName">controlColor</string>
+                                                               <object class="NSColor" key="NSColor" id="666005350">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <object class="NSColor" key="NSTextColor" id="887152126">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName">System</string>
+                                                               <string key="NSColorName">controlTextColor</string>
+                                                               <object class="NSColor" key="NSColor" id="104533627">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MAA</bytes>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="581738572">
+                                               <reference key="NSNextResponder" ref="1048779201"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{110, 151}, {138, 18}}</string>
+                                               <reference key="NSSuperview" ref="1048779201"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="824062726">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents">Check for updates</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="581738572"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="1056213191"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="597305137">
+                                               <reference key="NSNextResponder" ref="1048779201"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{110, 70}, {228, 18}}</string>
+                                               <reference key="NSSuperview" ref="1048779201"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="437495050">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents">Send file to MetaX</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="597305137"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <object class="NSCustomResource" key="NSNormalImage">
+                                                               <string key="NSClassName">NSImage</string>
+                                                               <string key="NSResourceName">NSSwitch</string>
+                                                       </object>
+                                                       <reference key="NSAlternateImage" ref="1056213191"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="576686737">
+                                               <reference key="NSNextResponder" ref="1048779201"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{38, 152}, {68, 17}}</string>
+                                               <reference key="NSSuperview" ref="1048779201"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="404194395">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">272629760</int>
+                                                       <string key="NSContents">At launch:</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="576686737"/>
+                                                       <reference key="NSBackgroundColor" ref="525377782"/>
+                                                       <reference key="NSTextColor" ref="887152126"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="713240777">
+                                               <reference key="NSNextResponder" ref="1048779201"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{24, 39}, {83, 17}}</string>
+                                               <reference key="NSSuperview" ref="1048779201"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="947435557">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">272629760</int>
+                                                       <string key="NSContents">Output files:</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="713240777"/>
+                                                       <reference key="NSBackgroundColor" ref="525377782"/>
+                                                       <reference key="NSTextColor" ref="887152126"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSPopUpButton" id="317169558">
+                                               <reference key="NSNextResponder" ref="1048779201"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{109, 89}, {218, 26}}</string>
+                                               <reference key="NSSuperview" ref="1048779201"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSPopUpButtonCell" key="NSCell" id="792374025">
+                                                       <int key="NSCellFlags">71433792</int>
+                                                       <int key="NSCellFlags2">2048</int>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="317169558"/>
+                                                       <int key="NSButtonFlags">109199615</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <object class="NSFont" key="NSAlternateImage">
+                                                               <string key="NSName">LucidaGrande</string>
+                                                               <double key="NSSize">1.300000e+01</double>
+                                                               <int key="NSfFlags">16</int>
+                                                       </object>
+                                                       <string key="NSAlternateContents"/>
+                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                               <characters key="NS.bytes"/>
+                                                       </object>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                                       <object class="NSMenuItem" key="NSMenuItem" id="40171696">
+                                                               <reference key="NSMenu" ref="783755954"/>
+                                                               <string key="NSTitle">Alert Window</string>
+                                                               <string key="NSKeyEquiv"/>
+                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                               <int key="NSState">1</int>
+                                                               <object class="NSCustomResource" key="NSOnImage" id="201515479">
+                                                                       <string key="NSClassName">NSImage</string>
+                                                                       <string key="NSResourceName">NSMenuCheckmark</string>
+                                                               </object>
+                                                               <object class="NSCustomResource" key="NSMixedImage" id="944085027">
+                                                                       <string key="NSClassName">NSImage</string>
+                                                                       <string key="NSResourceName">NSMenuMixedState</string>
+                                                               </object>
+                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                               <reference key="NSTarget" ref="792374025"/>
+                                                       </object>
+                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                       <object class="NSMenu" key="NSMenu" id="783755954">
+                                                               <object class="NSMutableString" key="NSTitle">
+                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <object class="NSMenuItem" id="197120751">
+                                                                               <reference key="NSMenu" ref="783755954"/>
+                                                                               <string key="NSTitle">Do Nothing</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="201515479"/>
+                                                                               <reference key="NSMixedImage" ref="944085027"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="792374025"/>
+                                                                       </object>
+                                                                       <reference ref="40171696"/>
+                                                                       <object class="NSMenuItem" id="725464990">
+                                                                               <reference key="NSMenu" ref="783755954"/>
+                                                                               <string key="NSTitle">Growl Notification</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="201515479"/>
+                                                                               <reference key="NSMixedImage" ref="944085027"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="792374025"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="564582398">
+                                                                               <reference key="NSMenu" ref="783755954"/>
+                                                                               <string key="NSTitle">Alert Window And Growl</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="201515479"/>
+                                                                               <reference key="NSMixedImage" ref="944085027"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="792374025"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="698601725">
+                                                                               <reference key="NSMenu" ref="783755954"/>
+                                                                               <string key="NSTitle">Put Computer To Sleep</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="201515479"/>
+                                                                               <reference key="NSMixedImage" ref="944085027"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="792374025"/>
+                                                                       </object>
+                                                                       <object class="NSMenuItem" id="449823126">
+                                                                               <reference key="NSMenu" ref="783755954"/>
+                                                                               <string key="NSTitle">Shut Down Computer</string>
+                                                                               <string key="NSKeyEquiv"/>
+                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                               <reference key="NSOnImage" ref="201515479"/>
+                                                                               <reference key="NSMixedImage" ref="944085027"/>
+                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                               <reference key="NSTarget" ref="792374025"/>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSSelectedIndex">1</int>
+                                                       <int key="NSPreferredEdge">3</int>
+                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                       <bool key="NSAltersState">YES</bool>
+                                                       <int key="NSArrowPosition">1</int>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSFrameSize">{492, 189}</string>
+                               <reference key="NSSuperview"/>
+                               <string key="NSClassName">NSView</string>
+                               <string key="NSExtension">NSControl</string>
+                       </object>
+                       <object class="NSCustomView" id="520288288">
+                               <reference key="NSNextResponder"/>
+                               <int key="NSvFlags">256</int>
+                               <object class="NSMutableArray" key="NSSubviews">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSTextField" id="1062449667">
+                                               <reference key="NSNextResponder" ref="520288288"/>
+                                               <int key="NSvFlags">268</int>
+                                               <string key="NSFrame">{{188, 38}, {113, 22}}</string>
+                                               <reference key="NSSuperview" ref="520288288"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="51555548">
+                                                       <int key="NSCellFlags">-1804468671</int>
+                                                       <int key="NSCellFlags2">272630784</int>
+                                                       <string key="NSContents"/>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="1062449667"/>
+                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                       <object class="NSColor" key="NSBackgroundColor" id="686497954">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName">System</string>
+                                                               <string key="NSColorName">textBackgroundColor</string>
+                                                               <object class="NSColor" key="NSColor" id="993015046">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MQA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <object class="NSColor" key="NSTextColor">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName">System</string>
+                                                               <string key="NSColorName">textColor</string>
+                                                               <reference key="NSColor" ref="104533627"/>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="539748933">
+                                               <reference key="NSNextResponder" ref="520288288"/>
+                                               <int key="NSvFlags">268</int>
+                                               <string key="NSFrame">{{27, 40}, {155, 17}}</string>
+                                               <reference key="NSSuperview" ref="520288288"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="374363387">
+                                                       <int key="NSCellFlags">67239488</int>
+                                                       <int key="NSCellFlags2">71304192</int>
+                                                       <string key="NSContents">Custom Decomb String:</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="539748933"/>
+                                                       <reference key="NSBackgroundColor" ref="525377782"/>
+                                                       <reference key="NSTextColor" ref="887152126"/>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSFrameSize">{496, 80}</string>
+                               <reference key="NSSuperview"/>
+                               <string key="NSClassName">NSView</string>
+                               <string key="NSExtension">NSResponder</string>
+                       </object>
+                       <object class="NSCustomView" id="332598366">
+                               <nil key="NSNextResponder"/>
+                               <int key="NSvFlags">256</int>
+                               <object class="NSMutableArray" key="NSSubviews">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSTextField" id="389101877">
+                                               <reference key="NSNextResponder" ref="332598366"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{76, 43}, {114, 17}}</string>
+                                               <reference key="NSSuperview" ref="332598366"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="459708758">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">272629760</int>
+                                                       <string key="NSContents">Native Language:</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="389101877"/>
+                                                       <reference key="NSBackgroundColor" ref="525377782"/>
+                                                       <reference key="NSTextColor" ref="887152126"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSComboBox" id="172081130">
+                                               <reference key="NSNextResponder" ref="332598366"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{195, 39}, {229, 26}}</string>
+                                               <reference key="NSSuperview" ref="332598366"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSComboBoxCell" key="NSCell" id="210320026">
+                                                       <int key="NSCellFlags">343014976</int>
+                                                       <int key="NSCellFlags2">272630784</int>
+                                                       <string key="NSContents">English</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="172081130"/>
+                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                       <reference key="NSBackgroundColor" ref="686497954"/>
+                                                       <reference key="NSTextColor" ref="887152126"/>
+                                                       <int key="NSVisibleItemCount">10</int>
+                                                       <bool key="NSHasVerticalScroller">YES</bool>
+                                                       <bool key="NSCompletes">YES</bool>
+                                                       <object class="NSMutableArray" key="NSPopUpListData">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <string>Afar</string>
+                                                               <string>Abkhazian</string>
+                                                               <string>Afrikaans</string>
+                                                               <string>Albanian</string>
+                                                               <string>Amharic</string>
+                                                               <string>Arabic</string>
+                                                               <string>Armenian</string>
+                                                               <string>Assamese</string>
+                                                               <string>Avestan</string>
+                                                               <string>Aymara</string>
+                                                               <string>Azerbaijani</string>
+                                                               <string>Bashkir</string>
+                                                               <string>Basque</string>
+                                                               <string>Belarusian</string>
+                                                               <string>Bengali</string>
+                                                               <string>Bihari</string>
+                                                               <string>Bislama</string>
+                                                               <string>Bosnian</string>
+                                                               <string>Breton</string>
+                                                               <string>Bulgarian</string>
+                                                               <string>Burmese</string>
+                                                               <string>Catalan</string>
+                                                               <string>Chamorro</string>
+                                                               <string>Chechen</string>
+                                                               <string>Chichewa; Nyanja</string>
+                                                               <string>Chinese</string>
+                                                               <string>Church Slavic</string>
+                                                               <string>Chuvash</string>
+                                                               <string>Cornish</string>
+                                                               <string>Corsican</string>
+                                                               <string>Croatian</string>
+                                                               <string>Czech</string>
+                                                               <string>Dansk</string>
+                                                               <string>Deutsch</string>
+                                                               <string>Dzongkha</string>
+                                                               <string>English</string>
+                                                               <string>Espanol</string>
+                                                               <string>Esperanto</string>
+                                                               <string>Estonian</string>
+                                                               <string>Faroese</string>
+                                                               <string>Fijian</string>
+                                                               <string>Francais</string>
+                                                               <string>Frisian</string>
+                                                               <string>Georgian</string>
+                                                               <string>Gaelic (Scots)</string>
+                                                               <string>Gallegan</string>
+                                                               <string>Greek, Modern ()</string>
+                                                               <string>Guarani</string>
+                                                               <string>Gujarati</string>
+                                                               <string>Hebrew</string>
+                                                               <string>Herero</string>
+                                                               <string>Hindi</string>
+                                                               <string>Hiri Motu</string>
+                                                               <string>Inuktitut</string>
+                                                               <string>Interlingue</string>
+                                                               <string>Interlingua</string>
+                                                               <string>Indonesian</string>
+                                                               <string>Inupiaq</string>
+                                                               <string>Irish</string>
+                                                               <string>Islenska</string>
+                                                               <string>Italian</string>
+                                                               <string>Javanese</string>
+                                                               <string>Japanese</string>
+                                                               <string>Kalaallisut (Greenlandic)</string>
+                                                               <string>Kannada</string>
+                                                               <string>Kashmiri</string>
+                                                               <string>Kazakh</string>
+                                                               <string>Khmer</string>
+                                                               <string>Kikuyu</string>
+                                                               <string>Kinyarwanda</string>
+                                                               <string>Kirghiz</string>
+                                                               <string>Komi</string>
+                                                               <string>Korean</string>
+                                                               <string>Kuanyama</string>
+                                                               <string>Kurdish</string>
+                                                               <string>Lao</string>
+                                                               <string>Latin</string>
+                                                               <string>Latvian</string>
+                                                               <string>Lingala</string>
+                                                               <string>Lithuanian</string>
+                                                               <string>Letzeburgesch</string>
+                                                               <string>Macedonian</string>
+                                                               <string>Magyar</string>
+                                                               <string>Malay</string>
+                                                               <string>Malayalam</string>
+                                                               <string>Malagasy</string>
+                                                               <string>Maltese</string>
+                                                               <string>Manx</string>
+                                                               <string>Maori</string>
+                                                               <string>Marathi</string>
+                                                               <string>Marshall</string>
+                                                               <string>Moldavian</string>
+                                                               <string>Mongolian</string>
+                                                               <string>Nauru</string>
+                                                               <string>Navajo</string>
+                                                               <string>Ndebele, South</string>
+                                                               <string>Ndebele, North</string>
+                                                               <string>Ndonga</string>
+                                                               <string>Nederlands</string>
+                                                               <string>Nepali</string>
+                                                               <string>Northern Sami</string>
+                                                               <string>Norwegian</string>
+                                                               <string>Norwegian Bokmal</string>
+                                                               <string>Norwegian Nynorsk</string>
+                                                               <string>Occitan (post 1500); Provencal</string>
+                                                               <string>Oriya</string>
+                                                               <string>Oromo</string>
+                                                               <string>Ossetian; Ossetic</string>
+                                                               <string>Panjabi</string>
+                                                               <string>Persian</string>
+                                                               <string>Pali</string>
+                                                               <string>Polish</string>
+                                                               <string>Portuges</string>
+                                                               <string>Pushto</string>
+                                                               <string>Quechua</string>
+                                                               <string>Raeto-Romance</string>
+                                                               <string>Romanian</string>
+                                                               <string>Rundi</string>
+                                                               <string>Russian</string>
+                                                               <string>Sango</string>
+                                                               <string>Sanskrit</string>
+                                                               <string>Sardinian</string>
+                                                               <string>Serbian</string>
+                                                               <string>Sinhalese</string>
+                                                               <string>Slovak</string>
+                                                               <string>Slovenian</string>
+                                                               <string>Samoan</string>
+                                                               <string>Shona</string>
+                                                               <string>Sindhi</string>
+                                                               <string>Somali</string>
+                                                               <string>Sotho, Southern</string>
+                                                               <string>Sundanese</string>
+                                                               <string>Suomi</string>
+                                                               <string>Svenska</string>
+                                                               <string>Swahili</string>
+                                                               <string>Swati</string>
+                                                               <string>Tahitian</string>
+                                                               <string>Tamil</string>
+                                                               <string>Tatar</string>
+                                                               <string>Telugu</string>
+                                                               <string>Tajik</string>
+                                                               <string>Tagalog</string>
+                                                               <string>Thai</string>
+                                                               <string>Tibetian</string>
+                                                               <string>Tigrinya</string>
+                                                               <string>Tonga (Tonga Islands)</string>
+                                                               <string>Tswana</string>
+                                                               <string>Tsonga</string>
+                                                               <string>Turkish</string>
+                                                               <string>Turkmen</string>
+                                                               <string>Twi</string>
+                                                               <string>Uighur</string>
+                                                               <string>Ukrainian</string>
+                                                               <string>Urdu</string>
+                                                               <string>Uzbek</string>
+                                                               <string>Vietnamese</string>
+                                                               <string>Volapk</string>
+                                                               <string>Welsh</string>
+                                                               <string>Wolof</string>
+                                                               <string>Xhosa</string>
+                                                               <string>Yiddish</string>
+                                                               <string>Yoruba</string>
+                                                               <string>Zhuang</string>
+                                                               <string>Zulu</string>
+                                                       </object>
+                                                       <reference key="NSDelegate" ref="172081130"/>
+                                                       <object class="NSComboTableView" key="NSTableView" id="686758712">
+                                                               <reference key="NSNextResponder"/>
+                                                               <int key="NSvFlags">274</int>
+                                                               <string key="NSFrameSize">{13, 3444}</string>
+                                                               <reference key="NSSuperview"/>
+                                                               <reference key="NSWindow"/>
+                                                               <bool key="NSEnabled">YES</bool>
+                                                               <object class="NSMutableArray" key="NSTableColumns">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <object class="NSTableColumn">
+                                                                               <integer value="0" key="NSIdentifier"/>
+                                                                               <double key="NSWidth">1.000000e+01</double>
+                                                                               <double key="NSMinWidth">1.000000e+01</double>
+                                                                               <double key="NSMaxWidth">1.000000e+03</double>
+                                                                               <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                       <int key="NSCellFlags">75628032</int>
+                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                       <object class="NSMutableString" key="NSContents">
+                                                                                               <characters key="NS.bytes"/>
+                                                                                       </object>
+                                                                                       <object class="NSFont" key="NSSupport">
+                                                                                               <string key="NSName">LucidaGrande</string>
+                                                                                               <double key="NSSize">1.200000e+01</double>
+                                                                                               <int key="NSfFlags">16</int>
+                                                                                       </object>
+                                                                                       <object class="NSColor" key="NSBackgroundColor">
+                                                                                               <int key="NSColorSpace">3</int>
+                                                                                               <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+                                                                                       </object>
+                                                                                       <reference key="NSTextColor" ref="993015046"/>
+                                                                               </object>
+                                                                               <object class="NSTextFieldCell" key="NSDataCell">
+                                                                                       <int key="NSCellFlags">338820672</int>
+                                                                                       <int key="NSCellFlags2">1024</int>
+                                                                                       <reference key="NSSupport" ref="964910696"/>
+                                                                                       <reference key="NSControlView" ref="686758712"/>
+                                                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                                                       <object class="NSColor" key="NSBackgroundColor" id="501011794">
+                                                                                               <int key="NSColorSpace">6</int>
+                                                                                               <string key="NSCatalogName">System</string>
+                                                                                               <string key="NSColorName">controlBackgroundColor</string>
+                                                                                               <reference key="NSColor" ref="666005350"/>
+                                                                                       </object>
+                                                                                       <reference key="NSTextColor" ref="887152126"/>
+                                                                               </object>
+                                                                               <int key="NSResizingMask">3</int>
+                                                                               <bool key="NSIsResizeable">YES</bool>
+                                                                               <reference key="NSTableView" ref="686758712"/>
+                                                                       </object>
+                                                               </object>
+                                                               <double key="NSIntercellSpacingWidth">3.000000e+00</double>
+                                                               <double key="NSIntercellSpacingHeight">2.000000e+00</double>
+                                                               <reference key="NSBackgroundColor" ref="501011794"/>
+                                                               <object class="NSColor" key="NSGridColor">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">gridColor</string>
+                                                                       <object class="NSColor" key="NSColor">
+                                                                               <int key="NSColorSpace">3</int>
+                                                                               <bytes key="NSWhite">MC41AA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                               <double key="NSRowHeight">1.900000e+01</double>
+                                                               <string key="NSAction">tableViewAction:</string>
+                                                               <int key="NSTvFlags">-765427712</int>
+                                                               <reference key="NSDelegate" ref="210320026"/>
+                                                               <reference key="NSDataSource" ref="210320026"/>
+                                                               <reference key="NSTarget" ref="210320026"/>
+                                                               <int key="NSColumnAutoresizingStyle">1</int>
+                                                               <int key="NSDraggingSourceMaskForLocal">15</int>
+                                                               <int key="NSDraggingSourceMaskForNonLocal">0</int>
+                                                               <bool key="NSAllowsTypeSelect">YES</bool>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="168948265">
+                                               <reference key="NSNextResponder" ref="332598366"/>
+                                               <int key="NSvFlags">-2147483392</int>
+                                               <string key="NSFrame">{{18, 18}, {472, 18}}</string>
+                                               <reference key="NSSuperview" ref="332598366"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="686321393">
+                                                       <int key="NSCellFlags">604110336</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents">If sources native language is not your preferred language, use subtitles</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="168948265"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="1056213191"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSFrameSize">{500, 83}</string>
+                               <object class="NSMutableString" key="NSClassName">
+                                       <characters key="NS.bytes">NSView</characters>
+                               </object>
+                               <string key="NSExtension">NSResponder</string>
+                       </object>
+                       <object class="NSCustomView" id="23728330">
+                               <reference key="NSNextResponder"/>
+                               <int key="NSvFlags">256</int>
+                               <object class="NSMutableArray" key="NSSubviews">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSButton" id="882188042">
+                                               <reference key="NSNextResponder" ref="23728330"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{83, 146}, {367, 18}}</string>
+                                               <reference key="NSSuperview" ref="23728330"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="197383193">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents">Use CRF (instead of CQP) for Constant Quality encodes</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="882188042"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="1056213191"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="759266151">
+                                               <reference key="NSNextResponder" ref="23728330"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{39, 147}, {41, 17}}</string>
+                                               <reference key="NSSuperview" ref="23728330"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="488653412">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">272629760</int>
+                                                       <string key="NSContents">x264:</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="759266151"/>
+                                                       <reference key="NSBackgroundColor" ref="525377782"/>
+                                                       <reference key="NSTextColor" ref="887152126"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="907177043">
+                                               <reference key="NSNextResponder" ref="23728330"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{83, 108}, {367, 18}}</string>
+                                               <reference key="NSSuperview" ref="23728330"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="869757541">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents">Put individual encode logs in same location as movie</string>
+                                                       <reference key="NSSupport" ref="964910696"/>
+                                                       <reference key="NSControlView" ref="907177043"/>
+                                                       <int key="NSButtonFlags">1211912703</int>
+                                                       <int key="NSButtonFlags2">2</int>
+                                                       <reference key="NSAlternateImage" ref="1056213191"/>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSFrameSize">{500, 184}</string>
+                               <reference key="NSSuperview"/>
+                               <object class="NSMutableString" key="NSClassName">
+                                       <characters key="NS.bytes">NSView</characters>
+                               </object>
+                               <string key="NSExtension">NSResponder</string>
+                       </object>
+               </object>
+               <object class="IBObjectContainer" key="IBDocument.Objects">
+                       <object class="NSMutableArray" key="connectionRecords">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">delegate</string>
+                                               <reference key="source" ref="123373831"/>
+                                               <reference key="destination" ref="169862212"/>
+                                       </object>
+                                       <int key="connectionID">185</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">window</string>
+                                               <reference key="source" ref="169862212"/>
+                                               <reference key="destination" ref="123373831"/>
+                                       </object>
+                                       <int key="connectionID">187</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fGeneralView</string>
+                                               <reference key="source" ref="169862212"/>
+                                               <reference key="destination" ref="1048779201"/>
+                                       </object>
+                                       <int key="connectionID">245</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAdvancedView</string>
+                                               <reference key="source" ref="169862212"/>
+                                               <reference key="destination" ref="23728330"/>
+                                       </object>
+                                       <int key="connectionID">246</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fAudioView</string>
+                                               <reference key="source" ref="169862212"/>
+                                               <reference key="destination" ref="332598366"/>
+                                       </object>
+                                       <int key="connectionID">247</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fPictureView</string>
+                                               <reference key="source" ref="169862212"/>
+                                               <reference key="destination" ref="520288288"/>
+                                       </object>
+                                       <int key="connectionID">248</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.DefaultPresetsDrawerShow</string>
+                                               <reference key="source" ref="636306431"/>
+                                               <reference key="destination" ref="580534391"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="636306431"/>
+                                                       <reference key="NSDestination" ref="580534391"/>
+                                                       <string key="NSLabel">value: values.DefaultPresetsDrawerShow</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.DefaultPresetsDrawerShow</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">260</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.DefaultAutoNaming</string>
+                                               <reference key="source" ref="965044526"/>
+                                               <reference key="destination" ref="580534391"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="965044526"/>
+                                                       <reference key="NSDestination" ref="580534391"/>
+                                                       <string key="NSLabel">value: values.DefaultAutoNaming</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.DefaultAutoNaming</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">262</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.DefaultMpegName</string>
+                                               <reference key="source" ref="906899216"/>
+                                               <reference key="destination" ref="580534391"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="906899216"/>
+                                                       <reference key="NSDestination" ref="580534391"/>
+                                                       <string key="NSLabel">value: values.DefaultMpegName</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.DefaultMpegName</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">264</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.sendToMetaX</string>
+                                               <reference key="source" ref="597305137"/>
+                                               <reference key="destination" ref="580534391"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="597305137"/>
+                                                       <reference key="NSDestination" ref="580534391"/>
+                                                       <string key="NSLabel">value: values.sendToMetaX</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.sendToMetaX</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">266</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.DefaultLanguage</string>
+                                               <reference key="source" ref="172081130"/>
+                                               <reference key="destination" ref="580534391"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="172081130"/>
+                                                       <reference key="NSDestination" ref="580534391"/>
+                                                       <string key="NSLabel">value: values.DefaultLanguage</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.DefaultLanguage</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">270</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.PreferredLanguageSubtitles</string>
+                                               <reference key="source" ref="168948265"/>
+                                               <reference key="destination" ref="580534391"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="168948265"/>
+                                                       <reference key="NSDestination" ref="580534391"/>
+                                                       <string key="NSLabel">value: values.PreferredLanguageSubtitles</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.PreferredLanguageSubtitles</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">271</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.DefaultCrf</string>
+                                               <reference key="source" ref="882188042"/>
+                                               <reference key="destination" ref="580534391"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="882188042"/>
+                                                       <reference key="NSDestination" ref="580534391"/>
+                                                       <string key="NSLabel">value: values.DefaultCrf</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.DefaultCrf</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">272</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">selectedValue: values.AlertWhenDone</string>
+                                               <reference key="source" ref="317169558"/>
+                                               <reference key="destination" ref="580534391"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="317169558"/>
+                                                       <reference key="NSDestination" ref="580534391"/>
+                                                       <string key="NSLabel">selectedValue: values.AlertWhenDone</string>
+                                                       <string key="NSBinding">selectedValue</string>
+                                                       <string key="NSKeyPath">values.AlertWhenDone</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">298</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.SUCheckAtStartup</string>
+                                               <reference key="source" ref="581738572"/>
+                                               <reference key="destination" ref="580534391"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="581738572"/>
+                                                       <reference key="NSDestination" ref="580534391"/>
+                                                       <string key="NSLabel">value: values.SUCheckAtStartup</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.SUCheckAtStartup</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">323</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.DecombCustomString</string>
+                                               <reference key="source" ref="1062449667"/>
+                                               <reference key="destination" ref="580534391"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="1062449667"/>
+                                                       <reference key="NSDestination" ref="580534391"/>
+                                                       <string key="NSLabel">value: values.DecombCustomString</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.DecombCustomString</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <string key="NS.key.0">NSContinuouslyUpdatesValue</string>
+                                                               <integer value="1" key="NS.object.0" id="9"/>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">330</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.EncodeLogLocation</string>
+                                               <reference key="source" ref="907177043"/>
+                                               <reference key="destination" ref="580534391"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="907177043"/>
+                                                       <reference key="NSDestination" ref="580534391"/>
+                                                       <string key="NSLabel">value: values.EncodeLogLocation</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.EncodeLogLocation</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">349</int>
+                               </object>
+                       </object>
+                       <object class="IBMutableOrderedSet" key="objectRecords">
+                               <object class="NSArray" key="orderedObjects">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">0</int>
+                                               <object class="NSArray" key="object" id="510204080">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <reference key="children" ref="185275739"/>
+                                               <nil key="parent"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-2</int>
+                                               <reference key="object" ref="169862212"/>
+                                               <reference key="parent" ref="510204080"/>
+                                               <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-1</int>
+                                               <reference key="object" ref="941647215"/>
+                                               <reference key="parent" ref="510204080"/>
+                                               <string key="objectName">First Responder</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5</int>
+                                               <reference key="object" ref="123373831"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="496214002"/>
+                                               </object>
+                                               <reference key="parent" ref="510204080"/>
+                                               <string key="objectName">Preferences</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">6</int>
+                                               <reference key="object" ref="496214002"/>
+                                               <reference key="parent" ref="123373831"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">61</int>
+                                               <reference key="object" ref="580534391"/>
+                                               <reference key="parent" ref="510204080"/>
+                                               <string key="objectName">Shared Defaults</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">233</int>
+                                               <reference key="object" ref="1048779201"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="906899216"/>
+                                                       <reference ref="636306431"/>
+                                                       <reference ref="965044526"/>
+                                                       <reference ref="315188467"/>
+                                                       <reference ref="581738572"/>
+                                                       <reference ref="597305137"/>
+                                                       <reference ref="576686737"/>
+                                                       <reference ref="713240777"/>
+                                                       <reference ref="317169558"/>
+                                               </object>
+                                               <reference key="parent" ref="510204080"/>
+                                               <string key="objectName">General</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">237</int>
+                                               <reference key="object" ref="906899216"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="36851657"/>
+                                               </object>
+                                               <reference key="parent" ref="1048779201"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">238</int>
+                                               <reference key="object" ref="636306431"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="448858755"/>
+                                               </object>
+                                               <reference key="parent" ref="1048779201"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">239</int>
+                                               <reference key="object" ref="965044526"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="419322096"/>
+                                               </object>
+                                               <reference key="parent" ref="1048779201"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">242</int>
+                                               <reference key="object" ref="315188467"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="718672066"/>
+                                               </object>
+                                               <reference key="parent" ref="1048779201"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">243</int>
+                                               <reference key="object" ref="581738572"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="824062726"/>
+                                               </object>
+                                               <reference key="parent" ref="1048779201"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">244</int>
+                                               <reference key="object" ref="597305137"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="437495050"/>
+                                               </object>
+                                               <reference key="parent" ref="1048779201"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">275</int>
+                                               <reference key="object" ref="576686737"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="404194395"/>
+                                               </object>
+                                               <reference key="parent" ref="1048779201"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">276</int>
+                                               <reference key="object" ref="713240777"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="947435557"/>
+                                               </object>
+                                               <reference key="parent" ref="1048779201"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">289</int>
+                                               <reference key="object" ref="317169558"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="792374025"/>
+                                               </object>
+                                               <reference key="parent" ref="1048779201"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">234</int>
+                                               <reference key="object" ref="520288288"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1062449667"/>
+                                                       <reference ref="539748933"/>
+                                               </object>
+                                               <reference key="parent" ref="510204080"/>
+                                               <string key="objectName">Picture</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">235</int>
+                                               <reference key="object" ref="332598366"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="389101877"/>
+                                                       <reference ref="172081130"/>
+                                                       <reference ref="168948265"/>
+                                               </object>
+                                               <reference key="parent" ref="510204080"/>
+                                               <string key="objectName">Audio</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">252</int>
+                                               <reference key="object" ref="389101877"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="459708758"/>
+                                               </object>
+                                               <reference key="parent" ref="332598366"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">253</int>
+                                               <reference key="object" ref="172081130"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="210320026"/>
+                                               </object>
+                                               <reference key="parent" ref="332598366"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">254</int>
+                                               <reference key="object" ref="168948265"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="686321393"/>
+                                               </object>
+                                               <reference key="parent" ref="332598366"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">236</int>
+                                               <reference key="object" ref="23728330"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="882188042"/>
+                                                       <reference ref="759266151"/>
+                                                       <reference ref="907177043"/>
+                                               </object>
+                                               <reference key="parent" ref="510204080"/>
+                                               <string key="objectName">Advanced</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">255</int>
+                                               <reference key="object" ref="882188042"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="197383193"/>
+                                               </object>
+                                               <reference key="parent" ref="23728330"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">280</int>
+                                               <reference key="object" ref="759266151"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="488653412"/>
+                                               </object>
+                                               <reference key="parent" ref="23728330"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">300</int>
+                                               <reference key="object" ref="36851657"/>
+                                               <reference key="parent" ref="906899216"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">301</int>
+                                               <reference key="object" ref="448858755"/>
+                                               <reference key="parent" ref="636306431"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">302</int>
+                                               <reference key="object" ref="419322096"/>
+                                               <reference key="parent" ref="965044526"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">304</int>
+                                               <reference key="object" ref="718672066"/>
+                                               <reference key="parent" ref="315188467"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">305</int>
+                                               <reference key="object" ref="824062726"/>
+                                               <reference key="parent" ref="581738572"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">306</int>
+                                               <reference key="object" ref="437495050"/>
+                                               <reference key="parent" ref="597305137"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">307</int>
+                                               <reference key="object" ref="404194395"/>
+                                               <reference key="parent" ref="576686737"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">308</int>
+                                               <reference key="object" ref="947435557"/>
+                                               <reference key="parent" ref="713240777"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">309</int>
+                                               <reference key="object" ref="792374025"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="783755954"/>
+                                               </object>
+                                               <reference key="parent" ref="317169558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">315</int>
+                                               <reference key="object" ref="459708758"/>
+                                               <reference key="parent" ref="389101877"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">316</int>
+                                               <reference key="object" ref="210320026"/>
+                                               <reference key="parent" ref="172081130"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">317</int>
+                                               <reference key="object" ref="686321393"/>
+                                               <reference key="parent" ref="168948265"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">318</int>
+                                               <reference key="object" ref="197383193"/>
+                                               <reference key="parent" ref="882188042"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">322</int>
+                                               <reference key="object" ref="488653412"/>
+                                               <reference key="parent" ref="759266151"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">290</int>
+                                               <reference key="object" ref="783755954"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="698601725"/>
+                                                       <reference ref="449823126"/>
+                                                       <reference ref="564582398"/>
+                                                       <reference ref="40171696"/>
+                                                       <reference ref="197120751"/>
+                                                       <reference ref="725464990"/>
+                                               </object>
+                                               <reference key="parent" ref="792374025"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">296</int>
+                                               <reference key="object" ref="698601725"/>
+                                               <reference key="parent" ref="783755954"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">295</int>
+                                               <reference key="object" ref="449823126"/>
+                                               <reference key="parent" ref="783755954"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">294</int>
+                                               <reference key="object" ref="564582398"/>
+                                               <reference key="parent" ref="783755954"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">293</int>
+                                               <reference key="object" ref="40171696"/>
+                                               <reference key="parent" ref="783755954"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">292</int>
+                                               <reference key="object" ref="197120751"/>
+                                               <reference key="parent" ref="783755954"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">291</int>
+                                               <reference key="object" ref="725464990"/>
+                                               <reference key="parent" ref="783755954"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-3</int>
+                                               <reference key="object" ref="559784606"/>
+                                               <reference key="parent" ref="510204080"/>
+                                               <string key="objectName">Application</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">324</int>
+                                               <reference key="object" ref="1062449667"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="51555548"/>
+                                               </object>
+                                               <reference key="parent" ref="520288288"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">325</int>
+                                               <reference key="object" ref="51555548"/>
+                                               <reference key="parent" ref="1062449667"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">326</int>
+                                               <reference key="object" ref="539748933"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="374363387"/>
+                                               </object>
+                                               <reference key="parent" ref="520288288"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">327</int>
+                                               <reference key="object" ref="374363387"/>
+                                               <reference key="parent" ref="539748933"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">347</int>
+                                               <reference key="object" ref="907177043"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="869757541"/>
+                                               </object>
+                                               <reference key="parent" ref="23728330"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">348</int>
+                                               <reference key="object" ref="869757541"/>
+                                               <reference key="parent" ref="907177043"/>
+                                       </object>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="flattenedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>-1.IBPluginDependency</string>
+                                       <string>-2.IBPluginDependency</string>
+                                       <string>233.IBEditorWindowLastContentRect</string>
+                                       <string>233.IBPluginDependency</string>
+                                       <string>233.ImportedFromIB2</string>
+                                       <string>233.editorWindowContentRectSynchronizationRect</string>
+                                       <string>234.IBEditorWindowLastContentRect</string>
+                                       <string>234.IBPluginDependency</string>
+                                       <string>234.ImportedFromIB2</string>
+                                       <string>234.editorWindowContentRectSynchronizationRect</string>
+                                       <string>235.IBPluginDependency</string>
+                                       <string>235.ImportedFromIB2</string>
+                                       <string>236.IBEditorWindowLastContentRect</string>
+                                       <string>236.IBPluginDependency</string>
+                                       <string>236.ImportedFromIB2</string>
+                                       <string>236.editorWindowContentRectSynchronizationRect</string>
+                                       <string>237.IBPluginDependency</string>
+                                       <string>237.ImportedFromIB2</string>
+                                       <string>238.IBPluginDependency</string>
+                                       <string>238.ImportedFromIB2</string>
+                                       <string>239.IBPluginDependency</string>
+                                       <string>239.ImportedFromIB2</string>
+                                       <string>242.IBPluginDependency</string>
+                                       <string>242.ImportedFromIB2</string>
+                                       <string>243.IBPluginDependency</string>
+                                       <string>243.ImportedFromIB2</string>
+                                       <string>244.IBPluginDependency</string>
+                                       <string>244.ImportedFromIB2</string>
+                                       <string>252.IBPluginDependency</string>
+                                       <string>252.ImportedFromIB2</string>
+                                       <string>253.IBPluginDependency</string>
+                                       <string>253.ImportedFromIB2</string>
+                                       <string>254.IBPluginDependency</string>
+                                       <string>254.ImportedFromIB2</string>
+                                       <string>255.IBPluginDependency</string>
+                                       <string>255.ImportedFromIB2</string>
+                                       <string>275.IBPluginDependency</string>
+                                       <string>275.ImportedFromIB2</string>
+                                       <string>276.IBPluginDependency</string>
+                                       <string>276.ImportedFromIB2</string>
+                                       <string>280.IBPluginDependency</string>
+                                       <string>280.ImportedFromIB2</string>
+                                       <string>289.IBPluginDependency</string>
+                                       <string>289.ImportedFromIB2</string>
+                                       <string>290.IBPluginDependency</string>
+                                       <string>290.ImportedFromIB2</string>
+                                       <string>291.IBPluginDependency</string>
+                                       <string>291.ImportedFromIB2</string>
+                                       <string>292.IBPluginDependency</string>
+                                       <string>292.ImportedFromIB2</string>
+                                       <string>293.IBPluginDependency</string>
+                                       <string>293.ImportedFromIB2</string>
+                                       <string>294.IBPluginDependency</string>
+                                       <string>294.ImportedFromIB2</string>
+                                       <string>295.IBPluginDependency</string>
+                                       <string>295.ImportedFromIB2</string>
+                                       <string>296.IBPluginDependency</string>
+                                       <string>296.ImportedFromIB2</string>
+                                       <string>324.IBPluginDependency</string>
+                                       <string>325.IBPluginDependency</string>
+                                       <string>326.IBPluginDependency</string>
+                                       <string>327.IBPluginDependency</string>
+                                       <string>347.IBPluginDependency</string>
+                                       <string>347.ImportedFromIB2</string>
+                                       <string>5.IBPluginDependency</string>
+                                       <string>5.ImportedFromIB2</string>
+                                       <string>5.windowTemplate.hasMaxSize</string>
+                                       <string>5.windowTemplate.hasMinSize</string>
+                                       <string>5.windowTemplate.maxSize</string>
+                                       <string>5.windowTemplate.minSize</string>
+                                       <string>6.IBPluginDependency</string>
+                                       <string>6.ImportedFromIB2</string>
+                                       <string>61.IBPluginDependency</string>
+                                       <string>61.ImportedFromIB2</string>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{{28, 401}, {492, 189}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{0, 636}, {500, 209}}</string>
+                                       <string>{{27, 609}, {496, 80}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{0, 726}, {500, 108}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{110, 672}, {500, 184}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{0, 650}, {500, 184}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>{3.40282e+38, 3.40282e+38}</string>
+                                       <string>{213, 107}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="unlocalizedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="activeLocalization"/>
+                       <object class="NSMutableDictionary" key="localizations">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="sourceID"/>
+                       <int key="maxID">349</int>
+               </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes">
+                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBPreferencesController</string>
+                                       <string key="superclassName">NSWindowController</string>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>fAdvancedView</string>
+                                                       <string>fAudioView</string>
+                                                       <string>fGeneralView</string>
+                                                       <string>fPictureView</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>NSView</string>
+                                                       <string>NSView</string>
+                                                       <string>NSView</string>
+                                                       <string>NSView</string>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">HBPreferencesController.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBPreferencesController</string>
+                                       <string key="superclassName">NSWindowController</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <string key="NS.key.0">runModal:</string>
+                                               <string key="NS.object.0">id</string>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">PictureController.h</string>
+                                       </object>
+                               </object>
+                       </object>
+               </object>
+               <int key="IBDocument.localizationMode">0</int>
+               <string key="IBDocument.LastKnownRelativeProjectPath">../HandBrake.xcodeproj</string>
+               <int key="IBDocument.defaultPropertyAccessControl">3</int>
+       </data>
+</archive>
diff --git a/macosx/English.lproj/Queue.xib b/macosx/English.lproj/Queue.xib
new file mode 100644 (file)
index 0000000..667d263
--- /dev/null
@@ -0,0 +1,991 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+       <data>
+               <int key="IBDocument.SystemTarget">1050</int>
+               <string key="IBDocument.SystemVersion">9F33</string>
+               <string key="IBDocument.InterfaceBuilderVersion">670</string>
+               <string key="IBDocument.AppKitVersion">949.34</string>
+               <string key="IBDocument.HIToolboxVersion">352.00</string>
+               <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <integer value="2596"/>
+               </object>
+               <object class="NSArray" key="IBDocument.PluginDependencies">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+               </object>
+               <object class="NSMutableArray" key="IBDocument.RootObjects" id="543585533">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <object class="NSCustomObject" id="678333032">
+                               <string key="NSClassName">HBQueueController</string>
+                       </object>
+                       <object class="NSCustomObject" id="258430128">
+                               <string key="NSClassName">FirstResponder</string>
+                       </object>
+                       <object class="NSCustomObject" id="529995888">
+                               <string key="NSClassName">NSApplication</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="238545558">
+                               <int key="NSWindowStyleMask">4111</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{893, 137}, {574, 423}}</string>
+                               <int key="NSWTFlags">1886912512</int>
+                               <string key="NSWindowTitle">Queue - HandBrake</string>
+                               <string key="NSWindowClass">NSWindow</string>
+                               <object class="NSMutableString" key="NSViewClass">
+                                       <characters key="NS.bytes">View</characters>
+                               </object>
+                               <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <string key="NSWindowContentMinSize">{525, 340}</string>
+                               <object class="NSView" key="NSWindowView" id="431299686">
+                                       <reference key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <object class="NSMutableArray" key="NSSubviews">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSCustomView" id="60629844">
+                                                       <reference key="NSNextResponder" ref="431299686"/>
+                                                       <int key="NSvFlags">274</int>
+                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSScrollView" id="9160137">
+                                                                       <reference key="NSNextResponder" ref="60629844"/>
+                                                                       <int key="NSvFlags">274</int>
+                                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <object class="NSClipView" id="13598910">
+                                                                                       <reference key="NSNextResponder" ref="9160137"/>
+                                                                                       <int key="NSvFlags">2304</int>
+                                                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                               <object class="NSOutlineView" id="790027174">
+                                                                                                       <reference key="NSNextResponder" ref="13598910"/>
+                                                                                                       <int key="NSvFlags">4352</int>
+                                                                                                       <string key="NSFrameSize">{517, 342}</string>
+                                                                                                       <reference key="NSSuperview" ref="13598910"/>
+                                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                                       <object class="_NSCornerView" key="NSCornerView">
+                                                                                                               <nil key="NSNextResponder"/>
+                                                                                                               <int key="NSvFlags">256</int>
+                                                                                                               <string key="NSFrame">{{518, 0}, {16, 17}}</string>
+                                                                                                       </object>
+                                                                                                       <object class="NSMutableArray" key="NSTableColumns">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <object class="NSTableColumn" id="821940358">
+                                                                                                                       <string key="NSIdentifier">icon</string>
+                                                                                                                       <double key="NSWidth">3.800000e+01</double>
+                                                                                                                       <double key="NSMinWidth">3.800000e+01</double>
+                                                                                                                       <double key="NSMaxWidth">3.800000e+01</double>
+                                                                                                                       <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                                                               <string key="NSContents"/>
+                                                                                                                               <object class="NSFont" key="NSSupport" id="26">
+                                                                                                                                       <string key="NSName">LucidaGrande</string>
+                                                                                                                                       <double key="NSSize">1.100000e+01</double>
+                                                                                                                                       <int key="NSfFlags">3100</int>
+                                                                                                                               </object>
+                                                                                                                               <object class="NSColor" key="NSBackgroundColor" id="122009290">
+                                                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                                                       <string key="NSCatalogName">System</string>
+                                                                                                                                       <string key="NSColorName">headerColor</string>
+                                                                                                                                       <object class="NSColor" key="NSColor" id="983556133">
+                                                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                                                               <bytes key="NSWhite">MQA</bytes>
+                                                                                                                                       </object>
+                                                                                                                               </object>
+                                                                                                                               <object class="NSColor" key="NSTextColor" id="204129071">
+                                                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                                                       <string key="NSCatalogName">System</string>
+                                                                                                                                       <string key="NSColorName">headerTextColor</string>
+                                                                                                                                       <object class="NSColor" key="NSColor" id="1016246953">
+                                                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                                                               <bytes key="NSWhite">MAA</bytes>
+                                                                                                                                       </object>
+                                                                                                                               </object>
+                                                                                                                       </object>
+                                                                                                                       <object class="NSImageCell" key="NSDataCell" id="592677893">
+                                                                                                                               <int key="NSCellFlags">130560</int>
+                                                                                                                               <int key="NSCellFlags2">33554432</int>
+                                                                                                                               <int key="NSAlign">3</int>
+                                                                                                                               <int key="NSScale">0</int>
+                                                                                                                               <int key="NSStyle">0</int>
+                                                                                                                               <bool key="NSAnimates">YES</bool>
+                                                                                                                       </object>
+                                                                                                                       <int key="NSResizingMask">3</int>
+                                                                                                                       <bool key="NSIsResizeable">YES</bool>
+                                                                                                                       <bool key="NSIsEditable">YES</bool>
+                                                                                                                       <reference key="NSTableView" ref="790027174"/>
+                                                                                                               </object>
+                                                                                                               <object class="NSTableColumn" id="664777621">
+                                                                                                                       <string key="NSIdentifier">desc</string>
+                                                                                                                       <double key="NSWidth">4.500000e+02</double>
+                                                                                                                       <double key="NSMinWidth">4.000000e+01</double>
+                                                                                                                       <double key="NSMaxWidth">5.000000e+03</double>
+                                                                                                                       <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                                               <int key="NSCellFlags">75628032</int>
+                                                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                                                               <string key="NSContents"/>
+                                                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                                                               <object class="NSColor" key="NSBackgroundColor">
+                                                                                                                                       <int key="NSColorSpace">3</int>
+                                                                                                                                       <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+                                                                                                                               </object>
+                                                                                                                               <reference key="NSTextColor" ref="204129071"/>
+                                                                                                                       </object>
+                                                                                                                       <object class="NSTextFieldCell" key="NSDataCell" id="574589932">
+                                                                                                                               <int key="NSCellFlags">337772032</int>
+                                                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                                                               <object class="NSFont" key="NSSupport" id="844481358">
+                                                                                                                                       <string key="NSName">LucidaGrande</string>
+                                                                                                                                       <double key="NSSize">1.200000e+01</double>
+                                                                                                                                       <int key="NSfFlags">16</int>
+                                                                                                                               </object>
+                                                                                                                               <reference key="NSControlView" ref="790027174"/>
+                                                                                                                               <object class="NSColor" key="NSBackgroundColor">
+                                                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                                                       <string key="NSCatalogName">System</string>
+                                                                                                                                       <string key="NSColorName">textBackgroundColor</string>
+                                                                                                                                       <reference key="NSColor" ref="983556133"/>
+                                                                                                                               </object>
+                                                                                                                               <object class="NSColor" key="NSTextColor" id="434514744">
+                                                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                                                       <string key="NSCatalogName">System</string>
+                                                                                                                                       <string key="NSColorName">controlTextColor</string>
+                                                                                                                                       <reference key="NSColor" ref="1016246953"/>
+                                                                                                                               </object>
+                                                                                                                       </object>
+                                                                                                                       <int key="NSResizingMask">1</int>
+                                                                                                                       <bool key="NSIsResizeable">YES</bool>
+                                                                                                                       <reference key="NSTableView" ref="790027174"/>
+                                                                                                               </object>
+                                                                                                               <object class="NSTableColumn" id="498008730">
+                                                                                                                       <string key="NSIdentifier">action</string>
+                                                                                                                       <double key="NSWidth">2.000000e+01</double>
+                                                                                                                       <double key="NSMinWidth">8.000000e+00</double>
+                                                                                                                       <double key="NSMaxWidth">2.000000e+01</double>
+                                                                                                                       <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                                                               <int key="NSCellFlags2">134217728</int>
+                                                                                                                               <string key="NSContents"/>
+                                                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                                                               <reference key="NSBackgroundColor" ref="122009290"/>
+                                                                                                                               <reference key="NSTextColor" ref="204129071"/>
+                                                                                                                       </object>
+                                                                                                                       <object class="NSButtonCell" key="NSDataCell" id="620017021">
+                                                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                                                               <int key="NSCellFlags2">134217728</int>
+                                                                                                                               <string key="NSContents"/>
+                                                                                                                               <reference key="NSSupport" ref="844481358"/>
+                                                                                                                               <reference key="NSControlView" ref="790027174"/>
+                                                                                                                               <int key="NSButtonFlags">135020799</int>
+                                                                                                                               <int key="NSButtonFlags2">6</int>
+                                                                                                                               <object class="NSCustomResource" key="NSNormalImage">
+                                                                                                                                       <string key="NSClassName">NSImage</string>
+                                                                                                                                       <string key="NSResourceName">Delete</string>
+                                                                                                                               </object>
+                                                                                                                               <string key="NSAlternateContents"/>
+                                                                                                                               <string key="NSKeyEquivalent"/>
+                                                                                                                               <int key="NSPeriodicDelay">400</int>
+                                                                                                                               <int key="NSPeriodicInterval">75</int>
+                                                                                                                       </object>
+                                                                                                                       <reference key="NSTableView" ref="790027174"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <double key="NSIntercellSpacingWidth">3.000000e+00</double>
+                                                                                                       <double key="NSIntercellSpacingHeight">2.000000e+00</double>
+                                                                                                       <reference key="NSBackgroundColor" ref="983556133"/>
+                                                                                                       <object class="NSColor" key="NSGridColor">
+                                                                                                               <int key="NSColorSpace">6</int>
+                                                                                                               <string key="NSCatalogName">System</string>
+                                                                                                               <string key="NSColorName">gridColor</string>
+                                                                                                               <object class="NSColor" key="NSColor">
+                                                                                                                       <int key="NSColorSpace">3</int>
+                                                                                                                       <bytes key="NSWhite">MC41AA</bytes>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <double key="NSRowHeight">1.700000e+01</double>
+                                                                                                       <int key="NSTvFlags">314605568</int>
+                                                                                                       <int key="NSColumnAutoresizingStyle">1</int>
+                                                                                                       <int key="NSDraggingSourceMaskForLocal">15</int>
+                                                                                                       <int key="NSDraggingSourceMaskForNonLocal">0</int>
+                                                                                                       <bool key="NSAllowsTypeSelect">YES</bool>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <string key="NSFrame">{{1, 1}, {517, 342}}</string>
+                                                                                       <reference key="NSSuperview" ref="9160137"/>
+                                                                                       <reference key="NSNextKeyView" ref="790027174"/>
+                                                                                       <reference key="NSDocView" ref="790027174"/>
+                                                                                       <object class="NSColor" key="NSBGColor">
+                                                                                               <int key="NSColorSpace">6</int>
+                                                                                               <string key="NSCatalogName">System</string>
+                                                                                               <string key="NSColorName">controlBackgroundColor</string>
+                                                                                               <object class="NSColor" key="NSColor" id="724853981">
+                                                                                                       <int key="NSColorSpace">3</int>
+                                                                                                       <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <int key="NScvFlags">4</int>
+                                                                               </object>
+                                                                               <object class="NSScroller" id="459639248">
+                                                                                       <reference key="NSNextResponder" ref="9160137"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{518, 1}, {15, 342}}</string>
+                                                                                       <reference key="NSSuperview" ref="9160137"/>
+                                                                                       <reference key="NSTarget" ref="9160137"/>
+                                                                                       <string key="NSAction">_doScroller:</string>
+                                                                                       <double key="NSPercent">7.142857e-01</double>
+                                                                               </object>
+                                                                               <object class="NSScroller" id="636348341">
+                                                                                       <reference key="NSNextResponder" ref="9160137"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrame">{{-100, -100}, {282, 15}}</string>
+                                                                                       <reference key="NSSuperview" ref="9160137"/>
+                                                                                       <int key="NSsFlags">1</int>
+                                                                                       <reference key="NSTarget" ref="9160137"/>
+                                                                                       <string key="NSAction">_doScroller:</string>
+                                                                                       <double key="NSPercent">9.656652e-01</double>
+                                                                               </object>
+                                                                       </object>
+                                                                       <string key="NSFrame">{{20, 20}, {534, 344}}</string>
+                                                                       <reference key="NSSuperview" ref="60629844"/>
+                                                                       <reference key="NSNextKeyView" ref="13598910"/>
+                                                                       <int key="NSsFlags">18</int>
+                                                                       <reference key="NSVScroller" ref="459639248"/>
+                                                                       <reference key="NSHScroller" ref="636348341"/>
+                                                                       <reference key="NSContentView" ref="13598910"/>
+                                                                       <bytes key="NSScrollAmts">AAAAAAAAAABBmAAAQZgAAA</bytes>
+                                                               </object>
+                                                               <object class="NSSlider" id="948250828">
+                                                                       <reference key="NSNextResponder" ref="60629844"/>
+                                                                       <int key="NSvFlags">-2147483356</int>
+                                                                       <string key="NSFrame">{{60, 1}, {180, 16}}</string>
+                                                                       <reference key="NSSuperview" ref="60629844"/>
+                                                                       <bool key="NSEnabled">YES</bool>
+                                                                       <object class="NSSliderCell" key="NSCell" id="1016294819">
+                                                                               <int key="NSCellFlags">67501824</int>
+                                                                               <int key="NSCellFlags2">262144</int>
+                                                                               <object class="NSMutableString" key="NSContents">
+                                                                                       <characters key="NS.bytes"/>
+                                                                               </object>
+                                                                               <object class="NSFont" key="NSSupport" id="459826394">
+                                                                                       <string key="NSName">Helvetica</string>
+                                                                                       <double key="NSSize">1.200000e+01</double>
+                                                                                       <int key="NSfFlags">16</int>
+                                                                               </object>
+                                                                               <reference key="NSControlView" ref="948250828"/>
+                                                                               <double key="NSMaxValue">3.000000e+01</double>
+                                                                               <double key="NSMinValue">0.000000e+00</double>
+                                                                               <double key="NSValue">2.000000e+00</double>
+                                                                               <double key="NSAltIncValue">0.000000e+00</double>
+                                                                               <int key="NSNumberOfTickMarks">31</int>
+                                                                               <int key="NSTickMarkPosition">1</int>
+                                                                               <bool key="NSAllowsTickMarkValuesOnly">YES</bool>
+                                                                               <bool key="NSVertical">NO</bool>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSSlider" id="252090132">
+                                                                       <reference key="NSNextResponder" ref="60629844"/>
+                                                                       <int key="NSvFlags">-2147483356</int>
+                                                                       <string key="NSFrame">{{296, 2}, {80, 16}}</string>
+                                                                       <reference key="NSSuperview" ref="60629844"/>
+                                                                       <bool key="NSEnabled">YES</bool>
+                                                                       <object class="NSSliderCell" key="NSCell" id="271127179">
+                                                                               <int key="NSCellFlags">67501824</int>
+                                                                               <int key="NSCellFlags2">262144</int>
+                                                                               <object class="NSMutableString" key="NSContents">
+                                                                                       <characters key="NS.bytes"/>
+                                                                               </object>
+                                                                               <reference key="NSSupport" ref="459826394"/>
+                                                                               <reference key="NSControlView" ref="252090132"/>
+                                                                               <double key="NSMaxValue">1.000000e+01</double>
+                                                                               <double key="NSMinValue">0.000000e+00</double>
+                                                                               <double key="NSValue">3.000000e+00</double>
+                                                                               <double key="NSAltIncValue">0.000000e+00</double>
+                                                                               <int key="NSNumberOfTickMarks">11</int>
+                                                                               <int key="NSTickMarkPosition">1</int>
+                                                                               <bool key="NSAllowsTickMarkValuesOnly">YES</bool>
+                                                                               <bool key="NSVertical">NO</bool>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSTextField" id="316422061">
+                                                                       <reference key="NSNextResponder" ref="60629844"/>
+                                                                       <int key="NSvFlags">-2147483356</int>
+                                                                       <string key="NSFrame">{{17, 0}, {38, 14}}</string>
+                                                                       <reference key="NSSuperview" ref="60629844"/>
+                                                                       <bool key="NSEnabled">YES</bool>
+                                                                       <object class="NSTextFieldCell" key="NSCell" id="655488883">
+                                                                               <int key="NSCellFlags">67239424</int>
+                                                                               <int key="NSCellFlags2">272629760</int>
+                                                                               <string key="NSContents">Indent</string>
+                                                                               <reference key="NSSupport" ref="26"/>
+                                                                               <reference key="NSControlView" ref="316422061"/>
+                                                                               <object class="NSColor" key="NSBackgroundColor" id="987568653">
+                                                                                       <int key="NSColorSpace">6</int>
+                                                                                       <string key="NSCatalogName">System</string>
+                                                                                       <string key="NSColorName">controlColor</string>
+                                                                                       <reference key="NSColor" ref="724853981"/>
+                                                                               </object>
+                                                                               <reference key="NSTextColor" ref="434514744"/>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSTextField" id="891125080">
+                                                                       <reference key="NSNextResponder" ref="60629844"/>
+                                                                       <int key="NSvFlags">-2147483356</int>
+                                                                       <string key="NSFrame">{{245, 1}, {46, 14}}</string>
+                                                                       <reference key="NSSuperview" ref="60629844"/>
+                                                                       <bool key="NSEnabled">YES</bool>
+                                                                       <object class="NSTextFieldCell" key="NSCell" id="402192242">
+                                                                               <int key="NSCellFlags">67239424</int>
+                                                                               <int key="NSCellFlags2">272629760</int>
+                                                                               <string key="NSContents">Spacing</string>
+                                                                               <reference key="NSSupport" ref="26"/>
+                                                                               <reference key="NSControlView" ref="891125080"/>
+                                                                               <reference key="NSBackgroundColor" ref="987568653"/>
+                                                                               <reference key="NSTextColor" ref="434514744"/>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSButton" id="1065139278">
+                                                                       <reference key="NSNextResponder" ref="60629844"/>
+                                                                       <int key="NSvFlags">292</int>
+                                                                       <string key="NSFrame">{{6, -25}, {159, 16}}</string>
+                                                                       <reference key="NSSuperview" ref="60629844"/>
+                                                                       <bool key="NSEnabled">YES</bool>
+                                                                       <object class="NSButtonCell" key="NSCell" id="907474520">
+                                                                               <int key="NSCellFlags">67239424</int>
+                                                                               <int key="NSCellFlags2">134479872</int>
+                                                                               <string key="NSContents">quick way to intercept delete key</string>
+                                                                               <object class="NSFont" key="NSSupport">
+                                                                                       <string key="NSName">LucidaGrande</string>
+                                                                                       <double key="NSSize">9.000000e+00</double>
+                                                                                       <int key="NSfFlags">3614</int>
+                                                                               </object>
+                                                                               <reference key="NSControlView" ref="1065139278"/>
+                                                                               <int key="NSButtonFlags">-2038021889</int>
+                                                                               <int key="NSButtonFlags2">34</int>
+                                                                               <object class="NSFont" key="NSAlternateImage">
+                                                                                       <string key="NSName">LucidaGrande</string>
+                                                                                       <double key="NSSize">9.000000e+00</double>
+                                                                                       <int key="NSfFlags">16</int>
+                                                                               </object>
+                                                                               <string key="NSAlternateContents"/>
+                                                                               <string type="base64-UTF8" key="NSKeyEquivalent">fw</string>
+                                                                               <int key="NSPeriodicDelay">200</int>
+                                                                               <int key="NSPeriodicInterval">25</int>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSFrameSize">{574, 371}</string>
+                                                       <reference key="NSSuperview" ref="431299686"/>
+                                                       <string key="NSClassName">NSView</string>
+                                                       <string key="NSExtension">NSResponder</string>
+                                               </object>
+                                               <object class="NSTextField" id="463845363">
+                                                       <reference key="NSNextResponder" ref="431299686"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{17, 398}, {148, 14}}</string>
+                                                       <reference key="NSSuperview" ref="431299686"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="617812287">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">272760832</int>
+                                                               <string key="NSContents">Pending Jobs</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="463845363"/>
+                                                               <reference key="NSBackgroundColor" ref="987568653"/>
+                                                               <reference key="NSTextColor" ref="434514744"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="138063786">
+                                                       <reference key="NSNextResponder" ref="431299686"/>
+                                                       <int key="NSvFlags">264</int>
+                                                       <string key="NSFrame">{{17, 376}, {540, 14}}</string>
+                                                       <reference key="NSSuperview" ref="431299686"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="108133680">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">272760832</int>
+                                                               <string key="NSContents">There are no jobs currently encoding</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="138063786"/>
+                                                               <reference key="NSBackgroundColor" ref="987568653"/>
+                                                               <reference key="NSTextColor" ref="434514744"/>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <string key="NSFrameSize">{574, 423}</string>
+                                       <reference key="NSSuperview"/>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
+                               <string key="NSMinSize">{525, 362}</string>
+                               <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <string key="NSFrameAutosaveName">QueueWindow</string>
+                       </object>
+               </object>
+               <object class="IBObjectContainer" key="IBDocument.Objects">
+                       <object class="NSMutableArray" key="connectionRecords">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fQueuePane</string>
+                                               <reference key="source" ref="678333032"/>
+                                               <reference key="destination" ref="60629844"/>
+                                       </object>
+                                       <int key="connectionID">2561</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fQueueCountField</string>
+                                               <reference key="source" ref="678333032"/>
+                                               <reference key="destination" ref="463845363"/>
+                                       </object>
+                                       <int key="connectionID">2564</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">delegate</string>
+                                               <reference key="source" ref="238545558"/>
+                                               <reference key="destination" ref="678333032"/>
+                                       </object>
+                                       <int key="connectionID">2579</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fOutlineView</string>
+                                               <reference key="source" ref="678333032"/>
+                                               <reference key="destination" ref="790027174"/>
+                                       </object>
+                                       <int key="connectionID">2601</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">dataSource</string>
+                                               <reference key="source" ref="790027174"/>
+                                               <reference key="destination" ref="678333032"/>
+                                       </object>
+                                       <int key="connectionID">2602</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">delegate</string>
+                                               <reference key="source" ref="790027174"/>
+                                               <reference key="destination" ref="678333032"/>
+                                       </object>
+                                       <int key="connectionID">2603</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">removeSelectedQueueItem:</string>
+                                               <reference key="source" ref="678333032"/>
+                                               <reference key="destination" ref="1065139278"/>
+                                       </object>
+                                       <int key="connectionID">2623</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">window</string>
+                                               <reference key="source" ref="678333032"/>
+                                               <reference key="destination" ref="238545558"/>
+                                       </object>
+                                       <int key="connectionID">2645</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fProgressTextField</string>
+                                               <reference key="source" ref="678333032"/>
+                                               <reference key="destination" ref="138063786"/>
+                                       </object>
+                                       <int key="connectionID">2648</int>
+                               </object>
+                       </object>
+                       <object class="IBMutableOrderedSet" key="objectRecords">
+                               <object class="NSArray" key="orderedObjects">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">0</int>
+                                               <object class="NSArray" key="object" id="1017359617">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <reference key="children" ref="543585533"/>
+                                               <nil key="parent"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-2</int>
+                                               <reference key="object" ref="678333032"/>
+                                               <reference key="parent" ref="1017359617"/>
+                                               <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-1</int>
+                                               <reference key="object" ref="258430128"/>
+                                               <reference key="parent" ref="1017359617"/>
+                                               <string key="objectName">First Responder</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2576</int>
+                                               <reference key="object" ref="238545558"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="431299686"/>
+                                               </object>
+                                               <reference key="parent" ref="1017359617"/>
+                                               <string key="objectName">Window</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2577</int>
+                                               <reference key="object" ref="431299686"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="60629844"/>
+                                                       <reference ref="138063786"/>
+                                                       <reference ref="463845363"/>
+                                               </object>
+                                               <reference key="parent" ref="238545558"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2547</int>
+                                               <reference key="object" ref="60629844"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="9160137"/>
+                                                       <reference ref="948250828"/>
+                                                       <reference ref="252090132"/>
+                                                       <reference ref="316422061"/>
+                                                       <reference ref="891125080"/>
+                                                       <reference ref="1065139278"/>
+                                               </object>
+                                               <reference key="parent" ref="431299686"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2596</int>
+                                               <reference key="object" ref="9160137"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="790027174"/>
+                                                       <reference ref="459639248"/>
+                                                       <reference ref="636348341"/>
+                                               </object>
+                                               <reference key="parent" ref="60629844"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2597</int>
+                                               <reference key="object" ref="790027174"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="664777621"/>
+                                                       <reference ref="498008730"/>
+                                                       <reference ref="821940358"/>
+                                               </object>
+                                               <reference key="parent" ref="9160137"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2599</int>
+                                               <reference key="object" ref="664777621"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="574589932"/>
+                                               </object>
+                                               <reference key="parent" ref="790027174"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2609</int>
+                                               <reference key="object" ref="574589932"/>
+                                               <reference key="parent" ref="664777621"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2604</int>
+                                               <reference key="object" ref="498008730"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="620017021"/>
+                                               </object>
+                                               <reference key="parent" ref="790027174"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2605</int>
+                                               <reference key="object" ref="620017021"/>
+                                               <reference key="parent" ref="498008730"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2624</int>
+                                               <reference key="object" ref="821940358"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="592677893"/>
+                                               </object>
+                                               <reference key="parent" ref="790027174"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2625</int>
+                                               <reference key="object" ref="592677893"/>
+                                               <reference key="parent" ref="821940358"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2610</int>
+                                               <reference key="object" ref="948250828"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1016294819"/>
+                                               </object>
+                                               <reference key="parent" ref="60629844"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2611</int>
+                                               <reference key="object" ref="252090132"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="271127179"/>
+                                               </object>
+                                               <reference key="parent" ref="60629844"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2614</int>
+                                               <reference key="object" ref="316422061"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="655488883"/>
+                                               </object>
+                                               <reference key="parent" ref="60629844"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2615</int>
+                                               <reference key="object" ref="891125080"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="402192242"/>
+                                               </object>
+                                               <reference key="parent" ref="60629844"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2622</int>
+                                               <reference key="object" ref="1065139278"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="907474520"/>
+                                               </object>
+                                               <reference key="parent" ref="60629844"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2638</int>
+                                               <reference key="object" ref="1016294819"/>
+                                               <reference key="parent" ref="948250828"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2639</int>
+                                               <reference key="object" ref="271127179"/>
+                                               <reference key="parent" ref="252090132"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2640</int>
+                                               <reference key="object" ref="655488883"/>
+                                               <reference key="parent" ref="316422061"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2641</int>
+                                               <reference key="object" ref="402192242"/>
+                                               <reference key="parent" ref="891125080"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2642</int>
+                                               <reference key="object" ref="907474520"/>
+                                               <reference key="parent" ref="1065139278"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2643</int>
+                                               <reference key="object" ref="459639248"/>
+                                               <reference key="parent" ref="9160137"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2644</int>
+                                               <reference key="object" ref="636348341"/>
+                                               <reference key="parent" ref="9160137"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-3</int>
+                                               <reference key="object" ref="529995888"/>
+                                               <reference key="parent" ref="1017359617"/>
+                                               <string key="objectName">Application</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2511</int>
+                                               <reference key="object" ref="463845363"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="617812287"/>
+                                               </object>
+                                               <reference key="parent" ref="431299686"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2637</int>
+                                               <reference key="object" ref="617812287"/>
+                                               <reference key="parent" ref="463845363"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2646</int>
+                                               <reference key="object" ref="138063786"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="108133680"/>
+                                               </object>
+                                               <reference key="parent" ref="431299686"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2647</int>
+                                               <reference key="object" ref="108133680"/>
+                                               <reference key="parent" ref="138063786"/>
+                                       </object>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="flattenedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>-1.IBPluginDependency</string>
+                                       <string>-2.IBPluginDependency</string>
+                                       <string>2511.IBPluginDependency</string>
+                                       <string>2511.ImportedFromIB2</string>
+                                       <string>2547.IBPluginDependency</string>
+                                       <string>2547.ImportedFromIB2</string>
+                                       <string>2576.IBEditorWindowLastContentRect</string>
+                                       <string>2576.IBPluginDependency</string>
+                                       <string>2576.IBWindowTemplateEditedContentRect</string>
+                                       <string>2576.ImportedFromIB2</string>
+                                       <string>2576.windowTemplate.hasMaxSize</string>
+                                       <string>2576.windowTemplate.hasMinSize</string>
+                                       <string>2576.windowTemplate.maxSize</string>
+                                       <string>2576.windowTemplate.minSize</string>
+                                       <string>2577.IBPluginDependency</string>
+                                       <string>2577.ImportedFromIB2</string>
+                                       <string>2596.IBPluginDependency</string>
+                                       <string>2596.ImportedFromIB2</string>
+                                       <string>2597.CustomClassName</string>
+                                       <string>2597.IBPluginDependency</string>
+                                       <string>2597.ImportedFromIB2</string>
+                                       <string>2599.IBPluginDependency</string>
+                                       <string>2599.ImportedFromIB2</string>
+                                       <string>2604.IBPluginDependency</string>
+                                       <string>2604.ImportedFromIB2</string>
+                                       <string>2605.IBPluginDependency</string>
+                                       <string>2605.ImportedFromIB2</string>
+                                       <string>2609.CustomClassName</string>
+                                       <string>2609.IBPluginDependency</string>
+                                       <string>2609.ImportedFromIB2</string>
+                                       <string>2610.IBPluginDependency</string>
+                                       <string>2610.ImportedFromIB2</string>
+                                       <string>2611.IBPluginDependency</string>
+                                       <string>2611.ImportedFromIB2</string>
+                                       <string>2614.IBPluginDependency</string>
+                                       <string>2614.ImportedFromIB2</string>
+                                       <string>2615.IBPluginDependency</string>
+                                       <string>2615.ImportedFromIB2</string>
+                                       <string>2622.IBPluginDependency</string>
+                                       <string>2622.ImportedFromIB2</string>
+                                       <string>2624.IBPluginDependency</string>
+                                       <string>2624.ImportedFromIB2</string>
+                                       <string>2625.IBPluginDependency</string>
+                                       <string>2625.ImportedFromIB2</string>
+                                       <string>2643.IBShouldRemoveOnLegacySave</string>
+                                       <string>2644.IBShouldRemoveOnLegacySave</string>
+                                       <string>2646.IBPluginDependency</string>
+                                       <string>2646.ImportedFromIB2</string>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <integer value="1" id="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{170, 67}, {574, 423}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{{170, 67}, {574, 423}}</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>{3.40282e+38, 3.40282e+38}</string>
+                                       <string>{525, 340}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>HBQueueOutlineView</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>HBImageAndTextCell</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="unlocalizedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="activeLocalization"/>
+                       <object class="NSMutableDictionary" key="localizations">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="sourceID"/>
+                       <int key="maxID">2648</int>
+               </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes">
+                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBImageAndTextCell</string>
+                                       <string key="superclassName">NSTextFieldCell</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">HBImageAndTextCell.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBImageAndTextCell</string>
+                                       <string key="superclassName">NSTextFieldCell</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBQueueController</string>
+                                       <string key="superclassName">NSWindowController</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>imageSpacingChanged:</string>
+                                                       <string>indentChanged:</string>
+                                                       <string>removeSelectedQueueItem:</string>
+                                                       <string>revealSelectedQueueItem:</string>
+                                                       <string>showQueueWindow:</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>fCurrentJobPane</string>
+                                                       <string>fIndentation</string>
+                                                       <string>fJobDescTextField</string>
+                                                       <string>fJobIconView</string>
+                                                       <string>fOutlineView</string>
+                                                       <string>fProgressBar</string>
+                                                       <string>fProgressTextField</string>
+                                                       <string>fQueueCountField</string>
+                                                       <string>fQueuePane</string>
+                                                       <string>fSpacing</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>NSView</string>
+                                                       <string>NSSlider</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSImageView</string>
+                                                       <string>HBQueueOutlineView</string>
+                                                       <string>NSProgressIndicator</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSView</string>
+                                                       <string>NSSlider</string>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier" id="333889241">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">HBQueueController.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBQueueController</string>
+                                       <string key="superclassName">NSWindowController</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>cancelCurrentJob:</string>
+                                                       <string>revealSelectedJobGroups:</string>
+                                                       <string>togglePauseResume:</string>
+                                                       <string>toggleStartCancel:</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBQueueOutlineView</string>
+                                       <string key="superclassName">NSOutlineView</string>
+                                       <reference key="sourceIdentifier" ref="333889241"/>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">HBQueueOutlineView</string>
+                                       <string key="superclassName">NSOutlineView</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">PictureController.h</string>
+                                       </object>
+                               </object>
+                       </object>
+               </object>
+               <int key="IBDocument.localizationMode">0</int>
+               <string key="IBDocument.LastKnownRelativeProjectPath">../HandBrake.xcodeproj</string>
+               <int key="IBDocument.defaultPropertyAccessControl">3</int>
+       </data>
+</archive>
diff --git a/macosx/Growl.framework/Growl b/macosx/Growl.framework/Growl
new file mode 120000 (symlink)
index 0000000..85956e2
--- /dev/null
@@ -0,0 +1 @@
+Versions/Current/Growl
\ No newline at end of file
diff --git a/macosx/Growl.framework/Headers b/macosx/Growl.framework/Headers
new file mode 120000 (symlink)
index 0000000..a177d2a
--- /dev/null
@@ -0,0 +1 @@
+Versions/Current/Headers
\ No newline at end of file
diff --git a/macosx/Growl.framework/Resources b/macosx/Growl.framework/Resources
new file mode 120000 (symlink)
index 0000000..953ee36
--- /dev/null
@@ -0,0 +1 @@
+Versions/Current/Resources
\ No newline at end of file
diff --git a/macosx/Growl.framework/Versions/A/Growl b/macosx/Growl.framework/Versions/A/Growl
new file mode 100755 (executable)
index 0000000..a0572a3
Binary files /dev/null and b/macosx/Growl.framework/Versions/A/Growl differ
diff --git a/macosx/Growl.framework/Versions/A/Headers/Growl.h b/macosx/Growl.framework/Versions/A/Headers/Growl.h
new file mode 100644 (file)
index 0000000..e2a4425
--- /dev/null
@@ -0,0 +1,6 @@
+#include "GrowlDefines.h"
+
+#ifdef __OBJC__
+#      include "GrowlApplicationBridge.h"
+#endif
+#include "GrowlApplicationBridge-Carbon.h"
diff --git a/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h b/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h
new file mode 100644 (file)
index 0000000..fb70509
--- /dev/null
@@ -0,0 +1,758 @@
+//
+//  GrowlApplicationBridge-Carbon.h
+//  Growl
+//
+//  Created by Mac-arena the Bored Zo on Wed Jun 18 2004.
+//  Based on GrowlApplicationBridge.h by Evan Schoenberg.
+//  This source code is in the public domain. You may freely link it into any
+//    program.
+//
+
+#ifndef _GROWLAPPLICATIONBRIDGE_CARBON_H_
+#define _GROWLAPPLICATIONBRIDGE_CARBON_H_
+
+#include <sys/cdefs.h>
+#include <Carbon/Carbon.h>
+
+/*!    @header GrowlApplicationBridge-Carbon.h
+ *     @abstract       Declares an API that Carbon applications can use to interact with Growl.
+ *     @discussion     GrowlApplicationBridge uses a delegate to provide information //XXX
+ *      to Growl (such as your application's name and what notifications it may
+ *      post) and to provide information to your application (such as that Growl
+ *      is listening for notifications or that a notification has been clicked).
+ *
+ *      You can set the Growldelegate with Growl_SetDelegate and find out the
+ *      current delegate with Growl_GetDelegate. See struct Growl_Delegate for more
+ *      information about the delegate.
+ */
+
+__BEGIN_DECLS
+
+/*!    @struct Growl_Delegate
+ *     @abstract Delegate to supply GrowlApplicationBridge with information and respond to events.
+ *     @discussion The Growl delegate provides your interface to
+ *      GrowlApplicationBridge. When GrowlApplicationBridge needs information about
+ *      your application, it looks for it in the delegate; when Growl or the user
+ *      does something that you might be interested in, GrowlApplicationBridge
+ *      looks for a callback in the delegate and calls it if present
+ *      (meaning, if it is not <code>NULL</code>).
+ *     XXX on all of that
+ *  @field size The size of the delegate structure.
+ *     @field applicationName The name of your application.
+ *     @field registrationDictionary A dictionary describing your application and the notifications it can send out.
+ *     @field applicationIconData Your application's icon.
+ *     @field growlInstallationWindowTitle The title of the installation window.
+ *     @field growlInstallationInformation Text to display in the installation window.
+ *     @field growlUpdateWindowTitle The title of the update window.
+ *     @field growlUpdateInformation Text to display in the update window.
+ *     @field referenceCount A count of owners of the delegate.
+ *     @field retain Called when GrowlApplicationBridge receives this delegate.
+ *     @field release Called when GrowlApplicationBridge no longer needs this delegate.
+ *     @field growlIsReady Called when GrowlHelperApp is listening for notifications.
+ *     @field growlNotificationWasClicked Called when a Growl notification is clicked.
+ *  @field growlNotificationTimedOut Called when a Growl notification timed out.
+ */
+struct Growl_Delegate {
+       /*      @discussion This should be sizeof(struct Growl_Delegate).
+        */
+       size_t size;
+
+       /*All of these attributes are optional.
+        *Optional attributes can be NULL; required attributes that
+        *       are NULL cause setting the Growl delegate to fail.
+        *XXX - move optional/required status into the discussion for each field
+        */
+
+       /* This name is used both internally and in the Growl preferences.
+        *
+        *       This should remain stable between different versions and incarnations of
+        *       your application.
+        *       For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and
+        *       "SurfWriter Lite" are not.
+        *
+        * This can be <code>NULL</code> if it is provided elsewhere, namely in an
+        *       auto-discoverable plist file in your app bundle
+        *       (XXX refer to more information on that) or in registrationDictionary.
+        */
+       CFStringRef applicationName;
+
+       /*
+        * Must contain at least these keys:
+        *      GROWL_NOTIFICATIONS_ALL (CFArray):
+        *              Contains the names of all notifications your application may post.
+        *
+        * Can also contain these keys:
+        *      GROWL_NOTIFICATIONS_DEFAULT (CFArray):
+        *              Names of notifications that should be enabled by default.
+        *              If omitted, GROWL_NOTIFICATIONS_ALL will be used.
+        *      GROWL_APP_NAME (CFString):
+        *              Same as the applicationName member of this structure.
+        *              If both are present, the applicationName member shall prevail.
+        *              If this key is present, you may omit applicationName (set it to <code>NULL</code>).
+        *      GROWL_APP_ICON (CFData):
+        *              Same as the iconData member of this structure.
+        *              If both are present, the iconData member shall prevail.
+        *              If this key is present, you may omit iconData (set it to <code>NULL</code>).
+        *
+        * If you change the contents of this dictionary after setting the delegate,
+        *      be sure to call Growl_Reregister.
+        *
+        * This can be <code>NULL</code> if you have an auto-discoverable plist file in your app
+        *       bundle. (XXX refer to more information on that)
+        */
+       CFDictionaryRef registrationDictionary;
+
+       /* The data can be in any format supported by NSImage. As of
+        *       Mac OS X 10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and
+        *       PICT formats.
+        *
+        *       If this is not supplied, Growl will look up your application's icon by
+        *       its application name.
+        */
+       CFDataRef applicationIconData;
+
+       /* Installer display attributes
+        *
+        * These four attributes are used by the Growl installer, if this framework
+        *      supports it.
+        * For any of these being <code>NULL</code>, a localised default will be
+        *      supplied.
+        */
+
+       /*      If this is <code>NULL</code>, Growl will use a default,
+        *       localized title.
+        *
+        *       Only used if you're using Growl-WithInstaller.framework. Otherwise,
+        *       this member is ignored.
+        */
+       CFStringRef growlInstallationWindowTitle;
+       /*      This information may be as long or short as desired (the
+        *       window will be sized to fit it).  If Growl is not installed, it will
+        *       be displayed to the user as an explanation of what Growl is and what
+        *       it can do in your application.
+        *       It should probably note that no download is required to install.
+        *
+        *       If this is <code>NULL</code>, Growl will use a default, localized
+        *       explanation.
+        *
+        *       Only used if you're using Growl-WithInstaller.framework. Otherwise,
+        *       this member is ignored.
+        */
+       CFStringRef growlInstallationInformation;
+       /*      If this is <code>NULL</code>, Growl will use a default,
+        *       localized title.
+        *
+        *       Only used if you're using Growl-WithInstaller.framework. Otherwise,
+        *       this member is ignored.
+        */
+       CFStringRef growlUpdateWindowTitle;
+       /*      This information may be as long or short as desired (the
+        *       window will be sized to fit it).  If an older version of Growl is
+        *       installed, it will be displayed to the user as an explanation that an
+        *       updated version of Growl is included in your application and
+        *       no download is required.
+        *
+        *       If this is <code>NULL</code>, Growl will use a default, localized
+        *       explanation.
+        *
+        *       Only used if you're using Growl-WithInstaller.framework. Otherwise,
+        *       this member is ignored.
+        */
+       CFStringRef growlUpdateInformation;
+
+       /*      This member is provided for use by your retain and release
+        *       callbacks (see below).
+        *
+        *       GrowlApplicationBridge never directly uses this member. Instead, it
+        *       calls your retain callback (if non-<code>NULL</code>) and your release
+        *       callback (if non-<code>NULL</code>).
+        */
+       unsigned referenceCount;
+
+       //Functions. Currently all of these are optional (any of them can be NULL).
+
+       /*      When you call Growl_SetDelegate(newDelegate), it will call
+        *       oldDelegate->release(oldDelegate), and then it will call
+        *       newDelegate->retain(newDelegate), and the return value from retain
+        *       is what will be set as the delegate.
+        *       (This means that this member works like CFRetain and -[NSObject retain].)
+        *       This member is optional (it can be <code>NULL</code>).
+        *       For a delegate allocated with malloc, this member would be
+        *       <code>NULL</code>.
+        *      @result A delegate to which GrowlApplicationBridge holds a reference.
+        */
+       void *(*retain)(void *);
+       /*      When you call Growl_SetDelegate(newDelegate), it will call
+        *       oldDelegate->release(oldDelegate), and then it will call
+        *       newDelegate->retain(newDelegate), and the return value from retain
+        *       is what will be set as the delegate.
+        *       (This means that this member works like CFRelease and
+        *        -[NSObject release].)
+        *       This member is optional (it can be NULL).
+        *       For a delegate allocated with malloc, this member might be
+        *       <code>free</code>(3).
+        */
+       void (*release)(void *);
+
+       /*      Informs the delegate that Growl (specifically, the GrowlHelperApp) was
+        *       launched successfully (or was already running). The application can
+        *       take actions with the knowledge that Growl is installed and functional.
+        */
+       void (*growlIsReady)(void);
+
+       /*      Informs the delegate that a Growl notification was clicked. It is only
+        *       sent for notifications sent with a non-<code>NULL</code> clickContext,
+        *       so if you want to receive a message when a notification is clicked,
+        *       clickContext must not be <code>NULL</code> when calling
+        *       Growl_PostNotification or
+        *       Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext.
+        */
+       void (*growlNotificationWasClicked)(CFPropertyListRef clickContext);
+
+       /*      Informs the delegate that a Growl notification timed out. It is only
+        *       sent for notifications sent with a non-<code>NULL</code> clickContext,
+        *       so if you want to receive a message when a notification is clicked,
+        *       clickContext must not be <code>NULL</code> when calling
+        *       Growl_PostNotification or
+        *       Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext.
+        */
+       void (*growlNotificationTimedOut)(CFPropertyListRef clickContext);
+};
+
+/*!    @struct Growl_Notification
+ *     @abstract Structure describing a Growl notification.
+ *     @discussion XXX
+ *     @field size The size of the notification structure.
+ *     @field name Identifies the notification.
+ *     @field title Short synopsis of the notification.
+ *  @field description Additional text.
+ *     @field iconData An icon for the notification.
+ *     @field priority An indicator of the notification's importance.
+ *     @field reserved Bits reserved for future usage.
+ *     @field isSticky Requests that a notification stay on-screen until dismissed explicitly.
+ *     @field clickContext An identifier to be passed to your click callback when a notification is clicked.
+ *     @field clickCallback A callback to call when the notification is clicked.
+ */
+struct Growl_Notification {
+       /*      This should be sizeof(struct Growl_Notification).
+        */
+       size_t size;
+
+       /*      The notification name distinguishes one type of
+        *       notification from another. The name should be human-readable, as it
+        *       will be displayed in the Growl preference pane.
+        *
+        *       The name is used in the GROWL_NOTIFICATIONS_ALL and
+        *       GROWL_NOTIFICATIONS_DEFAULT arrays in the registration dictionary, and
+        *       in this member of the Growl_Notification structure.
+        */
+       CFStringRef name;
+
+       /*      A notification's title describes the notification briefly.
+        *       It should be easy to read quickly by the user.
+        */
+       CFStringRef title;
+
+       /*      The description supplements the title with more
+        *       information. It is usually longer and sometimes involves a list of
+        *       subjects. For example, for a 'Download complete' notification, the
+        *       description might have one filename per line. GrowlMail in Growl 0.6
+        *       uses a description of '%d new mail(s)' (formatted with the number of
+        *       messages).
+        */
+       CFStringRef description;
+
+       /*      The notification icon usually indicates either what
+        *       happened (it may have the same icon as e.g. a toolbar item that
+        *       started the process that led to the notification), or what it happened
+        *       to (e.g. a document icon).
+        *
+        *       The icon data is optional, so it can be <code>NULL</code>. In that
+        *       case, the application icon is used alone. Not all displays support
+        *       icons.
+        *
+        *       The data can be in any format supported by NSImage. As of Mac OS X
+        *       10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and PICT form
+        *       ats.
+        */
+       CFDataRef iconData;
+
+       /*      Priority is new in Growl 0.6, and is represented as a
+        *       signed integer from -2 to +2. 0 is Normal priority, -2 is Very Low
+        *       priority, and +2 is Very High priority.
+        *
+        *       Not all displays support priority. If you do not wish to assign a
+        *       priority to your notification, assign 0.
+        */
+       signed int priority;
+
+       /*      These bits are not used in Growl 0.6. Set them to 0.
+        */
+       unsigned reserved: 31;
+
+       /*      When the sticky bit is clear, in most displays,
+        *       notifications disappear after a certain amount of time. Sticky
+        *       notifications, however, remain on-screen until the user dismisses them
+        *       explicitly, usually by clicking them.
+        *
+        *       Sticky notifications were introduced in Growl 0.6. Most notifications
+        *       should not be sticky. Not all displays support sticky notifications,
+        *       and the user may choose in Growl's preference pane to force the
+        *       notification to be sticky or non-sticky, in which case the sticky bit
+        *       in the notification will be ignored.
+        */
+       unsigned isSticky: 1;
+
+       /*      If this is not <code>NULL</code>, and your click callback
+        *       is not <code>NULL</code> either, this will be passed to the callback
+        *       when your notification is clicked by the user.
+        *
+        *       Click feedback was introduced in Growl 0.6, and it is optional. Not
+        *       all displays support click feedback.
+        */
+       CFPropertyListRef clickContext;
+
+       /*      If this is not <code>NULL</code>, it will be called instead
+        *       of the Growl delegate's click callback when clickContext is
+        *       non-<code>NULL</code> and the notification is clicked on by the user.
+        *
+        *       Click feedback was introduced in Growl 0.6, and it is optional. Not
+        *       all displays support click feedback.
+        *
+        *       The per-notification click callback is not yet supported as of Growl
+        *       0.7.
+        */
+       void (*clickCallback)(CFPropertyListRef clickContext);
+};
+
+#pragma mark -
+#pragma mark Easy initialisers
+
+/*!    @defined        InitGrowlDelegate
+ *     @abstract       Callable macro. Initializes a Growl delegate structure to defaults.
+ *     @discussion     Call with a pointer to a struct Growl_Delegate. All of the
+ *      members of the structure will be set to 0 or <code>NULL</code>, except for
+ *      size (which will be set to <code>sizeof(struct Growl_Delegate)</code>) and
+ *      referenceCount (which will be set to 1).
+ */
+#define InitGrowlDelegate(delegate) \
+       do { \
+               if (delegate) { \
+                       (delegate)->size = sizeof(struct Growl_Delegate); \
+                       (delegate)->applicationName = NULL; \
+                       (delegate)->registrationDictionary = NULL; \
+                       (delegate)->applicationIconData = NULL; \
+                       (delegate)->growlInstallationWindowTitle = NULL; \
+                       (delegate)->growlInstallationInformation = NULL; \
+                       (delegate)->growlUpdateWindowTitle = NULL; \
+                       (delegate)->growlUpdateInformation = NULL; \
+                       (delegate)->referenceCount = 1U; \
+                       (delegate)->retain = NULL; \
+                       (delegate)->release = NULL; \
+                       (delegate)->growlIsReady = NULL; \
+                       (delegate)->growlNotificationWasClicked = NULL; \
+                       (delegate)->growlNotificationTimedOut = NULL; \
+               } \
+       } while(0)
+
+/*!    @defined        InitGrowlNotification
+ *     @abstract       Callable macro. Initializes a Growl notification structure to defaults.
+ *     @discussion     Call with a pointer to a struct Growl_Notification. All of
+ *      the members of the structure will be set to 0 or <code>NULL</code>, except
+ *      for size (which will be set to
+ *     <code>sizeof(struct Growl_Notification)</code>).
+ */
+#define InitGrowlNotification(notification) \
+       do { \
+               if (notification) { \
+                       (notification)->size = sizeof(struct Growl_Notification); \
+                       (notification)->name = NULL; \
+                       (notification)->title = NULL; \
+                       (notification)->description = NULL; \
+                       (notification)->iconData = NULL; \
+                       (notification)->priority = 0; \
+                       (notification)->reserved = 0U; \
+                       (notification)->isSticky = false; \
+                       (notification)->clickContext = NULL; \
+               } \
+       } while(0)
+
+#pragma mark -
+#pragma mark Public API
+
+//     @functiongroup  Managing the Growl delegate
+
+/*!    @function       Growl_SetDelegate
+ *     @abstract       Replaces the current Growl delegate with a new one, or removes
+ *      the Growl delegate.
+ *     @param  newDelegate
+ *     @result Returns false and does nothing else if a pointer that was passed in
+ *      is unsatisfactory (because it is non-<code>NULL</code>, but at least one
+ *      required member of it is <code>NULL</code>). Otherwise, sets or unsets the
+ *      delegate and returns true.
+ *     @discussion     When <code>newDelegate</code> is non-<code>NULL</code>, sets
+ *      the delegate to <code>newDelegate</code>. When it is <code>NULL</code>,
+ *      the current delegate will be unset, and no delegate will be in place.
+ *
+ *      It is legal for <code>newDelegate</code> to be the current delegate;
+ *      nothing will happen, and Growl_SetDelegate will return true. It is also
+ *      legal for it to be <code>NULL</code>, as described above; again, it will
+ *      return true.
+ *
+ *      If there was a delegate in place before the call, Growl_SetDelegate will
+ *      call the old delegate's release member if it was non-<code>NULL</code>. If
+ *      <code>newDelegate</code> is non-<code>NULL</code>, Growl_SetDelegate will
+ *      call <code>newDelegate->retain</code>, and set the delegate to its return
+ *      value.
+ *
+ *      If you are using Growl-WithInstaller.framework, and an older version of
+ *      Growl is installed on the user's system, the user will automatically be
+ *      prompted to update.
+ *
+ *      GrowlApplicationBridge currently does not copy this structure, nor does it
+ *      retain any of the CF objects in the structure (it regards the structure as
+ *      a container that retains the objects when they are added and releases them
+ *      when they are removed or the structure is destroyed). Also,
+ *      GrowlApplicationBridge currently does not modify any member of the
+ *      structure, except possibly the referenceCount by calling the retain and
+ *      release members.
+ */
+Boolean Growl_SetDelegate(struct Growl_Delegate *newDelegate);
+
+/*!    @function       Growl_GetDelegate
+ *     @abstract       Returns the current Growl delegate, if any.
+ *     @result The current Growl delegate.
+ *     @discussion     Returns the last pointer passed into Growl_SetDelegate, or
+ *      <code>NULL</code> if no such call has been made.
+ *
+ *      This function follows standard Core Foundation reference-counting rules.
+ *      Because it is a Get function, not a Copy function, it will not retain the
+ *      delegate on your behalf. You are responsible for retaining and releasing
+ *      the delegate as needed.
+ */
+struct Growl_Delegate *Growl_GetDelegate(void);
+
+#pragma mark -
+
+//     @functiongroup  Posting Growl notifications
+
+/*!    @function       Growl_PostNotification
+ *     @abstract       Posts a Growl notification.
+ *     @param  notification    The notification to post.
+ *     @discussion     This is the preferred means for sending a Growl notification.
+ *      The notification name and at least one of the title and description are
+ *      required (all three are preferred). All other parameters may be
+ *      <code>NULL</code> (or 0 or false as appropriate) to accept default values.
+ *
+ *      If using the Growl-WithInstaller framework, if Growl is not installed the
+ *      user will be prompted to install Growl.
+ *      If the user cancels, this function will have no effect until the next
+ *      application session, at which time when it is called the user will be
+ *      prompted again. The user is also given the option to not be prompted again.
+ *      If the user does choose to install Growl, the requested notification will
+ *      be displayed once Growl is installed and running.
+ */
+void Growl_PostNotification(const struct Growl_Notification *notification);
+
+/*!    @function Growl_PostNotificationWithDictionary
+*      @abstract       Notifies using a userInfo dictionary suitable for passing to
+*       CFDistributedNotificationCenter.
+*      @param  userInfo        The dictionary to notify with.
+*      @discussion     Before Growl 0.6, your application would have posted
+*       notifications using CFDistributedNotificationCenter by creating a userInfo
+*       dictionary with the notification data. This had the advantage of allowing
+*       you to add other data to the dictionary for programs besides Growl that
+*       might be listening.
+*
+*       This function allows you to use such dictionaries without being restricted
+*       to using CFDistributedNotificationCenter. The keys for this dictionary
+ *      can be found in GrowlDefines.h.
+*/
+void Growl_PostNotificationWithDictionary(CFDictionaryRef userInfo);
+
+/*!    @function       Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext
+ *     @abstract       Posts a Growl notification using parameter values.
+ *     @param  title   The title of the notification.
+ *     @param  description     The description of the notification.
+ *     @param  notificationName        The name of the notification as listed in the
+ *      registration dictionary.
+ *     @param  iconData        Data representing a notification icon. Can be <code>NULL</code>.
+ *     @param  priority        The priority of the notification (-2 to +2, with -2
+ *      being Very Low and +2 being Very High).
+ *     @param  isSticky        If true, requests that this notification wait for a
+ *      response from the user.
+ *     @param  clickContext    An object to pass to the clickCallback, if any. Can
+ *      be <code>NULL</code>, in which case the clickCallback is not called.
+ *     @discussion     Creates a temporary Growl_Notification, fills it out with the
+ *      supplied information, and calls Growl_PostNotification on it.
+ *      See struct Growl_Notification and Growl_PostNotification for more
+ *      information.
+ *
+ *      The icon data can be in any format supported by NSImage. As of Mac OS X
+ *      10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and PICT formats.
+ */
+void Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext(
+ /*inhale*/
+       CFStringRef title,
+       CFStringRef description,
+       CFStringRef notificationName,
+       CFDataRef iconData,
+       signed int priority,
+       Boolean isSticky,
+       CFPropertyListRef clickContext);
+
+#pragma mark -
+
+//     @functiongroup  Registering
+
+/*!    @function Growl_RegisterWithDictionary
+ *     @abstract       Register your application with Growl without setting a delegate.
+ *     @discussion     When you call this function with a dictionary,
+ *      GrowlApplicationBridge registers your application using that dictionary.
+ *      If you pass <code>NULL</code>, GrowlApplicationBridge will ask the delegate
+ *      (if there is one) for a dictionary, and if that doesn't work, it will look
+ *      in your application's bundle for an auto-discoverable plist.
+ *      (XXX refer to more information on that)
+ *
+ *      If you pass a dictionary to this function, it must include the
+ *      <code>GROWL_APP_NAME</code> key, unless a delegate is set.
+ *
+ *      This function is mainly an alternative to the delegate system introduced
+ *      with Growl 0.6. Without a delegate, you cannot receive callbacks such as
+ *      <code>growlIsReady</code> (since they are sent to the delegate). You can,
+ *      however, set a delegate after registering without one.
+ *
+ *      This function was introduced in Growl.framework 0.7.
+ *     @result <code>false</code> if registration failed (e.g. if Growl isn't installed).
+ */
+Boolean Growl_RegisterWithDictionary(CFDictionaryRef regDict);
+
+/*!    @function       Growl_Reregister
+ *     @abstract       Updates your registration with Growl.
+ *     @discussion     If your application changes the contents of the
+ *      GROWL_NOTIFICATIONS_ALL key in the registrationDictionary member of the
+ *      Growl delegate, or if it changes the value of that member, or if it
+ *      changes the contents of its auto-discoverable plist, call this function
+ *      to have Growl update its registration information for your application.
+ *
+ *      Otherwise, this function does not normally need to be called. If you're
+ *      using a delegate, your application will be registered when you set the
+ *      delegate if both the delegate and its registrationDictionary member are
+ *      non-<code>NULL</code>.
+ *
+ *      This function is now implemented using
+ *      <code>Growl_RegisterWithDictionary</code>.
+ */
+void Growl_Reregister(void);
+
+#pragma mark -
+
+/*!    @function       Growl_SetWillRegisterWhenGrowlIsReady
+ *     @abstract       Tells GrowlApplicationBridge to register with Growl when Growl
+ *      launches (or not).
+ *     @discussion     When Growl has started listening for notifications, it posts a
+ *      <code>GROWL_IS_READY</code> notification on the Distributed Notification
+ *      Center. GrowlApplicationBridge listens for this notification, using it to
+ *      perform various tasks (such as calling your delegate's
+ *      <code>growlIsReady</code> callback, if it has one). If this function is
+ *      called with <code>true</code>, one of those tasks will be to reregister
+ *      with Growl (in the manner of <code>Growl_Reregister</code>).
+ *
+ *      This attribute is automatically set back to <code>false</code>
+ *      (the default) after every <code>GROWL_IS_READY</code> notification.
+ *     @param  flag    <code>true</code> if you want GrowlApplicationBridge to register with
+ *      Growl when next it is ready; <code>false</code> if not.
+ */
+void Growl_SetWillRegisterWhenGrowlIsReady(Boolean flag);
+/*!    @function       Growl_WillRegisterWhenGrowlIsReady
+ *     @abstract       Reports whether GrowlApplicationBridge will register with Growl
+ *      when Growl next launches.
+ *     @result <code>true</code> if GrowlApplicationBridge will register with
+ *      Growl when next it posts GROWL_IS_READY; <code>false</code> if not.
+ */
+Boolean Growl_WillRegisterWhenGrowlIsReady(void);
+
+#pragma mark -
+
+//     @functiongroup  Obtaining registration dictionaries
+
+/*!    @function       Growl_CopyRegistrationDictionaryFromDelegate
+ *     @abstract       Asks the delegate for a registration dictionary.
+ *     @discussion     If no delegate is set, or if the delegate's
+ *      <code>registrationDictionary</code> member is <code>NULL</code>, this
+ *      function returns <code>NULL</code>.
+ *
+ *      This function does not attempt to clean up the dictionary in any way - for
+ *      example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
+ *      will be missing it too. Use
+ *      <code>Growl_CreateRegistrationDictionaryByFillingInDictionary:</code> or
+ *      <code>Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys</code>
+ *      to try to fill in missing keys.
+ *
+ *      This function was introduced in Growl.framework 0.7.
+ *     @result A registration dictionary.
+ */
+CFDictionaryRef Growl_CopyRegistrationDictionaryFromDelegate(void);
+
+/*!    @function       Growl_CopyRegistrationDictionaryFromBundle
+ *     @abstract       Looks in a bundle for a registration dictionary.
+ *     @discussion     This function looks in a bundle for an auto-discoverable
+ *      registration dictionary file using <code>CFBundleCopyResourceURL</code>.
+ *      If it finds one, it loads the file using <code>CFPropertyList</code> and
+ *      returns the result.
+ *
+ *      If you pass <code>NULL</code> as the bundle, the main bundle is examined.
+ *
+ *      This function does not attempt to clean up the dictionary in any way - for
+ *      example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
+ *      will be missing it too. Use
+ *      <code>Growl_CreateRegistrationDictionaryByFillingInDictionary:</code> or
+ *      <code>Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys</code>
+ *      to try to fill in missing keys.
+ *
+ *      This function was introduced in Growl.framework 0.7.
+ *     @result A registration dictionary.
+ */
+CFDictionaryRef Growl_CopyRegistrationDictionaryFromBundle(CFBundleRef bundle);
+
+/*!    @function       Growl_CreateBestRegistrationDictionary
+ *     @abstract       Obtains a registration dictionary, filled out to the best of
+ *      GrowlApplicationBridge's knowledge.
+ *     @discussion     This function creates a registration dictionary as best
+ *      GrowlApplicationBridge knows how.
+ *
+ *      First, GrowlApplicationBridge examines the Growl delegate (if there is
+ *      one) and gets the registration dictionary from that. If no such dictionary
+ *      was obtained, GrowlApplicationBridge looks in your application's main
+ *      bundle for an auto-discoverable registration dictionary file. If that
+ *      doesn't exist either, this function returns <code>NULL</code>.
+ *
+ *      Second, GrowlApplicationBridge calls
+ *      <code>Growl_CreateRegistrationDictionaryByFillingInDictionary</code> with
+ *      whatever dictionary was obtained. The result of that function is the
+ *      result of this function.
+ *
+ *      GrowlApplicationBridge uses this function when you call
+ *      <code>Growl_SetDelegate</code>, or when you call
+ *      <code>Growl_RegisterWithDictionary</code> with <code>NULL</code>.
+ *
+ *      This function was introduced in Growl.framework 0.7.
+ *     @result A registration dictionary.
+ */
+CFDictionaryRef Growl_CreateBestRegistrationDictionary(void);
+
+#pragma mark -
+
+//     @functiongroup  Filling in registration dictionaries
+
+/*!    @function       Growl_CreateRegistrationDictionaryByFillingInDictionary
+ *     @abstract       Tries to fill in missing keys in a registration dictionary.
+ *     @param  regDict The dictionary to fill in.
+ *     @result The dictionary with the keys filled in.
+ *     @discussion     This function examines the passed-in dictionary for missing keys,
+ *      and tries to work out correct values for them. As of 0.7, it uses:
+ *
+ *      Key                                                                 Value
+ *      ---                                                                 -----
+ *      <code>GROWL_APP_NAME</code>                 <code>CFBundleExecutableName</code>
+ *      <code>GROWL_APP_ICON</code>                 The icon of the application.
+ *      <code>GROWL_APP_LOCATION</code>             The location of the application.
+ *      <code>GROWL_NOTIFICATIONS_DEFAULT</code>    <code>GROWL_NOTIFICATIONS_ALL</code>
+ *
+ *      Keys are only filled in if missing; if a key is present in the dictionary,
+ *      its value will not be changed.
+ *
+ *      This function was introduced in Growl.framework 0.7.
+ */
+CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionary(CFDictionaryRef regDict);
+/*!    @function       Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys
+ *     @abstract       Tries to fill in missing keys in a registration dictionary.
+ *     @param  regDict The dictionary to fill in.
+ *     @param  keys    The keys to fill in. If <code>NULL</code>, any missing keys are filled in.
+ *     @result The dictionary with the keys filled in.
+ *     @discussion     This function examines the passed-in dictionary for missing keys,
+ *      and tries to work out correct values for them. As of 0.7, it uses:
+ *
+ *      Key                                                                 Value
+ *      ---                                                                 -----
+ *      <code>GROWL_APP_NAME</code>                 <code>CFBundleExecutableName</code>
+ *      <code>GROWL_APP_ICON</code>                 The icon of the application.
+ *      <code>GROWL_APP_LOCATION</code>             The location of the application.
+ *      <code>GROWL_NOTIFICATIONS_DEFAULT</code>    <code>GROWL_NOTIFICATIONS_ALL</code>
+ *
+ *      Only those keys that are listed in <code>keys</code> will be filled in.
+ *      Other missing keys are ignored. Also, keys are only filled in if missing;
+ *      if a key is present in the dictionary, its value will not be changed.
+ *
+ *      This function was introduced in Growl.framework 0.7.
+ */
+CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys(CFDictionaryRef regDict, CFSetRef keys);
+
+#pragma mark -
+
+//     @functiongroup  Querying Growl's status
+
+/*!    @function       Growl_IsInstalled
+ *     @abstract       Determines whether the Growl prefpane and its helper app are
+ *      installed.
+ *     @result Returns true if Growl is installed, false otherwise.
+ */
+Boolean Growl_IsInstalled(void);
+
+/*!    @function       Growl_IsRunning
+ *     @abstract       Cycles through the process list to find whether GrowlHelperApp
+ *      is running.
+ *     @result Returns true if Growl is running, false otherwise.
+ */
+Boolean Growl_IsRunning(void);
+
+#pragma mark -
+
+//     @functiongroup  Launching Growl
+
+/*!    @typedef        GrowlLaunchCallback
+ *     @abstract       Callback to notify you that Growl is running.
+ *     @param  context The context pointer passed to Growl_LaunchIfInstalled.
+ *     @discussion     Growl_LaunchIfInstalled calls this callback function if Growl
+ *      was already running or if it launched Growl successfully.
+ */
+typedef void (*GrowlLaunchCallback)(void *context);
+
+/*!    @function       Growl_LaunchIfInstalled
+ *     @abstract       Launches GrowlHelperApp if it is not already running.
+ *     @param  callback        A callback function which will be called if Growl was successfully
+ *      launched or was already running. Can be <code>NULL</code>.
+ *     @param  context The context pointer to pass to the callback. Can be <code>NULL</code>.
+ *     @result Returns true if Growl was successfully launched or was already
+ *      running; returns false and does not call the callback otherwise.
+ *     @discussion     Returns true and calls the callback (if the callback is not
+ *      <code>NULL</code>) if the Growl helper app began launching or was already
+ *      running. Returns false and performs no other action if Growl could not be
+ *      launched (e.g. because the Growl preference pane is not properly installed).
+ *
+ *      If <code>Growl_CreateBestRegistrationDictionary</code> returns
+ *      non-<code>NULL</code>, this function will register with Growl atomically.
+ *
+ *      The callback should take a single argument; this is to allow applications
+ *      to have context-relevant information passed back. It is perfectly
+ *      acceptable for context to be <code>NULL</code>. The callback itself can be
+ *      <code>NULL</code> if you don't want one.
+ */
+Boolean Growl_LaunchIfInstalled(GrowlLaunchCallback callback, void *context);
+
+#pragma mark -
+#pragma mark Constants
+
+/*!    @defined        GROWL_PREFPANE_BUNDLE_IDENTIFIER
+ *     @abstract       The CFBundleIdentifier of the Growl preference pane bundle.
+ *     @discussion     GrowlApplicationBridge uses this to determine whether Growl is
+ *      currently installed, by searching for the Growl preference pane. Your
+ *      application probably does not need to use this macro itself.
+ */
+#ifndef GROWL_PREFPANE_BUNDLE_IDENTIFIER
+#define GROWL_PREFPANE_BUNDLE_IDENTIFIER       CFSTR("com.growl.prefpanel")
+#endif
+
+__END_DECLS
+
+#endif /* _GROWLAPPLICATIONBRIDGE_CARBON_H_ */
diff --git a/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h b/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h
new file mode 100644 (file)
index 0000000..7ac315a
--- /dev/null
@@ -0,0 +1,556 @@
+//
+//  GrowlApplicationBridge.h
+//  Growl
+//
+//  Created by Evan Schoenberg on Wed Jun 16 2004.
+//  Copyright 2004-2005 The Growl Project. All rights reserved.
+//
+
+/*!
+ *     @header         GrowlApplicationBridge.h
+ *     @abstract   Defines the GrowlApplicationBridge class.
+ *     @discussion This header defines the GrowlApplicationBridge class as well as
+ *      the GROWL_PREFPANE_BUNDLE_IDENTIFIER constant.
+ */
+
+#ifndef __GrowlApplicationBridge_h__
+#define __GrowlApplicationBridge_h__
+
+#import <Foundation/Foundation.h>
+#import "GrowlDefines.h"
+
+//Forward declarations
+@protocol GrowlApplicationBridgeDelegate;
+
+/*!
+ *     @defined    GROWL_PREFPANE_BUNDLE_IDENTIFIER
+ *     @discussion The bundle identifier for the Growl prefpane.
+ */
+#define GROWL_PREFPANE_BUNDLE_IDENTIFIER       @"com.growl.prefpanel"
+
+/*!
+ *     @defined    GROWL_PREFPANE_NAME
+ *     @discussion The file name of the Growl prefpane.
+ */
+#define GROWL_PREFPANE_NAME                                    @"Growl.prefPane"
+
+//Internal notification when the user chooses not to install (to avoid continuing to cache notifications awaiting installation)
+#define GROWL_USER_CHOSE_NOT_TO_INSTALL_NOTIFICATION @"User chose not to install"
+
+//------------------------------------------------------------------------------
+#pragma mark -
+
+/*!
+ *     @class      GrowlApplicationBridge
+ *     @abstract   A class used to interface with Growl.
+ *     @discussion This class provides a means to interface with Growl.
+ *
+ *      Currently it provides a way to detect if Growl is installed and launch the
+ *      GrowlHelperApp if it's not already running.
+ */
+@interface GrowlApplicationBridge : NSObject {
+
+}
+
+/*!
+ *     @method isGrowlInstalled
+ *     @abstract Detects whether Growl is installed.
+ *     @discussion Determines if the Growl prefpane and its helper app are installed.
+ *     @result Returns YES if Growl is installed, NO otherwise.
+ */
++ (BOOL) isGrowlInstalled;
+
+/*!
+ *     @method isGrowlRunning
+ *     @abstract Detects whether GrowlHelperApp is currently running.
+ *     @discussion Cycles through the process list to find whether GrowlHelperApp is running and returns its findings.
+ *     @result Returns YES if GrowlHelperApp is running, NO otherwise.
+ */
++ (BOOL) isGrowlRunning;
+
+#pragma mark -
+
+/*!
+ *     @method setGrowlDelegate:
+ *     @abstract Set the object which will be responsible for providing and receiving Growl information.
+ *     @discussion This must be called before using GrowlApplicationBridge.
+ *
+ *      The methods in the GrowlApplicationBridgeDelegate protocol are required
+ *      and return the basic information needed to register with Growl.
+ *
+ *      The methods in the GrowlApplicationBridgeDelegate_InformalProtocol
+ *      informal protocol are individually optional.  They provide a greater
+ *      degree of interaction between the application and growl such as informing
+ *      the application when one of its Growl notifications is clicked by the user.
+ *
+ *      The methods in the GrowlApplicationBridgeDelegate_Installation_InformalProtocol
+ *      informal protocol are individually optional and are only applicable when
+ *      using the Growl-WithInstaller.framework which allows for automated Growl
+ *      installation.
+ *
+ *      When this method is called, data will be collected from inDelegate, Growl
+ *      will be launched if it is not already running, and the application will be
+ *      registered with Growl.
+ *
+ *      If using the Growl-WithInstaller framework, if Growl is already installed
+ *      but this copy of the framework has an updated version of Growl, the user
+ *      will be prompted to update automatically.
+ *
+ *     @param inDelegate The delegate for the GrowlApplicationBridge. It must conform to the GrowlApplicationBridgeDelegate protocol.
+ */
++ (void) setGrowlDelegate:(NSObject<GrowlApplicationBridgeDelegate> *)inDelegate;
+
+/*!
+ *     @method growlDelegate
+ *     @abstract Return the object responsible for providing and receiving Growl information.
+ *     @discussion See setGrowlDelegate: for details.
+ *     @result The Growl delegate.
+ */
++ (NSObject<GrowlApplicationBridgeDelegate> *) growlDelegate;
+
+#pragma mark -
+
+/*!
+ *     @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:
+ *     @abstract Send a Growl notification.
+ *     @discussion This is the preferred means for sending a Growl notification.
+ *      The notification name and at least one of the title and description are
+ *      required (all three are preferred).  All other parameters may be
+ *      <code>nil</code> (or 0 or NO as appropriate) to accept default values.
+ *
+ *      If using the Growl-WithInstaller framework, if Growl is not installed the
+ *      user will be prompted to install Growl. If the user cancels, this method
+ *      will have no effect until the next application session, at which time when
+ *      it is called the user will be prompted again. The user is also given the
+ *      option to not be prompted again.  If the user does choose to install Growl,
+ *      the requested notification will be displayed once Growl is installed and
+ *      running.
+ *
+ *     @param title            The title of the notification displayed to the user.
+ *     @param description      The full description of the notification displayed to the user.
+ *     @param notifName        The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane.
+ *     @param iconData         <code>NSData</code> object to show with the notification as its icon. If <code>nil</code>, the application's icon will be used instead.
+ *     @param priority         The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority.
+ *     @param isSticky         If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications.
+ *     @param clickContext     A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of <code>NSString</code>, <code>NSArray</code>, <code>NSNumber</code>, <code>NSDictionary</code>, and <code>NSData</code> types).
+ */
++ (void) notifyWithTitle:(NSString *)title
+                        description:(NSString *)description
+               notificationName:(NSString *)notifName
+                               iconData:(NSData *)iconData
+                               priority:(signed int)priority
+                               isSticky:(BOOL)isSticky
+                       clickContext:(id)clickContext;
+
+/*!
+ *     @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:identifier:
+ *     @abstract Send a Growl notification.
+ *     @discussion This is the preferred means for sending a Growl notification.
+ *      The notification name and at least one of the title and description are
+ *      required (all three are preferred).  All other parameters may be
+ *      <code>nil</code> (or 0 or NO as appropriate) to accept default values.
+ *
+ *      If using the Growl-WithInstaller framework, if Growl is not installed the
+ *      user will be prompted to install Growl. If the user cancels, this method
+ *      will have no effect until the next application session, at which time when
+ *      it is called the user will be prompted again. The user is also given the
+ *      option to not be prompted again.  If the user does choose to install Growl,
+ *      the requested notification will be displayed once Growl is installed and
+ *      running.
+ *
+ *     @param title            The title of the notification displayed to the user.
+ *     @param description      The full description of the notification displayed to the user.
+ *     @param notifName        The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane.
+ *     @param iconData         <code>NSData</code> object to show with the notification as its icon. If <code>nil</code>, the application's icon will be used instead.
+ *     @param priority         The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority.
+ *     @param isSticky         If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications.
+ *     @param clickContext     A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of <code>NSString</code>, <code>NSArray</code>, <code>NSNumber</code>, <code>NSDictionary</code>, and <code>NSData</code> types).
+ *     @param identifier       An identifier for this notification. Notifications with equal identifiers are coalesced.
+ */
++ (void) notifyWithTitle:(NSString *)title
+                        description:(NSString *)description
+               notificationName:(NSString *)notifName
+                               iconData:(NSData *)iconData
+                               priority:(signed int)priority
+                               isSticky:(BOOL)isSticky
+                       clickContext:(id)clickContext
+                         identifier:(NSString *)identifier;
+
+/*!    @method notifyWithDictionary:
+ *     @abstract       Notifies using a userInfo dictionary suitable for passing to
+ *      <code>NSDistributedNotificationCenter</code>.
+ *     @param  userInfo        The dictionary to notify with.
+ *     @discussion     Before Growl 0.6, your application would have posted
+ *      notifications using <code>NSDistributedNotificationCenter</code> by
+ *      creating a userInfo dictionary with the notification data. This had the
+ *      advantage of allowing you to add other data to the dictionary for programs
+ *      besides Growl that might be listening.
+ *
+ *      This method allows you to use such dictionaries without being restricted
+ *      to using <code>NSDistributedNotificationCenter</code>. The keys for this dictionary
+ *      can be found in GrowlDefines.h.
+ */
++ (void) notifyWithDictionary:(NSDictionary *)userInfo;
+
+#pragma mark -
+
+/*!    @method registerWithDictionary:
+ *     @abstract       Register your application with Growl without setting a delegate.
+ *     @discussion     When you call this method with a dictionary,
+ *      GrowlApplicationBridge registers your application using that dictionary.
+ *      If you pass <code>nil</code>, GrowlApplicationBridge will ask the delegate
+ *      (if there is one) for a dictionary, and if that doesn't work, it will look
+ *      in your application's bundle for an auto-discoverable plist.
+ *      (XXX refer to more information on that)
+ *
+ *      If you pass a dictionary to this method, it must include the
+ *      <code>GROWL_APP_NAME</code> key, unless a delegate is set.
+ *
+ *      This method is mainly an alternative to the delegate system introduced
+ *      with Growl 0.6. Without a delegate, you cannot receive callbacks such as
+ *      <code>-growlIsReady</code> (since they are sent to the delegate). You can,
+ *      however, set a delegate after registering without one.
+ *
+ *      This method was introduced in Growl.framework 0.7.
+ */
++ (BOOL) registerWithDictionary:(NSDictionary *)regDict;
+
+/*!    @method reregisterGrowlNotifications
+ *     @abstract       Reregister the notifications for this application.
+ *     @discussion     This method does not normally need to be called.  If your
+ *      application changes what notifications it is registering with Growl, call
+ *      this method to have the Growl delegate's
+ *      <code>-registrationDictionaryForGrowl</code> method called again and the
+ *      Growl registration information updated.
+ *
+ *      This method is now implemented using <code>-registerWithDictionary:</code>.
+ */
++ (void) reregisterGrowlNotifications;
+
+#pragma mark -
+
+/*!    @method setWillRegisterWhenGrowlIsReady:
+ *     @abstract       Tells GrowlApplicationBridge to register with Growl when Growl
+ *      launches (or not).
+ *     @discussion     When Growl has started listening for notifications, it posts a
+ *      <code>GROWL_IS_READY</code> notification on the Distributed Notification
+ *      Center. GrowlApplicationBridge listens for this notification, using it to
+ *      perform various tasks (such as calling your delegate's
+ *      <code>-growlIsReady</code> method, if it has one). If this method is
+ *      called with <code>YES</code>, one of those tasks will be to reregister
+ *      with Growl (in the manner of <code>-reregisterGrowlNotifications</code>).
+ *
+ *      This attribute is automatically set back to <code>NO</code> (the default)
+ *      after every <code>GROWL_IS_READY</code> notification.
+ *     @param  flag    <code>YES</code> if you want GrowlApplicationBridge to register with
+ *      Growl when next it is ready; <code>NO</code> if not.
+ */
++ (void) setWillRegisterWhenGrowlIsReady:(BOOL)flag;
+/*!    @method willRegisterWhenGrowlIsReady
+ *     @abstract       Reports whether GrowlApplicationBridge will register with Growl
+ *      when Growl next launches.
+ *     @result <code>YES</code> if GrowlApplicationBridge will register with Growl
+ *      when next it posts GROWL_IS_READY; <code>NO</code> if not.
+ */
++ (BOOL) willRegisterWhenGrowlIsReady;
+
+#pragma mark -
+
+/*!    @method registrationDictionaryFromDelegate
+ *     @abstract       Asks the delegate for a registration dictionary.
+ *     @discussion     If no delegate is set, or if the delegate's
+ *      <code>-registrationDictionaryForGrowl</code> method returns
+ *      <code>nil</code>, this method returns <code>nil</code>.
+ *
+ *      This method does not attempt to clean up the dictionary in any way - for
+ *      example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
+ *      will be missing it too. Use <code>+[GrowlApplicationBridge
+ *      registrationDictionaryByFillingInDictionary:]</code> or
+ *      <code>+[GrowlApplicationBridge
+ *      registrationDictionaryByFillingInDictionary:restrictToKeys:]</code> to try
+ *      to fill in missing keys.
+ *
+ *      This method was introduced in Growl.framework 0.7.
+ *     @result A registration dictionary.
+ */
++ (NSDictionary *) registrationDictionaryFromDelegate;
+
+/*!    @method registrationDictionaryFromBundle:
+ *     @abstract       Looks in a bundle for a registration dictionary.
+ *     @discussion     This method looks in a bundle for an auto-discoverable
+ *      registration dictionary file using <code>-[NSBundle
+ *      pathForResource:ofType:]</code>. If it finds one, it loads the file using
+ *      <code>+[NSDictionary dictionaryWithContentsOfFile:]</code> and returns the
+ *      result.
+ *
+ *      If you pass <code>nil</code> as the bundle, the main bundle is examined.
+ *
+ *      This method does not attempt to clean up the dictionary in any way - for
+ *      example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
+ *      will be missing it too. Use <code>+[GrowlApplicationBridge
+ *      registrationDictionaryByFillingInDictionary:]</code> or
+ *      <code>+[GrowlApplicationBridge
+ *      registrationDictionaryByFillingInDictionary:restrictToKeys:]</code> to try
+ *      to fill in missing keys.
+ *
+ *      This method was introduced in Growl.framework 0.7.
+ *     @result A registration dictionary.
+ */
++ (NSDictionary *) registrationDictionaryFromBundle:(NSBundle *)bundle;
+
+/*!    @method bestRegistrationDictionary
+ *     @abstract       Obtains a registration dictionary, filled out to the best of
+ *      GrowlApplicationBridge's knowledge.
+ *     @discussion     This method creates a registration dictionary as best
+ *      GrowlApplicationBridge knows how.
+ *
+ *      First, GrowlApplicationBridge contacts the Growl delegate (if there is
+ *      one) and gets the registration dictionary from that. If no such dictionary
+ *      was obtained, GrowlApplicationBridge looks in your application's main
+ *      bundle for an auto-discoverable registration dictionary file. If that
+ *      doesn't exist either, this method returns <code>nil</code>.
+ *
+ *      Second, GrowlApplicationBridge calls
+ *      <code>+registrationDictionaryByFillingInDictionary:</code> with whatever
+ *      dictionary was obtained. The result of that method is the result of this
+ *      method.
+ *
+ *      GrowlApplicationBridge uses this method when you call
+ *      <code>+setGrowlDelegate:</code>, or when you call
+ *      <code>+registerWithDictionary:</code> with <code>nil</code>.
+ *
+ *      This method was introduced in Growl.framework 0.7.
+ *     @result A registration dictionary.
+ */
++ (NSDictionary *) bestRegistrationDictionary;
+
+#pragma mark -
+
+/*!    @method registrationDictionaryByFillingInDictionary:
+ *     @abstract       Tries to fill in missing keys in a registration dictionary.
+ *     @discussion     This method examines the passed-in dictionary for missing keys,
+ *      and tries to work out correct values for them. As of 0.7, it uses:
+ *
+ *      Key                                                                 Value
+ *      ---                                                                 -----
+ *      <code>GROWL_APP_NAME</code>                 <code>CFBundleExecutableName</code>
+ *      <code>GROWL_APP_ICON</code>                 The icon of the application.
+ *      <code>GROWL_APP_LOCATION</code>             The location of the application.
+ *      <code>GROWL_NOTIFICATIONS_DEFAULT</code>    <code>GROWL_NOTIFICATIONS_ALL</code>
+ *
+ *      Keys are only filled in if missing; if a key is present in the dictionary,
+ *      its value will not be changed.
+ *
+ *      This method was introduced in Growl.framework 0.7.
+ *     @param  regDict The dictionary to fill in.
+ *     @result The dictionary with the keys filled in. This is an autoreleased
+ *      copy of <code>regDict</code>.
+ */
++ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict;
+/*!    @method registrationDictionaryByFillingInDictionary:restrictToKeys:
+ *     @abstract       Tries to fill in missing keys in a registration dictionary.
+ *     @discussion     This method examines the passed-in dictionary for missing keys,
+ *      and tries to work out correct values for them. As of 0.7, it uses:
+ *
+ *      Key                                                                 Value
+ *      ---                                                                 -----
+ *      <code>GROWL_APP_NAME</code>                 <code>CFBundleExecutableName</code>
+ *      <code>GROWL_APP_ICON</code>                 The icon of the application.
+ *      <code>GROWL_APP_LOCATION</code>             The location of the application.
+ *      <code>GROWL_NOTIFICATIONS_DEFAULT</code>    <code>GROWL_NOTIFICATIONS_ALL</code>
+ *
+ *      Only those keys that are listed in <code>keys</code> will be filled in.
+ *      Other missing keys are ignored. Also, keys are only filled in if missing;
+ *      if a key is present in the dictionary, its value will not be changed.
+ *
+ *      This method was introduced in Growl.framework 0.7.
+ *     @param  regDict The dictionary to fill in.
+ *     @param  keys    The keys to fill in. If <code>nil</code>, any missing keys are filled in.
+ *     @result The dictionary with the keys filled in. This is an autoreleased
+ *      copy of <code>regDict</code>.
+ */
++ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict restrictToKeys:(NSSet *)keys;
+
+@end
+
+//------------------------------------------------------------------------------
+#pragma mark -
+
+/*!
+ *     @protocol GrowlApplicationBridgeDelegate
+ *     @abstract Required protocol for the Growl delegate.
+ *     @discussion The methods in this protocol are required and are called
+ *      automatically as needed by GrowlApplicationBridge. See
+ *      <code>+[GrowlApplicationBridge setGrowlDelegate:]</code>.
+ *      See also <code>GrowlApplicationBridgeDelegate_InformalProtocol</code>.
+ */
+
+@protocol GrowlApplicationBridgeDelegate
+
+// -registrationDictionaryForGrowl has moved to the informal protocol as of 0.7.
+
+@end
+
+//------------------------------------------------------------------------------
+#pragma mark -
+
+/*!
+ *     @category NSObject(GrowlApplicationBridgeDelegate_InformalProtocol)
+ *     @abstract Methods which may be optionally implemented by the GrowlDelegate.
+ *     @discussion The methods in this informal protocol will only be called if implemented by the delegate.
+ */
+@interface NSObject (GrowlApplicationBridgeDelegate_InformalProtocol)
+
+/*!
+ *     @method registrationDictionaryForGrowl
+ *     @abstract Return the dictionary used to register this application with Growl.
+ *     @discussion The returned dictionary gives Growl the complete list of
+ *      notifications this application will ever send, and it also specifies which
+ *      notifications should be enabled by default.  Each is specified by an array
+ *      of <code>NSString</code> objects.
+ *
+ *      For most applications, these two arrays can be the same (if all sent
+ *      notifications should be displayed by default).
+ *
+ *      The <code>NSString</code> objects of these arrays will correspond to the
+ *      <code>notificationName:</code> parameter passed in
+ *      <code>+[GrowlApplicationBridge
+ *      notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]</code> calls.
+ *
+ *      The dictionary should have 2 key object pairs:
+ *      key: GROWL_NOTIFICATIONS_ALL           object: <code>NSArray</code> of <code>NSString</code> objects
+ *      key: GROWL_NOTIFICATIONS_DEFAULT       object: <code>NSArray</code> of <code>NSString</code> objects
+ *
+ *      You do not need to implement this method if you have an auto-discoverable
+ *      plist file in your app bundle. (XXX refer to more information on that)
+ *
+ *     @result The <code>NSDictionary</code> to use for registration.
+ */
+- (NSDictionary *) registrationDictionaryForGrowl;
+
+/*!
+ *     @method applicationNameForGrowl
+ *     @abstract Return the name of this application which will be used for Growl bookkeeping.
+ *     @discussion This name is used both internally and in the Growl preferences.
+ *
+ *      This should remain stable between different versions and incarnations of
+ *      your application.
+ *      For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and
+ *      "SurfWriter Lite" are not.
+ *
+ *      You do not need to implement this method if you are providing the
+ *      application name elsewhere, meaning in an auto-discoverable plist file in
+ *      your app bundle (XXX refer to more information on that) or in the result
+ *      of -registrationDictionaryForGrowl.
+ *
+ *     @result The name of the application using Growl.
+ */
+- (NSString *) applicationNameForGrowl;
+
+/*!
+ *     @method applicationIconDataForGrowl
+ *     @abstract Return the <code>NSData</code> to treat as the application icon.
+ *     @discussion The delegate may optionally return an <code>NSData</code>
+ *      object to use as the application icon; if this is not implemented, the
+ *      application's own icon is used.  This is not generally needed.
+ *     @result The <code>NSData</code> to treat as the application icon.
+ */
+- (NSData *) applicationIconDataForGrowl;
+
+/*!
+ *     @method growlIsReady
+ *     @abstract Informs the delegate that Growl has launched.
+ *     @discussion Informs the delegate that Growl (specifically, the
+ *      GrowlHelperApp) was launched successfully or was already running.  The
+ *      application can take actions with the knowledge that Growl is installed and
+ *      functional.
+ */
+- (void) growlIsReady;
+
+/*!
+ *     @method growlNotificationWasClicked:
+ *     @abstract Informs the delegate that a Growl notification was clicked.
+ *     @discussion Informs the delegate that a Growl notification was clicked.  It
+ *      is only sent for notifications sent with a non-<code>nil</code>
+ *      clickContext, so if you want to receive a message when a notification is
+ *      clicked, clickContext must not be <code>nil</code> when calling
+ *      <code>+[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]</code>.
+ *     @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:].
+ */
+- (void) growlNotificationWasClicked:(id)clickContext;
+
+/*!
+ *     @method growlNotificationTimedOut:
+ *     @abstract Informs the delegate that a Growl notification timed out.
+ *     @discussion Informs the delegate that a Growl notification timed out. It
+ *      is only sent for notifications sent with a non-<code>nil</code>
+ *      clickContext, so if you want to receive a message when a notification is
+ *      clicked, clickContext must not be <code>nil</code> when calling
+ *      <code>+[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]</code>.
+ *     @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:].
+ */
+- (void) growlNotificationTimedOut:(id)clickContext;
+
+@end
+
+#pragma mark -
+/*!
+ *     @category NSObject(GrowlApplicationBridgeDelegate_Installation_InformalProtocol)
+ *     @abstract Methods which may be optionally implemented by the Growl delegate when used with Growl-WithInstaller.framework.
+ *     @discussion The methods in this informal protocol will only be called if
+ *      implemented by the delegate.  They allow greater control of the information
+ *      presented to the user when installing or upgrading Growl from within your
+ *      application when using Growl-WithInstaller.framework.
+ */
+@interface NSObject (GrowlApplicationBridgeDelegate_Installation_InformalProtocol)
+
+/*!
+ *     @method growlInstallationWindowTitle
+ *     @abstract Return the title of the installation window.
+ *     @discussion If not implemented, Growl will use a default, localized title.
+ *     @result An NSString object to use as the title.
+ */
+- (NSString *)growlInstallationWindowTitle;
+
+/*!
+ *     @method growlUpdateWindowTitle
+ *     @abstract Return the title of the upgrade window.
+ *     @discussion If not implemented, Growl will use a default, localized title.
+ *     @result An NSString object to use as the title.
+ */
+- (NSString *)growlUpdateWindowTitle;
+
+/*!
+ *     @method growlInstallationInformation
+ *     @abstract Return the information to display when installing.
+ *     @discussion This information may be as long or short as desired (the window
+ *      will be sized to fit it).  It will be displayed to the user as an
+ *      explanation of what Growl is and what it can do in your application.  It
+ *      should probably note that no download is required to install.
+ *
+ *      If this is not implemented, Growl will use a default, localized explanation.
+ *     @result An NSAttributedString object to display.
+ */
+- (NSAttributedString *)growlInstallationInformation;
+
+/*!
+ *     @method growlUpdateInformation
+ *     @abstract Return the information to display when upgrading.
+ *     @discussion This information may be as long or short as desired (the window
+ *      will be sized to fit it).  It will be displayed to the user as an
+ *      explanation that an updated version of Growl is included in your
+ *      application and no download is required.
+ *
+ *      If this is not implemented, Growl will use a default, localized explanation.
+ *     @result An NSAttributedString object to display.
+ */
+- (NSAttributedString *)growlUpdateInformation;
+
+@end
+
+//private
+@interface GrowlApplicationBridge (GrowlInstallationPrompt_private)
++ (void) _userChoseNotToInstallGrowl;
+@end
+
+#endif /* __GrowlApplicationBridge_h__ */
diff --git a/macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h b/macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h
new file mode 100644 (file)
index 0000000..6ff6ee3
--- /dev/null
@@ -0,0 +1,307 @@
+//
+//  GrowlDefines.h
+//
+
+#ifndef _GROWLDEFINES_H
+#define _GROWLDEFINES_H
+
+#ifdef __OBJC__
+#define XSTR(x) (@x)
+#define STRING NSString *
+#else
+#define XSTR CFSTR
+#define STRING CFStringRef
+#endif
+
+/*!    @header GrowlDefines.h
+ *     @abstract   Defines all the notification keys.
+ *     @discussion Defines all the keys used for registration with Growl and for
+ *      Growl notifications.
+ *
+ *      Most applications should use the functions or methods of Growl.framework
+ *      instead of posting notifications such as those described here.
+ *     @updated 2004-01-25
+ */
+
+// UserInfo Keys for Registration
+#pragma mark UserInfo Keys for Registration
+
+/*!    @group Registration userInfo keys */
+/*     @abstract       Keys for the userInfo dictionary of a GROWL_APP_REGISTRATION distributed notification.
+ *     @discussion The values of these keys describe the application and the
+ *      notifications it may post.
+ *
+ *      Your application must register with Growl before it can post Growl
+ *      notifications (and have them not be ignored). However, as of Growl 0.6,
+ *      posting GROWL_APP_REGISTRATION notifications directly is no longer the
+ *      preferred way to register your application. Your application should instead
+ *      use Growl.framework's delegate system.
+ *      See +[GrowlApplicationBridge setGrowlDelegate:] or Growl_SetDelegate for
+ *      more information.
+ */
+
+/*!    @defined GROWL_APP_NAME
+ *     @abstract The name of your application.
+ *     @discussion The name of your application. This should remain stable between
+ *      different versions and incarnations of your application.
+ *      For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and
+ *      "SurfWriter Lite" are not.
+ */
+#define GROWL_APP_NAME                                 XSTR("ApplicationName")
+/*!    @defined GROWL_APP_ICON
+ *     @abstract The image data for your application's icon.
+ *     @discussion Image data representing your application's icon. This may be
+ *      superimposed on a notification icon as a badge, used as the notification
+ *      icon when a notification-specific icon is not supplied, or ignored
+ *      altogether, depending on the display. Must be in a format supported by
+ *      NSImage, such as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF.
+ *
+ *      Optional. Not supported by all display plugins.
+ */
+#define GROWL_APP_ICON                                 XSTR("ApplicationIcon")
+/*!    @defined GROWL_NOTIFICATIONS_DEFAULT
+ *     @abstract The array of notifications to turn on by default.
+ *     @discussion These are the names of the notifications that should be enabled
+ *      by default when your application registers for the first time. If your
+ *      application reregisters, Growl will look here for any new notification
+ *      names found in GROWL_NOTIFICATIONS_ALL, but ignore any others.
+ */
+#define GROWL_NOTIFICATIONS_DEFAULT            XSTR("DefaultNotifications")
+/*!    @defined GROWL_NOTIFICATIONS_ALL
+ *     @abstract The array of all notifications your application can send.
+ *     @discussion These are the names of all of the notifications that your
+ *      application may post. See GROWL_NOTIFICATION_NAME for a discussion of good
+ *      notification names.
+ */
+#define GROWL_NOTIFICATIONS_ALL                        XSTR("AllNotifications")
+/*!    @defined        GROWL_TICKET_VERSION
+ *     @abstract       The version of your registration ticket.
+ *     @discussion     Include this key in a ticket plist file that you put in your
+ *      application bundle for auto-discovery. The current ticket version is 1.
+ */
+#define GROWL_TICKET_VERSION                   XSTR("TicketVersion")
+// UserInfo Keys for Notifications
+#pragma mark UserInfo Keys for Notifications
+
+/*!    @group Notification userInfo keys */
+/*     @abstract       Keys for the userInfo dictionary of a GROWL_NOTIFICATION distributed notification.
+ *     @discussion The values of these keys describe the content of a Growl
+ *      notification.
+ *
+ *      Not all of these keys are supported by all displays. Only the name, title,
+ *      and description of a notification are universal. Most of the built-in
+ *      displays do support all of these keys, and most other visual displays
+ *      probably will also. But, as of 0.6, the Log, MailMe, and Speech displays
+ *      support only textual data.
+ */
+
+/*!    @defined GROWL_NOTIFICATION_NAME
+ *     @abstract The name of the notification.
+ *     @discussion The name of the notification. This should be human-readable, as
+ *      it's shown in the prefpane, in the list of notifications your application
+ *      supports. */
+#define GROWL_NOTIFICATION_NAME                        XSTR("NotificationName")
+/*!    @defined GROWL_NOTIFICATION_TITLE
+ *     @abstract The title to display in the notification.
+ *     @discussion The title of the notification. Should be very brief.
+ *      The title usually says what happened, e.g. "Download complete".
+ */
+#define GROWL_NOTIFICATION_TITLE               XSTR("NotificationTitle")
+/*!    @defined GROWL_NOTIFICATION_DESCRIPTION
+ *     @abstract The description to display in the notification.
+ *     @discussion The description should be longer and more verbose than the title.
+ *      The description usually tells the subject of the action,
+ *      e.g. "Growl-0.6.dmg downloaded in 5.02 minutes".
+ */
+#define GROWL_NOTIFICATION_DESCRIPTION         XSTR("NotificationDescription")
+/*!    @defined GROWL_NOTIFICATION_ICON
+ *     @discussion Image data for the notification icon. Must be in a format
+ *      supported by NSImage, such as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF.
+ *
+ *      Optional. Not supported by all display plugins.
+ */
+#define GROWL_NOTIFICATION_ICON                        XSTR("NotificationIcon")
+/*!    @defined GROWL_NOTIFICATION_APP_ICON
+ *     @discussion Image data for the application icon, in case GROWL_APP_ICON does
+ *      not apply for some reason. Must be in a format supported by NSImage, such
+ *      as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF.
+ *
+ *      Optional. Not supported by all display plugins.
+ */
+#define GROWL_NOTIFICATION_APP_ICON            XSTR("NotificationAppIcon")
+/*!    @defined GROWL_NOTIFICATION_PRIORITY
+ *     @discussion The priority of the notification as an integer number from
+ *      -2 to +2 (+2 being highest).
+ *
+ *      Optional. Not supported by all display plugins.
+ */
+#define GROWL_NOTIFICATION_PRIORITY            XSTR("NotificationPriority")
+/*!    @defined GROWL_NOTIFICATION_STICKY
+ *     @discussion A Boolean number controlling whether the notification is sticky.
+ *
+ *      Optional. Not supported by all display plugins.
+ */
+#define GROWL_NOTIFICATION_STICKY              XSTR("NotificationSticky")
+/*!    @defined GROWL_NOTIFICATION_CLICK_CONTEXT
+ *     @abstract Identifies which notification was clicked.
+ *     @discussion An identifier for the notification for clicking purposes.
+ *
+ *      This will be passed back to the application when the notification is
+ *      clicked. It must be plist-encodable (a data, dictionary, array, number, or
+ *      string object), and it should be unique for each notification you post.
+ *      A good click context would be a UUID string returned by NSProcessInfo or
+ *      CFUUID.
+ *
+ *      Optional. Not supported by all display plugins.
+ */
+#define GROWL_NOTIFICATION_CLICK_CONTEXT                       XSTR("NotificationClickContext")
+
+/*!    @defined GROWL_DISPLAY_PLUGIN
+ *     @discussion The name of a display plugin which should be used for this notification.
+ *    Optional. If this key is not set or the specified display plugin does not
+ *    exist, the display plugin stored in the application ticket is used. This key
+ *    allows applications to use different default display plugins for their
+ *    notifications. The user can still override those settings in the preference
+ *    pane.
+ */
+#define GROWL_DISPLAY_PLUGIN                           XSTR("NotificationDisplayPlugin")
+
+/*!    @defined GROWL_NOTIFICATION_IDENTIFIER
+ *     @abstract An identifier for the notification for coalescing purposes.
+ *   Notifications with the same identifier fall into the same class; only
+ *   the last notification of a class is displayed on the screen. If a
+ *   notification of the same class is currently being displayed, it is
+ *   replaced by this notification.
+ *
+ *      Optional. Not supported by all display plugins.
+ */
+#define GROWL_NOTIFICATION_IDENTIFIER  XSTR("GrowlNotificationIdentifier")
+
+/*!    @defined GROWL_APP_PID
+ *     @abstract The process identifier of the process which sends this
+ *   notification. If this field is set, the application will only receive
+ *   clicked and timed out notifications which originate from this process.
+ *
+ *      Optional.
+ */
+#define GROWL_APP_PID                                  XSTR("ApplicationPID")
+
+// Notifications
+#pragma mark Notifications
+
+/*!    @group Notification names */
+/*     @abstract       Names of distributed notifications used by Growl.
+ *     @discussion     These are notifications used by applications (directly or
+ *      indirectly) to interact with Growl, and by Growl for interaction between
+ *      its components.
+ *
+ *      Most of these should no longer be used in Growl 0.6 and later, in favor of
+ *      Growl.framework's GrowlApplicationBridge APIs.
+ */
+
+/*!    @defined GROWL_APP_REGISTRATION
+ *     @abstract The distributed notification for registering your application.
+ *     @discussion This is the name of the distributed notification that can be
+ *      used to register applications with Growl.
+ *
+ *      The userInfo dictionary for this notification can contain these keys:
+ *      <ul>
+ *             <li>GROWL_APP_NAME</li>
+ *             <li>GROWL_APP_ICON</li>
+ *             <li>GROWL_NOTIFICATIONS_ALL</li>
+ *             <li>GROWL_NOTIFICATIONS_DEFAULT</li>
+ *      </ul>
+ *
+ *      No longer recommended as of Growl 0.6. An alternate method of registering
+ *      is to use Growl.framework's delegate system.
+ *      See +[GrowlApplicationBridge setGrowlDelegate:] or Growl_SetDelegate for
+ *      more information.
+ */
+#define GROWL_APP_REGISTRATION                 XSTR("GrowlApplicationRegistrationNotification")
+/*!    @defined GROWL_APP_REGISTRATION_CONF
+ *     @abstract The distributed notification for confirming registration.
+ *     @discussion The name of the distributed notification sent to confirm the
+ *      registration. Used by the Growl preference pane. Your application probably
+ *      does not need to use this notification.
+ */
+#define GROWL_APP_REGISTRATION_CONF            XSTR("GrowlApplicationRegistrationConfirmationNotification")
+/*!    @defined GROWL_NOTIFICATION
+ *     @abstract The distributed notification for Growl notifications.
+ *     @discussion This is what it all comes down to. This is the name of the
+ *      distributed notification that your application posts to actually send a
+ *      Growl notification.
+ *
+ *      The userInfo dictionary for this notification can contain these keys:
+ *      <ul>
+ *             <li>GROWL_NOTIFICATION_NAME (required)</li>
+ *             <li>GROWL_NOTIFICATION_TITLE (required)</li>
+ *             <li>GROWL_NOTIFICATION_DESCRIPTION (required)</li>
+ *             <li>GROWL_NOTIFICATION_ICON</li>
+ *             <li>GROWL_NOTIFICATION_APP_ICON</li>
+ *             <li>GROWL_NOTIFICATION_PRIORITY</li>
+ *             <li>GROWL_NOTIFICATION_STICKY</li>
+ *             <li>GROWL_NOTIFICATION_CLICK_CONTEXT</li>
+ *             <li>GROWL_APP_NAME (required)</li>
+ *      </ul>
+ *
+ *      No longer recommended as of Growl 0.6. Three alternate methods of posting
+ *      notifications are +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:],
+ *      Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext, and
+ *      Growl_PostNotification.
+ */
+#define GROWL_NOTIFICATION                             XSTR("GrowlNotification")
+/*!    @defined GROWL_SHUTDOWN
+*      @abstract The distributed notification name that tells Growl to shutdown.
+*      @discussion The Growl preference pane posts this notification when the
+*       "Stop Growl" button is clicked.
+*/
+#define GROWL_SHUTDOWN                                 XSTR("GrowlShutdown")
+/*!    @defined GROWL_PING
+ *     @abstract A distributed notification to check whether Growl is running.
+ *     @discussion This is used by the Growl preference pane. If it receives a
+ *      GROWL_PONG, the preference pane takes this to mean that Growl is running.
+ */
+#define GROWL_PING                                             XSTR("Honey, Mind Taking Out The Trash")
+/*!    @defined GROWL_PONG
+ *     @abstract The distributed notification sent in reply to GROWL_PING.
+ *     @discussion GrowlHelperApp posts this in reply to GROWL_PING.
+ */
+#define GROWL_PONG                                             XSTR("What Do You Want From Me, Woman")
+/*!    @defined GROWL_IS_READY
+ *     @abstract The distributed notification sent when Growl starts up.
+ *     @discussion GrowlHelperApp posts this when it has begin listening on all of
+ *      its sources for new notifications. GrowlApplicationBridge (in
+ *      Growl.framework), upon receiving this notification, reregisters using the
+ *      registration dictionary supplied by its delegate.
+ */
+#define GROWL_IS_READY                                 XSTR("Lend Me Some Sugar; I Am Your Neighbor!")
+/*!    @defined GROWL_NOTIFICATION_CLICKED
+ *     @abstract The distributed notification sent when a supported notification is clicked.
+ *     @discussion When a Growl notification with a click context is clicked on by
+ *      the user, Growl posts this distributed notification.
+ *      The GrowlApplicationBridge responds to this notification by calling a
+ *      callback in its delegate.
+ */
+#define GROWL_NOTIFICATION_CLICKED             XSTR("GrowlClicked!")
+#define GROWL_NOTIFICATION_TIMED_OUT   XSTR("GrowlTimedOut!")
+
+/*!    @group Other symbols */
+/* Symbols which don't fit into any of the other categories. */
+
+/*!    @defined GROWL_KEY_CLICKED_CONTEXT
+ *     @abstract Used internally as the key for the clickedContext passed over DNC.
+ *     @discussion This key is used in GROWL_NOTIFICATION_CLICKED, and contains the
+ *      click context that was supplied in the original notification.
+ */
+#define GROWL_KEY_CLICKED_CONTEXT              XSTR("ClickedContext")
+/*!    @defined GROWL_REG_DICT_EXTENSION
+ *     @abstract The filename extension for registration dictionaries.
+ *     @discussion The GrowlApplicationBridge in Growl.framework registers with
+ *      Growl by creating a file with the extension of .(GROWL_REG_DICT_EXTENSION)
+ *      and opening it in the GrowlHelperApp. This happens whether or not Growl is
+ *      running; if it was stopped, it quits immediately without listening for
+ *      notifications.
+ */
+#define GROWL_REG_DICT_EXTENSION               XSTR("growlRegDict")
+
+#endif //ndef _GROWLDEFINES_H
diff --git a/macosx/Growl.framework/Versions/A/Resources/Info.plist b/macosx/Growl.framework/Versions/A/Resources/Info.plist
new file mode 100644 (file)
index 0000000..6530bd2
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>Growl</string>
+       <key>CFBundleIdentifier</key>
+       <string>com.growl.growlframework</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundlePackageType</key>
+       <string>FMWK</string>
+       <key>CFBundleShortVersionString</key>
+       <string>0.7.6</string>
+       <key>CFBundleSignature</key>
+       <string>GRRR</string>
+       <key>CFBundleVersion</key>
+       <string>0.7.6</string>
+       <key>NSPrincipalClass</key>
+       <string>GrowlApplicationBridge</string>
+</dict>
+</plist>
diff --git a/macosx/Growl.framework/Versions/Current b/macosx/Growl.framework/Versions/Current
new file mode 120000 (symlink)
index 0000000..8c7e5a6
--- /dev/null
@@ -0,0 +1 @@
+A
\ No newline at end of file
diff --git a/macosx/HBAdvancedController.h b/macosx/HBAdvancedController.h
new file mode 100644 (file)
index 0000000..3af5b5b
--- /dev/null
@@ -0,0 +1,68 @@
+/* HBAdvancedController
+
+    This file is part of the HandBrake source code.
+    Homepage: <http://handbrake.fr/>.
+    It may be used under the terms of the GNU General Public License. */
+
+#import <Cocoa/Cocoa.h>
+
+@interface HBAdvancedController : NSObject
+{
+    /* Advanced Tab for opts fX264optView*/
+    NSBox                       * fOptionsBox;
+    
+    IBOutlet NSView             * fX264optView;
+    IBOutlet NSView             * fEmptyView;
+    IBOutlet NSTextField        * fX264optViewTitleLabel;
+    IBOutlet NSTextField        * fDisplayX264OptionsLabel;
+    IBOutlet NSTextField        * fDisplayX264Options;
+    IBOutlet NSTextField        * fX264optBframesLabel;
+    IBOutlet NSPopUpButton      * fX264optBframesPopUp;
+    IBOutlet NSTextField        * fX264optRefLabel;
+    IBOutlet NSPopUpButton      * fX264optRefPopUp;
+    IBOutlet NSTextField        * fX264optNfpskipLabel;
+    IBOutlet NSButton           * fX264optNfpskipSwitch;
+    IBOutlet NSTextField        * fX264optNodctdcmtLabel;
+    IBOutlet NSButton           * fX264optNodctdcmtSwitch;
+    IBOutlet NSTextField        * fX264optSubmeLabel;
+    IBOutlet NSPopUpButton      * fX264optSubmePopUp;
+    IBOutlet NSTextField        * fX264optTrellisLabel;
+    IBOutlet NSPopUpButton      * fX264optTrellisPopUp;
+    IBOutlet NSTextField        * fX264optMixedRefsLabel;
+    IBOutlet NSButton           * fX264optMixedRefsSwitch;
+    IBOutlet NSTextField        * fX264optMotionEstLabel;
+    IBOutlet NSPopUpButton      * fX264optMotionEstPopUp;
+    IBOutlet NSTextField        * fX264optMERangeLabel;
+    IBOutlet NSPopUpButton      * fX264optMERangePopUp;
+    IBOutlet NSTextField        * fX264optWeightBLabel;
+    IBOutlet NSButton           * fX264optWeightBSwitch;
+    IBOutlet NSTextField        * fX264optBPyramidLabel;
+    IBOutlet NSButton           * fX264optBPyramidSwitch;
+    IBOutlet NSTextField        * fX264optDirectPredLabel;
+    IBOutlet NSPopUpButton      * fX264optDirectPredPopUp;
+    IBOutlet NSTextField        * fX264optDeblockLabel;
+    IBOutlet NSPopUpButton      * fX264optAlphaDeblockPopUp;
+    IBOutlet NSPopUpButton      * fX264optBetaDeblockPopUp;
+    IBOutlet NSTextField        * fX264optAnalyseLabel;
+    IBOutlet NSPopUpButton      * fX264optAnalysePopUp;
+    IBOutlet NSTextField        * fX264opt8x8dctLabel;
+    IBOutlet NSButton           * fX264opt8x8dctSwitch;
+    IBOutlet NSTextField        * fX264optCabacLabel;
+    IBOutlet NSButton           * fX264optCabacSwitch;
+}
+
+// x264 Advanced Panel Methods
+- (void) setView: (NSBox *) box;
+- (BOOL) loadMyNibFile;
+- (NSString *) optionsString;
+- (void) setOptions: (NSString *)string;
+- (void) enableUI: (bool) b;
+- (void) setHidden: (BOOL) hide;
+- (IBAction) X264AdvancedOptionsAnimate: (id) sender;
+- (IBAction) X264AdvancedOptionsSet: (id) sender;
+- (IBAction) X264AdvancedOptionsStandardizeOptString: (id) sender;
+- (IBAction) X264AdvancedOptionsSetCurrentSettings: (id) sender;
+- (NSString *)  X264AdvancedOptionsStandardizeOptNames:(NSString *) cleanOptNameString;
+- (IBAction) X264AdvancedOptionsChanged: (id) sender;
+
+@end
diff --git a/macosx/HBAdvancedController.m b/macosx/HBAdvancedController.m
new file mode 100644 (file)
index 0000000..b3ddeb0
--- /dev/null
@@ -0,0 +1,1265 @@
+/* HBAdvancedController
+
+    This file is part of the HandBrake source code.
+    Homepage: <http://handbrake.fr/>.
+    It may be used under the terms of the GNU General Public License. */
+    
+#import "HBAdvancedController.h"
+
+@implementation HBAdvancedController
+
+- (id)init
+{
+    [super init];
+    [self loadMyNibFile];
+    
+    return self;
+}
+
+- (void) setView: (NSBox *) box
+{
+    fOptionsBox = box;
+    [fOptionsBox setContentView:fX264optView];
+}
+
+- (BOOL) loadMyNibFile
+{
+    if(![NSBundle loadNibNamed:@"AdvancedView" owner:self])
+    {
+        NSLog(@"Warning! Could not load myNib file.\n");
+        return NO;
+    }
+    
+    return YES;
+}
+
+- (NSString *) optionsString
+{
+    return [fDisplayX264Options stringValue];
+}
+
+- (void) setOptions: (NSString *)string
+{
+    [fDisplayX264Options setStringValue:string];
+    [self X264AdvancedOptionsSet:nil];
+}
+
+- (void) setHidden: (BOOL) hide
+{
+    if(hide)
+    {
+        [fOptionsBox setContentView:fEmptyView];
+        [fX264optViewTitleLabel setStringValue: @"Only Used With The x264 (H.264) Codec"];
+    }
+    else
+    {
+        [fOptionsBox setContentView:fX264optView];
+        [fX264optViewTitleLabel setStringValue: @""];
+    }
+    return;
+}
+
+ - (void) enableUI: (bool) b
+{
+    unsigned i;
+    NSControl * controls[] =
+      { fX264optViewTitleLabel,fDisplayX264Options,fDisplayX264OptionsLabel,fX264optBframesLabel,
+        fX264optBframesPopUp,fX264optRefLabel,fX264optRefPopUp,fX264optNfpskipLabel,fX264optNfpskipSwitch,
+        fX264optNodctdcmtLabel,fX264optNodctdcmtSwitch,fX264optSubmeLabel,fX264optSubmePopUp,
+        fX264optTrellisLabel,fX264optTrellisPopUp,fX264optMixedRefsLabel,fX264optMixedRefsSwitch,
+        fX264optMotionEstLabel,fX264optMotionEstPopUp,fX264optMERangeLabel,fX264optMERangePopUp,
+        fX264optWeightBLabel,fX264optWeightBSwitch, fX264optBPyramidLabel,fX264optBPyramidSwitch,
+        fX264optDirectPredLabel,fX264optDirectPredPopUp,fX264optDeblockLabel,fX264optAnalyseLabel,
+        fX264optAnalysePopUp,fX264opt8x8dctLabel,fX264opt8x8dctSwitch,fX264optCabacLabel,fX264optCabacSwitch,
+        fX264optAlphaDeblockPopUp,fX264optBetaDeblockPopUp};
+
+    for( i = 0; i < sizeof( controls ) / sizeof( NSControl * ); i++ )
+    {
+        if( [[controls[i] className] isEqualToString: @"NSTextField"] )
+        {
+            NSTextField * tf = (NSTextField *) controls[i];
+            if( ![tf isBezeled] )
+            {
+                [tf setTextColor: b ? [NSColor controlTextColor] :
+                    [NSColor disabledControlTextColor]];
+                continue;
+            }
+        }
+        [controls[i] setEnabled: b];
+
+    }
+    
+    [fX264optView setWantsLayer:YES];
+}
+
+- (void)dealloc
+{
+    [super dealloc];
+}
+
+/**
+ * Populates the option widgets
+ */
+- (IBAction) X264AdvancedOptionsSet: (id) sender
+{
+    /*Set opt widget values here*/
+    
+    /*B-Frames fX264optBframesPopUp*/
+    int i;
+    [fX264optBframesPopUp removeAllItems];
+    [fX264optBframesPopUp addItemWithTitle:@"Default (0)"];
+    for (i=0; i<17;i++)
+    {
+        [fX264optBframesPopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]];
+    }
+    
+    /*Reference Frames fX264optRefPopUp*/
+    [fX264optRefPopUp removeAllItems];
+    [fX264optRefPopUp addItemWithTitle:@"Default (1)"];
+    for (i=0; i<17;i++)
+    {
+        [fX264optRefPopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]];
+    }
+    
+    /*No Fast P-Skip fX264optNfpskipSwitch BOOLEAN*/
+    [fX264optNfpskipSwitch setState:0];
+    
+    /*No Dict Decimate fX264optNodctdcmtSwitch BOOLEAN*/
+    [fX264optNodctdcmtSwitch setState:0];    
+    
+    /*Sub Me fX264optSubmePopUp*/
+    [fX264optSubmePopUp removeAllItems];
+    [fX264optSubmePopUp addItemWithTitle:@"Default (6)"];
+    for (i=0; i<10;i++)
+    {
+        [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]];
+    }
+    
+    /*Trellis fX264optTrellisPopUp*/
+    [fX264optTrellisPopUp removeAllItems];
+    [fX264optTrellisPopUp addItemWithTitle:@"Default (0)"];
+    for (i=0; i<3;i++)
+    {
+        [fX264optTrellisPopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]];
+    }
+    [fX264optTrellisPopUp setWantsLayer:YES];
+    
+    /*Mixed-references fX264optMixedRefsSwitch BOOLEAN*/
+    [fX264optMixedRefsSwitch setState:0];
+    [fX264optMixedRefsSwitch setWantsLayer:YES];
+    
+    /*Motion Estimation fX264optMotionEstPopUp*/
+    [fX264optMotionEstPopUp removeAllItems];
+    [fX264optMotionEstPopUp addItemWithTitle:@"Default (Hexagon)"];
+    [fX264optMotionEstPopUp addItemWithTitle:@"Diamond"];
+    [fX264optMotionEstPopUp addItemWithTitle:@"Hexagon"];
+    [fX264optMotionEstPopUp addItemWithTitle:@"Uneven Multi-Hexagon"];
+    [fX264optMotionEstPopUp addItemWithTitle:@"Exhaustive"];
+    
+    /*Motion Estimation range fX264optMERangePopUp*/
+    [fX264optMERangePopUp removeAllItems];
+    [fX264optMERangePopUp addItemWithTitle:@"Default (16)"];
+    for (i=4; i<65;i++)
+    {
+        [fX264optMERangePopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]];
+    }
+    
+    /*Weighted B-Frame Prediction fX264optWeightBSwitch BOOLEAN*/
+    [fX264optWeightBSwitch setState:0];
+    [fX264optWeightBSwitch setWantsLayer:YES];
+    
+    /*B-frame Pyramids fX264optBPyramidSwitch BOOLEAN*/
+    [fX264optBPyramidSwitch setState:0];
+    [fX264optBPyramidSwitch setWantsLayer:YES];
+    
+    /*Direct B-Frame Prediction Mode fX264optDirectPredPopUp*/
+    [fX264optDirectPredPopUp removeAllItems];
+    [fX264optDirectPredPopUp addItemWithTitle:@"Default (Spatial)"];
+    [fX264optDirectPredPopUp addItemWithTitle:@"None"];
+    [fX264optDirectPredPopUp addItemWithTitle:@"Spatial"];
+    [fX264optDirectPredPopUp addItemWithTitle:@"Temporal"];
+    [fX264optDirectPredPopUp addItemWithTitle:@"Automatic"];
+    [fX264optDirectPredPopUp setWantsLayer:YES];
+    
+    /*Alpha Deblock*/
+    [fX264optAlphaDeblockPopUp removeAllItems];
+    [fX264optAlphaDeblockPopUp addItemWithTitle:@"Default (0)"];
+    for (i=-6; i<7;i++)
+    {
+        [fX264optAlphaDeblockPopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]];
+    }
+
+    /*Beta Deblock*/
+    [fX264optBetaDeblockPopUp removeAllItems];
+    [fX264optBetaDeblockPopUp addItemWithTitle:@"Default (0)"];
+    for (i=-6; i<7;i++)
+    {
+        [fX264optBetaDeblockPopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]];
+    }
+
+    /* Analysis fX264optAnalysePopUp */
+    [fX264optAnalysePopUp removeAllItems];
+    [fX264optAnalysePopUp addItemWithTitle:@"Default (some)"]; /* 0=default */
+    [fX264optAnalysePopUp addItemWithTitle:[NSString stringWithFormat:@"None"]]; /* 1=none */
+    [fX264optAnalysePopUp addItemWithTitle:[NSString stringWithFormat:@"All"]]; /* 2=all */
+
+    /* 8x8 DCT fX264op8x8dctSwitch */
+    [fX264opt8x8dctSwitch setState:0];
+    [fX264opt8x8dctSwitch setWantsLayer:YES];
+
+    /* CABAC fX264opCabacSwitch */
+    [fX264optCabacSwitch setState:1];
+
+    /* Standardize the option string */
+    [self X264AdvancedOptionsStandardizeOptString:nil];
+
+    /* Set Current GUI Settings based on newly standardized string */
+    [self X264AdvancedOptionsSetCurrentSettings:nil];
+
+    /* Fade out options that don't apply */
+    [self X264AdvancedOptionsAnimate: sender];
+}
+
+/**
+ * Cleans the option string to use a standard format of option=value
+ */
+- (IBAction) X264AdvancedOptionsStandardizeOptString: (id) sender
+{
+    /* Set widgets depending on the opt string in field */
+    NSString * thisOpt; // The separated option such as "bframes=3"
+    NSString * optName = @""; // The option name such as "bframes"
+    NSString * optValue = @"";// The option value such as "3"
+    NSString * changedOptString = @"";
+    NSArray *currentOptsArray;
+    
+    /*First, we get an opt string to process */
+    NSString *currentOptString = [fDisplayX264Options stringValue];
+    
+    /* Verify there is an opt string to process by making sure an
+       option is getting its value set. If so, start to process it. */
+    NSRange currentOptRange = [currentOptString rangeOfString:@"="];
+    if (currentOptRange.location != NSNotFound)
+    {
+        /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/
+        currentOptsArray = [currentOptString componentsSeparatedByString:@":"];
+        
+        /*iterate through the array and get <opts> and <values*/
+        int loopcounter;
+        int currentOptsArrayCount = [currentOptsArray count];
+        for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++)
+        {
+            thisOpt = [currentOptsArray objectAtIndex:loopcounter];
+            
+            NSRange splitOptRange = [thisOpt rangeOfString:@"="];
+            if (splitOptRange.location != NSNotFound)
+            {
+                optName = [thisOpt substringToIndex:splitOptRange.location];
+                optValue = [thisOpt substringFromIndex:splitOptRange.location + 1];
+                
+                /* Standardize the names here depending on whats in the string */
+                optName = [self X264AdvancedOptionsStandardizeOptNames:optName];
+                thisOpt = [NSString stringWithFormat:@"%@=%@",optName,optValue];    
+            }
+            else // No value given so we use a default of "1"
+            {
+                optName = thisOpt;
+
+                /* Standardize the names here depending on whats in the string */
+                optName = [self X264AdvancedOptionsStandardizeOptNames:optName];
+                thisOpt = [NSString stringWithFormat:@"%@=%d",optName,1];
+            }
+            
+            /* Construct New String for opts here.*/
+            if ([thisOpt isEqualToString:@""])
+            {
+                /* Blank option, just add it to the string. (Why?) */
+                changedOptString = [NSString stringWithFormat:@"%@%@",changedOptString,thisOpt];
+            }
+            else
+            {
+                if ([changedOptString isEqualToString:@""])
+                {
+                    /* Blank string, output the current option. */
+                    changedOptString = [NSString stringWithFormat:@"%@",thisOpt];
+                }
+                else
+                {
+                    /* Option exists and string exists, so append the option
+                       to the string with a semi-colon inbetween them.       */
+                    changedOptString = [NSString stringWithFormat:@"%@:%@",changedOptString,thisOpt];
+                }
+            }
+        }
+    }
+    
+    /* Change the option string to reflect the new standardized option string */
+    [fDisplayX264Options setStringValue:[NSString stringWithFormat:changedOptString]];
+}
+
+/**
+ * Cleans the option string to use a standard set of option names, by conflating synonyms.
+ */
+- (NSString *) X264AdvancedOptionsStandardizeOptNames:(NSString *) cleanOptNameString
+{
+    /* Reference Frames */
+    if ([cleanOptNameString isEqualToString:@"ref"] || [cleanOptNameString isEqualToString:@"frameref"])
+    {
+        cleanOptNameString = @"ref";
+    }
+    
+    /*No Fast PSkip nofast_pskip*/
+    if ([cleanOptNameString isEqualToString:@"no-fast-pskip"] || [cleanOptNameString isEqualToString:@"no_fast_pskip"] || [cleanOptNameString isEqualToString:@"nofast_pskip"])
+    {
+        cleanOptNameString = @"no-fast-pskip";
+    }
+    
+    /*No Dict Decimate*/
+    if ([cleanOptNameString isEqualToString:@"no-dct-decimate"] || [cleanOptNameString isEqualToString:@"no_dct_decimate"] || [cleanOptNameString isEqualToString:@"nodct_decimate"])
+    {
+        cleanOptNameString = @"no-dct-decimate";
+    }
+    
+    /*Subme*/
+    if ([cleanOptNameString isEqualToString:@"subme"])
+    {
+        cleanOptNameString = @"subq";
+    }
+    
+    /*ME Range*/
+    if ([cleanOptNameString isEqualToString:@"me-range"] || [cleanOptNameString isEqualToString:@"me_range"])
+        cleanOptNameString = @"merange";
+    
+    /*WeightB*/
+    if ([cleanOptNameString isEqualToString:@"weight-b"] || [cleanOptNameString isEqualToString:@"weight_b"])
+    {
+        cleanOptNameString = @"weightb";
+    }
+    
+    /*B Pyramid*/
+    if ([cleanOptNameString isEqualToString:@"b_pyramid"])
+    {
+        cleanOptNameString = @"b-pyramid";
+    }
+    
+    /*Direct Prediction*/
+    if ([cleanOptNameString isEqualToString:@"direct-pred"] || [cleanOptNameString isEqualToString:@"direct_pred"])
+    {
+        cleanOptNameString = @"direct";
+    }
+    
+    /*Deblocking*/
+    if ([cleanOptNameString isEqualToString:@"filter"])
+    {
+        cleanOptNameString = @"deblock";
+    }
+    
+    /*Analysis*/
+    if ([cleanOptNameString isEqualToString:@"partitions"])
+    {
+        cleanOptNameString = @"analyse";
+    }
+    
+    return cleanOptNameString;    
+}
+
+/**
+ * Fades options in and out depending on whether they're available..
+ */
+- (IBAction) X264AdvancedOptionsAnimate: (id) sender
+{
+    /* Lots of situations to cover.
+       - B-frames (when 0 turn of b-frame specific stuff, when < 2 disable b-pyramid)
+       - CABAC (when 0 turn off trellis)
+       - analysis (if none, turn off 8x8dct)
+       - refs (under 2, disable mixed-refs)
+    */
+    
+    if ( [fX264optBframesPopUp indexOfSelectedItem ] < 2)
+    {
+        /* If the b-frame widget is at 0 or 1, the user has chosen
+           not to use b-frames at all. So disable the options
+           that can only be used when b-frames are enabled.        */
+        [[fX264optWeightBSwitch animator] setHidden:YES];
+        [[fX264optWeightBLabel animator] setHidden:YES];
+        if ( [fX264optWeightBSwitch state] == 1 && sender != fX264optWeightBSwitch && sender != fX264optBPyramidSwitch && sender != fX264optDirectPredPopUp)
+            [fX264optWeightBSwitch performClick:self];
+        
+        [[fX264optBPyramidSwitch animator] setHidden:YES];
+        [[fX264optBPyramidLabel animator] setHidden:YES];
+        if ( [fX264optBPyramidSwitch state] == 1 && sender != fX264optWeightBSwitch && sender != fX264optBPyramidSwitch && sender != fX264optDirectPredPopUp)
+            [fX264optBPyramidSwitch performClick:self];
+
+        [[fX264optDirectPredPopUp animator] setHidden:YES];
+        [[fX264optDirectPredLabel animator] setHidden:YES];
+        if ( [fX264optDirectPredPopUp indexOfSelectedItem] > 0 && sender != fX264optWeightBSwitch && sender != fX264optBPyramidSwitch && sender != fX264optDirectPredPopUp)
+        {
+            [fX264optDirectPredPopUp selectItemAtIndex: 0];
+            [[fX264optDirectPredPopUp cell] performClick:self];
+            
+        }
+    }
+    else if ( [fX264optBframesPopUp indexOfSelectedItem ] == 2)
+    {
+        /* Only 1 b-frame? Disable b-pyramid. */
+        [[fX264optBPyramidSwitch animator] setHidden:YES];
+        [[fX264optBPyramidLabel animator] setHidden:YES];
+        if ( [fX264optBPyramidSwitch state] == 1 && sender != fX264optBPyramidSwitch)
+            [fX264optBPyramidSwitch performClick:self];
+
+        [[fX264optWeightBSwitch animator] setHidden:NO];
+        [[fX264optWeightBLabel animator] setHidden:NO];
+
+        [[fX264optDirectPredPopUp animator] setHidden:NO];
+        [[fX264optDirectPredLabel animator] setHidden:NO];
+    }
+    else
+    {
+        [[fX264optWeightBSwitch animator] setHidden:NO];
+        [[fX264optWeightBLabel animator] setHidden:NO];
+
+        [[fX264optBPyramidSwitch animator] setHidden:NO];
+        [[fX264optBPyramidLabel animator] setHidden:NO];
+
+        [[fX264optDirectPredPopUp animator] setHidden:NO];
+        [[fX264optDirectPredLabel animator] setHidden:NO];
+    }
+    
+    if ( [fX264optCabacSwitch state] == false)
+    {
+        /* Without CABAC entropy coding, trellis doesn't run. */
+        
+        [[fX264optTrellisPopUp animator] setHidden:YES];
+        [[fX264optTrellisLabel animator] setHidden:YES];
+        [fX264optTrellisPopUp selectItemAtIndex:0];
+        if (sender != fX264optTrellisPopUp)
+            [[fX264optTrellisPopUp cell] performClick:self];
+    }
+    else
+    {
+        [[fX264optTrellisPopUp animator] setHidden:NO];
+        [[fX264optTrellisLabel animator] setHidden:NO];
+    }
+    
+    if ( [fX264optAnalysePopUp indexOfSelectedItem] == 1)
+    {
+        /* No analysis? Disable 8x8dct */
+        [[fX264opt8x8dctSwitch animator] setHidden:YES];
+        [[fX264opt8x8dctLabel animator] setHidden:YES];
+        if ( [fX264opt8x8dctSwitch state] == 1 && sender != fX264opt8x8dctSwitch )
+            [fX264opt8x8dctSwitch performClick:self];
+    }
+    else
+    {
+        [[fX264opt8x8dctSwitch animator] setHidden:NO];
+        [[fX264opt8x8dctLabel animator] setHidden:NO];
+    }
+    
+    if ( [fX264optRefPopUp indexOfSelectedItem] < 3)
+    {
+        /* Only do mixed-refs when there are at least 2 refs to mix. */
+        [[fX264optMixedRefsSwitch animator] setHidden:YES];
+        [[fX264optMixedRefsLabel animator] setHidden:YES];
+        if ( [fX264optMixedRefsSwitch state] == 1 && sender != fX264optMixedRefsSwitch )
+            [fX264optMixedRefsSwitch performClick:self];
+    }
+    else
+    {
+        [[fX264optMixedRefsSwitch animator] setHidden:NO];
+        [[fX264optMixedRefsLabel animator] setHidden:NO];
+    }
+}
+
+/**
+ * Resets the GUI widgets to the contents of the option string.
+ */
+- (IBAction) X264AdvancedOptionsSetCurrentSettings: (id) sender
+{
+    /* Set widgets depending on the opt string in field */
+    NSString * thisOpt; // The separated option such as "bframes=3"
+    NSString * optName = @""; // The option name such as "bframes"
+    NSString * optValue = @"";// The option value such as "3"
+    NSArray *currentOptsArray;
+    
+    /*First, we get an opt string to process */
+    NSString *currentOptString = [fDisplayX264Options stringValue];
+    
+    /* Verify there is an opt string to process by making sure an
+       option is getting its value set. If so, start to process it. */
+    NSRange currentOptRange = [currentOptString rangeOfString:@"="];
+    if (currentOptRange.location != NSNotFound)
+    {
+        /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/
+        currentOptsArray = [currentOptString componentsSeparatedByString:@":"];
+        
+        /*iterate through the array and get <opts> and <values*/
+        int loopcounter;
+        int currentOptsArrayCount = [currentOptsArray count];
+        for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++)
+        {
+            thisOpt = [currentOptsArray objectAtIndex:loopcounter];
+            
+            /* Verify the option sets a value */
+            NSRange splitOptRange = [thisOpt rangeOfString:@"="];            
+            if (splitOptRange.location != NSNotFound)
+            {
+                /* Split thisOpt into an optName setting an optValue. */
+                optName = [thisOpt substringToIndex:splitOptRange.location];
+                optValue = [thisOpt substringFromIndex:splitOptRange.location + 1];
+                
+                /*Run through the available widgets for x264 opts and set them, as you add widgets, 
+                    they need to be added here. This should be moved to its own method probably*/
+                
+                /*bframes NSPopUpButton*/
+                if ([optName isEqualToString:@"bframes"])
+                {
+                    [fX264optBframesPopUp selectItemAtIndex:[optValue intValue]+1];
+                }
+                /*ref NSPopUpButton*/
+                if ([optName isEqualToString:@"ref"])
+                {
+                    [fX264optRefPopUp selectItemAtIndex:[optValue intValue]+1];
+                }
+                /*No Fast PSkip NSButton*/
+                if ([optName isEqualToString:@"no-fast-pskip"])
+                {
+                    [fX264optNfpskipSwitch setState:[optValue intValue]];
+                }
+                /*No Dict Decimate NSButton*/
+                if ([optName isEqualToString:@"no-dct-decimate"])
+                {
+                    [fX264optNodctdcmtSwitch setState:[optValue intValue]];
+                }
+                /*Sub Me NSPopUpButton*/
+                if ([optName isEqualToString:@"subq"])
+                {
+                    [fX264optSubmePopUp selectItemAtIndex:[optValue intValue]+1];
+                }
+                /*Trellis NSPopUpButton*/
+                if ([optName isEqualToString:@"trellis"])
+                {
+                    [fX264optTrellisPopUp selectItemAtIndex:[optValue intValue]+1];
+                }
+                /*Mixed Refs NSButton*/
+                if ([optName isEqualToString:@"mixed-refs"])
+                {
+                    [fX264optMixedRefsSwitch setState:[optValue intValue]];
+                }
+                /*Motion Estimation NSPopUpButton*/
+                if ([optName isEqualToString:@"me"])
+                {
+                    if ([optValue isEqualToString:@"dia"])
+                        [fX264optMotionEstPopUp selectItemAtIndex:1];
+                    else if ([optValue isEqualToString:@"hex"])
+                        [fX264optMotionEstPopUp selectItemAtIndex:2];
+                    else if ([optValue isEqualToString:@"umh"])
+                        [fX264optMotionEstPopUp selectItemAtIndex:3];
+                    else if ([optValue isEqualToString:@"esa"])
+                        [fX264optMotionEstPopUp selectItemAtIndex:4];                        
+                }
+                /*ME Range NSPopUpButton*/
+                if ([optName isEqualToString:@"merange"])
+                {
+                    [fX264optMERangePopUp selectItemAtIndex:[optValue intValue]-3];
+                }
+                /*Weighted B-Frames NSButton*/
+                if ([optName isEqualToString:@"weightb"])
+                {
+                    [fX264optWeightBSwitch setState:[optValue intValue]];
+                }
+                /*B Pyramid NSPButton*/
+                if ([optName isEqualToString:@"b-pyramid"])
+                {
+                    [fX264optBPyramidSwitch setState:[optValue intValue]];
+                }
+                /*Direct B-frame Prediction NSPopUpButton*/
+                if ([optName isEqualToString:@"direct"])
+                {
+                    if ([optValue isEqualToString:@"none"])
+                        [fX264optDirectPredPopUp selectItemAtIndex:1];
+                    else if ([optValue isEqualToString:@"spatial"])
+                        [fX264optDirectPredPopUp selectItemAtIndex:2];
+                    else if ([optValue isEqualToString:@"temporal"])
+                        [fX264optDirectPredPopUp selectItemAtIndex:3];
+                    else if ([optValue isEqualToString:@"auto"])
+                        [fX264optDirectPredPopUp selectItemAtIndex:4];                        
+                }
+                /*Deblocking NSPopUpButtons*/
+                if ([optName isEqualToString:@"deblock"])
+                {
+                    NSString * alphaDeblock = @"";
+                    NSString * betaDeblock = @"";
+                    
+                    NSRange splitDeblock = [optValue rangeOfString:@","];
+                    alphaDeblock = [optValue substringToIndex:splitDeblock.location];
+                    betaDeblock = [optValue substringFromIndex:splitDeblock.location + 1];
+                    
+                    if ([alphaDeblock isEqualToString:@"0"] && [betaDeblock isEqualToString:@"0"])
+                    {
+                        /* When both filters are at 0, default */
+                        [fX264optAlphaDeblockPopUp selectItemAtIndex:0];                        
+                        [fX264optBetaDeblockPopUp selectItemAtIndex:0];                               
+                    }
+                    else
+                    {
+                        if (![alphaDeblock isEqualToString:@"0"])
+                        {
+                            /* Alpha isn't 0, so set it. The offset of 7 is
+                               because filters start at -6 instead of at 0. */
+                            [fX264optAlphaDeblockPopUp selectItemAtIndex:[alphaDeblock intValue]+7];
+                        }
+                        else
+                        {
+                            /* Set alpha filter to 0, which is 7 up
+                               because filters start at -6, not 0. */
+                            [fX264optAlphaDeblockPopUp selectItemAtIndex:7];                        
+                        }
+                        
+                        if (![betaDeblock isEqualToString:@"0"])
+                        {
+                            /* Beta isn't 0, so set it. */
+                            [fX264optBetaDeblockPopUp selectItemAtIndex:[betaDeblock intValue]+7];
+                        }
+                        else
+                        {
+                            /* Set beta filter to 0. */
+                            [fX264optBetaDeblockPopUp selectItemAtIndex:7];                        
+                        }
+                    }
+                }
+                /* Analysis NSPopUpButton */
+                if ([optName isEqualToString:@"analyse"])
+                {
+                    if ([optValue isEqualToString:@"p8x8,b8x8,i8x8,i4x4"])
+                    {
+                        /* Default ("some") */
+                        [fX264optAnalysePopUp selectItemAtIndex:0];
+                    }
+                    if ([optValue isEqualToString:@"none"])
+                    {
+                        [fX264optAnalysePopUp selectItemAtIndex:1];
+                    }
+                    if ([optValue isEqualToString:@"all"])
+                    {
+                        [fX264optAnalysePopUp selectItemAtIndex:2];
+                    }
+                }
+                /* 8x8 DCT NSButton */
+                if ([optName isEqualToString:@"8x8dct"])
+                {
+                    [fX264opt8x8dctSwitch setState:[optValue intValue]];
+                }
+                /* CABAC NSButton */
+                if ([optName isEqualToString:@"cabac"])
+                {
+                    [fX264optCabacSwitch setState:[optValue intValue]];
+                }                                                                 
+            }
+        }
+    }
+}
+
+/**
+ * Resets the option string to mirror the GUI widgets.
+ */
+- (IBAction) X264AdvancedOptionsChanged: (id) sender
+{
+    /*Determine which outlet is being used and set optName to process accordingly */
+    NSString * optNameToChange = @""; // The option name such as "bframes"
+    
+    if (sender == fX264optBframesPopUp)
+    {
+        optNameToChange = @"bframes";
+    }
+    if (sender == fX264optRefPopUp)
+    {
+        optNameToChange = @"ref";
+    }
+    if (sender == fX264optNfpskipSwitch)
+    {
+        optNameToChange = @"no-fast-pskip";
+    }
+    if (sender == fX264optNodctdcmtSwitch)
+    {
+        optNameToChange = @"no-dct-decimate";
+    }
+    if (sender == fX264optSubmePopUp)
+    {
+        optNameToChange = @"subq";
+    }
+    if (sender == fX264optTrellisPopUp)
+    {
+        optNameToChange = @"trellis";
+    }
+    if (sender == fX264optMixedRefsSwitch)
+    {
+        optNameToChange = @"mixed-refs";
+    }
+    if (sender == fX264optMotionEstPopUp)
+    {
+        optNameToChange = @"me";
+    }
+    if (sender == fX264optMERangePopUp)
+    {
+        optNameToChange = @"merange";
+    }
+    if (sender == fX264optWeightBSwitch)
+    {
+        optNameToChange = @"weightb";
+    }
+    if (sender == fX264optBPyramidSwitch)
+    {
+        optNameToChange = @"b-pyramid";
+    }
+    if (sender == fX264optDirectPredPopUp)
+    {
+        optNameToChange = @"direct";
+    }
+    if (sender == fX264optAlphaDeblockPopUp)
+    {
+        optNameToChange = @"deblock";
+    }
+    if (sender == fX264optBetaDeblockPopUp)
+    {
+        optNameToChange = @"deblock";
+    }        
+    if (sender == fX264optAnalysePopUp)
+    {
+        optNameToChange = @"analyse";
+    }
+    if (sender == fX264opt8x8dctSwitch)
+    {
+        optNameToChange = @"8x8dct";
+    }
+    if (sender == fX264optCabacSwitch)
+    {
+        optNameToChange = @"cabac";
+    }
+    
+    /* Set widgets depending on the opt string in field */
+    NSString * thisOpt; // The separated option such as "bframes=3"
+    NSString * optName = @""; // The option name such as "bframes"
+    NSString * optValue = @"";// The option value such as "3"
+    NSArray *currentOptsArray;
+    
+    /*First, we get an opt string to process */
+    NSString *currentOptString = [fDisplayX264Options stringValue];
+    
+    /* There are going to be a few possibilities.
+       - The option might start off the string.
+       - The option might be in the middle of the string.
+       - The option might not be in the string at all yet.
+       - The string itself might not yet exist.
+       
+       Because each of these possibilities means constructing a different kind of string,
+       they're all handled separately in a sea of messy, somewhat redundant code. =(     */
+       
+    /* If the option is in the string but not the beginning of it, it will be in the form of ":optName=value"
+       so we really want to be looking for ":optNameToChange=" rather than "optNameToChange".                 */
+    NSString *checkOptNameToChange = [NSString stringWithFormat:@":%@=",optNameToChange];
+    
+    /* Now we store the part of the string up through the option name in currentOptRange. */
+    NSRange currentOptRange = [currentOptString rangeOfString:checkOptNameToChange];
+
+    /*  We need to know if the option is at the beginning of the string.
+        If it is at the start, it won't be preceded by a colon.
+        To figure this out, we'll use the rangeOfString method. First,
+        store what the option name would be if if it was at the beginning,
+        in checkOptNameToChangeBeginning. Then, find its range in the string.
+        If the range is 0, it's the first option listed in the string.       */        
+    NSString *checkOptNameToChangeBeginning = [NSString stringWithFormat:@"%@=",optNameToChange];
+    NSRange currentOptRangeBeginning = [currentOptString rangeOfString:checkOptNameToChangeBeginning];
+    
+    if (currentOptRange.location != NSNotFound || currentOptRangeBeginning.location == 0)
+    {
+        /* If the option is in the string wth a semicolon, or starts the string, it's time to edit.
+           This means parsing the whole string into an array of options and values. From there,
+           iterate through the options, and when you reach the one that's been changed, edit it.   */
+        
+        /* Create new empty opt string*/
+        NSString *changedOptString = @"";
+        
+        /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/
+        currentOptsArray = [currentOptString componentsSeparatedByString:@":"];
+        
+        /*iterate through the array and get <opts> and <values*/
+        int loopcounter;
+        int currentOptsArrayCount = [currentOptsArray count];
+        for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++)
+        {
+            thisOpt = [currentOptsArray objectAtIndex:loopcounter];
+            NSRange splitOptRange = [thisOpt rangeOfString:@"="];
+            
+            if (splitOptRange.location != NSNotFound)
+            {
+                /* First off, it's time to handle option strings that
+                   already have at least one option=value pair in them. */
+                   
+                optName = [thisOpt substringToIndex:splitOptRange.location];
+                optValue = [thisOpt substringFromIndex:splitOptRange.location + 1];
+                
+                /*Run through the available widgets for x264 opts and set them, as you add widgets, 
+                    they need to be added here. This should be moved to its own method probably*/
+                
+                /*If the optNameToChange is found, appropriately change the value or delete it if
+                    "Unspecified" is set.*/
+                if ([optName isEqualToString:optNameToChange])
+                {
+                    if ([optNameToChange isEqualToString:@"deblock"])
+                    {
+                        if ((([fX264optAlphaDeblockPopUp indexOfSelectedItem] == 0) || ([fX264optAlphaDeblockPopUp indexOfSelectedItem] == 7)) && (([fX264optBetaDeblockPopUp indexOfSelectedItem] == 0) || ([fX264optBetaDeblockPopUp indexOfSelectedItem] == 7)))
+                        {
+                            /* When both deblock widgets are 0 or default or a mix of the two,
+                               use a blank string, since deblocking defaults to 0,0.           */
+                            thisOpt = @"";                                
+                        }
+                        else
+                        {
+                            /* Otherwise the format is deblock=a,b, where a and b both have an array
+                               offset of 7 because deblocking values start at -6 instead of at zero. */
+                            thisOpt = [NSString stringWithFormat:@"%@=%d,%d",optName, ([fX264optAlphaDeblockPopUp indexOfSelectedItem] != 0) ? [fX264optAlphaDeblockPopUp indexOfSelectedItem]-7 : 0,([fX264optBetaDeblockPopUp indexOfSelectedItem] != 0) ? [fX264optBetaDeblockPopUp indexOfSelectedItem]-7 : 0];
+                        }
+                    }
+                    else if /*Boolean Switches*/ ([optNameToChange isEqualToString:@"mixed-refs"] || [optNameToChange isEqualToString:@"weightb"] ||  [optNameToChange isEqualToString:@"b-pyramid"] || [optNameToChange isEqualToString:@"no-fast-pskip"] || [optNameToChange isEqualToString:@"no-dct-decimate"] || [optNameToChange isEqualToString:@"8x8dct"] )
+                    {
+                        /* Here is where we take care of the boolean options that work overtly:
+                           no-dct-decimate being on means no-dct-decimate=1, etc. Some options
+                           require the inverse, but those will be handled a couple lines down. */
+                        if ([sender state] == 0)
+                        {
+                            /* When these options are false, don't include them. They all default
+                               to being set off, so they don't need to be mentioned at all.       */
+                            thisOpt = @"";
+                        }
+                        else
+                        {
+                            /* Otherwise, include them as optioname=1 */
+                            thisOpt = [NSString stringWithFormat:@"%@=%d",optName,1];
+                        }
+                    }
+                    else if ([optNameToChange isEqualToString:@"cabac"])
+                    {
+                        /* CABAC is odd, in that it defaults to being on. That means
+                           it only needs to be included in the string when turned off. */
+                        if ([sender state] == 1)
+                        {
+                            /* It's true so don't include it. */
+                            thisOpt = @"";
+                        }
+                        else
+                        {
+                            /* Otherwise, include cabac=0 in the string to enable CAVLC. */
+                            thisOpt = [NSString stringWithFormat:@"%@=%d",optName,0];
+                        }
+                    }                                        
+                    else if (([sender indexOfSelectedItem] == 0) && (sender != fX264optAlphaDeblockPopUp) && (sender != fX264optBetaDeblockPopUp) ) // means that "unspecified" is chosen, lets then remove it from the string
+                    {
+                        /* When a widget is at index 0, it's default. Default means don't add to the string.
+                           The exception for deblocking is because for those, *both* need to at index 0
+                           for it to default, so it's handled separately, above this section.                */
+                        thisOpt = @"";
+                    }
+                    else if ([optNameToChange isEqualToString:@"me"])
+                    {
+                        /* Motion estimation uses string values, so this switch
+                           pairs the widget index with the right value string.  */
+                        switch ([sender indexOfSelectedItem])
+                        {   
+                            case 1:
+                                thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"dia"];
+                                break;
+                                
+                            case 2:
+                                thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"hex"];
+                                break;
+                                
+                            case 3:
+                                thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"umh"];
+                                break;
+                                
+                            case 4:
+                                thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"esa"];
+                                break;
+                                
+                            default:
+                                break;
+                        }
+                    }
+                    else if ([optNameToChange isEqualToString:@"direct"])
+                    {
+                        /* Direct prediction uses string values, so this switch
+                           pairs the right string value with the right widget index. */
+                        switch ([sender indexOfSelectedItem])
+                        {   
+                            case 1:
+                                thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"none"];
+                                break;
+                                
+                            case 2:
+                                thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"spatial"];
+                                break;
+                                
+                            case 3:
+                                thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"temporal"];
+                                break;
+                                
+                            case 4:
+                                thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"auto"];
+                                break;
+                                
+                            default:
+                                break;
+                        }
+                    }
+                    else if ([optNameToChange isEqualToString:@"analyse"])
+                    {
+                        /* Analysis uses string values as well. */
+                        switch ([sender indexOfSelectedItem])
+                        {   
+                            case 1:
+                                thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"none"];
+                                break;
+                                
+                            case 2:
+                                thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"all"];
+                                break;
+                                
+                            default:
+                                break;
+                        }
+                    }
+                    else if ([optNameToChange isEqualToString:@"merange"])
+                    {
+                        /* Motion estimation range uses an odd array offset because in addition
+                           to starting with index 0 as default, index 1 starts at 4 instead of 1,
+                           because merange can't go below 4. So it has to be handled separately.  */
+                        thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]+3];
+                    }
+                    else // we have a valid value to change, so change it
+                    {
+                        if ( [sender indexOfSelectedItem] != 0 )
+                        /* Here's our general case, that catches things like ref frames and b-frames.
+                           Basically, any options that are PopUp menus with index 0 as default and
+                           index 1 as 1, with numerical values, are all handled right here. All of
+                           the above stuff is for the exceptions to the general case.              */
+                            thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]-1];
+                    }
+                }
+            }
+            
+            /* Construct New String for opts here */
+            if ([thisOpt isEqualToString:@""])
+            {
+                /* Blank option, so just add it to the string. (Why?) */
+                changedOptString = [NSString stringWithFormat:@"%@%@",changedOptString,thisOpt];
+            }
+            else
+            {
+                if ([changedOptString isEqualToString:@""])
+                {
+                    /* No existing string, make the string this option. */
+                    changedOptString = [NSString stringWithFormat:@"%@",thisOpt];
+                }
+                else
+                {
+                    /* Existing string, existing option. Append the
+                       option to the string, preceding it with a colon. */
+                    changedOptString = [NSString stringWithFormat:@"%@:%@",changedOptString,thisOpt];
+                }
+            }
+        }
+        
+        /* Change the dislayed option string to reflect the new modified settings */
+        [fDisplayX264Options setStringValue:[NSString stringWithFormat:changedOptString]];    
+    }
+    else // if none exists, add it to the string
+    {
+        /* This is where options that aren't already in the string are handled. */
+        if ([[fDisplayX264Options stringValue] isEqualToString: @""])
+        {
+            /* The option might not be in the string because the
+               string is empty. Handle this possibility first.   */
+            if ([optNameToChange isEqualToString:@"me"])
+            {
+                /* Special case for motion estimation, which uses string values
+                   that need to be paired up with the equivalent widget index.  */
+                switch ([sender indexOfSelectedItem])
+                {   
+                    case 1:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"dia"]]];
+                        break;
+                        
+                    case 2:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"hex"]]];
+                        break;
+                        
+                    case 3:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"umh"]]];
+                        break;
+                        
+                    case 4:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"esa"]]];
+                        break;
+                        
+                    default:
+                        break;
+                }
+            }
+            else if ([optNameToChange isEqualToString:@"direct"])
+            {
+                /* Special case for direct prediction, which uses string values
+                   that need to be paired up with the equivalent widget index.  */
+                switch ([sender indexOfSelectedItem])
+                {   
+                    case 1:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"none"]]];
+                        break;
+                        
+                    case 2:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"spatial"]]];
+                        break;
+                        
+                    case 3:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"temporal"]]];
+                        break;
+                        
+                    case 4:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"auto"]]];
+                        break;
+                        
+                    default:
+                        break;
+                }
+            }
+            else if ([optNameToChange isEqualToString:@"analyse"])
+            {
+                /* Special case for partition analysis, which uses string values
+                   that need to be paired up with the equivalent widget index.  */
+                switch ([sender indexOfSelectedItem])
+                {   
+                    case 1:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"none"]]];
+                        break;
+                        
+                    case 2:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"all"]]];
+                        break;
+                        
+                    default:
+                        break;
+                }
+            }
+            
+            else if ([optNameToChange isEqualToString:@"merange"])
+            {
+                /* Special case for motion estimation range, which uses
+                   a widget index offset of 3. This is because the
+                   first valid value after default is four, not zero.   */
+                [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                    [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]+3]]];
+            }
+            else if ([optNameToChange isEqualToString:@"deblock"])
+            {
+                /* Very special case for deblock. Uses a weird widget index offset
+                   of 7, because the first value after default is -6, rather than 0.
+                   As well, deblock only goes to default when *both* alpha and beta
+                   are zero. If only one is zero, you can't mark it down as default.
+                   Instead, mark that one down as literally 0. This is because when
+                   widgets are at default values, they aren't included in the string.
+                   If only one filter is at 0, both need to be overtly specified.    */
+                [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d,%d", ([fX264optAlphaDeblockPopUp indexOfSelectedItem] != 0) ? [fX264optAlphaDeblockPopUp indexOfSelectedItem]-7 : 0, ([fX264optBetaDeblockPopUp indexOfSelectedItem] != 0) ? [fX264optBetaDeblockPopUp indexOfSelectedItem]-7 : 0]]];                
+            }
+            else if /*Boolean Switches*/ ([optNameToChange isEqualToString:@"mixed-refs"] || [optNameToChange isEqualToString:@"weightb"] || [optNameToChange isEqualToString:@"b-pyramid"] || [optNameToChange isEqualToString:@"no-fast-pskip"] || [optNameToChange isEqualToString:@"no-dct-decimate"] || [optNameToChange isEqualToString:@"8x8dct"] )
+            {
+                /* This covers all the boolean options that need to be specified only when true. */
+                if ([sender state] == 0)
+                {
+                    [fDisplayX264Options setStringValue:[NSString stringWithFormat:@""]];                    
+                }
+                else
+                {
+                    [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                        [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender state]]]];
+                }
+            }
+            else if ([optNameToChange isEqualToString:@"cabac"])
+            {
+                /* CABAC is weird in that you need the inverse. Only include in the string
+                   when cabac=0, because cabac=1 is the default. Turning it off means CAVLC. */
+                if ([sender state] == 1)
+                {
+                    [fDisplayX264Options setStringValue:[NSString stringWithFormat:@""]];                                        
+                }
+                else
+                {
+                    [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                        [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender state]]]];                    
+                }
+            }            
+            else
+            {
+                if ( [sender indexOfSelectedItem] != 0 )
+                /* General case to cover all the normal PopUp widgets, like ref and b-frames. */
+                    [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", 
+                    [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]-1]]];
+            }
+        }
+        else
+        {
+            /* The string isn't empty, and the option isn't already in it,
+               so it will need to be appended to the string with a colon.  */
+            if ([optNameToChange isEqualToString:@"me"])
+            {
+                /* Special case for motion estimation, which uses string values
+                   that need to be paired up with the equivalent widget index.  */
+                switch ([sender indexOfSelectedItem])
+                {   
+                    case 1:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@", 
+                            [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"dia"]]];
+                        break;
+                        
+                    case 2:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@", 
+                            [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"hex"]]];
+                        break;
+                        
+                    case 3:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@", 
+                            [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"umh"]]];
+                        break;
+                        
+                    case 4:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@", 
+                            [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"esa"]]];
+                        break;
+                        
+                    default:
+                        break;
+                }
+            }
+            else if ([optNameToChange isEqualToString:@"direct"])
+            {
+                /* Special case for direct prediction, which uses string values
+                   that need to be paired up with the equivalent widget index.  */
+                switch ([sender indexOfSelectedItem])
+                {   
+                    case 1:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@", 
+                            [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"none"]]];
+                        break;
+                        
+                    case 2:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@", 
+                            [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"spatial"]]];
+                        break;
+                        
+                    case 3:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@", 
+                            [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"temporal"]]];
+                        break;
+                        
+                    case 4:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@", 
+                            [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"auto"]]];
+                        break;
+                        
+                    default:
+                        break;
+                }
+            }
+            else if ([optNameToChange isEqualToString:@"analyse"])
+            {
+                /* Special case for partition analysis, which uses string values
+                   that need to be paired up with the equivalent widget index.  */
+                switch ([sender indexOfSelectedItem])
+                {   
+                    case 1:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@", 
+                            [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"none"]]];
+                        break;
+                        
+                    case 2:
+                        [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@", 
+                            [NSString stringWithFormat:[fDisplayX264Options stringValue]],
+                            [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"all"]]];
+                        break;
+                        
+                    default:
+                        break;
+                }
+            }
+            
+            else if ([optNameToChange isEqualToString:@"merange"])
+            {
+                /* Motion estimation range uses a weird offset since its index goes
+                   0: default, 1: 4, because the first valid value is 4, not 1.     */
+                [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]], 
+                    [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]+3]]];
+            }
+            else if ([optNameToChange isEqualToString:@"deblock"])
+            {
+                /* Deblock is really weird because it has two values, and if only one is default, both
+                   still need to be specified directly. with the default one at zero. To make deblock
+                   just a little more fun, values start at -6 instead of at zero.                       */
+                [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@", [NSString stringWithFormat:[fDisplayX264Options stringValue]], [NSString stringWithFormat:optNameToChange], [NSString stringWithFormat:@"%d,%d", ([fX264optAlphaDeblockPopUp indexOfSelectedItem] != 0) ? [fX264optAlphaDeblockPopUp indexOfSelectedItem]-7 : 0, ([fX264optBetaDeblockPopUp indexOfSelectedItem] != 0) ? [fX264optBetaDeblockPopUp indexOfSelectedItem]-7 : 0]]];                
+            }
+            else if /*Boolean Switches*/ ([optNameToChange isEqualToString:@"mixed-refs"] || [optNameToChange isEqualToString:@"weightb"] || [optNameToChange isEqualToString:@"b-pyramid"] || [optNameToChange isEqualToString:@"no-fast-pskip"] || [optNameToChange isEqualToString:@"no-dct-decimate"] || [optNameToChange isEqualToString:@"8x8dct"] )
+            {
+                /* Covers all the normal booleans, that only need to be included in the string when they're true. */
+                if ([sender state] == 0)
+                {
+                    [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]]]];                    
+                }
+                else
+                {
+                    [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]], 
+                        [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender state]]]];                
+                }
+            }
+            else if ([optNameToChange isEqualToString:@"cabac"])
+            {
+                /* CABAC is weird, in that it's an inverse. Only include it in the string when it's false. */
+                if ([sender state] == 1)
+                {
+                    [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]]]];                    
+                }
+                else
+                {
+                    [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]], 
+                        [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender state]]]];
+                }
+            }
+            else
+            {
+                /* General case to handle the normal PopUp widgets like ref and b-frames. */
+                if ( [sender indexOfSelectedItem] != 0 )
+                    [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]], 
+                    [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]-1]]];
+            }
+        }
+    }
+    
+    /* We now need to reset the opt widgets since we changed some stuff */        
+    [self X264AdvancedOptionsSet:sender];        
+}
+
+@end
diff --git a/macosx/HBCore.h b/macosx/HBCore.h
new file mode 100644 (file)
index 0000000..435d5f7
--- /dev/null
@@ -0,0 +1,52 @@
+/**
+ * @file
+ * Interface of class HBCore.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+extern const NSString *HBStateIdle;
+extern const NSString *HBStateScanning;
+extern const NSString *HBStateScanDone;
+extern const NSString *HBStateWorking;
+extern const NSString *HBStatePaused;
+extern const NSString *HBStateWorkDone;
+extern const NSString *HBStateMuxing;
+extern const NSString *HBStateAll;
+
+extern NSString *HBCoreScanningNotification;
+extern NSString *HBCoreScanDoneNotification;
+extern NSString *HBCoreWorkingNotification;
+extern NSString *HBCorePausedNotification;
+extern NSString *HBCoreWorkDoneNotification;
+extern NSString *HBCoreMuxingNotification;
+
+/**
+ * HBCore is an Objective-C interface to the low-level HandBrake library.
+ * HBCore monitors state changes of libhb and provides notifications via
+ * NSNotificationCenter to any object who needs them. It can also be used
+ * to implement properties that can be directly bound to elements of the gui.
+ */
+@interface HBCore : NSObject
+{
+    /// Pointer to libhb handle.
+    struct hb_handle_s *hb_handle;
+    
+    /// Pointer to latest state information returned by libhb.
+    struct hb_state_s *hb_state;
+    
+    /// Timer used to poll libhb for state changes.
+    NSTimer *updateTimer;
+
+    /// Current state of HBCore; one of the HBState* constants.
+    const NSString *state;  
+}
+
+- (id)init;
+- (BOOL)openInDebugMode:(BOOL)debugMode checkForUpdates:(BOOL)checkForUpdates;
+- (BOOL)close;
+- (NSString *)state;
+- (struct hb_handle_s *)hb_handle;
+- (const struct hb_state_s *)hb_state;
+
+@end
diff --git a/macosx/HBCore.m b/macosx/HBCore.m
new file mode 100644 (file)
index 0000000..4037760
--- /dev/null
@@ -0,0 +1,270 @@
+/**
+ * @file
+ * Implementation of class HBCore.
+ */
+
+#import "HBCore.h"
+#include "hb.h"
+
+// These constants specify the current state of HBCore.
+
+const NSString *HBStateIdle = @"HBStateIdle";           ///< HB is doing nothing (HB_STATE_IDLE)
+const NSString *HBStateScanning = @"HBStateScanning";   ///< HB is scanning (HB_STATE_SCANNING)
+const NSString *HBStateScanDone = @"HBStateScanDone";   ///< Scanning has been completed (HB_STATE_SCANDONE)
+const NSString *HBStateWorking = @"HBStateWorking";     ///< HB is encoding (HB_STATE_WORKING)
+const NSString *HBStatePaused = @"HBStatePaused";       ///< Encoding is paused (HB_STATE_PAUSED)
+const NSString *HBStateWorkDone = @"HBStateWorkDone";   ///< Encoding has been completed (HB_STATE_WORKDONE)
+const NSString *HBStateMuxing = @"HBStateMuxing";       ///< HB is muxing (HB_STATE_MUXING)
+
+
+// These constants specify various status notifications sent by HBCore
+
+/// Notification sent to update status while scanning. Matches HB_STATE_SCANNING constant in libhb.
+NSString *HBCoreScanningNotification = @"HBCoreScanningNotification";
+
+/// Notification sent after scanning is complete. Matches HB_STATE_SCANDONE constant in libhb.
+NSString *HBCoreScanDoneNotification = @"HBCoreScanDoneNotification";
+
+/// Notification sent to update status while encoding. Matches HB_STATE_WORKING constant in libhb.
+NSString *HBCoreWorkingNotification = @"HBCoreWorkingNotification";
+
+/// Notification sent when encoding is paused. Matches HB_STATE_PAUSED constant in libhb.
+NSString *HBCorePausedNotification = @"HBCorePausedNotification";
+
+/// Notification sent after encoding is complete. Matches HB_STATE_WORKDONE constant in libhb.
+NSString *HBCoreWorkDoneNotification = @"HBCoreWorkDoneNotification";
+
+/// Notification sent to update status while muxing. Matches HB_STATE_MUXING constant in libhb.
+NSString *HBCoreMuxingNotification = @"HBCoreMuxingNotification";
+
+/**
+ * Private methods of HBCore.
+ */
+@interface HBCore (Private)
+- (NSString *)stateAsString:(int)stateValue;
+@end
+
+@implementation HBCore
+
+/**
+ * Initializes HBCore.
+ */
+- (id)init
+{
+    if (self = [super init])
+    {
+        state = HBStateIdle;    
+        hb_state = malloc(sizeof(struct hb_state_s));   
+    }
+    return self;
+}
+
+/**
+ * Releases resources.
+ */
+- (void)dealloc
+{
+    free(hb_state);    
+    [super dealloc];
+}
+
+/**
+ * Opens low level HandBrake library. This should be called once before other
+ * functions HBCore are used.
+ *
+ * @param debugMode         If set to YES, libhb will print verbose debug output.
+ * @param checkForUpdates   If set to YES, libhb checks for updated versions.
+ *
+ * @return YES if libhb was opened, NO if there was an error.
+ */
+- (BOOL)openInDebugMode:(BOOL)debugMode checkForUpdates:(BOOL)checkForUpdates;
+{
+    NSAssert(!hb_handle, @"[HBCore openInDebugMode:checkForUpdates:] libhb is already open");
+    if (hb_handle)
+        return NO;
+
+    state = HBStateIdle;    
+
+    hb_handle = hb_init(debugMode ? HB_DEBUG_ALL : HB_DEBUG_NONE, checkForUpdates);
+    if (!hb_handle)
+        return NO;
+
+    updateTimer = [[NSTimer scheduledTimerWithTimeInterval:0.2
+                                                    target:self
+                                                  selector:@selector(stateUpdateTimer:) 
+                                                  userInfo:NULL 
+                                                   repeats:YES] retain];
+
+    [[NSRunLoop currentRunLoop] addTimer:updateTimer forMode:NSModalPanelRunLoopMode];        
+    return YES;
+}
+
+/**
+ * Closes low level HandBrake library and releases resources.
+ *
+ * @return YES if libhb was closed successfully, NO if there was an error.
+ */
+- (BOOL)close
+{
+    NSAssert(hb_handle, @"[HBCore close] libhb is not open");
+    if (!hb_handle)
+        return NO;
+        
+    [updateTimer invalidate];
+    [updateTimer release];
+    updateTimer = nil;
+    hb_close(&hb_handle);
+    hb_handle = NULL;
+    return YES;
+}
+
+/**
+ * Returns libhb handle used by this HBCore instance.
+ */ 
+- (struct hb_handle_s *)hb_handle
+{
+    return hb_handle;
+}
+
+/**
+ * Returns current state of HBCore.
+ *
+ * @return One of the HBState* string constants.
+ */
+- (const NSString *)state
+{
+    return state;
+}
+
+/**
+ * Returns latest hb_state_s information struct returned by libhb.
+ *
+ * @return Pointer to a hb_state_s struct containing state information of libhb.
+ */
+- (const struct hb_state_s *)hb_state
+{
+    return hb_state;
+}
+
+@end 
+
+@implementation HBCore (Private)
+
+/**
+ * Transforms a libhb state constant to a matching HBCore state constant.
+ */
+- (const NSString *)stateAsString:(int)stateValue
+{
+    switch (stateValue)
+    {
+        case HB_STATE_IDLE:
+            return HBStateIdle;        
+        case HB_STATE_SCANNING:
+            return HBStateScanning;
+        case HB_STATE_SCANDONE:
+            return HBStateScanDone;
+        case HB_STATE_WORKING:
+            return HBStateWorking;
+        case HB_STATE_PAUSED:
+            return HBStatePaused;
+        case HB_STATE_WORKDONE:
+            return HBStateWorkDone;
+        case HB_STATE_MUXING:
+            return HBStateMuxing;        
+        default:
+            NSAssert1(NO, @"[HBCore stateAsString:] unknown state %d", stateValue);
+            return nil;
+    }
+}
+
+/**
+ * This method polls libhb continuously for state changes and processes them.
+ * Additional processing for each state is performed in methods that start
+ * with 'handle' (e.g. handleHBStateScanning).
+ */
+- (void)stateUpdateTimer:(NSTimer *)timer
+{
+    if (!hb_handle)
+    {
+        // Libhb is not open so we cannot do anything.
+        return;
+    }
+    hb_get_state(hb_handle, hb_state);
+
+    if (hb_state->state == HB_STATE_IDLE)
+    {
+        // Libhb reported HB_STATE_IDLE, so nothing interesting has happened.
+        return;
+    }
+        
+    // Update HBCore state to reflect the current state of libhb
+    NSString *newState = [self stateAsString:hb_state->state];
+    if (newState != state)
+    {
+        [self willChangeValueForKey:@"state"];
+        state = newState;
+        [self didChangeValueForKey:@"state"];
+    }
+
+    // Determine name of the method that does further processing for this state
+    // and call it. 
+    SEL sel = NSSelectorFromString([NSString stringWithFormat:@"handle%@", state]);
+    if ([self respondsToSelector:sel])
+        [self performSelector:sel];
+}
+
+/**
+ * Processes HBStateScanning state information. Current implementation just
+ * sends HBCoreScanningNotification.
+ */
+- (void)handleHBStateScanning
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCoreScanningNotification object:self];    
+}
+
+/**
+ * Processes HBStateScanDone state information. Current implementation just
+ * sends HBCoreScanDoneNotification.
+ */
+- (void)handleHBStateScanDone
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCoreScanDoneNotification object:self];    
+}
+
+/**
+ * Processes HBStateWorking state information. Current implementation just
+ * sends HBCoreWorkingNotification.
+ */
+- (void)handleHBStateWorking
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCoreWorkingNotification object:self];    
+}
+
+/**
+ * Processes HBStatePaused state information. Current implementation just
+ * sends HBCorePausedNotification.
+ */
+- (void)handleHBStatePaused
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCorePausedNotification object:self];    
+}
+
+/**
+ * Processes HBStateWorkDone state information. Current implementation just
+ * sends HBCoreWorkDoneNotification.
+ */
+- (void)handleHBStateWorkDone
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCoreWorkDoneNotification object:self];    
+}
+
+/**
+ * Processes HBStateMuxing state information. Current implementation just
+ * sends HBCoreMuxingNotification.
+ */
+- (void)handleHBStateMuxing
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCoreMuxingNotification object:self];    
+}
+
+@end
diff --git a/macosx/HBDVDDetector.h b/macosx/HBDVDDetector.h
new file mode 100644 (file)
index 0000000..5f5331c
--- /dev/null
@@ -0,0 +1,25 @@
+ /**
+ * HBDVDDetector.h
+ * 8/17/2007
+ * 
+ * This file is part of the HandBrake source code.
+ * Homepage: <http://handbrake.fr/>.
+ * It may be used under the terms of the GNU General Public License.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface HBDVDDetector : NSObject
+{
+    NSString *path;
+    NSString *bsdName;
+}
+
++ (HBDVDDetector *)detectorForPath: (NSString *)aPath;
+- (HBDVDDetector *)initWithPath: (NSString *)aPath;
+
+- (BOOL)isVideoDVD;
+- (NSString *)devicePath;
+
+@end
\ No newline at end of file
diff --git a/macosx/HBDVDDetector.m b/macosx/HBDVDDetector.m
new file mode 100644 (file)
index 0000000..588d32d
--- /dev/null
@@ -0,0 +1,247 @@
+/**
+ * HBDriveDetector.m
+ * 8/17/2007
+ * 
+ * This file is part of the HandBrake source code.
+ * Homepage: <http://handbrake.fr/>.
+ * It may be used under the terms of the GNU General Public License.
+ */
+
+#include <IOKit/IOKitLib.h>
+#include <IOKit/storage/IOMedia.h>
+#include <IOKit/storage/IODVDMedia.h>
+
+#import "HBDVDDetector.h"
+
+
+@interface HBDVDDetector (Private)
+
+- (NSString *)bsdNameForPath;
+- (BOOL)pathHasVideoTS;
+- (BOOL)deviceIsDVD;
+- (io_service_t)getIOKitServiceForBSDName;
+- (BOOL)isDVDService: (io_service_t)service;
+- (BOOL)isWholeMediaService: (io_service_t)service;
+
+@end
+
+
+@implementation HBDVDDetector
+
++ (HBDVDDetector *)detectorForPath: (NSString *)aPath
+{
+    return [[[self alloc] initWithPath:aPath] autorelease];
+}
+
+
+- (HBDVDDetector *)initWithPath: (NSString *)aPath
+{
+    NSAssert(aPath, @"nil string passed to drive detector.");
+       if( self = [super init] )       
+       {
+        path = [aPath retain];
+        bsdName = nil;
+       }
+    return self;
+}
+
+
+- (void)dealloc
+{
+    [path release];
+    path = nil;
+    [bsdName release];
+    bsdName = nil;
+    [super dealloc];
+}
+
+
+- (BOOL)isVideoDVD
+{
+    if( !bsdName )
+    {
+        bsdName = [[self bsdNameForPath] retain];
+    }
+    return ( [self pathHasVideoTS] && [self deviceIsDVD] );
+}
+
+
+- (NSString *)devicePath
+{
+    if( !bsdName )
+    {
+        bsdName = [[self bsdNameForPath] retain];
+    }
+    return [NSString stringWithFormat:@"/dev/%@", bsdName];
+}
+
+@end
+
+
+@implementation HBDVDDetector (Private)
+
+- (NSString *)bsdNameForPath
+{
+    OSStatus err;
+    FSRef ref;
+    err = FSPathMakeRef( (const UInt8 *) [path fileSystemRepresentation],
+                         &ref, NULL ); 
+    if( err != noErr )
+    {
+        return nil;
+    }
+
+    // Get the volume reference number.
+    FSCatalogInfo catalogInfo;
+    err = FSGetCatalogInfo( &ref, kFSCatInfoVolume, &catalogInfo, NULL, NULL,
+                            NULL);
+    if( err != noErr )
+    {
+        return nil;
+    }
+    FSVolumeRefNum volRefNum = catalogInfo.volume;
+
+    // Now let's get the device name
+    GetVolParmsInfoBuffer volumeParms;
+    err = FSGetVolumeParms ( volRefNum, &volumeParms, sizeof( volumeParms ) );
+
+    if( err != noErr )
+    {
+        return nil;
+    }
+
+    // A version 4 GetVolParmsInfoBuffer contains the BSD node name in the vMDeviceID field.
+    // It is actually a char * value. This is mentioned in the header CoreServices/CarbonCore/Files.h.
+    if( volumeParms.vMVersion < 4 )
+    {
+        return nil;
+    }
+
+    // vMDeviceID might be zero as is reported with experimental ZFS (zfs-119) support in Leopard.
+    if( !volumeParms.vMDeviceID )
+    {
+        return nil;
+    }
+
+    return [NSString stringWithCString:(const char *)volumeParms.vMDeviceID];
+}
+
+
+- (BOOL)pathHasVideoTS
+{
+    // Check one level under the path
+    if( [[NSFileManager defaultManager] fileExistsAtPath:
+        [path stringByAppendingPathComponent:@"VIDEO_TS"]] )
+    {
+        return YES;
+    }
+
+    // Now check above the path
+    return [[path pathComponents] containsObject:@"VIDEO_TS"];
+}
+
+
+- (BOOL)deviceIsDVD
+{
+    io_service_t service = [self getIOKitServiceForBSDName];
+    if( service == IO_OBJECT_NULL )
+    {
+        return NO;
+    }
+    BOOL result = [self isDVDService:service];
+    IOObjectRelease(service);
+    return result;
+}
+
+
+- (io_service_t)getIOKitServiceForBSDName
+{
+    CFMutableDictionaryRef  matchingDict;
+    matchingDict = IOBSDNameMatching( kIOMasterPortDefault, 0, [bsdName UTF8String] );
+    if( matchingDict == NULL )
+    {
+        return IO_OBJECT_NULL;
+    }
+       
+    // Fetch the object with the matching BSD node name. There should only be
+    // one match, so IOServiceGetMatchingService is used instead of
+    // IOServiceGetMatchingServices to simplify the code.
+    return IOServiceGetMatchingService( kIOMasterPortDefault, matchingDict );    
+}
+
+
+- (BOOL)isDVDService: (io_service_t)service
+{
+    // Find the IOMedia object that represents the entire (whole) media that the
+    // volume is on. 
+    //
+    // If the volume is on partitioned media, the whole media object will be a
+    // parent of the volume's media object. If the media is not partitioned, the
+    // volume's media object will be the whole media object.
+    // 
+    // The whole media object is indicated in the IORegistry by the presence of
+    // a property with the key "Whole" and value "Yes".
+
+    // Create an iterator across all parents of the service object passed in.
+    kern_return_t  kernResult;
+    io_iterator_t  iter;
+    kernResult = IORegistryEntryCreateIterator( service,
+                                                kIOServicePlane,
+                                                kIORegistryIterateRecursively | kIORegistryIterateParents,
+                                                &iter );
+    if( kernResult != KERN_SUCCESS )
+    {
+        return NO;
+    }
+    if( iter == IO_OBJECT_NULL )
+    {
+        return NO;
+    }
+
+
+    // A reference on the initial service object is released in the do-while loop below,
+    // so add a reference to balance.
+    IOObjectRetain( service );
+
+    BOOL isDVD = NO;
+    do
+    {
+        isDVD = ( [self isWholeMediaService:service] &&
+                  IOObjectConformsTo(service, kIODVDMediaClass) );
+        IOObjectRelease(service);
+    } while( !isDVD && (service = IOIteratorNext(iter)) );
+    IOObjectRelease( iter );
+
+    return isDVD;
+}
+
+
+- (BOOL)isWholeMediaService: (io_service_t)service
+{
+    //
+    // Determine if the object passed in represents an IOMedia (or subclass) object.
+    // If it does, test the "Whole" property.
+    //
+    
+    Boolean isWholeMedia = NO;
+    
+    if( IOObjectConformsTo(service, kIOMediaClass) )
+    {
+        CFTypeRef wholeMedia;
+        wholeMedia = IORegistryEntryCreateCFProperty( service, 
+                                                      CFSTR(kIOMediaWholeKey), 
+                                                      kCFAllocatorDefault, 
+                                                      0);
+        if( !wholeMedia )
+        {
+            return NO;
+        }
+        isWholeMedia = CFBooleanGetValue( (CFBooleanRef)wholeMedia );
+        CFRelease(wholeMedia);
+    }
+
+    return isWholeMedia;
+}
+
+
+@end
\ No newline at end of file
diff --git a/macosx/HBImageAndTextCell.h b/macosx/HBImageAndTextCell.h
new file mode 100644 (file)
index 0000000..855067c
--- /dev/null
@@ -0,0 +1,30 @@
+/* HBImageAndTextCell
+
+    This file is part of the HandBrake source code.
+    Homepage: <http://handbrake.fr/>.
+    It may be used under the terms of the GNU General Public License.
+*/
+
+#import <Cocoa/Cocoa.h>
+
+@interface HBImageAndTextCell : NSTextFieldCell
+{
+@private
+    NSImage                 *image;
+    NSImageAlignment     imageAlignment;    // defaults to NSImageAlignTop. Supports NSImageAlignCenter & NSImageAlignBottom
+    NSSize               imageSpacing;      // horizontal and vertical spacing around the image 
+}
+
+- (void) setImage:(NSImage *)anImage;
+- (NSImage *) image;
+
+- (void) setImageAlignment:(NSImageAlignment)alignment;
+- (NSImageAlignment) imageAlignment;
+
+- (void)setImageSpacing:(NSSize)aSize;
+- (NSSize)imageSpacing;
+
+- (void) drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
+- (NSSize) cellSize;
+
+@end
diff --git a/macosx/HBImageAndTextCell.m b/macosx/HBImageAndTextCell.m
new file mode 100644 (file)
index 0000000..2fe1ea9
--- /dev/null
@@ -0,0 +1,298 @@
+/* HBImageAndTextCell
+
+    This file is part of the HandBrake source code.
+    Homepage: <http://handbrake.fr/>.
+    It may be used under the terms of the GNU General Public License.
+*/
+
+
+#import "HBImageAndTextCell.h"
+
+
+static inline float
+xLeftInRect(NSSize innerSize, NSRect outerRect)
+{
+  return NSMinX(outerRect);
+}
+
+static inline float
+xCenterInRect(NSSize innerSize, NSRect outerRect)
+{
+  return MAX(NSMidX(outerRect) - (innerSize.width/2.0), 0.0);
+}
+
+static inline float
+xRightInRect(NSSize innerSize, NSRect outerRect)
+{
+  return MAX(NSMaxX(outerRect) - innerSize.width, 0.0);
+}
+
+static inline float
+yTopInRect(NSSize innerSize, NSRect outerRect, BOOL flipped)
+{
+  if (flipped)
+    return NSMinY(outerRect);
+  else
+    return MAX(NSMaxY(outerRect) - innerSize.height, 0.0);
+}
+
+static inline float
+yCenterInRect(NSSize innerSize, NSRect outerRect, BOOL flipped)
+{
+  return MAX(NSMidY(outerRect) - innerSize.height/2.0, 0.0);
+}
+
+static inline float
+yBottomInRect(NSSize innerSize, NSRect outerRect, BOOL flipped)
+{
+  if (flipped)
+    return MAX(NSMaxY(outerRect) - innerSize.height, 0.0);
+  else
+    return NSMinY(outerRect);
+}
+
+static inline NSSize
+scaleProportionally(NSSize imageSize, NSRect canvasRect)
+{
+  float ratio;
+
+  // get the smaller ratio and scale the image size by it
+  ratio = MIN(NSWidth(canvasRect) / imageSize.width,
+             NSHeight(canvasRect) / imageSize.height);
+
+  imageSize.width *= ratio;
+  imageSize.height *= ratio;
+
+  return imageSize;
+}
+
+
+
+@implementation HBImageAndTextCell
+
+-(id)initTextCell:(NSString *)aString
+{
+    if (self = [super initTextCell:aString])
+    {
+        imageAlignment = NSImageAlignTop;
+        imageSpacing = NSMakeSize (3.0, 2.0);
+    }
+    return self; 
+}
+
+-(id)initWithCoder:(NSCoder *)decoder
+{
+    if (self = [super initWithCoder:decoder])
+    {
+        imageAlignment = NSImageAlignTop;
+        imageSpacing = NSMakeSize (3.0, 2.0);
+    }
+    return self; 
+}
+
+- (void)dealloc
+{
+    [image release];
+    image = nil;
+    [super dealloc];
+}
+
+- copyWithZone:(NSZone *)zone
+{
+    HBImageAndTextCell *cell = (HBImageAndTextCell *)[super copyWithZone:zone];
+    cell->image = [image retain];
+    return cell;
+}
+
+- (void)setImage:(NSImage *)anImage
+{
+    if (anImage != image)
+    {
+        [image release];
+        image = [anImage retain];
+    }
+}
+
+- (NSImage *)image
+{
+    return image;
+}
+
+- (void) setImageAlignment:(NSImageAlignment)alignment;
+{
+    imageAlignment = alignment;
+}
+
+- (NSImageAlignment) imageAlignment;
+{
+    return imageAlignment;
+}
+
+- (void)setImageSpacing:(NSSize)aSize;
+{
+    imageSpacing = aSize;
+}
+
+- (NSSize)imageSpacing
+{
+    return imageSpacing;
+}
+
+- (void)editWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject event:(NSEvent *)theEvent
+{
+    NSRect textFrame, imageFrame;
+    NSDivideRect (aRect, &imageFrame, &textFrame, (imageSpacing.width * 2) + [image size].width, NSMinXEdge);
+    [super editWithFrame: textFrame inView: controlView editor:textObj delegate:anObject event: theEvent];
+}
+
+- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(int)selStart length:(int)selLength
+{
+    NSRect textFrame, imageFrame;
+    NSDivideRect (aRect, &imageFrame, &textFrame, (imageSpacing.width * 2) + [image size].width, NSMinXEdge);
+    [super selectWithFrame: textFrame inView: controlView editor:textObj delegate:anObject start:selStart length:selLength];
+}
+
+- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
+{
+#if 1
+    if (image != nil)
+    {
+        NSSize imageSize;
+        NSRect imageFrame;
+
+        imageSize = [image size];
+        NSDivideRect(cellFrame, &imageFrame, &cellFrame, (imageSpacing.width * 2) + imageSize.width, NSMinXEdge);
+        if ([self drawsBackground])
+        {
+            [[self backgroundColor] set];
+            NSRectFill(imageFrame);
+        }
+        imageFrame.origin.x += imageSpacing.width;
+        imageFrame.size = imageSize;
+
+        switch (imageAlignment)
+        {
+            default:
+            case NSImageAlignTop:
+                if ([controlView isFlipped])
+                    imageFrame.origin.y += imageFrame.size.height;
+                else
+                    imageFrame.origin.y += (cellFrame.size.height - imageFrame.size.height);
+                break;
+
+            case NSImageAlignCenter:
+                if ([controlView isFlipped])
+                    imageFrame.origin.y += ceil((cellFrame.size.height + imageFrame.size.height) / 2);
+                else
+                    imageFrame.origin.y += ceil((cellFrame.size.height - imageFrame.size.height) / 2);
+                break;
+
+             case NSImageAlignBottom:
+                if ([controlView isFlipped])
+                    imageFrame.origin.y += cellFrame.size.height;
+                // for unflipped, imageFrame is already correct
+                break;
+          
+        }
+        
+        [image compositeToPoint:imageFrame.origin operation:NSCompositeSourceOver];
+    }
+
+    [super drawWithFrame:cellFrame inView:controlView];
+#endif
+
+
+#if 0 // this snippet supports all alignment values plus potentially scaling.
+    if (image != nil)
+    {
+        NSSize imageSize;
+        NSSize srcImageSize;
+        NSRect imageFrame;
+        NSPoint        position;
+        BOOL flipped = [controlView isFlipped];
+
+        imageSize = [image size];
+        srcImageSize = imageSize;   // this will be more useful once/if we support scaling
+        
+        NSDivideRect(cellFrame, &imageFrame, &cellFrame, 12 + imageSize.width, NSMinXEdge);
+        if ([self drawsBackground])
+        {
+            [[self backgroundColor] set];
+            NSRectFill(imageFrame);
+        }
+        
+        switch (imageAlignment)
+        {
+            default:
+            case NSImageAlignLeft:
+                position.x = xLeftInRect(imageSize, imageFrame);
+                position.y = yCenterInRect(imageSize, imageFrame, flipped);
+                break;
+            case NSImageAlignRight:
+                position.x = xRightInRect(imageSize, imageFrame);
+                position.y = yCenterInRect(imageSize, imageFrame, flipped);
+                break;
+            case NSImageAlignCenter:
+                position.x = xCenterInRect(imageSize, imageFrame);
+                position.y = yCenterInRect(imageSize, imageFrame, flipped);
+                break;
+            case NSImageAlignTop:
+                position.x = xCenterInRect(imageSize, imageFrame);
+                position.y = yTopInRect(imageSize, imageFrame, flipped);
+                break;
+            case NSImageAlignBottom:
+                position.x = xCenterInRect(imageSize, imageFrame);
+                position.y = yBottomInRect(imageSize, imageFrame, flipped);
+                break;
+            case NSImageAlignTopLeft:
+                position.x = xLeftInRect(imageSize, imageFrame);
+                position.y = yTopInRect(imageSize, imageFrame, flipped);
+                break;
+            case NSImageAlignTopRight:
+                position.x = xRightInRect(imageSize, imageFrame);
+                position.y = yTopInRect(imageSize, imageFrame, flipped);
+                break;
+            case NSImageAlignBottomLeft:
+                position.x = xLeftInRect(imageSize, imageFrame);
+                position.y = yBottomInRect(imageSize, imageFrame, flipped);
+                break;
+            case NSImageAlignBottomRight:
+                position.x = xRightInRect(imageSize, imageFrame);
+                position.y = yBottomInRect(imageSize, imageFrame, flipped);
+                break;
+        }
+
+        // account for flipped views
+        if (flipped)
+        {
+            position.y += imageSize.height;
+            imageSize.height = -imageSize.height;
+        }
+
+        // Set image flipping to match view. Don't know if this is really the best way
+        // to deal with flipped views and images.
+        if ([image isFlipped] != flipped)
+            [image setFlipped: flipped];
+
+        // draw!
+        [image drawInRect: NSMakeRect(position.x, position.y, imageSize.width, imageSize.height)
+            fromRect: NSMakeRect(0, 0, srcImageSize.width,
+            srcImageSize.height)
+            operation: NSCompositeSourceOver
+            fraction: 1.0];
+
+    }
+
+    [super drawWithFrame:cellFrame inView:controlView];
+#endif
+}
+
+- (NSSize)cellSize
+{
+    NSSize cellSize = [super cellSize];
+    cellSize.width += (image ? [image size].width + (imageSpacing.width * 2) : 0);
+    return cellSize;
+}
+
+@end
+
diff --git a/macosx/HBOutputPanelController.h b/macosx/HBOutputPanelController.h
new file mode 100644 (file)
index 0000000..dc76e2a
--- /dev/null
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @date 18.5.2007
+ *
+ * Interface of class HBOutputPanelController.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+/**
+ * This class implements a panel that displays all text that is written
+ * to stderr. User can easily copy the text to pasteboard from context menu.
+ */
+@interface HBOutputPanelController : NSWindowController
+{
+    /// Textview that displays debug output.
+    IBOutlet NSTextView *textView;
+
+    /// Text storage for the debug output.
+    NSTextStorage *outputTextStorage;
+
+    /// Path to log text file.
+    NSString *outputLogFile;
+    /// Path to individual log text file.
+    NSString *outputLogFileForEncode;
+    BOOL encodeLogOn;
+}
+
+- (IBAction)showOutputPanel:(id)sender;
+- (IBAction)clearOutput:(id)sender;
+- (IBAction)copyAllOutputToPasteboard:(id)sender;
+- (IBAction)openActivityLogFile:(id)sender;
+- (IBAction)openEncodeLogDirectory:(id)sender;
+- (IBAction)clearActivityLogFile:(id)sender;
+- (void) startEncodeLog:(NSString *) logPath;
+- (void) endEncodeLog;
+
+@end
diff --git a/macosx/HBOutputPanelController.m b/macosx/HBOutputPanelController.m
new file mode 100644 (file)
index 0000000..e504a5f
--- /dev/null
@@ -0,0 +1,280 @@
+/**
+ * @file
+ * @date 18.5.2007
+ *
+ * Implementation of class HBOutputPanelController.
+ */
+
+#import "HBOutputPanelController.h"
+#import "HBOutputRedirect.h"
+
+/// Maximum amount of characters that can be shown in the view.
+// Original value used by cleaner
+//#define TextStorageUpperSizeLimit 20000
+// lets use this higher value for now for better gui debugging
+#define TextStorageUpperSizeLimit 40000
+
+/// When old output is removed, this is the amount of characters that will be
+/// left in outputTextStorage.
+// Original value used by cleaner
+//#define TextStorageLowerSizeLimit 15000
+// lets use this higher value for now for better gui debugging
+#define TextStorageLowerSizeLimit 35000
+
+@implementation HBOutputPanelController
+
+/**
+ * Initializes the object, creates outputTextStorage and starts redirection of stderr.
+ */
+- (id)init
+{
+    if( (self = [super initWithWindowNibName:@"OutputPanel"]) )
+    {
+        /* NSWindowController likes to lazily load its window nib. Since this
+         * controller tries to touch the outlets before accessing the window, we
+         * need to force it to load immadiately by invoking its accessor.
+         *
+         * If/when we switch to using bindings, this can probably go away.
+         */
+        [self window];
+
+        /* We initialize the outputTextStorage object for the activity window */
+        outputTextStorage = [[NSTextStorage alloc] init];
+
+        /* We declare the default NSFileManager into fileManager */
+        NSFileManager * fileManager = [NSFileManager defaultManager];
+        /* Establish the log file location to write to */
+        /* We are initially using a .txt file as opposed to a .log file since it will open by
+         * default with the users text editor instead of the .log default Console.app, should
+         * create less confusion for less experienced users when we ask them to paste the log for support
+         */
+        outputLogFile = @"~/Library/Application Support/HandBrake/HandBrake-activitylog.txt";
+        outputLogFile = [[outputLogFile stringByExpandingTildeInPath]retain];
+
+        /* We check for an existing output log file here */
+        if( [fileManager fileExistsAtPath:outputLogFile] == 0 )
+        {
+            /* if not, then we create a new blank one */
+            [fileManager createFileAtPath:outputLogFile contents:nil attributes:nil];
+        }
+        /* We overwrite the existing output log with the date for starters the output log to start fresh with the new session */
+        /* Use the current date and time for the new output log header */
+        NSString *startOutputLogString = [NSString stringWithFormat: @"HandBrake Activity Log for Session (Cleared): %@\n\n", [[NSDate  date] descriptionWithCalendarFormat:nil timeZone:nil locale:nil]];
+        [startOutputLogString writeToFile:outputLogFile atomically:YES encoding:NSUTF8StringEncoding error:NULL];
+
+        [[HBOutputRedirect stderrRedirect] addListener:self];
+        [[HBOutputRedirect stdoutRedirect] addListener:self];
+
+        [self setWindowFrameAutosaveName:@"OutputPanelFrame"];
+        [[textView layoutManager] replaceTextStorage:outputTextStorage];
+        [[textView enclosingScrollView] setLineScroll:10];
+        [[textView enclosingScrollView] setPageScroll:20];
+        
+        encodeLogOn = NO;
+    }
+    return self;
+}
+
+/**
+ * Stops redirection of stderr and releases resources.
+ */
+- (void)dealloc
+{
+    [[HBOutputRedirect stderrRedirect] removeListener:self];
+    [[HBOutputRedirect stdoutRedirect] removeListener:self];
+    [outputTextStorage release];
+    [super dealloc];
+}
+
+/**
+ * Loads output panel from OutputPanel.nib and shows it.
+ */
+- (IBAction)showOutputPanel:(id)sender
+{
+    [textView scrollRangeToVisible:NSMakeRange([outputTextStorage length], 0)];
+    [self showWindow:sender];
+
+    [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"OutputPanelIsOpen"];
+}
+
+- (void) startEncodeLog:(NSString *) logPath
+{
+    encodeLogOn = YES;
+    NSString *outputFileForEncode = logPath ;
+    /* Since the destination path matches the extension of the output file, replace the
+     * output movie extension and replace it with ".txt"
+     */
+    NSFileManager * fileManager = [NSFileManager defaultManager];
+    /* Establish the log file location to write to */
+    /* We are initially using a .txt file as opposed to a .log file since it will open by
+     * default with the users text editor instead of the .log default Console.app, should
+     * create less confusion for less experienced users when we ask them to paste the log for support
+     */
+    /* We need to get the current time in YY-MM-DD HH-MM-SS format to put at the beginning of the name of the log file */
+    time_t _now = time( NULL );
+    struct tm * now  = localtime( &_now );
+    NSString *dateForLogTitle = [NSString stringWithFormat:@"%02d-%02d-%02d %02d-%02d-%02d",now->tm_year + 1900, now->tm_mon, now->tm_mday,now->tm_hour, now->tm_min, now->tm_sec]; 
+    
+    /* Assemble the new log file name as YY-MM-DD HH-MM-SS mymoviename.txt */
+    NSString *outputDateFileName = [NSString stringWithFormat:@"%@ %@.txt",dateForLogTitle,[[outputFileForEncode lastPathComponent] stringByDeletingPathExtension]];
+    if ([[NSUserDefaults standardUserDefaults] boolForKey:@"EncodeLogLocation"]) // if we are putting it in the same directory with the movie
+    {
+        
+        outputLogFileForEncode = [[NSString stringWithFormat:@"%@/%@",[outputFileForEncode stringByDeletingLastPathComponent],outputDateFileName] retain];
+    }
+    else // if we are putting it in the default ~/Libraries/Application Support/HandBrake/EncodeLogs logs directory
+    {
+        NSString *libraryDir = [NSSearchPathForDirectoriesInDomains( NSLibraryDirectory,
+                                                                    NSUserDomainMask,
+                                                                    YES ) objectAtIndex:0];
+        NSString *encodeLogDirectory = [[[libraryDir stringByAppendingPathComponent:@"Application Support"] stringByAppendingPathComponent:@"HandBrake"] stringByAppendingPathComponent:@"EncodeLogs"];
+        if( ![[NSFileManager defaultManager] fileExistsAtPath:encodeLogDirectory] )
+        {
+            [[NSFileManager defaultManager] createDirectoryAtPath:encodeLogDirectory
+                                                       attributes:nil];
+        }
+        outputLogFileForEncode = [[NSString stringWithFormat:@"%@/%@",encodeLogDirectory,outputDateFileName] retain];   
+    }
+    [fileManager createFileAtPath:outputLogFileForEncode contents:nil attributes:nil];
+    
+    /* Similar to the regular activity log, we print a header containing the date and time of the encode as well as what directory it was encoded to */
+    NSString *versionStringFull = [[NSString stringWithFormat: @"Handbrake Version: %@", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleGetInfoString"]] stringByAppendingString: [NSString stringWithFormat: @" (%@)\n\n", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]]];
+    NSString *startOutputLogString = [NSString stringWithFormat: @"HandBrake Activity Log for %@: %@\n%@",outputFileForEncode, [[NSDate  date] descriptionWithCalendarFormat:nil timeZone:nil locale:nil],versionStringFull];
+    [startOutputLogString writeToFile:outputLogFileForEncode atomically:YES encoding:NSUTF8StringEncoding error:NULL];
+
+
+}
+
+- (void) endEncodeLog
+{
+    encodeLogOn = NO;
+}
+
+/**
+ * Displays text received from HBOutputRedirect in the text view.
+ */
+- (void)stderrRedirect:(NSString *)text
+{
+       
+    NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:text];
+       /* Actually write the libhb output to the text view (outputTextStorage) */
+    [outputTextStorage appendAttributedString:attributedString];
+    [attributedString release];
+    
+       /* remove text from outputTextStorage as defined by TextStorageUpperSizeLimit and TextStorageLowerSizeLimit */
+    if ([outputTextStorage length] > TextStorageUpperSizeLimit)
+               [outputTextStorage deleteCharactersInRange:NSMakeRange(0, [outputTextStorage length] - TextStorageLowerSizeLimit)];
+    
+    [textView scrollRangeToVisible:NSMakeRange([outputTextStorage length], 0)];
+    
+    /* We use a c function to write to the log file without reading it into memory 
+        * as it should be faster and easier on memory than using cocoa's writeToFile
+        * thanks ritsuka !!*/
+    FILE *f = fopen([outputLogFile UTF8String], "a");
+    fprintf(f, "%s", [text UTF8String]);
+    fclose(f);
+    
+    if (encodeLogOn == YES && outputLogFileForEncode != nil)
+    {
+    FILE *e = fopen([outputLogFileForEncode UTF8String], "a");
+    fprintf(e, "%s", [text UTF8String]);
+    fclose(e);
+    }
+    /* Below uses Objective-C to write to the file, though it is slow and uses
+        * more memory than the c function above. For now, leaving this in here
+        * just in case and commented out.
+    */
+    /* Put the new incoming string from libhb into an nsstring for appending to our log file */
+    //NSString *newOutputString = [[NSString alloc] initWithString:text];
+    /*get the current log file and put it into an NSString */
+    /* HACK ALERT: must be a way to do it without reading the whole log into memory 
+        Performance note: could batch write to the log, but want to get each line as it comes out of
+        libhb in case of a crash or freeze so we see exactly what the last thing was before crash*/
+    //NSString *currentOutputLogString = [[NSString alloc]initWithContentsOfFile:outputLogFile encoding:NSUTF8StringEncoding error:NULL];
+    
+    /* Append the new libhb output string to the existing log file string */
+    //currentOutputLogString = [currentOutputLogString stringByAppendingString:newOutputString];
+    /* Save the new modified log file string back to disk */
+    //[currentOutputLogString writeToFile:outputLogFile atomically:YES encoding:NSUTF8StringEncoding error:NULL];
+    /* Release the new libhb output string */
+    //[newOutputString release];
+}
+- (void)stdoutRedirect:(NSString *)text { [self stderrRedirect:text]; }
+
+/**
+ * Clears the output window.
+ */
+- (IBAction)clearOutput:(id)sender
+{
+       [outputTextStorage deleteCharactersInRange:NSMakeRange(0, [outputTextStorage length])];
+    /* We want to rewrite the app version info to the top of the activity window so it is always present */
+    NSString *versionStringFull = [[NSString stringWithFormat: @"Handbrake Version: %@", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleGetInfoString"]] stringByAppendingString: [NSString stringWithFormat: @" (%@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]]];
+    time_t _now = time( NULL );
+    struct tm * now  = localtime( &_now );
+    fprintf(stderr, "[%02d:%02d:%02d] macgui: %s\n", now->tm_hour, now->tm_min, now->tm_sec, [versionStringFull UTF8String]);
+    
+}
+
+/**
+ * Copies all text in the output window to pasteboard.
+ */
+- (IBAction)copyAllOutputToPasteboard:(id)sender
+{
+       NSPasteboard *pboard = [NSPasteboard generalPasteboard];
+       [pboard declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil];
+       [pboard setString:[outputTextStorage string] forType:NSStringPboardType];
+    
+}
+
+/**
+ * Opens the activity log txt file in users default editor.
+ */
+- (IBAction)openActivityLogFile:(id)sender
+{
+    /* Opens the activity window log file in the users default text editor */
+    NSAppleScript *myScript = [[NSAppleScript alloc] initWithSource: [NSString stringWithFormat: @"%@%@%@", @"tell application \"Finder\" to open (POSIX file \"", outputLogFile, @"\")"]];
+    [myScript executeAndReturnError: nil];
+    [myScript release];
+}
+
+/**
+ * Opens the activity log txt file in users default editor.
+ */
+- (IBAction)openEncodeLogDirectory:(id)sender
+{
+    /* Opens the activity window log file in the users default text editor */
+    NSString *libraryDir = [NSSearchPathForDirectoriesInDomains( NSLibraryDirectory,
+                                                                NSUserDomainMask,
+                                                                YES ) objectAtIndex:0];
+    NSString *encodeLogDirectory = [[[libraryDir stringByAppendingPathComponent:@"Application Support"] stringByAppendingPathComponent:@"HandBrake"] stringByAppendingPathComponent:@"EncodeLogs"];
+    if( ![[NSFileManager defaultManager] fileExistsAtPath:encodeLogDirectory] )
+    {
+        [[NSFileManager defaultManager] createDirectoryAtPath:encodeLogDirectory
+                                                   attributes:nil];
+    }
+    
+    NSAppleScript *myScript = [[NSAppleScript alloc] initWithSource: [NSString stringWithFormat: @"%@%@%@", @"tell application \"Finder\" to open (POSIX file \"", encodeLogDirectory, @"\")"]];
+    [myScript executeAndReturnError: nil];
+    [myScript release];
+}
+
+- (IBAction)clearActivityLogFile:(id)sender
+{
+    /* We overwrite the existing output log with the new date and time header */
+        /* Use the current date and time for the new output log header */
+        NSString *startOutputLogString = [NSString stringWithFormat: @"HandBrake Activity Log for Session Starting: %@\n\n", [[NSDate  date] descriptionWithCalendarFormat:nil timeZone:nil locale:nil]];
+        [startOutputLogString writeToFile:outputLogFile atomically:NO encoding:NSUTF8StringEncoding error:NULL];
+        
+        /* We want to rewrite the app version info to the top of the activity window so it is always present */
+        NSString *versionStringFull = [[NSString stringWithFormat: @"macgui: Handbrake Version: %@", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleGetInfoString"]] stringByAppendingString: [NSString stringWithFormat: @" (%@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]]];
+        [versionStringFull writeToFile:outputLogFile atomically:NO encoding:NSUTF8StringEncoding error:NULL];
+        
+}
+
+- (void)windowWillClose:(NSNotification *)aNotification
+{
+    [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"OutputPanelIsOpen"];
+}
+
+
+@end
diff --git a/macosx/HBOutputRedirect.h b/macosx/HBOutputRedirect.h
new file mode 100644 (file)
index 0000000..562f094
--- /dev/null
@@ -0,0 +1,60 @@
+/**
+ * @file
+ * @date 17.5.2007
+ *
+ * Interface of class HBOutputRedirect.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+/**
+ * This class is used to redirect @c stdout and @c stderr outputs. It is never
+ * created directly; @c stdoutRedirect and @c stderrRedirect class methods
+ * should be use instead.
+ *
+ * @note Redirection is done by replacing @c _write functions for @c stdout and
+ *              @c stderr streams. Because of this messages written by NSLog(), for
+ *              example are not redirected. I consider this a good thing, but if more
+ *              universal redirecting is needed, it can be done at file descriptor
+ *              level.
+ */
+@interface HBOutputRedirect : NSObject
+{
+       /// Set that contains all registered listeners for this output.
+       NSMutableSet *listeners;
+       
+       /// Selector that is called on listeners to forward the output.
+       SEL forwardingSelector;
+
+       /// Output stream (@c stdout or @c stderr) redirected by this object.
+       FILE *stream;
+       
+       /// Pointer to old write function for the stream.
+       int     (*oldWriteFunc)(void *, const char *, int);
+       
+       NSLock *lock;
+}
+
++ (id)stdoutRedirect;
++ (id)stderrRedirect;
+
+- (void)addListener:(id)aListener;
+- (void)removeListener:(id)aListener;
+
+@end
+
+/* Here is another technique to redirect stderr, but it is done at lower level
+   which also redirects NSLog() and other writes that are done directly to the
+   file descriptor. This method is not used by HBOutputRedirect, but should
+   be easy to implement if needed. Code is untested, but this is shows basic 
+   idea for future reference.
+
+       // Create a pipe
+       NSPipe *pipe = [[NSPipe alloc] init];
+
+       // Connect stderr to the writing end of the pipe
+       dup2([[pipe fileHandleForWriting] fileDescriptor], STDERR_FILENO);      
+       
+       // Get reading end of the pipe, we can use this to read stderr
+       NSFileHandle *fh = [pipe fileHandleForReading];
+*/
diff --git a/macosx/HBOutputRedirect.m b/macosx/HBOutputRedirect.m
new file mode 100644 (file)
index 0000000..29ae733
--- /dev/null
@@ -0,0 +1,190 @@
+/**
+ * @file
+ * @date 17.5.2007
+ *
+ * Implementation of class HBOutputRedirect.
+ */
+
+#import "HBOutputRedirect.h"
+
+/// Global pointer to HBOutputRedirect object that manages redirects for stdout.
+static HBOutputRedirect *g_stdoutRedirect = nil;
+
+/// Global pointer to HBOutputRedirect object that manages redirects for stderr.
+static HBOutputRedirect *g_stderrRedirect = nil;
+
+@interface HBOutputRedirect (Private)
+- (id)initWithStream:(FILE *)aStream selector:(SEL)aSelector;
+- (void)startRedirect;
+- (void)stopRedirect;
+- (void)forwardOutput:(NSData *)data;
+@end
+
+/**
+ * Function that replaces stdout->_write and forwards stdout to g_stdoutRedirect.
+ */
+int    stdoutwrite(void *inFD, const char *buffer, int size)
+{
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       NSData *data = [[NSData alloc] initWithBytes:buffer length:size];
+       [g_stdoutRedirect performSelectorOnMainThread:@selector(forwardOutput:) withObject:data waitUntilDone:NO];
+       [data release];
+       [pool release];
+       return size;
+}
+
+/**
+ * Function that replaces stderr->_write and forwards stderr to g_stderrRedirect.
+ */
+int    stderrwrite(void *inFD, const char *buffer, int size)
+{
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       NSData *data = [[NSData alloc] initWithBytes:buffer length:size];
+       [g_stderrRedirect performSelectorOnMainThread:@selector(forwardOutput:) withObject:data waitUntilDone:NO];
+       [data release];
+       [pool release];
+       return size;
+}
+
+@implementation HBOutputRedirect
+
+/**
+ * Returns HBOutputRedirect object used to redirect stdout.
+ */
++ (id)stdoutRedirect
+{
+       if (!g_stdoutRedirect)
+               g_stdoutRedirect = [[HBOutputRedirect alloc] initWithStream:stdout selector:@selector(stdoutRedirect:)];
+               
+       return g_stdoutRedirect;
+}
+
+/**
+ * Returns HBOutputRedirect object used to redirect stderr.
+ */
++ (id)stderrRedirect
+{
+       if (!g_stderrRedirect)
+               g_stderrRedirect = [[HBOutputRedirect alloc] initWithStream:stderr selector:@selector(stderrRedirect:)];
+               
+       return g_stderrRedirect;
+}
+
+/**
+ * Adds specified object as listener for this output. Method @c stdoutRedirect:
+ * or @c stderrRedirect: of the listener is called to redirect the output.
+ */
+- (void)addListener:(id)aListener
+{
+       NSAssert2([aListener respondsToSelector:forwardingSelector], @"Object %@ doesn't respond to selector \"%@\"", aListener, NSStringFromSelector(forwardingSelector));
+
+       if (![listeners containsObject:aListener])
+       {
+               [listeners addObject:aListener];
+               [aListener release];
+       }
+       
+       if ([listeners count] > 0)
+               [self startRedirect];
+}
+
+/**
+ * Stops forwarding for this output to the specified listener object.
+ */
+- (void)removeListener:(id)aListener
+{
+       if ([listeners containsObject:aListener])
+       {
+               [aListener retain];
+               [listeners removeObject:aListener];
+       }
+
+       // If last listener is removed, stop redirecting output and autorelease
+       // self. Remember to set proper global pointer to NULL so the object is
+       // recreated again when needed.
+       if ([listeners count] == 0)
+       {
+               [self stopRedirect];
+               [self autorelease];
+
+               if (self == g_stdoutRedirect)
+                       g_stdoutRedirect = nil;
+               else if (self == g_stderrRedirect)
+                       g_stderrRedirect = nil;
+       }
+}
+
+@end
+
+@implementation HBOutputRedirect (Private)
+
+/**
+ * Private constructor which should not be called from outside. This is used to
+ * initialize the class at @c stdoutRedirect and @c stderrRedirect.
+ *
+ * @param aStream      Stream that wil be redirected (stdout or stderr).
+ * @param aSelector    Selector that will be called in listeners to redirect the stream.
+ *
+ * @return New HBOutputRedirect object.
+ */
+- (id)initWithStream:(FILE *)aStream selector:(SEL)aSelector
+{
+       if (self = [super init])
+       {
+               listeners = [[NSMutableSet alloc] init];
+               forwardingSelector = aSelector;
+               stream = aStream;
+               oldWriteFunc = NULL;
+               lock = [[NSLock alloc] init];
+       }
+       return self;
+}
+
+/**
+ * Frees all the listeners and deallocs the object.
+ */
+- (void)dealloc
+{
+       [listeners release];
+       [super dealloc];
+}
+
+/**
+ * Starts redirecting the stream by redirecting its output to function
+ * @c stdoutwrite() or @c stderrwrite(). Old _write function is stored to
+ * @c oldWriteFunc so it can be restored. 
+ */
+- (void)startRedirect
+{
+       if (!oldWriteFunc)
+       {
+               oldWriteFunc = stream->_write;
+               stream->_write = stream == stdout ? stdoutwrite : stderrwrite;
+       }
+}
+
+/**
+ * Stops redirecting of the stream by returning the stream's _write function
+ * to original.
+ */
+- (void)stopRedirect
+{
+       if (oldWriteFunc)
+       {
+               stream->_write = oldWriteFunc;
+               oldWriteFunc = NULL;
+       }
+}
+
+/**
+ * Called from @c stdoutwrite() and @c stderrwrite() to forward the output to 
+ * listeners.
+ */ 
+- (void)forwardOutput:(NSData *)data
+{
+       NSString *string = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];
+       [listeners makeObjectsPerformSelector:forwardingSelector withObject:string];
+       [string release];
+}
+
+@end
diff --git a/macosx/HBPreferencesController.h b/macosx/HBPreferencesController.h
new file mode 100644 (file)
index 0000000..297fe57
--- /dev/null
@@ -0,0 +1,16 @@
+/**
+ * @file
+ * Interface of class HBPreferencesController.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@interface HBPreferencesController : NSWindowController
+{
+    IBOutlet NSView         * fGeneralView, * fPictureView, * fAudioView, * fAdvancedView;
+}
+
++ (void)registerUserDefaults;
+- (id)init;
+
+@end
diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m
new file mode 100644 (file)
index 0000000..701b95f
--- /dev/null
@@ -0,0 +1,193 @@
+/**
+ * @file
+ * Implementation of class HBPreferencesController.
+ */
+
+#import "HBPreferencesController.h"
+#define TOOLBAR_GENERAL     @"TOOLBAR_GENERAL"
+#define TOOLBAR_PICTURE     @"TOOLBAR_PICTURE"
+#define TOOLBAR_AUDIO       @"TOOLBAR_AUDIO"
+#define TOOLBAR_ADVANCED    @"TOOLBAR_ADVANCED"
+
+/**
+ * This class controls the preferences window of HandBrake. Default values for
+ * all preferences and user defaults are specified in class method
+ * @c registerUserDefaults. The preferences window is loaded from
+ * Preferences.nib file when HBPreferencesController is initialized.
+ *
+ * All preferences are bound to user defaults in Interface Builder, therefore
+ * no getter/setter code is needed in this file (unless more complicated
+ * preference settings are added that cannot be handled with Cocoa bindings).
+ */
+
+@interface HBPreferencesController (Private)
+
+- (void) setPrefView: (id) sender;
+
+@end
+
+@implementation HBPreferencesController
+
+/**
+ * Registers default values to user defaults. This is called immediately
+ * when HandBrake starts, from [HBController init].
+ */
++ (void)registerUserDefaults
+{
+    NSString *desktopDirectory =  [@"~/Desktop" stringByExpandingTildeInPath];
+
+    [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:
+        @"YES",             @"CheckForUpdates",
+        @"English",         @"DefaultLanguage",
+        @"NO",              @"DefaultMpegName",
+        @"YES",             @"DefaultCrf",
+        @"",                @"DefAdvancedx264Flags",
+        @"YES",             @"DefaultPresetsDrawerShow",
+        desktopDirectory,   @"LastDestinationDirectory",
+        desktopDirectory,   @"LastSourceDirectory",
+        @"NO",              @"DefaultAutoNaming",
+        @"NO",              @"DisableDvdAutoDetect",
+        @"Alert Window",    @"AlertWhenDone",
+        @"1",               @"LoggingLevel",
+        @"4:10:15:9:10:35:9",    @"DecombCustomString",
+        @"NO",    @"EncodeLogLocation",
+        nil]];
+}
+
+/**
+ * Initializes the preferences controller by loading Preferences.nib file.
+ */
+- (id)init
+{
+    if (self = [super initWithWindowNibName:@"Preferences"])
+    {
+        NSAssert([self window], @"[HBPreferencesController init] window outlet is not connected in Preferences.nib");
+    }
+    return self;
+}
+
+- (void) awakeFromNib
+{
+    NSToolbar * toolbar = [[[NSToolbar alloc] initWithIdentifier: @"Preferences Toolbar"] autorelease];
+    [toolbar setDelegate: self];
+    [toolbar setAllowsUserCustomization: NO];
+    [toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
+    [toolbar setSizeMode: NSToolbarSizeModeRegular];
+    [[self window] setToolbar: toolbar];
+
+    [toolbar setSelectedItemIdentifier: TOOLBAR_GENERAL];
+    [self setPrefView:nil];
+}
+
+- (NSToolbarItem *) toolbar: (NSToolbar *) toolbar itemForItemIdentifier: (NSString *) ident
+                    willBeInsertedIntoToolbar: (BOOL) flag
+{
+    NSToolbarItem * item;
+    item = [[[NSToolbarItem alloc] initWithItemIdentifier: ident] autorelease];
+
+    if ([ident isEqualToString: TOOLBAR_GENERAL])
+    {
+        [item setLabel: NSLocalizedString(@"General", "General")];
+        [item setImage: [NSImage imageNamed: @"NSPreferencesGeneral"]];
+        [item setTarget: self];
+        [item setAction: @selector(setPrefView:)];
+        [item setAutovalidates: NO];
+    }
+    else if ([ident isEqualToString: TOOLBAR_PICTURE])
+    {
+        [item setLabel: NSLocalizedString(@"Picture", "Picture")];
+        [item setImage: [NSImage imageNamed: @"pref-picture"]];
+        [item setTarget: self];
+        [item setAction: @selector(setPrefView:)];
+        [item setAutovalidates: NO];
+    }
+    else if ([ident isEqualToString: TOOLBAR_AUDIO])
+    {
+        [item setLabel: NSLocalizedString(@"Audio", "Audio")];
+        [item setImage: [NSImage imageNamed: @"pref-audio"]];
+        [item setTarget: self];
+        [item setAction: @selector(setPrefView:)];
+        [item setAutovalidates: NO];
+    }
+    else if ([ident isEqualToString: TOOLBAR_ADVANCED])
+    {
+        [item setLabel: NSLocalizedString(@"Advanced", "Advanced")];
+        [item setImage: [NSImage imageNamed: @"NSAdvanced"]];
+        [item setTarget: self];
+        [item setAction: @selector(setPrefView:)];
+        [item setAutovalidates: NO];
+    }
+    else
+    {
+        return nil;
+    }
+
+    return item;
+}
+
+- (NSArray *) toolbarSelectableItemIdentifiers: (NSToolbar *) toolbar
+{
+    return [self toolbarDefaultItemIdentifiers: toolbar];
+}
+
+- (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar
+{
+    return [self toolbarAllowedItemIdentifiers: toolbar];
+}
+
+- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar
+{
+    return [NSArray arrayWithObjects: TOOLBAR_GENERAL, TOOLBAR_PICTURE,
+                                        TOOLBAR_AUDIO, TOOLBAR_ADVANCED, nil];
+}
+
+@end
+
+@implementation HBPreferencesController (Private)
+
+- (void) setPrefView: (id) sender
+{
+    NSView * view = fGeneralView;
+    if( sender )
+    {
+        NSString * identifier = [sender itemIdentifier];
+        if( [identifier isEqualToString: TOOLBAR_PICTURE] )
+            view = fPictureView;
+        else if( [identifier isEqualToString: TOOLBAR_AUDIO] )
+            view = fAudioView;
+        else if( [identifier isEqualToString: TOOLBAR_ADVANCED] )
+            view = fAdvancedView;
+        else;
+    }
+
+    NSWindow * window = [self window];
+    if( [window contentView] == view )
+        return;
+
+    NSRect windowRect = [window frame];
+    CGFloat difference = ( [view frame].size.height - [[window contentView] frame].size.height ) * [window userSpaceScaleFactor];
+    windowRect.origin.y -= difference;
+    windowRect.size.height += difference;
+
+    [view setHidden: YES];
+    [window setContentView: view];
+    [window setFrame: windowRect display: YES animate: YES];
+    [view setHidden: NO];
+
+    //set title label
+    if( sender )
+        [window setTitle: [sender label]];
+    else
+    {
+        NSToolbar * toolbar = [window toolbar];
+        NSString * itemIdentifier = [toolbar selectedItemIdentifier];
+        for( NSToolbarItem * item in [toolbar items] )
+            if( [[item itemIdentifier] isEqualToString: itemIdentifier] )
+            {
+                [window setTitle: [item label]];
+                break;
+            }
+    }
+}
+
+@end
diff --git a/macosx/HBPresets.h b/macosx/HBPresets.h
new file mode 100644 (file)
index 0000000..71a5160
--- /dev/null
@@ -0,0 +1,40 @@
+/*  HBPresets.h $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface HBPresets : NSObject {}
+
+/* Called by -addFactoryPresets in Controller.mm */
+- (NSMutableArray *) generateBuiltinPresets: (NSMutableArray *) UserPresets;
+
+/* Built-In Preset Dictionaries (one for each built in preset) */
+- (NSDictionary *)createApplePresetFolder;
+- (NSDictionary *)createBasicPresetFolder;
+- (NSDictionary *)createGamingConsolesPresetFolder;
+- (NSDictionary *)createHiProfilePresetFolder;
+- (NSDictionary *)createLegacyPresetFolder;
+
+- (NSDictionary *)create360Preset;
+- (NSDictionary *)createAnimationPreset;
+- (NSDictionary *)createAppleTVPreset;
+- (NSDictionary *)createAppleTVLegacyPreset;
+- (NSDictionary *)createAppleUniversalPreset;
+- (NSDictionary *)createClassicPreset;
+- (NSDictionary *)createCRFPreset;
+- (NSDictionary *)createFilmPreset;
+- (NSDictionary *)createiPhonePreset;
+- (NSDictionary *)createiPhoneLegacyPreset;
+- (NSDictionary *)createIpodHighPreset;
+- (NSDictionary *)createIpodLowPreset;
+- (NSDictionary *)createNormalPreset;
+- (NSDictionary *)createPSPPreset;
+- (NSDictionary *)createPSThreePreset;  
+- (NSDictionary *)createQuickTimePreset;
+- (NSDictionary *)createTelevisionPreset;
+
+@end
diff --git a/macosx/HBPresets.m b/macosx/HBPresets.m
new file mode 100644 (file)
index 0000000..a9911a3
--- /dev/null
@@ -0,0 +1,1773 @@
+/*  HBPresets.m $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#import "HBPresets.h"
+
+@implementation HBPresets
+- (id)init 
+{
+    self = [super init];
+   return self;
+}
+
+/* Called by -addFactoryPresets in Controller.mm */
+- (NSMutableArray *) generateBuiltinPresets: (NSMutableArray *) UserPresets
+{
+    /* We receive the user presets array of dictionaries from controller.mm */
+    /* We re-create new built in presets programmatically and add them to our presets array */
+    
+    /* Note: the built in presets will *not* sort themselves alphabetically, so they will
+     * appear in the order you create them
+     */
+    /* Built in preset folders at the root of the hierarchy */
+    [UserPresets addObject:[self createApplePresetFolder]];
+    [UserPresets addObject:[self createBasicPresetFolder]];
+    [UserPresets addObject:[self createHiProfilePresetFolder]];
+    [UserPresets addObject:[self createGamingConsolesPresetFolder]];
+    
+    /* Independent presets at the root hierarchy level would go here */
+    
+    /* return the newly regenerated preset array back to Controller.mm */
+    return UserPresets;
+}
+
+#pragma mark -
+
+#pragma mark Built In Preset Folder Definitions
+
+- (NSDictionary *)createApplePresetFolder
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+/*Set whether or not this is a folder, 1 is bool for folder*/
+    [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"];
+
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Apple" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+    
+    /* Lets initalize the child array of dictionaries for folders, this
+     is an array of dictionaries much like the root level of presets and
+     may contain folders and presets alike, etc.*/
+    NSMutableArray *childrenArray = [[NSMutableArray alloc] init];
+    /* we actually call the methods for the nests here */
+    [childrenArray addObject:[self createAppleUniversalPreset]];
+    [childrenArray addObject:[self createIpodLowPreset]];
+    [childrenArray addObject:[self createiPhonePreset]];
+    [childrenArray addObject:[self createAppleTVPreset]];
+    [childrenArray addObject:[self createQuickTimePreset]];
+    [childrenArray addObject:[self createLegacyPresetFolder]];
+
+    [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
+    
+    [childrenArray autorelease];
+
+
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createGamingConsolesPresetFolder
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+/*Set whether or not this is a folder, 1 is bool for folder*/
+    [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"];
+
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Gaming Consoles" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+    
+    /* Lets initalize the child array of dictionaries for folders, this
+     is an array of dictionaries much like the root level of presets and
+     may contain folders and presets alike, etc.*/
+    NSMutableArray *childrenArray = [[NSMutableArray alloc] init];
+    /* we actually call the methods for the nests here */
+    [childrenArray addObject:[self createPSPPreset]];
+    [childrenArray addObject:[self createPSThreePreset]];
+    [childrenArray addObject:[self create360Preset]];
+    [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
+    
+    [childrenArray autorelease];
+
+
+
+    [preset autorelease];
+    return preset;
+}
+
+
+- (NSDictionary *)createBasicPresetFolder
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+/*Set whether or not this is a folder, 1 is bool for folder*/
+    [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"];
+
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Basic" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+    
+    /* Lets initalize the child array of dictionaries for folders, this
+     is an array of dictionaries much like the root level of presets and
+     may contain folders and presets alike, etc.*/
+    NSMutableArray *childrenArray = [[NSMutableArray alloc] init];
+    /* we actually call the methods for the nests here */
+    [childrenArray addObject:[self createNormalPreset]];
+    [childrenArray addObject:[self createClassicPreset]];
+    [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
+    
+    [childrenArray autorelease];
+
+
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createHiProfilePresetFolder
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+/*Set whether or not this is a folder, 1 is bool for folder*/
+    [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"];
+
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"High Profile" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+    
+    /* Lets initalize the child array of dictionaries for folders, this
+     is an array of dictionaries much like the root level of presets and
+     may contain folders and presets alike, etc.*/
+    NSMutableArray *childrenArray = [[NSMutableArray alloc] init];
+    /* we actually call the methods for the nests here */
+    [childrenArray addObject:[self createAnimationPreset]];
+    [childrenArray addObject:[self createCRFPreset]];
+    [childrenArray addObject:[self createFilmPreset]];
+    [childrenArray addObject:[self createTelevisionPreset]];
+    [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
+    
+    [childrenArray autorelease];
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createLegacyPresetFolder
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+/*Set whether or not this is a folder, 1 is bool for folder*/
+    [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"];
+
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Legacy" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+    
+    /* Lets initalize the child array of dictionaries for folders, this
+     is an array of dictionaries much like the root level of presets and
+     may contain folders and presets alike, etc.*/
+    NSMutableArray *childrenArray = [[NSMutableArray alloc] init];
+    /* we actually call the methods for the nests here */
+    [childrenArray addObject:[self createAppleTVLegacyPreset]];
+    [childrenArray addObject:[self createiPhoneLegacyPreset]];
+    [childrenArray addObject:[self createIpodHighPreset]];
+    [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
+    
+    [childrenArray autorelease];
+
+
+
+    [preset autorelease];
+    return preset;
+}
+
+
+#pragma mark -
+
+#pragma mark Built In Preset Definitions
+
+/* These NSDictionary Buit-In Preset definitions contain all of the settings for one built in preset */
+/* Note: For now, you can no longer have reference to any main window fields in your key values */
+
+- (NSDictionary *)create360Preset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Xbox 360" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's settings for the Microsoft Xbox 360." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+    
+    /* x264 Option String */
+    [preset setObject:@"level=40:ref=2:mixed-refs:bframes=3:weightb:subme=9:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"2000" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+    /*Picture Settings*/
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"48" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+    
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createAnimationPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Animation" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's settings for cartoons, anime, and CGI." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MKV file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String */
+    [preset setObject:@"ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-rd=1,1:subme=9" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"1000" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTwoPass"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTurboTwoPass"];
+
+    /*Picture Settings*/
+    /* Basic Picture Settings */
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"];
+
+    /* Filters. For animation, use slower deinterlacing. */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureDecomb"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"Auto" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+    
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createAppleTVPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"AppleTV" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+    /*Set whether or not this is a folder, 1 is bool for folder*/
+    [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"];
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"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." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* 64-bit MP4 file */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String (We can use this to tweak the appleTV output)*/
+    [preset setObject:@"level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"2500" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.59] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+    /* Basic Picture Settings */
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:960] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];    
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"48" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Track 2 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio2Track"];
+    [preset setObject:@"AC3 Passthru" forKey:@"Audio2Encoder"];
+    [preset setObject:@"AC3 Passthru" forKey:@"Audio2Mixdown"];
+    [preset setObject:@"Auto" forKey:@"Audio2Samplerate"];
+    /* Note: we ignore specified bitrate for AC3 Passthru in libhb and use
+     * the sources bitrate, however we need to initially set the value to something so
+     * the macgui doesnt barf, so 160 seems as good as anything */
+    [preset setObject:@"160" forKey:@"Audio2Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio2TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createAppleTVLegacyPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"AppleTV Legacy" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's deprecated settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance. This is the AppleTV preset from HandBrake 0.9.2, and while it is offered as a service to legacy users, it is no longer supported." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* 64-bit MP4 file */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String (We can use this to tweak the appleTV output)*/
+    [preset setObject:@"bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:trellis=1:cabac=0" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"2500" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+    /* Basic Picture Settings */
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+   
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"48" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Track 2 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio2Track"];
+    [preset setObject:@"AC3 Passthru" forKey:@"Audio2Encoder"];
+    [preset setObject:@"AC3 Passthru" forKey:@"Audio2Mixdown"];
+    [preset setObject:@"Auto" forKey:@"Audio2Samplerate"];
+    /* Note: we ignore specified bitrate for AC3 Passthru in libhb and use
+     * the sources bitrate, however we need to initially set the value to something so
+     * the macgui doesnt barf, so 160 seems as good as anything */
+    [preset setObject:@"160" forKey:@"Audio2Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio2TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createAppleUniversalPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Universal" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+    /*Set whether or not this is a folder, 1 is bool for folder*/
+    [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"];
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's universally compatible, full resolution settings for all current Apple devices: iPod, iPhone, AppleTV, and Macs" forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* 64-bit MP4 file */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4LargeFile"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String (We can use this to tweak the appleTV output)*/
+    [preset setObject:@"level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"2500" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.59] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+    /* Basic Picture Settings */
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:720] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];    
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"48" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Track 2 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio2Track"];
+    [preset setObject:@"AC3 Passthru" forKey:@"Audio2Encoder"];
+    [preset setObject:@"AC3 Passthru" forKey:@"Audio2Mixdown"];
+    [preset setObject:@"Auto" forKey:@"Audio2Samplerate"];
+    /* Note: we ignore specified bitrate for AC3 Passthru in libhb and use
+     * the sources bitrate, however we need to initially set the value to something so
+     * the macgui doesnt barf, so 160 seems as good as anything */
+    [preset setObject:@"160" forKey:@"Audio2Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio2TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createClassicPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Classic" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's traditional, faster, lower-quality settings." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"MPEG-4 (FFmpeg)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String */
+    [preset setObject:@"" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700"  forKey:@"VideoTargetSize"];
+    [preset setObject:@"1000" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+    /*Picture Settings*/
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+    
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"Auto" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createCRFPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Constant Quality Rate" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MKV file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String */
+    [preset setObject:@"ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"2000" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.60] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTurboTwoPass"];
+
+    /*Picture Settings*/
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AC3 Passthru" forKey:@"Audio1Encoder"];
+    [preset setObject:@"AC3 Passthru" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"Auto" forKey:@"Audio1Samplerate"];
+    /* Note: we ignore specified bitrate for AC3 Passthru in libhb and use
+     * the sources bitrate, however we need to initially set the value to something so
+     * the macgui doesnt barf, so 160 seems as good as anything */
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createFilmPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Film" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's preset for feature films." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MKV file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String */
+    [preset setObject:@"ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"1800" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTwoPass"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTurboTwoPass"];
+
+    /*Picture Settings*/
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AC3 Passthru" forKey:@"Audio1Encoder"];
+    [preset setObject:@"AC3 Passthru" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"Auto" forKey:@"Audio1Samplerate"];
+    /* Note: we ignore specified bitrate for AC3 Passthru in libhb and use
+     * the sources bitrate, however we need to initially set the value to something so
+     * the macgui doesnt barf, so 160 seems as good as anything */
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createiPhonePreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"iPhone & iPod Touch" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's settings for the iPhone and iPod Touch." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"];
+    /* x264 Option String */
+    [preset setObject:@"level=30:cabac=0:ref=2:mixed-refs:analyse=all:me=umh:no-fast-pskip=1" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"960" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.59] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+    /*Picture Settings*/
+    /* Use a width of 480 for the iPhone*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:480] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"48" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"128" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createiPhoneLegacyPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"iPhone Legacy" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's deprecated settings for the iPhone and iPod Touch. This is the iPhone preset from HandBrake 0.9.2, and while it is offered as a service to legacy users, it is no longer supported." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"];
+    /* x264 Option String */
+    [preset setObject:@"level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"960" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+    /*Picture Settings*/
+    /* Use a width of 480 for the iPhone*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:480] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"48" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"128" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createIpodHighPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"iPod Legacy" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's high resolution settings for older 5 and 5.5G iPods. Good video quality, great for viewing on a TV using your iPod. This is the iPod High-Rez preset from 0.9.2." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"];
+    /* x264 Option String */
+    [preset setObject:@"level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"1500" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+    /*Picture Settings*/
+    /* Use a width of 640 for iPod TV-out */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:640] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"48" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createIpodLowPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"iPod" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's low resolution settings for the iPod. Optimized for great playback on the iPod screen, with smaller file size." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"];
+    /* x264 Option String */
+    [preset setObject:@"level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"700" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+    /*Picture Settings*/
+    /* Use a width of 320 for the iPod screen */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:320] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"48" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createNormalPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Normal" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's normal, default settings." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String */
+    [preset setObject:@"ref=2:bframes=2:me=umh" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"1500" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTwoPass"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTurboTwoPass"];
+
+    /*Picture Settings*/
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"Auto" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createPSPPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"PSP" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's settings for the Sony PlayStation Portable." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"MPEG-4 (FFmpeg)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String (We can use this to tweak the appleTV output)*/
+    [preset setObject:@"" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"1024" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+    /*Picture Settings*/
+    /* Use dimensions of 368*208 for robust PSP compatibility */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:@"368" forKey:@"PictureWidth"];
+    [preset setObject:@"208" forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"48" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"128" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createPSThreePreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"PS3" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's settings for the Sony PlayStation 3." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String (We can use this to tweak the appleTV output)*/
+    [preset setObject:@"level=41:me=umh" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"2500" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+
+    /*Picture Settings*/
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"48" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createQuickTimePreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"QuickTime" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's high profile settings for use with QuickTime. It can be slow, so use it when the Normal preset doesn't look good enough." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MP4 file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String */
+    [preset setObject:@"ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"1800" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTwoPass"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTurboTwoPass"];
+
+    /*Picture Settings*/
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"];
+
+    /* Explicitly set the filters for built-in presets */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"Auto" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+- (NSDictionary *)createTelevisionPreset
+{
+    NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+    /* Get the New Preset Name from the field in the AddPresetPanel */
+    [preset setObject:@"Television" forKey:@"PresetName"];
+
+    /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+
+    /*Set whether or not this is default, at creation set to 0*/
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+
+    /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+
+    /* Get the New Preset Description from the field in the AddPresetPanel */
+    [preset setObject:@"HandBrake's settings for video from television." forKey:@"PresetDescription"];
+
+    /* File Format */
+    [preset setObject:@"MKV file" forKey:@"FileFormat"];
+
+    /* Chapter Markers*/
+     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
+    /* Video encoder */
+    [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
+
+    /* x264 Option String */
+    [preset setObject:@"ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-rd=1,1" forKey:@"x264Option"];
+
+    /* Video quality */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
+    [preset setObject:@"700" forKey:@"VideoTargetSize"];
+    [preset setObject:@"1300" forKey:@"VideoAvgBitrate"];
+    [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+    /* Video framerate */
+    [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+
+    /* GrayScale */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+
+    /* 2 Pass Encoding */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTwoPass"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTurboTwoPass"];
+
+    /*Picture Settings*/
+    /* Use Max Picture settings for whatever the dvd is.*/
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"];
+
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureDecomb"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureDetelecine"];
+
+    /* Set crop settings here */
+    /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+    [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+    /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
+     * not listed will be set to "None" and not encoded */
+    
+    /* Track 1 */
+    [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"];
+    [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"];
+    [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"];
+    [preset setObject:@"Auto" forKey:@"Audio1Samplerate"];
+    [preset setObject:@"160" forKey:@"Audio1Bitrate"];
+    [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"];
+
+    /* Subtitles*/
+    [preset setObject:@"None" forKey:@"Subtitles"];
+
+    [preset autorelease];
+    return preset;
+}
+
+@end
diff --git a/macosx/HBQueueController.h b/macosx/HBQueueController.h
new file mode 100644 (file)
index 0000000..51e01f6
--- /dev/null
@@ -0,0 +1,150 @@
+/* HBQueueController
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+
+#import <Cocoa/Cocoa.h>
+#include "hb.h"
+
+@class HBController;
+
+
+#define HB_QUEUE_DRAGGING 0             // <--- NOT COMPLETELY FUNCTIONAL YET
+#define HB_OUTLINE_METRIC_CONTROLS 0    // for tweaking the outline cell spacings
+
+
+
+//------------------------------------------------------------------------------------
+// As usual, we need to subclass NSOutlineView to handle a few special cases:
+//
+// (1) variable row heights during live resizes
+// HBQueueOutlineView exists solely to get around a bug in variable row height outline
+// views in which row heights get messed up during live resizes. See this discussion:
+// http://lists.apple.com/archives/cocoa-dev/2005/Oct/msg00871.html
+// However, the recommeneded fix (override drawRect:) does not work. Instead, this
+// subclass implements viewDidEndLiveResize in order to recalculate all row heights.
+//
+// (2) prevent expanding of items during drags
+// During dragging operations, we don't want outline items to expand, since a queue
+// doesn't really have children items.
+//
+// (3) generate a drag image that incorporates more than just the first column
+// By default, NSTableView only drags an image of the first column. Change this to
+// drag an image of the queue's icon and desc columns.
+
+@interface HBQueueOutlineView : NSOutlineView
+{
+
+BOOL                        fIsDragging;
+
+}
+
+- (BOOL) isDragging;
+
+@end
+
+
+
+
+@interface HBQueueController : NSWindowController
+{
+    hb_handle_t                  *fQueueEncodeLibhb;              // reference to libhb
+    HBController                 *fHBController;        // reference to HBController
+    NSMutableArray               *fJobGroups;           // mirror image of the queue array from controller.mm
+
+    int                          fEncodingQueueItem;     // corresponds to the index of fJobGroups encoding item
+    int                          fPendingCount;         // Number of various kinds of job groups in fJobGroups.
+    int                          fCompletedCount;
+    int                          fCanceledCount;
+    int                          fWorkingCount;
+    BOOL                         fJobGroupCountsNeedUpdating;
+
+    BOOL                         fCurrentJobPaneShown;  // NO when fCurrentJobPane has been shifted out of view (see showCurrentJobPane)
+    NSMutableIndexSet            *fSavedExpandedItems;  // used by save/restoreOutlineViewState to preserve which items are expanded
+    NSMutableIndexSet            *fSavedSelectedItems;  // used by save/restoreOutlineViewState to preserve which items are selected
+#if HB_QUEUE_DRAGGING
+    NSArray                      *fDraggedNodes;
+#endif
+    NSTimer                      *fAnimationTimer;      // animates the icon of the current job in the queue outline view
+    int                          fAnimationIndex;       // used to generate name of image used to animate the current job in the queue outline view
+
+    //  +------------------window-------------------+
+    //  |+-------------fCurrentJobPane-------------+|
+    //  ||                                         ||
+    //  ||                                         ||
+    //  ||                                         ||
+    //  |+-----------------------------------------+|
+    //  |+---------------fQueuePane----------------+|
+    //  ||                                         ||
+    //  ||                                         ||
+    //  ||                                         ||
+    //  ||                                         ||
+    //  ||                                         ||
+    //  ||                                         ||
+    //  ||                                         ||
+    //  |+-----------------------------------------+|
+    //  +-------------------------------------------+
+
+    // fCurrentJobPane - visible only when processing a job
+    IBOutlet NSView              *fCurrentJobPane;
+    IBOutlet NSImageView         *fJobIconView;
+    IBOutlet NSTextField         *fJobDescTextField;
+    IBOutlet NSProgressIndicator *fProgressBar;
+    IBOutlet NSTextField         *fProgressTextField;
+
+    // fQueuePane - always visible; fills entire window when fCurrentJobPane is hidden
+    IBOutlet NSView              *fQueuePane;
+    IBOutlet HBQueueOutlineView  *fOutlineView;
+    IBOutlet NSTextField         *fQueueCountField;
+    NSArray                      *fDraggedNodes;
+    BOOL                          fIsDragging;
+#if HB_OUTLINE_METRIC_CONTROLS
+    IBOutlet NSSlider            *fIndentation; // debug
+    IBOutlet NSSlider            *fSpacing;     // debug
+#endif
+
+}
+
+- (void)setHandle: (hb_handle_t *)handle;
+- (void)setHBController: (HBController *)controller;
+
+- (void)setupToolbar;
+
+- (void)setQueueArray: (NSMutableArray *)QueueFileArray;
+- (id)outlineView:(NSOutlineView *)fOutlineView child:(NSInteger)index ofItem:(id)item;
+
+- (BOOL)outlineView:(NSOutlineView *)fOutlineView isItemExpandable:(id)item;
+
+- (BOOL)outlineView:(NSOutlineView *)fOutlineView shouldExpandItem:(id)item;
+
+- (NSInteger)outlineView:(NSOutlineView *)fOutlineView numberOfChildrenOfItem:(id)item;
+
+- (id)outlineView:(NSOutlineView *)fOutlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;
+
+- (void)outlineView:(NSOutlineView *)fOutlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item;
+
+/* Animate the icon for the current encode */
+- (void) animateWorkingEncodeIconInQueue;
+- (void) startAnimatingCurrentWorkingEncodeInQueue;
+- (void) stopAnimatingCurrentJobGroupInQueue;
+- (void)setQueueStatusString: (NSString *)statusString;
+
+- (IBAction)showQueueWindow: (id)sender;
+
+
+/* control encodes in the window */
+- (IBAction)removeSelectedQueueItem: (id)sender;
+- (IBAction)revealSelectedQueueItem: (id)sender;
+
+#if HB_OUTLINE_METRIC_CONTROLS
+- (IBAction)imageSpacingChanged: (id)sender;
+- (IBAction)indentChanged: (id)sender;
+#endif
+
+
+
+
+
+@end
diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm
new file mode 100644 (file)
index 0000000..45d2f83
--- /dev/null
@@ -0,0 +1,1331 @@
+/* HBQueueController
+
+    This file is part of the HandBrake source code.
+    Homepage: <http://handbrake.fr/>.
+    It may be used under the terms of the GNU General Public License. */
+
+#import "HBQueueController.h"
+#import "Controller.h"
+#import "HBImageAndTextCell.h"
+
+#define HB_ROW_HEIGHT_TITLE_ONLY           17.0
+#define HB_ROW_HEIGHT_FULL_DESCRIPTION           200.0
+// Pasteboard type for or drag operations
+#define DragDropSimplePboardType       @"MyCustomOutlineViewPboardType"
+
+//------------------------------------------------------------------------------------
+#pragma mark -
+//------------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------------
+// NSMutableAttributedString (HBAdditions)
+//------------------------------------------------------------------------------------
+
+@interface NSMutableAttributedString (HBAdditions)
+- (void) appendString: (NSString*)aString withAttributes: (NSDictionary *)aDictionary;
+@end
+
+@implementation NSMutableAttributedString (HBAdditions)
+- (void) appendString: (NSString*)aString withAttributes: (NSDictionary *)aDictionary
+{
+    NSAttributedString * s = [[[NSAttributedString alloc]
+        initWithString: aString
+        attributes: aDictionary] autorelease];
+    [self appendAttributedString: s];
+}
+@end
+
+
+@implementation HBQueueOutlineView
+
+- (void)viewDidEndLiveResize
+{
+    // Since we disabled calculating row heights during a live resize, force them to
+    // recalculate now.
+    [self noteHeightOfRowsWithIndexesChanged:
+            [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [self numberOfRows])]];
+    [super viewDidEndLiveResize];
+}
+
+
+
+/* This should be for dragging, we take this info from the presets right now */
+- (NSImage *)dragImageForRowsWithIndexes:(NSIndexSet *)dragRows tableColumns:(NSArray *)tableColumns event:(NSEvent*)dragEvent offset:(NSPointPointer)dragImageOffset
+{
+    fIsDragging = YES;
+
+    // By default, NSTableView only drags an image of the first column. Change this to
+    // drag an image of the queue's icon and desc and action columns.
+    NSArray * cols = [NSArray arrayWithObjects: [self tableColumnWithIdentifier:@"desc"], [self tableColumnWithIdentifier:@"icon"],[self tableColumnWithIdentifier:@"action"], nil];
+    return [super dragImageForRowsWithIndexes:dragRows tableColumns:cols event:dragEvent offset:dragImageOffset];
+}
+
+
+
+- (void) mouseDown:(NSEvent *)theEvent
+{
+    [super mouseDown:theEvent];
+       fIsDragging = NO;
+}
+
+
+
+- (BOOL) isDragging;
+{
+    return fIsDragging;
+}
+
+
+
+@end
+
+#pragma mark Toolbar Identifiers
+// Toolbar identifiers
+static NSString*    HBQueueToolbar                            = @"HBQueueToolbar1";
+static NSString*    HBQueueStartCancelToolbarIdentifier       = @"HBQueueStartCancelToolbarIdentifier";
+static NSString*    HBQueuePauseResumeToolbarIdentifier       = @"HBQueuePauseResumeToolbarIdentifier";
+
+#pragma mark -
+
+@implementation HBQueueController
+
+//------------------------------------------------------------------------------------
+// init
+//------------------------------------------------------------------------------------
+- (id)init
+{
+    if (self = [super initWithWindowNibName:@"Queue"])
+    {
+        // NSWindowController likes to lazily load its window nib. Since this
+        // controller tries to touch the outlets before accessing the window, we
+        // need to force it to load immadiately by invoking its accessor.
+        //
+        // If/when we switch to using bindings, this can probably go away.
+        [self window];
+
+        // Our defaults
+        [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:
+            @"NO",      @"QueueWindowIsOpen",
+            @"NO",      @"QueueShowsDetail",
+            @"YES",     @"QueueShowsJobsAsGroups",
+            nil]];
+
+        fJobGroups = [[NSMutableArray arrayWithCapacity:0] retain];
+       } 
+        return self;
+}
+
+- (void)setQueueArray: (NSMutableArray *)QueueFileArray
+{
+    [fJobGroups setArray:QueueFileArray];
+    fIsDragging = NO; 
+    /* First stop any timer working now */
+    [self stopAnimatingCurrentJobGroupInQueue];
+    [fOutlineView reloadData];
+    
+    
+    
+    /* lets get the stats on the status of the queue array */
+    
+    fEncodingQueueItem = 0;
+    fPendingCount = 0;
+    fCompletedCount = 0;
+    fCanceledCount = 0;
+    fWorkingCount = 0;
+    
+    /* We use a number system to set the encode status of the queue item
+     * in controller.mm
+     * 0 == already encoded
+     * 1 == is being encoded
+     * 2 == is yet to be encoded
+     * 3 == cancelled
+     */
+    
+       int i = 0;
+    NSEnumerator *enumerator = [fJobGroups objectEnumerator];
+       id tempObject;
+       while (tempObject = [enumerator nextObject])
+       {
+               NSDictionary *thisQueueDict = tempObject;
+               if ([[thisQueueDict objectForKey:@"Status"] intValue] == 0) // Completed
+               {
+                       fCompletedCount++;      
+               }
+               if ([[thisQueueDict objectForKey:@"Status"] intValue] == 1) // being encoded
+               {
+                       fWorkingCount++;
+            fEncodingQueueItem = i;    
+               }
+        if ([[thisQueueDict objectForKey:@"Status"] intValue] == 2) // pending         
+        {
+                       fPendingCount++;
+               }
+        if ([[thisQueueDict objectForKey:@"Status"] intValue] == 3) // cancelled               
+        {
+                       fCanceledCount++;
+               }
+               i++;
+       }
+    
+    /* We should fire up the encoding timer here based on fWorkingCount */
+    
+    if (fWorkingCount > 0)
+    {
+        /* we have an encoding job so, lets start the animation timer */
+        [self startAnimatingCurrentWorkingEncodeInQueue];
+    }
+    
+    /* Set the queue status field in the queue window */
+    NSMutableString * string;
+    if (fPendingCount == 1)
+    {
+        string = [NSMutableString stringWithFormat: NSLocalizedString( @"%d encode pending", @"" ), fPendingCount];
+    }
+    else
+    {
+        string = [NSMutableString stringWithFormat: NSLocalizedString( @"%d encode(s) pending", @"" ), fPendingCount];
+    }
+    [fQueueCountField setStringValue:string];
+    
+}
+/* This method sets the status string in the queue window
+ * and is called from Controller.mm (fHBController)
+ * instead of running another timer here polling libhb
+ * for encoding status
+ */
+- (void)setQueueStatusString: (NSString *)statusString
+{
+[fProgressTextField setStringValue:statusString];
+}
+
+//------------------------------------------------------------------------------------
+// dealloc
+//------------------------------------------------------------------------------------
+- (void)dealloc
+{
+    // clear the delegate so that windowWillClose is not attempted
+    if( [[self window] delegate] == self )
+        [[self window] setDelegate:nil];
+
+    [fJobGroups release];
+
+    [fSavedExpandedItems release];
+    [fSavedSelectedItems release];
+
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+
+    [super dealloc];
+}
+
+//------------------------------------------------------------------------------------
+// Receive HB handle
+//------------------------------------------------------------------------------------
+- (void)setHandle: (hb_handle_t *)handle
+{
+    fQueueEncodeLibhb = handle;
+}
+
+//------------------------------------------------------------------------------------
+// Receive HBController
+//------------------------------------------------------------------------------------
+- (void)setHBController: (HBController *)controller
+{
+    fHBController = controller;
+}
+
+#pragma mark -
+
+//------------------------------------------------------------------------------------
+// Displays and brings the queue window to the front
+//------------------------------------------------------------------------------------
+- (IBAction) showQueueWindow: (id)sender
+{
+    [self showWindow:sender];
+    [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"QueueWindowIsOpen"];
+}
+
+
+
+//------------------------------------------------------------------------------------
+// awakeFromNib
+//------------------------------------------------------------------------------------
+- (void)awakeFromNib
+{
+    [self setupToolbar];
+
+    if( ![[self window] setFrameUsingName:@"Queue"] )
+        [[self window] center];
+    [self setWindowFrameAutosaveName:@"Queue"];
+    [[self window] setExcludedFromWindowsMenu:YES];
+
+    /* lets setup our queue list outline view for drag and drop here */
+    [fOutlineView registerForDraggedTypes: [NSArray arrayWithObject:DragDropSimplePboardType] ];
+    [fOutlineView setDraggingSourceOperationMask:NSDragOperationEvery forLocal:YES];
+    [fOutlineView setVerticalMotionCanBeginDrag: YES];
+
+
+    // Don't allow autoresizing of main column, else the "delete" column will get
+    // pushed out of view.
+    [fOutlineView setAutoresizesOutlineColumn: NO];
+
+#if HB_OUTLINE_METRIC_CONTROLS
+    [fIndentation setHidden: NO];
+    [fSpacing setHidden: NO];
+    [fIndentation setIntegerValue:[fOutlineView indentationPerLevel]];  // debug
+    [fSpacing setIntegerValue:3];       // debug
+#endif
+
+    // Show/hide UI elements
+    fCurrentJobPaneShown = NO;     // it's shown in the nib
+    //[self showCurrentJobPane:NO];
+
+    //[self updateQueueCountField];
+}
+
+
+//------------------------------------------------------------------------------------
+// windowWillClose
+//------------------------------------------------------------------------------------
+- (void)windowWillClose:(NSNotification *)aNotification
+{
+    [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"QueueWindowIsOpen"];
+}
+
+#pragma mark Toolbar
+
+//------------------------------------------------------------------------------------
+// setupToolbar
+//------------------------------------------------------------------------------------
+- (void)setupToolbar
+{
+    // Create a new toolbar instance, and attach it to our window
+    NSToolbar *toolbar = [[[NSToolbar alloc] initWithIdentifier: HBQueueToolbar] autorelease];
+
+    // Set up toolbar properties: Allow customization, give a default display mode, and remember state in user defaults
+    [toolbar setAllowsUserCustomization: YES];
+    [toolbar setAutosavesConfiguration: YES];
+    [toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
+
+    // We are the delegate
+    [toolbar setDelegate: self];
+
+    // Attach the toolbar to our window
+    [[self window] setToolbar:toolbar];
+}
+
+//------------------------------------------------------------------------------------
+// toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:
+//------------------------------------------------------------------------------------
+- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar
+        itemForItemIdentifier:(NSString *)itemIdentifier
+        willBeInsertedIntoToolbar:(BOOL)flag
+{
+    // Required delegate method: Given an item identifier, this method returns an item.
+    // The toolbar will use this method to obtain toolbar items that can be displayed
+    // in the customization sheet, or in the toolbar itself.
+
+    NSToolbarItem *toolbarItem = nil;
+
+    if ([itemIdentifier isEqual: HBQueueStartCancelToolbarIdentifier])
+    {
+        toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdentifier] autorelease];
+
+        // Set the text label to be displayed in the toolbar and customization palette
+        [toolbarItem setLabel: @"Start"];
+        [toolbarItem setPaletteLabel: @"Start/Cancel"];
+
+        // Set up a reasonable tooltip, and image
+        [toolbarItem setToolTip: @"Start Encoding"];
+        [toolbarItem setImage: [NSImage imageNamed: @"Play"]];
+
+        // Tell the item what message to send when it is clicked
+        [toolbarItem setTarget: self];
+        [toolbarItem setAction: @selector(toggleStartCancel:)];
+    }
+
+    if ([itemIdentifier isEqual: HBQueuePauseResumeToolbarIdentifier])
+    {
+        toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdentifier] autorelease];
+
+        // Set the text label to be displayed in the toolbar and customization palette
+        [toolbarItem setLabel: @"Pause"];
+        [toolbarItem setPaletteLabel: @"Pause/Resume"];
+
+        // Set up a reasonable tooltip, and image
+        [toolbarItem setToolTip: @"Pause Encoding"];
+        [toolbarItem setImage: [NSImage imageNamed: @"Pause"]];
+
+        // Tell the item what message to send when it is clicked
+        [toolbarItem setTarget: self];
+        [toolbarItem setAction: @selector(togglePauseResume:)];
+    }
+
+    return toolbarItem;
+}
+
+//------------------------------------------------------------------------------------
+// toolbarDefaultItemIdentifiers:
+//------------------------------------------------------------------------------------
+- (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar
+{
+    // Required delegate method: Returns the ordered list of items to be shown in the
+    // toolbar by default.
+
+    return [NSArray arrayWithObjects:
+        HBQueueStartCancelToolbarIdentifier,
+        HBQueuePauseResumeToolbarIdentifier,
+        nil];
+}
+
+//------------------------------------------------------------------------------------
+// toolbarAllowedItemIdentifiers:
+//------------------------------------------------------------------------------------
+- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar
+{
+    // Required delegate method: Returns the list of all allowed items by identifier.
+    // By default, the toolbar does not assume any items are allowed, even the
+    // separator. So, every allowed item must be explicitly listed.
+
+    return [NSArray arrayWithObjects:
+        HBQueueStartCancelToolbarIdentifier,
+        HBQueuePauseResumeToolbarIdentifier,
+        NSToolbarCustomizeToolbarItemIdentifier,
+        NSToolbarFlexibleSpaceItemIdentifier,
+        NSToolbarSpaceItemIdentifier,
+        NSToolbarSeparatorItemIdentifier,
+        nil];
+}
+
+//------------------------------------------------------------------------------------
+// validateToolbarItem:
+//------------------------------------------------------------------------------------
+- (BOOL) validateToolbarItem: (NSToolbarItem *) toolbarItem
+{
+    // Optional method: This message is sent to us since we are the target of some
+    // toolbar item actions.
+
+    if (!fQueueEncodeLibhb) return NO;
+
+    BOOL enable = NO;
+
+    hb_state_t s;
+    hb_get_state2 (fQueueEncodeLibhb, &s);
+
+    if ([[toolbarItem itemIdentifier] isEqual: HBQueueStartCancelToolbarIdentifier])
+    {
+        if ((s.state == HB_STATE_PAUSED) || (s.state == HB_STATE_WORKING) || (s.state == HB_STATE_MUXING))
+        {
+            enable = YES;
+            [toolbarItem setImage:[NSImage imageNamed: @"Stop"]];
+            [toolbarItem setLabel: @"Stop"];
+            [toolbarItem setToolTip: @"Stop Encoding"];
+        }
+
+        else if (fPendingCount > 0)
+        {
+            enable = YES;
+            [toolbarItem setImage:[NSImage imageNamed: @"Play"]];
+            [toolbarItem setLabel: @"Start"];
+            [toolbarItem setToolTip: @"Start Encoding"];
+        }
+
+        else
+        {
+            enable = NO;
+            [toolbarItem setImage:[NSImage imageNamed: @"Play"]];
+            [toolbarItem setLabel: @"Start"];
+            [toolbarItem setToolTip: @"Start Encoding"];
+        }
+    }
+
+    if ([[toolbarItem itemIdentifier] isEqual: HBQueuePauseResumeToolbarIdentifier])
+    {
+        if (s.state == HB_STATE_PAUSED)
+        {
+            enable = YES;
+            [toolbarItem setImage:[NSImage imageNamed: @"Play"]];
+            [toolbarItem setLabel: @"Resume"];
+            [toolbarItem setToolTip: @"Resume Encoding"];
+       }
+
+        else if ((s.state == HB_STATE_WORKING) || (s.state == HB_STATE_MUXING))
+        {
+            enable = YES;
+            [toolbarItem setImage:[NSImage imageNamed: @"Pause"]];
+            [toolbarItem setLabel: @"Pause"];
+            [toolbarItem setToolTip: @"Pause Encoding"];
+        }
+        else
+        {
+            enable = NO;
+            [toolbarItem setImage:[NSImage imageNamed: @"Pause"]];
+            [toolbarItem setLabel: @"Pause"];
+            [toolbarItem setToolTip: @"Pause Encoding"];
+        }
+    }
+
+    return enable;
+}
+
+#pragma mark -
+
+
+#pragma mark Queue Item Controls
+//------------------------------------------------------------------------------------
+// Delete encodes from the queue window and accompanying array
+// Also handling first cancelling the encode if in fact its currently encoding.
+//------------------------------------------------------------------------------------
+- (IBAction)removeSelectedQueueItem: (id)sender
+{
+    NSIndexSet * selectedRows = [fOutlineView selectedRowIndexes];
+    int row = [selectedRows firstIndex];
+    /* if this is a currently encoding job, we need to be sure to alert the user,
+     * to let them decide to cancel it first, then if they do, we can come back and
+     * remove it */
+    
+    if ([[[fJobGroups objectAtIndex:row] objectForKey:@"Status"] intValue] == 1)
+    {
+       /* We pause the encode here so that it doesn't finish right after and then
+        * screw up the sync while the window is open
+        */
+       [fHBController Pause:NULL];
+         NSString * alertTitle = [NSString stringWithFormat:NSLocalizedString(@"Stop This Encode and Remove It ?", nil)];
+        // Which window to attach the sheet to?
+        NSWindow * docWindow;
+        if ([sender respondsToSelector: @selector(window)])
+            docWindow = [sender window];
+        
+        
+        NSBeginCriticalAlertSheet(
+                                  alertTitle,
+                                  NSLocalizedString(@"Keep Encoding", nil),
+                                  nil,
+                                  NSLocalizedString(@"Stop Encoding and Delete", nil),
+                                  docWindow, self,
+                                  nil, @selector(didDimissCancelCurrentJob:returnCode:contextInfo:), nil,
+                                  NSLocalizedString(@"Your movie will be lost if you don't continue encoding.", nil));
+        
+        // didDimissCancelCurrentJob:returnCode:contextInfo: will be called when the dialog is dismissed
+    }
+    else
+    { 
+    /* since we are not a currently encoding item, we can just be cancelled */
+            [fHBController removeQueueFileItem:row];
+    }
+}
+
+- (void) didDimissCancelCurrentJob: (NSWindow *)sheet returnCode: (int)returnCode contextInfo: (void *)contextInfo
+{
+    /* We resume encoding and perform the appropriate actions 
+     * Note: Pause: is a toggle type method based on hb's current
+     * state, if it paused, it will resume encoding and vice versa.
+     * In this case, we are paused from the calling window, so calling
+     * [fHBController Pause:NULL]; Again will resume encoding
+     */
+       [fHBController Pause:NULL];
+    if (returnCode == NSAlertOtherReturn)
+    {
+    /* We need to save the currently encoding item number first */
+    int encodingItemToRemove = fEncodingQueueItem;
+    /* Since we are encoding, we need to let fHBController Cancel this job
+     * upon which it will move to the next one if there is one
+     */
+    [fHBController doCancelCurrentJob];
+    /* Now, we can go ahead and remove the job we just cancelled since
+     * we have its item number from above
+     */
+    [fHBController removeQueueFileItem:encodingItemToRemove];
+    }
+    
+}
+
+//------------------------------------------------------------------------------------
+// Show the finished encode in the finder
+//------------------------------------------------------------------------------------
+- (IBAction)revealSelectedQueueItem: (id)sender
+{
+    NSIndexSet * selectedRows = [fOutlineView selectedRowIndexes];
+    NSInteger row = [selectedRows firstIndex];
+    if (row != NSNotFound)
+    {
+        while (row != NSNotFound)
+        {
+           NSMutableDictionary *queueItemToOpen = [fOutlineView itemAtRow: row];
+         [[NSWorkspace sharedWorkspace] selectFile:[queueItemToOpen objectForKey:@"DestinationPath"] inFileViewerRootedAtPath:nil];
+
+            row = [selectedRows indexGreaterThanIndex: row];
+        }
+    }
+}
+
+
+//------------------------------------------------------------------------------------
+// Starts or cancels the processing of jobs depending on the current state
+//------------------------------------------------------------------------------------
+- (IBAction)toggleStartCancel: (id)sender
+{
+    if (!fQueueEncodeLibhb) return;
+
+    hb_state_t s;
+    hb_get_state2 (fQueueEncodeLibhb, &s);
+
+    if ((s.state == HB_STATE_PAUSED) || (s.state == HB_STATE_WORKING) || (s.state == HB_STATE_MUXING))
+        [fHBController Cancel: fQueuePane]; // sender == fQueuePane so that warning alert shows up on queue window
+
+    else if (fPendingCount > 0)
+        [fHBController Rip: NULL];
+}
+
+//------------------------------------------------------------------------------------
+// Toggles the pause/resume state of libhb
+//------------------------------------------------------------------------------------
+- (IBAction)togglePauseResume: (id)sender
+{
+    if (!fQueueEncodeLibhb) return;
+
+    hb_state_t s;
+    hb_get_state2 (fQueueEncodeLibhb, &s);
+
+    if (s.state == HB_STATE_PAUSED)
+        hb_resume (fQueueEncodeLibhb);
+    else if ((s.state == HB_STATE_WORKING) || (s.state == HB_STATE_MUXING))
+        hb_pause (fQueueEncodeLibhb);
+}
+
+#pragma mark -
+
+
+#pragma mark Animate Endcoding Item
+
+
+
+
+//------------------------------------------------------------------------------------
+// Starts animating the job icon of the currently processing job in the queue outline
+// view.
+//------------------------------------------------------------------------------------
+- (void) startAnimatingCurrentWorkingEncodeInQueue
+{
+    if (!fAnimationTimer)
+        fAnimationTimer = [[NSTimer scheduledTimerWithTimeInterval:1.0/12.0     // 1/12 because there are 6 images in the animation cycle
+                target:self
+                selector:@selector(animateWorkingEncodeInQueue:)
+                userInfo:nil
+                repeats:YES] retain];
+}
+
+//------------------------------------------------------------------------------------
+// If a job is currently processing, its job icon in the queue outline view is
+// animated to its next state.
+//------------------------------------------------------------------------------------
+- (void) animateWorkingEncodeInQueue:(NSTimer*)theTimer
+{
+    if (fWorkingCount > 0)
+    {
+        fAnimationIndex++;
+        fAnimationIndex %= 6;   // there are 6 animation images; see outlineView:objectValueForTableColumn:byItem: below.
+        [self animateWorkingEncodeIconInQueue];
+    }
+}
+
+
+- (void) animateWorkingEncodeIconInQueue
+{
+    NSInteger row = fEncodingQueueItem; /// need to set to fEncodingQueueItem
+    NSInteger col = [fOutlineView columnWithIdentifier: @"icon"];
+    if (row != -1 && col != -1)
+    {
+        NSRect frame = [fOutlineView frameOfCellAtColumn:col row:row];
+        [fOutlineView setNeedsDisplayInRect: frame];
+    }
+}
+
+//------------------------------------------------------------------------------------
+// Stops animating the job icon of the currently processing job in the queue outline
+// view.
+//------------------------------------------------------------------------------------
+- (void) stopAnimatingCurrentJobGroupInQueue
+{
+    if (fAnimationTimer && [fAnimationTimer isValid])
+    {
+        [fAnimationTimer invalidate];
+        [fAnimationTimer release];
+        fAnimationTimer = nil;
+    }
+}
+
+
+#pragma mark -
+
+- (void)moveObjectsInArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(NSUInteger)insertIndex
+{
+    NSUInteger index = [indexSet lastIndex];
+    NSUInteger aboveInsertIndexCount = 0;
+
+    while (index != NSNotFound)
+    {
+        NSUInteger removeIndex;
+
+        if (index >= insertIndex)
+        {
+            removeIndex = index + aboveInsertIndexCount;
+            aboveInsertIndexCount++;
+        }
+        else
+        {
+            removeIndex = index;
+            insertIndex--;
+        }
+
+        id object = [[array objectAtIndex:removeIndex] retain];
+        [array removeObjectAtIndex:removeIndex];
+        [array insertObject:object atIndex:insertIndex];
+        [object release];
+
+        index = [indexSet indexLessThanIndex:index];
+    }
+}
+
+
+#pragma mark -
+#pragma mark NSOutlineView delegate
+
+
+- (id)outlineView:(NSOutlineView *)fOutlineView child:(NSInteger)index ofItem:(id)item
+{
+    if (item == nil)
+        return [fJobGroups objectAtIndex:index];
+
+    // We are only one level deep, so we can't be asked about children
+    NSAssert (NO, @"HBQueueController outlineView:child:ofItem: can't handle nested items.");
+    return nil;
+}
+
+- (BOOL)outlineView:(NSOutlineView *)fOutlineView isItemExpandable:(id)item
+{
+    // Our outline view has no levels, but we can still expand every item. Doing so
+    // just makes the row taller. See heightOfRowByItem below.
+    return YES;
+}
+
+- (BOOL)outlineView:(NSOutlineView *)outlineView shouldExpandItem:(id)item
+{
+    // Our outline view has no levels, but we can still expand every item. Doing so
+    // just makes the row taller. See heightOfRowByItem below.
+return ![(HBQueueOutlineView*)outlineView isDragging];
+}
+
+- (NSInteger)outlineView:(NSOutlineView *)fOutlineView numberOfChildrenOfItem:(id)item
+{
+    // Our outline view has no levels, so number of children will be zero for all
+    // top-level items.
+    if (item == nil)
+        return [fJobGroups count];
+    else
+        return 0;
+}
+
+- (void)outlineViewItemDidCollapse:(NSNotification *)notification
+{
+    id item = [[notification userInfo] objectForKey:@"NSObject"];
+    NSInteger row = [fOutlineView rowForItem:item];
+    [fOutlineView noteHeightOfRowsWithIndexesChanged:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(row,1)]];
+}
+
+- (void)outlineViewItemDidExpand:(NSNotification *)notification
+{
+    id item = [[notification userInfo] objectForKey:@"NSObject"];
+    NSInteger row = [fOutlineView rowForItem:item];
+    [fOutlineView noteHeightOfRowsWithIndexesChanged:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(row,1)]];
+}
+
+- (CGFloat)outlineView:(NSOutlineView *)outlineView heightOfRowByItem:(id)item
+{
+    if ([outlineView isItemExpanded: item])
+    {
+        // Short-circuit here if in a live resize primarily to fix a bug but also to
+        // increase resposivness during a resize. There's a bug in NSTableView that
+        // causes row heights to get messed up if you try to change them during a live
+        // resize. So if in a live resize, simply return the previously calculated
+        // height. The row heights will get fixed up after the resize because we have
+        // implemented viewDidEndLiveResize to force all of them to be recalculated.
+        // if ([outlineView inLiveResize] && [item lastDescriptionHeight] > 0)
+         //   return [item lastDescriptionHeight];
+
+        // CGFloat width = [[outlineView tableColumnWithIdentifier: @"desc"] width];
+        // Column width is NOT what is ultimately used. I can't quite figure out what
+        // width to use for calculating text metrics. No matter how I tweak this value,
+        // there are a few conditions in which the drawn text extends below the bounds
+        // of the row cell. In previous versions, which ran under Tiger, I was
+        // reducing width by 47 pixles.
+        // width -= 2;     // (?) for intercell spacing
+
+        // CGFloat height = [item heightOfDescriptionForWidth: width];
+        // return height;
+        
+        return HB_ROW_HEIGHT_FULL_DESCRIPTION;
+    }
+    else
+        return HB_ROW_HEIGHT_TITLE_ONLY;
+}
+
+- (CGFloat) heightOfDescriptionForWidth:(CGFloat)width
+{
+    // Try to return the cached value if no changes have happened since the last time
+    //if ((width == fLastDescriptionWidth) && (fLastDescriptionHeight != 0) && !fNeedsDescription)
+       // return fLastDescriptionHeight;
+
+    //if (fNeedsDescription)
+    //    [self updateDescription];
+
+    // Calculate the height
+    //NSRect bounds = [fDescription boundingRectWithSize:NSMakeSize(width, 10000) options:NSStringDrawingUsesLineFragmentOrigin];
+    //fLastDescriptionHeight = bounds.size.height + 6.0; // add some border to bottom
+    //fLastDescriptionWidth = width;
+    return HB_ROW_HEIGHT_FULL_DESCRIPTION;
+
+/* supposedly another way to do this, in case boundingRectWithSize isn't working
+    NSTextView* tmpView = [[NSTextView alloc] initWithFrame:NSMakeRect(0, 0, width, 1)];
+    [[tmpView textStorage] setAttributedString:aString];
+    [tmpView setHorizontallyResizable:NO];
+    [tmpView setVerticallyResizable:YES];
+//    [[tmpView textContainer] setHeightTracksTextView: YES];
+//    [[tmpView textContainer] setContainerSize: NSMakeSize(width, 10000)];
+    [tmpView sizeToFit];
+    float height = [tmpView frame].size.height;
+    [tmpView release];
+    return height;
+*/
+}
+
+- (CGFloat) lastDescriptionHeight
+{
+    return HB_ROW_HEIGHT_FULL_DESCRIPTION;
+}
+
+- (id)outlineView:(NSOutlineView *)fOutlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
+{
+    // nb: The "desc" column is currently an HBImageAndTextCell. However, we are longer
+    // using the image portion of the cell so we could switch back to a regular NSTextFieldCell.
+    
+    if ([[tableColumn identifier] isEqualToString:@"desc"])
+    {
+        /* This should have caused the description we wanted to show*/
+        //return [item objectForKey:@"SourceName"];
+        
+        /* code to build the description as per old queue */
+        //return [self formatEncodeItemDescription:item];
+        
+        /* Below should be put into a separate method but I am way too f'ing lazy right now */
+        NSMutableAttributedString * finalString = [[[NSMutableAttributedString alloc] initWithString: @""] autorelease];
+        // Attributes
+        NSMutableParagraphStyle * ps = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+        [ps setHeadIndent: 40.0];
+        [ps setParagraphSpacing: 1.0];
+        [ps setTabStops:[NSArray array]];    // clear all tabs
+        [ps addTabStop: [[[NSTextTab alloc] initWithType: NSLeftTabStopType location: 20.0] autorelease]];
+        
+        
+        NSDictionary* detailAttr = [NSDictionary dictionaryWithObjectsAndKeys:
+                                    [NSFont systemFontOfSize:10.0], NSFontAttributeName,
+                                    ps, NSParagraphStyleAttributeName,
+                                    nil];
+        
+        NSDictionary* detailBoldAttr = [NSDictionary dictionaryWithObjectsAndKeys:
+                                        [NSFont boldSystemFontOfSize:10.0], NSFontAttributeName,
+                                        ps, NSParagraphStyleAttributeName,
+                                        nil];
+        
+        NSDictionary* titleAttr = [NSDictionary dictionaryWithObjectsAndKeys:
+                                   [NSFont systemFontOfSize:[NSFont systemFontSize]], NSFontAttributeName,
+                                   ps, NSParagraphStyleAttributeName,
+                                   nil];
+        
+        NSDictionary* shortHeightAttr = [NSDictionary dictionaryWithObjectsAndKeys:
+                                         [NSFont systemFontOfSize:2.0], NSFontAttributeName,
+                                         nil];
+        
+        /* First line, we should strip the destination path and just show the file name and add the title num and chapters (if any) */
+        //finalDescription = [finalDescription stringByAppendingString:[NSString stringWithFormat:@"Source: %@ Output: %@\n", [item objectForKey:@"SourceName"],[item objectForKey:@"DestinationPath"]]];
+        NSString * summaryInfo;
+        
+        NSString * titleString = [NSString stringWithFormat:@"Title %d", [[item objectForKey:@"TitleNumber"] intValue]];
+        
+        NSString * chapterString = ([[item objectForKey:@"ChapterStart"] intValue] == [[item objectForKey:@"ChapterEnd"] intValue]) ?
+        [NSString stringWithFormat:@"Chapter %d", [[item objectForKey:@"ChapterStart"] intValue]] :
+        [NSString stringWithFormat:@"Chapters %d through %d", [[item objectForKey:@"ChapterStart"] intValue], [[item objectForKey:@"ChapterEnd"] intValue]];
+        
+        NSString * passesString;
+        if ([[item objectForKey:@"VideoTwoPass"] intValue] == 0)
+        {
+            passesString = [NSString stringWithFormat:@"1 Video Pass"];
+        }
+        else
+        {
+            if ([[item objectForKey:@"VideoTurboTwoPass"] intValue] == 1)
+            {
+                passesString = [NSString stringWithFormat:@"2 Video Passes Turbo"];
+            }
+            else
+            {
+                passesString = [NSString stringWithFormat:@"2 Video Passes"];
+            }
+        }
+        
+        [finalString appendString:[NSString stringWithFormat:@"%@", [item objectForKey:@"SourceName"]] withAttributes:titleAttr];
+        
+        /* lets add the output file name to the title string here */
+        NSString * outputFilenameString = [[item objectForKey:@"DestinationPath"] lastPathComponent];
+        
+        summaryInfo = [NSString stringWithFormat: @" (%@, %@, %@) -> %@", titleString, chapterString, passesString, outputFilenameString];
+        
+        [finalString appendString:[NSString stringWithFormat:@"%@\n", summaryInfo] withAttributes:detailAttr];  
+        
+        // Insert a short-in-height line to put some white space after the title
+        [finalString appendString:@"\n" withAttributes:shortHeightAttr];
+        // End of Title Stuff
+        
+        /* Second Line  (Preset Name)*/
+        [finalString appendString: @"Preset: " withAttributes:detailBoldAttr];
+        [finalString appendString:[NSString stringWithFormat:@"%@\n", [item objectForKey:@"PresetName"]] withAttributes:detailAttr];
+        
+        /* Third Line  (Format Summary) */
+        NSString * audioCodecSummary = @"";
+        /* Lets also get our audio track detail since we are going through the logic for use later */
+        NSString * audioDetail1 = @"None";
+        NSString * audioDetail2 = @"None";
+        NSString * audioDetail3 = @"None";
+        NSString * audioDetail4 = @"None";
+        if ([[item objectForKey:@"Audio1Track"] intValue] > 0)
+        {
+            audioCodecSummary = [NSString stringWithFormat:@"%@", [item objectForKey:@"Audio1Encoder"]];
+            audioDetail1 = [NSString stringWithFormat:@"%@ Encoder: %@ Mixdown: %@ SampleRate: %@(khz) Bitrate: %@(kbps)",
+                            [item objectForKey:@"Audio1TrackDescription"] ,
+                            [item objectForKey:@"Audio1Encoder"],
+                            [item objectForKey:@"Audio1Mixdown"] ,
+                            [item objectForKey:@"Audio1Samplerate"],
+                            [item objectForKey:@"Audio1Bitrate"]];
+            
+            if ([[item objectForKey:@"Audio1TrackDRCSlider"] floatValue] > 1.00)
+            {
+                audioDetail1 = [NSString stringWithFormat:@"%@, DRC: %@",audioDetail1,[item objectForKey:@"Audio1TrackDRCSlider"]];
+            }
+            else
+            {
+                audioDetail1 = [NSString stringWithFormat:@"%@, DRC: Off",audioDetail1];
+            }
+        }
+        
+        if ([[item objectForKey:@"Audio2Track"] intValue] > 0)
+        {
+            audioCodecSummary = [NSString stringWithFormat:@"%@, %@",audioCodecSummary ,[item objectForKey:@"Audio2Encoder"]];
+            audioDetail2 = [NSString stringWithFormat:@"%@ Encoder: %@ Mixdown: %@ SampleRate: %@(khz) Bitrate: %@(kbps)",
+                            [item objectForKey:@"Audio2TrackDescription"] ,
+                            [item objectForKey:@"Audio2Encoder"],
+                            [item objectForKey:@"Audio2Mixdown"] ,
+                            [item objectForKey:@"Audio2Samplerate"],
+                            [item objectForKey:@"Audio2Bitrate"]];
+            
+            if ([[item objectForKey:@"Audio2TrackDRCSlider"] floatValue] > 1.00)
+            {
+                audioDetail2 = [NSString stringWithFormat:@"%@, DRC: %@",audioDetail2,[item objectForKey:@"Audio2TrackDRCSlider"]];
+            }
+            else
+            {
+                audioDetail2 = [NSString stringWithFormat:@"%@, DRC: Off",audioDetail2];
+            }
+        }
+        
+        if ([[item objectForKey:@"Audio3Track"] intValue] > 0)
+        {
+            audioCodecSummary = [NSString stringWithFormat:@"%@, %@",audioCodecSummary ,[item objectForKey:@"Audio3Encoder"]];
+            audioDetail3 = [NSString stringWithFormat:@"%@ Encoder: %@ Mixdown: %@ SampleRate: %@(khz) Bitrate: %@(kbps)",
+                            [item objectForKey:@"Audio3TrackDescription"] ,
+                            [item objectForKey:@"Audio3Encoder"],
+                            [item objectForKey:@"Audio3Mixdown"] ,
+                            [item objectForKey:@"Audio3Samplerate"],
+                            [item objectForKey:@"Audio3Bitrate"]];
+            
+            if ([[item objectForKey:@"Audio3TrackDRCSlider"] floatValue] > 1.00)
+            {
+                audioDetail3 = [NSString stringWithFormat:@"%@, DRC: %@",audioDetail3,[item objectForKey:@"Audio3TrackDRCSlider"]];
+            }
+            else
+            {
+                audioDetail3 = [NSString stringWithFormat:@"%@, DRC: Off",audioDetail3];
+            }
+        }
+        
+        if ([[item objectForKey:@"Audio4Track"] intValue] > 0)
+        {
+            audioCodecSummary = [NSString stringWithFormat:@"%@, %@",audioCodecSummary ,[item objectForKey:@"Audio3Encoder"]];
+            audioDetail4 = [NSString stringWithFormat:@"%@ Encoder: %@ Mixdown: %@ SampleRate: %@(khz) Bitrate: %@(kbps)",
+                            [item objectForKey:@"Audio4TrackDescription"] ,
+                            [item objectForKey:@"Audio4Encoder"],
+                            [item objectForKey:@"Audio4Mixdown"] ,
+                            [item objectForKey:@"Audio4Samplerate"],
+                            [item objectForKey:@"Audio4Bitrate"]];
+            
+            if ([[item objectForKey:@"Audio4TrackDRCSlider"] floatValue] > 1.00)
+            {
+                audioDetail4 = [NSString stringWithFormat:@"%@, DRC: %@",audioDetail4,[item objectForKey:@"Audio4TrackDRCSlider"]];
+            }
+            else
+            {
+                audioDetail4 = [NSString stringWithFormat:@"%@, DRC: Off",audioDetail4];
+            }
+        }
+        
+        NSString * jobFormatInfo;
+        if ([[item objectForKey:@"ChapterMarkers"] intValue] == 1)
+            jobFormatInfo = [NSString stringWithFormat:@"%@ Container, %@ Video  %@ Audio, Chapter Markers\n", [item objectForKey:@"FileFormat"], [item objectForKey:@"VideoEncoder"], audioCodecSummary];
+        else
+            jobFormatInfo = [NSString stringWithFormat:@"%@ Container, %@ Video  %@ Audio\n", [item objectForKey:@"FileFormat"], [item objectForKey:@"VideoEncoder"], audioCodecSummary];
+        
+        
+        [finalString appendString: @"Format: " withAttributes:detailBoldAttr];
+        [finalString appendString: jobFormatInfo withAttributes:detailAttr];
+        
+        /* Optional String for mp4 options */
+        if ([[item objectForKey:@"FileFormat"] isEqualToString: @"MP4 file"])
+        {
+            NSString * MP4Opts = @"";
+            BOOL mp4OptsPresent = NO;
+            if( [[item objectForKey:@"Mp4LargeFile"] intValue] == 1)
+            {
+                mp4OptsPresent = YES;
+                MP4Opts = [MP4Opts stringByAppendingString:@" - Large file size"];
+            }
+            if( [[item objectForKey:@"Mp4HttpOptimize"] intValue] == 1)
+            {
+                mp4OptsPresent = YES;
+                MP4Opts = [MP4Opts stringByAppendingString:@" - Web optimized"];
+            }
+            
+            if( [[item objectForKey:@"Mp4iPodCompatible"] intValue] == 1)
+            {
+                mp4OptsPresent = YES;
+                MP4Opts = [MP4Opts stringByAppendingString:@" - iPod 5G support "];
+            }
+            if (mp4OptsPresent == YES)
+            {
+                [finalString appendString: @"MP4 Options: " withAttributes:detailBoldAttr];
+                [finalString appendString: MP4Opts withAttributes:detailAttr];
+                [finalString appendString:@"\n" withAttributes:detailAttr];
+            }
+        }
+        
+        /* Fourth Line (Destination Path)*/
+        [finalString appendString: @"Destination: " withAttributes:detailBoldAttr];
+        [finalString appendString: [item objectForKey:@"DestinationPath"] withAttributes:detailAttr];
+        [finalString appendString:@"\n" withAttributes:detailAttr];
+        /* Fifth Line Picture Details*/
+        NSString * pictureInfo;
+        pictureInfo = [NSString stringWithFormat:@"%@", [item objectForKey:@"PictureSizingSummary"]];
+        if ([[item objectForKey:@"PictureKeepRatio"] intValue] == 1)
+        {
+            pictureInfo = [pictureInfo stringByAppendingString:@" Keep Aspect Ratio"];
+        }
+        if ([[item objectForKey:@"VideoGrayScale"] intValue] == 1)
+        {
+            pictureInfo = [pictureInfo stringByAppendingString:@", Grayscale"];
+        }
+        
+        [finalString appendString: @"Picture: " withAttributes:detailBoldAttr];
+        [finalString appendString: pictureInfo withAttributes:detailAttr];
+        [finalString appendString:@"\n" withAttributes:detailAttr];
+        
+        /* Optional String for Picture Filters */
+        
+        NSString * pictureFilters = @"";
+        BOOL pictureFiltersPresent = NO;
+        if( [[item objectForKey:@"VFR"] intValue] == 1)
+        {
+            pictureFiltersPresent = YES;
+            pictureFilters = [pictureFilters stringByAppendingString:@" - VFR"];
+        }
+        if( [[item objectForKey:@"PictureDetelecine"] intValue] == 1 )
+        {
+            pictureFiltersPresent = YES;
+            pictureFilters = [pictureFilters stringByAppendingString:@" - Detelecine"];
+        }
+        
+        if( [[item objectForKey:@"PictureDecomb"] intValue] == 1)
+        {
+            pictureFiltersPresent = YES;
+            pictureFilters = [pictureFilters stringByAppendingString:@" - Decomb "];
+        }
+        
+        if ([[item objectForKey:@"PictureDeinterlace"] intValue] != 0)
+        {
+            pictureFiltersPresent = YES;
+            if ([[item objectForKey:@"PictureDeinterlace"] intValue] == 1)
+            {
+                pictureFilters = [pictureFilters stringByAppendingString:@" - Deinterlace: Fast "];
+            }
+            else if ([[item objectForKey:@"PictureDeinterlace"] intValue] == 2)
+            {
+                pictureFilters = [pictureFilters stringByAppendingString:@" - Deinterlace: Slow "];           
+            }
+            else if ([[item objectForKey:@"PictureDeinterlace"] intValue] == 3)
+            {
+                pictureFilters = [pictureFilters stringByAppendingString:@" - Deinterlace: Slower "];            
+            }
+            
+        }
+        if ([[item objectForKey:@"PictureDenoise"] intValue] != 0)
+        {
+            pictureFiltersPresent = YES;
+            if ([[item objectForKey:@"PictureDenoise"] intValue] == 1)
+            {
+                pictureFilters = [pictureFilters stringByAppendingString:@" - Denoise: Weak "];
+            }
+            else if ([[item objectForKey:@"PictureDenoise"] intValue] == 2)
+            {
+                pictureFilters = [pictureFilters stringByAppendingString:@" - Denoise: Medium "];           
+            }
+            else if ([[item objectForKey:@"PictureDenoise"] intValue] == 3)
+            {
+                pictureFilters = [pictureFilters stringByAppendingString:@" - Denoise: Strong "];            
+            }
+            
+        }
+        if ([[item objectForKey:@"PictureDeblock"] intValue] != 0)
+        {
+            pictureFiltersPresent = YES;
+            pictureFilters = [pictureFilters stringByAppendingString: [NSString stringWithFormat:@" - Deblock (pp7) (%d) ",[[item objectForKey:@"PictureDeblock"] intValue]]];
+        }
+        if (pictureFiltersPresent == YES)
+        {
+            [finalString appendString: @"Filters: " withAttributes:detailBoldAttr];
+            [finalString appendString: pictureFilters withAttributes:detailAttr];
+            [finalString appendString:@"\n" withAttributes:detailAttr];
+        }
+        
+        /* Sixth Line Video Details*/
+        NSString * videoInfo;
+        videoInfo = [NSString stringWithFormat:@"Encoder: %@", [item objectForKey:@"VideoEncoder"]];
+        
+        /* for framerate look to see if we are using vfr detelecine */
+        if ([[item objectForKey:@"JobIndexVideoFramerate"] intValue] == 0)
+        {
+            if ([[item objectForKey:@"PictureDetelecine"] intValue] == 1)
+            {
+                /* we are using same as source with vfr detelecine */
+                videoInfo = [NSString stringWithFormat:@"%@ Framerate: Same as source (vfr detelecine)", videoInfo];
+            }
+            else
+            {
+                /* we are using a variable framerate without dropping frames */
+                videoInfo = [NSString stringWithFormat:@"%@ Framerate: Same as source (variable)", videoInfo];
+            }
+        }
+        else
+        {
+            /* we have a specified, constant framerate */
+            videoInfo = [NSString stringWithFormat:@"%@ Framerate: %@ (constant framerate)", videoInfo ,[item objectForKey:@"VideoFramerate"]];
+        }
+        
+        if ([[item objectForKey:@"VideoQualityType"] intValue] == 0)// Target Size MB
+        {
+            videoInfo = [NSString stringWithFormat:@"%@ Target Size: %@(MB) (%d(kbps) abr)", videoInfo ,[item objectForKey:@"VideoTargetSize"],[[item objectForKey:@"VideoAvgBitrate"] intValue]];
+        }
+        else if ([[item objectForKey:@"VideoQualityType"] intValue] == 1) // ABR
+        {
+            videoInfo = [NSString stringWithFormat:@"%@ Bitrate: %d(kbps)", videoInfo ,[[item objectForKey:@"VideoAvgBitrate"] intValue]];
+        }
+        else // CRF
+        {
+            videoInfo = [NSString stringWithFormat:@"%@ Constant Quality: %.0f %%", videoInfo ,[[item objectForKey:@"VideoQualitySlider"] floatValue] * 100];
+        }
+        
+        [finalString appendString: @"Video: " withAttributes:detailBoldAttr];
+        [finalString appendString: videoInfo withAttributes:detailAttr];
+        [finalString appendString:@"\n" withAttributes:detailAttr];
+        
+        if ([[item objectForKey:@"VideoEncoder"] isEqualToString: @"H.264 (x264)"])
+        {
+            [finalString appendString: @"x264 Options: " withAttributes:detailBoldAttr];
+            [finalString appendString: [item objectForKey:@"x264Option"] withAttributes:detailAttr];
+            [finalString appendString:@"\n" withAttributes:detailAttr];
+        }
+        
+        
+        /* Seventh Line Audio Details*/
+        [finalString appendString: @"Audio Track 1: " withAttributes:detailBoldAttr];
+        [finalString appendString: audioDetail1 withAttributes:detailAttr];
+        [finalString appendString:@"\n" withAttributes:detailAttr];
+        
+        [finalString appendString: @"Audio Track 2: " withAttributes:detailBoldAttr];
+        [finalString appendString: audioDetail2 withAttributes:detailAttr];
+        [finalString appendString:@"\n" withAttributes:detailAttr];
+        
+        [finalString appendString: @"Audio Track 3: " withAttributes:detailBoldAttr];
+        [finalString appendString: audioDetail3 withAttributes:detailAttr];
+        [finalString appendString:@"\n" withAttributes:detailAttr];
+        
+        [finalString appendString: @"Audio Track 4: " withAttributes:detailBoldAttr];
+        [finalString appendString: audioDetail4 withAttributes:detailAttr];
+        
+        return finalString;
+    }
+    else if ([[tableColumn identifier] isEqualToString:@"icon"])
+    {
+        if ([[item objectForKey:@"Status"] intValue] == 0)
+        {
+            return [NSImage imageNamed:@"EncodeComplete"];
+        }
+        else if ([[item objectForKey:@"Status"] intValue] == 1)
+        {
+            return [NSImage imageNamed: [NSString stringWithFormat: @"EncodeWorking%d", fAnimationIndex]];
+        }
+        else if ([[item objectForKey:@"Status"] intValue] == 3)
+        {
+            return [NSImage imageNamed:@"EncodeCanceled"];
+        }
+        else
+        {
+            return [NSImage imageNamed:@"JobSmall"];
+        }
+        
+    }
+    else
+    {
+        return @"";
+    }
+}
+
+- (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
+{
+    if ([[tableColumn identifier] isEqualToString:@"desc"])
+    {
+
+
+        // nb: The "desc" column is currently an HBImageAndTextCell. However, we are longer
+        // using the image portion of the cell so we could switch back to a regular NSTextFieldCell.
+
+        // Set the image here since the value returned from outlineView:objectValueForTableColumn: didn't specify the image part
+        [cell setImage:nil];
+    }
+    else if ([[tableColumn identifier] isEqualToString:@"action"])
+    {
+        [cell setEnabled: YES];
+        BOOL highlighted = [outlineView isRowSelected:[outlineView rowForItem: item]] && [[outlineView window] isKeyWindow] && ([[outlineView window] firstResponder] == outlineView);
+        if ([[item objectForKey:@"Status"] intValue] == 0)
+        {
+            [cell setAction: @selector(revealSelectedQueueItem:)];
+            if (highlighted)
+            {
+                [cell setImage:[NSImage imageNamed:@"RevealHighlight"]];
+                [cell setAlternateImage:[NSImage imageNamed:@"RevealHighlightPressed"]];
+            }
+            else
+                [cell setImage:[NSImage imageNamed:@"Reveal"]];
+        }
+        else
+        {
+            [cell setAction: @selector(removeSelectedQueueItem:)];
+            if (highlighted)
+            {
+                [cell setImage:[NSImage imageNamed:@"DeleteHighlight"]];
+                [cell setAlternateImage:[NSImage imageNamed:@"DeleteHighlightPressed"]];
+            }
+            else
+                [cell setImage:[NSImage imageNamed:@"Delete"]];
+        }
+    }
+}
+
+- (void)outlineView:(NSOutlineView *)outlineView willDisplayOutlineCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
+{
+    // By default, the discolsure image gets centered vertically in the cell. We want
+    // always at the top.
+    if ([outlineView isItemExpanded: item])
+        [cell setImagePosition: NSImageAbove];
+    else
+        [cell setImagePosition: NSImageOnly];
+}
+
+#pragma mark -
+#pragma mark NSOutlineView delegate (dragging related)
+
+//------------------------------------------------------------------------------------
+// NSTableView delegate
+//------------------------------------------------------------------------------------
+
+
+- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard
+{
+    // Dragging is only allowed of the pending items.
+    if ([[[fJobGroups objectAtIndex:[outlineView selectedRow]] objectForKey:@"Status"] intValue] != 2) // 2 is pending
+    {
+        return NO;
+    }
+    
+    // Don't retain since this is just holding temporaral drag information, and it is
+    //only used during a drag!  We could put this in the pboard actually.
+    fDraggedNodes = items;
+    
+    // Provide data for our custom type, and simple NSStrings.
+    [pboard declareTypes:[NSArray arrayWithObjects: DragDropSimplePboardType, nil] owner:self];
+    
+    // the actual data doesn't matter since DragDropSimplePboardType drags aren't recognized by anyone but us!.
+    [pboard setData:[NSData data] forType:DragDropSimplePboardType];
+    
+    return YES;
+}
+
+
+/* This method is used to validate the drops. */
+- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(NSInteger)index
+{
+    // Don't allow dropping ONTO an item since they can't really contain any children.
+    BOOL isOnDropTypeProposal = index == NSOutlineViewDropOnItemIndex;
+    if (isOnDropTypeProposal)
+    {
+        return NSDragOperationNone;
+    }
+    
+    // Don't allow dropping INTO an item since they can't really contain any children.
+    if (item != nil)
+    {
+        index = [fOutlineView rowForItem: item] + 1;
+        item = nil;
+    }
+    
+    // NOTE: Should we allow dropping a pending job *above* the
+    // finished or already encoded jobs ?
+    // We do not let the user drop a pending job before or *above*
+    // already finished or currently encoding jobs.
+    if (index <= fEncodingQueueItem)
+    {
+        return NSDragOperationNone;
+        index = MAX (index, fEncodingQueueItem);
+       }
+    
+    [outlineView setDropItem:item dropChildIndex:index];
+    return NSDragOperationGeneric;
+}
+
+
+
+- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)index
+{
+        NSMutableIndexSet *moveItems = [NSMutableIndexSet indexSet];
+    
+    id obj;
+    NSEnumerator *enumerator = [fDraggedNodes objectEnumerator];
+    while (obj = [enumerator nextObject])
+    {
+        [moveItems addIndex:[fJobGroups indexOfObject:obj]];
+    }
+    // Successful drop, we use moveObjectsInQueueArray:... in fHBController
+    // to properly rearrange the queue array, save it to plist and then send it back here.
+    // since Controller.mm is handling all queue array manipulation.
+    // We *could do this here, but I think we are better served keeping that code together.
+    [fHBController moveObjectsInQueueArray:fJobGroups fromIndexes:moveItems toIndex: index];
+    return YES;
+}
+
+
+@end
diff --git a/macosx/HandBrake.icns b/macosx/HandBrake.icns
new file mode 100644 (file)
index 0000000..f81352b
Binary files /dev/null and b/macosx/HandBrake.icns differ
diff --git a/macosx/HandBrake.plist b/macosx/HandBrake.plist
new file mode 100644 (file)
index 0000000..8217aa7
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleDisplayName</key>
+       <string>HandBrake</string>
+       <key>CFBundleExecutable</key>
+       <string>HandBrake</string>
+       <key>CFBundleGetInfoString</key>
+       <string>$(HB_VERSION)</string>
+       <key>CFBundleIconFile</key>
+       <string>HandBrake</string>
+       <key>CFBundleIdentifier</key>
+       <string>org.m0k.handbrake</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string>HandBrake</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleShortVersionString</key>
+       <string>$(HB_VERSION)</string>
+       <key>CFBundleSignature</key>
+       <string>HB##</string>
+       <key>CFBundleVersion</key>
+       <string>$(HB_BUILD)</string>
+       <key>NSHumanReadableCopyright</key>
+       <string>HandBrake Devs</string>
+       <key>NSMainNibFile</key>
+       <string>MainMenu</string>
+       <key>NSPrincipalClass</key>
+       <string>NSApplication</string>
+       <key>SUFeedURL</key>
+       <string>$(APPCAST_URL)</string>
+</dict>
+</plist>
diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..f864f75
--- /dev/null
@@ -0,0 +1,1604 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 42;
+       objects = {
+
+/* Begin PBXBuildFile section */
+               0D096E010B707D3400A845D4 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9B0B4CAB100064E04C /* common.c */; };
+               0D096E020B707D3400A845D4 /* deca52.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9D0B4CAB100064E04C /* deca52.c */; };
+               0D096E030B707D3400A845D4 /* decavcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9E0B4CAB100064E04C /* decavcodec.c */; };
+               0D096EA30B70884A00A845D4 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D1125D709D72FD200E0657B /* libz.dylib */; };
+               0DF377980B7BF99A00115CB0 /* fakexcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0DF377970B7BF99A00115CB0 /* fakexcode.cpp */; };
+               0DFA5C7B0B8DD1E90020BC09 /* HandBrake.icns in Resources */ = {isa = PBXBuildFile; fileRef = 0DFA5C7A0B8DD1E90020BC09 /* HandBrake.icns */; };
+               0DFA5CC00B8DD3FE0020BC09 /* declpcm.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C7E0B8DD3B60020BC09 /* declpcm.c */; };
+               0DFA5CC10B8DD3FE0020BC09 /* decmpeg2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C7F0B8DD3B60020BC09 /* decmpeg2.c */; };
+               0DFA5CC20B8DD3FE0020BC09 /* decsub.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C800B8DD3B60020BC09 /* decsub.c */; };
+               0DFA5CC30B8DD3FE0020BC09 /* demuxmpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C810B8DD3B60020BC09 /* demuxmpeg.c */; };
+               0DFA5CC40B8DD3FE0020BC09 /* dvd.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C820B8DD3B60020BC09 /* dvd.c */; };
+               0DFA5CC50B8DD3FE0020BC09 /* encavcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C830B8DD3B60020BC09 /* encavcodec.c */; };
+               0DFA5CC60B8DD3FE0020BC09 /* encfaac.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C840B8DD3B60020BC09 /* encfaac.c */; };
+               0DFA5CC70B8DD3FE0020BC09 /* enclame.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C850B8DD3B60020BC09 /* enclame.c */; };
+               0DFA5CC80B8DD3FE0020BC09 /* encvorbis.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C860B8DD3B60020BC09 /* encvorbis.c */; };
+               0DFA5CC90B8DD3FE0020BC09 /* encx264.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C870B8DD3B60020BC09 /* encx264.c */; };
+               0DFA5CCA0B8DD3FE0020BC09 /* encxvid.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C880B8DD3B60020BC09 /* encxvid.c */; };
+               0DFA5CCB0B8DD3FE0020BC09 /* fifo.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C890B8DD3B60020BC09 /* fifo.c */; };
+               0DFA5CCC0B8DD3FE0020BC09 /* hb.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C8A0B8DD3B60020BC09 /* hb.c */; };
+               0DFA5CCE0B8DD3FE0020BC09 /* muxavi.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C910B8DD3B60020BC09 /* muxavi.c */; };
+               0DFA5CCF0B8DD3FE0020BC09 /* muxcommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C920B8DD3B60020BC09 /* muxcommon.c */; };
+               0DFA5CD00B8DD3FE0020BC09 /* muxmp4.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C930B8DD3B60020BC09 /* muxmp4.c */; };
+               0DFA5CD10B8DD3FE0020BC09 /* muxogm.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C940B8DD3B60020BC09 /* muxogm.c */; };
+               0DFA5CD20B8DD3FE0020BC09 /* ports.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C950B8DD3B60020BC09 /* ports.c */; };
+               0DFA5CD30B8DD3FE0020BC09 /* reader.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C970B8DD3B60020BC09 /* reader.c */; };
+               0DFA5CD40B8DD3FE0020BC09 /* render.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C980B8DD3B60020BC09 /* render.c */; };
+               0DFA5CD50B8DD3FE0020BC09 /* scan.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C990B8DD3B60020BC09 /* scan.c */; };
+               0DFA5CD60B8DD3FE0020BC09 /* sync.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9A0B8DD3B60020BC09 /* sync.c */; };
+               0DFA5CD70B8DD3FE0020BC09 /* update.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9B0B8DD3B60020BC09 /* update.c */; };
+               0DFA5CD80B8DD3FE0020BC09 /* work.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9C0B8DD3B60020BC09 /* work.c */; };
+               0DFA5CD90B8DD4210020BC09 /* declpcm.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C7E0B8DD3B60020BC09 /* declpcm.c */; };
+               0DFA5CDA0B8DD4210020BC09 /* decmpeg2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C7F0B8DD3B60020BC09 /* decmpeg2.c */; };
+               0DFA5CDB0B8DD4210020BC09 /* decsub.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C800B8DD3B60020BC09 /* decsub.c */; };
+               0DFA5CDC0B8DD4210020BC09 /* demuxmpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C810B8DD3B60020BC09 /* demuxmpeg.c */; };
+               0DFA5CDD0B8DD4210020BC09 /* dvd.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C820B8DD3B60020BC09 /* dvd.c */; };
+               0DFA5CDE0B8DD4210020BC09 /* encavcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C830B8DD3B60020BC09 /* encavcodec.c */; };
+               0DFA5CDF0B8DD4210020BC09 /* encfaac.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C840B8DD3B60020BC09 /* encfaac.c */; };
+               0DFA5CE00B8DD4210020BC09 /* enclame.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C850B8DD3B60020BC09 /* enclame.c */; };
+               0DFA5CE10B8DD4210020BC09 /* encvorbis.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C860B8DD3B60020BC09 /* encvorbis.c */; };
+               0DFA5CE20B8DD4210020BC09 /* encx264.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C870B8DD3B60020BC09 /* encx264.c */; };
+               0DFA5CE30B8DD4210020BC09 /* encxvid.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C880B8DD3B60020BC09 /* encxvid.c */; };
+               0DFA5CE40B8DD4210020BC09 /* fifo.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C890B8DD3B60020BC09 /* fifo.c */; };
+               0DFA5CE50B8DD4210020BC09 /* hb.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C8A0B8DD3B60020BC09 /* hb.c */; };
+               0DFA5CE70B8DD4210020BC09 /* muxavi.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C910B8DD3B60020BC09 /* muxavi.c */; };
+               0DFA5CE80B8DD4210020BC09 /* muxcommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C920B8DD3B60020BC09 /* muxcommon.c */; };
+               0DFA5CE90B8DD4210020BC09 /* muxmp4.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C930B8DD3B60020BC09 /* muxmp4.c */; };
+               0DFA5CEA0B8DD4210020BC09 /* muxogm.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C940B8DD3B60020BC09 /* muxogm.c */; };
+               0DFA5CEB0B8DD4210020BC09 /* ports.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C950B8DD3B60020BC09 /* ports.c */; };
+               0DFA5CEC0B8DD4210020BC09 /* reader.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C970B8DD3B60020BC09 /* reader.c */; };
+               0DFA5CED0B8DD4210020BC09 /* render.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C980B8DD3B60020BC09 /* render.c */; };
+               0DFA5CEE0B8DD4210020BC09 /* scan.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C990B8DD3B60020BC09 /* scan.c */; };
+               0DFA5CEF0B8DD4210020BC09 /* sync.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9A0B8DD3B60020BC09 /* sync.c */; };
+               0DFA5CF00B8DD4210020BC09 /* update.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9B0B8DD3B60020BC09 /* update.c */; };
+               0DFA5CF10B8DD4210020BC09 /* work.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9C0B8DD3B60020BC09 /* work.c */; };
+               0DFF0B770B6BC72A00549488 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9B0B4CAB100064E04C /* common.c */; };
+               0DFF0B790B6BC72A00549488 /* deca52.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9D0B4CAB100064E04C /* deca52.c */; };
+               0DFF0B7A0B6BC72A00549488 /* decavcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9E0B4CAB100064E04C /* decavcodec.c */; };
+               0DFF0C100B6BCEE800549488 /* test.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC760B4CA8F40064E04C /* test.c */; };
+               253886010BFE0A5B0064E995 /* HBOutputRedirect.h in Headers */ = {isa = PBXBuildFile; fileRef = 253885FF0BFE0A5B0064E995 /* HBOutputRedirect.h */; };
+               253886020BFE0A5B0064E995 /* HBOutputRedirect.m in Sources */ = {isa = PBXBuildFile; fileRef = 253886000BFE0A5B0064E995 /* HBOutputRedirect.m */; };
+               253886170BFE0C160064E995 /* HBOutputPanelController.h in Headers */ = {isa = PBXBuildFile; fileRef = 253886150BFE0C160064E995 /* HBOutputPanelController.h */; };
+               253886180BFE0C160064E995 /* HBOutputPanelController.m in Sources */ = {isa = PBXBuildFile; fileRef = 253886160BFE0C160064E995 /* HBOutputPanelController.m */; };
+               25DE1FB60C169A0C00F01FC8 /* HBPreferencesController.h in Headers */ = {isa = PBXBuildFile; fileRef = 25DE1FB40C169A0C00F01FC8 /* HBPreferencesController.h */; };
+               25DE1FB70C169A0C00F01FC8 /* HBPreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 25DE1FB50C169A0C00F01FC8 /* HBPreferencesController.m */; };
+               4D1125D809D72FD200E0657B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D1125D709D72FD200E0657B /* libz.dylib */; };
+               4DD93F8F082036E8008E1322 /* Controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DF3C8CB052889CD00A80101 /* Controller.h */; };
+               4DD93F92082036E8008E1322 /* PictureController.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D1FD381073D19CE00E46515 /* PictureController.h */; };
+               4DD93F97082036E8008E1322 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
+               4DD93F9A082036E8008E1322 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.mm */; settings = {ATTRIBUTES = (); }; };
+               4DD93F9B082036E8008E1322 /* Controller.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4DF3C8CC052889CD00A80101 /* Controller.mm */; };
+               4DD93F9E082036E8008E1322 /* PictureController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4D1FD382073D19CE00E46515 /* PictureController.mm */; };
+               4DD93FA2082036E8008E1322 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+               4DD93FA3082036E8008E1322 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DEB2024052B055F00C39CA9 /* IOKit.framework */; };
+               4DD93FA4082036E8008E1322 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DDE9724052B7B2B00C39CA9 /* OpenGL.framework */; };
+               5558B5690BE3BADF00E15E27 /* decdca.c in Sources */ = {isa = PBXBuildFile; fileRef = 5558B5680BE3BADF00E15E27 /* decdca.c */; };
+               5558B56A0BE3BADF00E15E27 /* decdca.c in Sources */ = {isa = PBXBuildFile; fileRef = 5558B5680BE3BADF00E15E27 /* decdca.c */; };
+               593034EB0BBA39A100172349 /* ChapterTitles.h in Headers */ = {isa = PBXBuildFile; fileRef = 593034E90BBA39A100172349 /* ChapterTitles.h */; };
+               593034EC0BBA39A100172349 /* ChapterTitles.m in Sources */ = {isa = PBXBuildFile; fileRef = 593034EA0BBA39A100172349 /* ChapterTitles.m */; };
+               59CBD2370BBB44DA004A3BE3 /* parsecsv.c in Sources */ = {isa = PBXBuildFile; fileRef = 59CBD2360BBB44DA004A3BE3 /* parsecsv.c */; };
+               59CBD2650BBB4D1B004A3BE3 /* ChapterTitles.m in Sources */ = {isa = PBXBuildFile; fileRef = 593034EA0BBA39A100172349 /* ChapterTitles.m */; };
+               7497010F0DC281BB009200D8 /* decomb.c in Sources */ = {isa = PBXBuildFile; fileRef = 7497010E0DC281BB009200D8 /* decomb.c */; };
+               749701100DC281BB009200D8 /* decomb.c in Sources */ = {isa = PBXBuildFile; fileRef = 7497010E0DC281BB009200D8 /* decomb.c */; };
+               A22C85EC0D05D35000C10E36 /* HBPresets.h in Headers */ = {isa = PBXBuildFile; fileRef = A22C85EA0D05D35000C10E36 /* HBPresets.h */; };
+               A22C85ED0D05D35100C10E36 /* HBPresets.m in Sources */ = {isa = PBXBuildFile; fileRef = A22C85EB0D05D35000C10E36 /* HBPresets.m */; };
+               A25289E60D87A27D00461D5B /* enctheora.c in Sources */ = {isa = PBXBuildFile; fileRef = A25289E50D87A27D00461D5B /* enctheora.c */; };
+               A25289E70D87A2CB00461D5B /* enctheora.c in Sources */ = {isa = PBXBuildFile; fileRef = A25289E50D87A27D00461D5B /* enctheora.c */; };
+               A273E0510C57B39A00493A45 /* Pause.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E04A0C57B39A00493A45 /* Pause.tiff */; };
+               A273E0520C57B39A00493A45 /* Play.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E04B0C57B39A00493A45 /* Play.tiff */; };
+               A273E0530C57B39A00493A45 /* Stop.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E04C0C57B39A00493A45 /* Stop.tiff */; };
+               A273E09A0C57C1CC00493A45 /* muxmkv.c in Sources */ = {isa = PBXBuildFile; fileRef = A273E0950C57C19500493A45 /* muxmkv.c */; };
+               A273E09B0C57C1CD00493A45 /* muxmkv.c in Sources */ = {isa = PBXBuildFile; fileRef = A273E0950C57C19500493A45 /* muxmkv.c */; };
+               A29E05800BE1283E000533F5 /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A29E057F0BE1283E000533F5 /* Growl.framework */; };
+               A29E058B0BE12889000533F5 /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A29E057F0BE1283E000533F5 /* Growl.framework */; };
+               A2A1EC310C76C35E00827E0D /* HBDVDDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = A2A1EC300C76C35E00827E0D /* HBDVDDetector.h */; };
+               A2A1EC3A0C76C58400827E0D /* HBDVDDetector.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A1EC390C76C58400827E0D /* HBDVDDetector.m */; };
+               A2D0A0AB0D3E5929002D57CB /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2D0A0AA0D3E5929002D57CB /* Sparkle.framework */; };
+               A2D0A0BF0D3E596F002D57CB /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A2D0A0AA0D3E5929002D57CB /* Sparkle.framework */; };
+               A2D7AD670C998AD30082CA33 /* ActivityWindow.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD5E0C998AD30082CA33 /* ActivityWindow.tiff */; };
+               A2D7AD680C998AD30082CA33 /* AddToQueue.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD5F0C998AD30082CA33 /* AddToQueue.tiff */; };
+               A2D7AD690C998AD30082CA33 /* Drawer.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD600C998AD30082CA33 /* Drawer.tiff */; };
+               A2D7AD6B0C998AD30082CA33 /* pref-audio.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD620C998AD30082CA33 /* pref-audio.tiff */; };
+               A2D7AD6D0C998AD30082CA33 /* pref-picture.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD640C998AD30082CA33 /* pref-picture.tiff */; };
+               A2D7AD6E0C998AD30082CA33 /* Queue.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD650C998AD30082CA33 /* Queue.tiff */; };
+               A2D7AD6F0C998AD30082CA33 /* Source.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD660C998AD30082CA33 /* Source.tiff */; };
+               A9AC41DF0C918DB500DDF9B8 /* HBAdvancedController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9AC41DD0C918DB500DDF9B8 /* HBAdvancedController.m */; };
+               A9AC41E00C918DB500DDF9B8 /* HBAdvancedController.h in Headers */ = {isa = PBXBuildFile; fileRef = A9AC41DE0C918DB500DDF9B8 /* HBAdvancedController.h */; };
+               B48359A80C82960500E04440 /* lang.c in Sources */ = {isa = PBXBuildFile; fileRef = B48359A70C82960500E04440 /* lang.c */; };
+               D289A9F30DBBE7AC00CE614B /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D289A9F20DBBE7AC00CE614B /* CoreServices.framework */; };
+               D289AAC40DBBF3F100CE614B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DEB2024052B055F00C39CA9 /* IOKit.framework */; };
+               D4D49FED0C83355600F01215 /* lang.c in Sources */ = {isa = PBXBuildFile; fileRef = B48359A70C82960500E04440 /* lang.c */; };
+               E3003C7F0C88505D0072F2A8 /* DeleteHighlightPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = E3003C7E0C88505D0072F2A8 /* DeleteHighlightPressed.png */; };
+               E3003CB50C8852B70072F2A8 /* DeletePressed.png in Resources */ = {isa = PBXBuildFile; fileRef = E3003CB40C8852B70072F2A8 /* DeletePressed.png */; };
+               E37167890C92F6180072B384 /* JobPassSecondSmall.png in Resources */ = {isa = PBXBuildFile; fileRef = E37167830C92F6180072B384 /* JobPassSecondSmall.png */; };
+               E371678A0C92F6180072B384 /* JobPassSubtitleSmall.png in Resources */ = {isa = PBXBuildFile; fileRef = E37167840C92F6180072B384 /* JobPassSubtitleSmall.png */; };
+               E371678B0C92F6180072B384 /* JobPassFirstSmall.png in Resources */ = {isa = PBXBuildFile; fileRef = E37167850C92F6180072B384 /* JobPassFirstSmall.png */; };
+               E37167A90C92FAA50072B384 /* JobPassUnknownSmall.png in Resources */ = {isa = PBXBuildFile; fileRef = E37167A70C92FAA50072B384 /* JobPassUnknownSmall.png */; };
+               E37172670C977D340072B384 /* HBImageAndTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E37172650C977D340072B384 /* HBImageAndTextCell.m */; };
+               E37172680C977D340072B384 /* HBImageAndTextCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E37172660C977D340072B384 /* HBImageAndTextCell.h */; };
+               E37C89410C83988F00C1B919 /* DeleteHighlight.png in Resources */ = {isa = PBXBuildFile; fileRef = E37C893D0C83988F00C1B919 /* DeleteHighlight.png */; };
+               E37C89420C83988F00C1B919 /* Delete.png in Resources */ = {isa = PBXBuildFile; fileRef = E37C893E0C83988F00C1B919 /* Delete.png */; };
+               E37C89430C83988F00C1B919 /* JobSmall.png in Resources */ = {isa = PBXBuildFile; fileRef = E37C893F0C83988F00C1B919 /* JobSmall.png */; };
+               E37C89440C83988F00C1B919 /* JobLarge.png in Resources */ = {isa = PBXBuildFile; fileRef = E37C89400C83988F00C1B919 /* JobLarge.png */; };
+               E37C89470C83989F00C1B919 /* HBQueueController.mm in Sources */ = {isa = PBXBuildFile; fileRef = E37C89450C83989F00C1B919 /* HBQueueController.mm */; };
+               E37C89480C83989F00C1B919 /* HBQueueController.h in Headers */ = {isa = PBXBuildFile; fileRef = E37C89460C83989F00C1B919 /* HBQueueController.h */; };
+               E3997A2C0CAB58BC00287239 /* EncodeWorking3.png in Resources */ = {isa = PBXBuildFile; fileRef = E3997A260CAB58BC00287239 /* EncodeWorking3.png */; };
+               E3997A2D0CAB58BC00287239 /* EncodeWorking4.png in Resources */ = {isa = PBXBuildFile; fileRef = E3997A270CAB58BC00287239 /* EncodeWorking4.png */; };
+               E3997A2E0CAB58BC00287239 /* EncodeWorking1.png in Resources */ = {isa = PBXBuildFile; fileRef = E3997A280CAB58BC00287239 /* EncodeWorking1.png */; };
+               E3997A2F0CAB58BC00287239 /* EncodeWorking0.png in Resources */ = {isa = PBXBuildFile; fileRef = E3997A290CAB58BC00287239 /* EncodeWorking0.png */; };
+               E3997A300CAB58BC00287239 /* EncodeWorking2.png in Resources */ = {isa = PBXBuildFile; fileRef = E3997A2A0CAB58BC00287239 /* EncodeWorking2.png */; };
+               E3997A310CAB58BC00287239 /* EncodeWorking5.png in Resources */ = {isa = PBXBuildFile; fileRef = E3997A2B0CAB58BC00287239 /* EncodeWorking5.png */; };
+               E39AA4E60D32DC0B0007A415 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = E39AA4DA0D32DC0B0007A415 /* MainMenu.xib */; };
+               E39AA4E70D32DC0B0007A415 /* Queue.xib in Resources */ = {isa = PBXBuildFile; fileRef = E39AA4DC0D32DC0B0007A415 /* Queue.xib */; };
+               E39AA4E80D32DC0B0007A415 /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = E39AA4DE0D32DC0B0007A415 /* Preferences.xib */; };
+               E39AA4E90D32DC0B0007A415 /* PictureSettings.xib in Resources */ = {isa = PBXBuildFile; fileRef = E39AA4E00D32DC0B0007A415 /* PictureSettings.xib */; };
+               E39AA4EA0D32DC0B0007A415 /* AdvancedView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E39AA4E20D32DC0B0007A415 /* AdvancedView.xib */; };
+               E39AA4EB0D32DC0B0007A415 /* OutputPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = E39AA4E40D32DC0B0007A415 /* OutputPanel.xib */; };
+               E3C844F60CA6B3F90013B683 /* RevealPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = E3C844F20CA6B3F90013B683 /* RevealPressed.png */; };
+               E3C844F70CA6B3F90013B683 /* RevealHighlightPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = E3C844F30CA6B3F90013B683 /* RevealHighlightPressed.png */; };
+               E3C844F80CA6B3F90013B683 /* RevealHighlight.png in Resources */ = {isa = PBXBuildFile; fileRef = E3C844F40CA6B3F90013B683 /* RevealHighlight.png */; };
+               E3C844F90CA6B3F90013B683 /* Reveal.png in Resources */ = {isa = PBXBuildFile; fileRef = E3C844F50CA6B3F90013B683 /* Reveal.png */; };
+               E3C845870CA6E9080013B683 /* EncodeComplete.png in Resources */ = {isa = PBXBuildFile; fileRef = E3C845860CA6E9080013B683 /* EncodeComplete.png */; };
+               E3FC10910D1611EC00470E7B /* EncodeCanceled.png in Resources */ = {isa = PBXBuildFile; fileRef = E3FC10900D1611EC00470E7B /* EncodeCanceled.png */; };
+               EAA526930C3B25D200944FF2 /* stream.c in Sources */ = {isa = PBXBuildFile; fileRef = EAA526920C3B25D200944FF2 /* stream.c */; };
+               EAA526940C3B25D200944FF2 /* stream.c in Sources */ = {isa = PBXBuildFile; fileRef = EAA526920C3B25D200944FF2 /* stream.c */; };
+               FC8519500C59A02C0073812C /* denoise.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194C0C59A02C0073812C /* denoise.c */; };
+               FC8519510C59A02C0073812C /* deinterlace.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194D0C59A02C0073812C /* deinterlace.c */; };
+               FC8519520C59A02C0073812C /* deblock.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194E0C59A02C0073812C /* deblock.c */; };
+               FC8519530C59A02C0073812C /* detelecine.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194F0C59A02C0073812C /* detelecine.c */; };
+               FC8519540C59A02C0073812C /* denoise.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194C0C59A02C0073812C /* denoise.c */; };
+               FC8519550C59A02C0073812C /* deinterlace.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194D0C59A02C0073812C /* deinterlace.c */; };
+               FC8519560C59A02C0073812C /* deblock.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194E0C59A02C0073812C /* deblock.c */; };
+               FC8519570C59A02C0073812C /* detelecine.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194F0C59A02C0073812C /* detelecine.c */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+               0D6E35900B6BD5FA005AABB3 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 0DFF0B710B6BC6E600549488;
+                       remoteInfo = libmediafork;
+               };
+               0DFF0BF30B6BCCB900549488 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 0DFF0B710B6BC6E600549488;
+                       remoteInfo = libmediafork;
+               };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+               A29E05840BE12861000533F5 /* CopyFiles */ = {
+                       isa = PBXCopyFilesBuildPhase;
+                       buildActionMask = 2147483647;
+                       dstPath = "";
+                       dstSubfolderSpec = 10;
+                       files = (
+                               A2D0A0BF0D3E596F002D57CB /* Sparkle.framework in CopyFiles */,
+                               A29E058B0BE12889000533F5 /* Growl.framework in CopyFiles */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+               089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+               0D096DFF0B707D1200A845D4 /* libhb.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libhb.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+               0D6E35760B6BD4F0005AABB3 /* HandBrake.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HandBrake.app; sourceTree = BUILT_PRODUCTS_DIR; };
+               0DF377970B7BF99A00115CB0 /* fakexcode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fakexcode.cpp; path = ../test/fakexcode.cpp; sourceTree = SOURCE_ROOT; };
+               0DFA5C7A0B8DD1E90020BC09 /* HandBrake.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = HandBrake.icns; sourceTree = "<group>"; };
+               0DFA5C7E0B8DD3B60020BC09 /* declpcm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = declpcm.c; path = ../libhb/declpcm.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C7F0B8DD3B60020BC09 /* decmpeg2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = decmpeg2.c; path = ../libhb/decmpeg2.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C800B8DD3B60020BC09 /* decsub.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = decsub.c; path = ../libhb/decsub.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C810B8DD3B60020BC09 /* demuxmpeg.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = demuxmpeg.c; path = ../libhb/demuxmpeg.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C820B8DD3B60020BC09 /* dvd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dvd.c; path = ../libhb/dvd.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C830B8DD3B60020BC09 /* encavcodec.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = encavcodec.c; path = ../libhb/encavcodec.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C840B8DD3B60020BC09 /* encfaac.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = encfaac.c; path = ../libhb/encfaac.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C850B8DD3B60020BC09 /* enclame.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = enclame.c; path = ../libhb/enclame.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C860B8DD3B60020BC09 /* encvorbis.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = encvorbis.c; path = ../libhb/encvorbis.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C870B8DD3B60020BC09 /* encx264.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = encx264.c; path = ../libhb/encx264.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C880B8DD3B60020BC09 /* encxvid.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = encxvid.c; path = ../libhb/encxvid.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C890B8DD3B60020BC09 /* fifo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = fifo.c; path = ../libhb/fifo.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C8A0B8DD3B60020BC09 /* hb.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hb.c; path = ../libhb/hb.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C910B8DD3B60020BC09 /* muxavi.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = muxavi.c; path = ../libhb/muxavi.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C920B8DD3B60020BC09 /* muxcommon.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = muxcommon.c; path = ../libhb/muxcommon.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C930B8DD3B60020BC09 /* muxmp4.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = muxmp4.c; path = ../libhb/muxmp4.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C940B8DD3B60020BC09 /* muxogm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = muxogm.c; path = ../libhb/muxogm.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C950B8DD3B60020BC09 /* ports.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ports.c; path = ../libhb/ports.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C970B8DD3B60020BC09 /* reader.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = reader.c; path = ../libhb/reader.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C980B8DD3B60020BC09 /* render.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = render.c; path = ../libhb/render.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C990B8DD3B60020BC09 /* scan.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = scan.c; path = ../libhb/scan.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C9A0B8DD3B60020BC09 /* sync.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sync.c; path = ../libhb/sync.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C9B0B8DD3B60020BC09 /* update.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = update.c; path = ../libhb/update.c; sourceTree = SOURCE_ROOT; };
+               0DFA5C9C0B8DD3B60020BC09 /* work.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = work.c; path = ../libhb/work.c; sourceTree = SOURCE_ROOT; };
+               0DFA5D060B8DD9040020BC09 /* HandBrake.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = HandBrake.plist; sourceTree = "<group>"; };
+               0DFF0B720B6BC6E600549488 /* libhb.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libhb.a; sourceTree = BUILT_PRODUCTS_DIR; };
+               0DFF0C0A0B6BCEC200549488 /* HandBrakeCLI */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = HandBrakeCLI; sourceTree = BUILT_PRODUCTS_DIR; };
+               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+               253885FF0BFE0A5B0064E995 /* HBOutputRedirect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HBOutputRedirect.h; sourceTree = "<group>"; };
+               253886000BFE0A5B0064E995 /* HBOutputRedirect.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = HBOutputRedirect.m; sourceTree = "<group>"; };
+               253886150BFE0C160064E995 /* HBOutputPanelController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBOutputPanelController.h; sourceTree = "<group>"; };
+               253886160BFE0C160064E995 /* HBOutputPanelController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBOutputPanelController.m; sourceTree = "<group>"; };
+               25DE1FB40C169A0C00F01FC8 /* HBPreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBPreferencesController.h; sourceTree = "<group>"; };
+               25DE1FB50C169A0C00F01FC8 /* HBPreferencesController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBPreferencesController.m; sourceTree = "<group>"; };
+               29B97316FDCFA39411CA2CEA /* main.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
+               29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+               29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+               4D1125D709D72FD200E0657B /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; };
+               4D1FD381073D19CE00E46515 /* PictureController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PictureController.h; sourceTree = "<group>"; };
+               4D1FD382073D19CE00E46515 /* PictureController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = PictureController.mm; sourceTree = "<group>"; };
+               4DDE9724052B7B2B00C39CA9 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
+               4DEB2024052B055F00C39CA9 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
+               4DF3C8CB052889CD00A80101 /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Controller.h; sourceTree = "<group>"; };
+               4DF3C8CC052889CD00A80101 /* Controller.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = Controller.mm; sourceTree = "<group>"; };
+               526FBC760B4CA8F40064E04C /* test.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.c; fileEncoding = 30; name = test.c; path = ../test/test.c; sourceTree = SOURCE_ROOT; };
+               526FBC9B0B4CAB100064E04C /* common.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = common.c; path = ../libhb/common.c; sourceTree = SOURCE_ROOT; };
+               526FBC9D0B4CAB100064E04C /* deca52.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = deca52.c; path = ../libhb/deca52.c; sourceTree = SOURCE_ROOT; };
+               526FBC9E0B4CAB100064E04C /* decavcodec.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = decavcodec.c; path = ../libhb/decavcodec.c; sourceTree = SOURCE_ROOT; };
+               5558B5680BE3BADF00E15E27 /* decdca.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = decdca.c; path = ../libhb/decdca.c; sourceTree = SOURCE_ROOT; };
+               593034E90BBA39A100172349 /* ChapterTitles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChapterTitles.h; sourceTree = "<group>"; };
+               593034EA0BBA39A100172349 /* ChapterTitles.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChapterTitles.m; sourceTree = "<group>"; };
+               59CBD2360BBB44DA004A3BE3 /* parsecsv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = parsecsv.c; path = ../test/parsecsv.c; sourceTree = SOURCE_ROOT; };
+               7497010E0DC281BB009200D8 /* decomb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decomb.c; path = ../libhb/decomb.c; sourceTree = SOURCE_ROOT; };
+               A22C85EA0D05D35000C10E36 /* HBPresets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBPresets.h; sourceTree = "<group>"; };
+               A22C85EB0D05D35000C10E36 /* HBPresets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBPresets.m; sourceTree = "<group>"; };
+               A25289E50D87A27D00461D5B /* enctheora.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = enctheora.c; path = ../libhb/enctheora.c; sourceTree = SOURCE_ROOT; };
+               A273E04A0C57B39A00493A45 /* Pause.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Pause.tiff; sourceTree = "<group>"; };
+               A273E04B0C57B39A00493A45 /* Play.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Play.tiff; sourceTree = "<group>"; };
+               A273E04C0C57B39A00493A45 /* Stop.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Stop.tiff; sourceTree = "<group>"; };
+               A273E0950C57C19500493A45 /* muxmkv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = muxmkv.c; path = ../libhb/muxmkv.c; sourceTree = SOURCE_ROOT; };
+               A29E057F0BE1283E000533F5 /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Growl.framework; sourceTree = "<group>"; };
+               A2A1EC300C76C35E00827E0D /* HBDVDDetector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HBDVDDetector.h; sourceTree = "<group>"; };
+               A2A1EC390C76C58400827E0D /* HBDVDDetector.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = HBDVDDetector.m; sourceTree = "<group>"; };
+               A2D0A0AA0D3E5929002D57CB /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
+               A2D7AD5E0C998AD30082CA33 /* ActivityWindow.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = ActivityWindow.tiff; sourceTree = "<group>"; };
+               A2D7AD5F0C998AD30082CA33 /* AddToQueue.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = AddToQueue.tiff; sourceTree = "<group>"; };
+               A2D7AD600C998AD30082CA33 /* Drawer.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Drawer.tiff; sourceTree = "<group>"; };
+               A2D7AD620C998AD30082CA33 /* pref-audio.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "pref-audio.tiff"; sourceTree = "<group>"; };
+               A2D7AD640C998AD30082CA33 /* pref-picture.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "pref-picture.tiff"; sourceTree = "<group>"; };
+               A2D7AD650C998AD30082CA33 /* Queue.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Queue.tiff; sourceTree = "<group>"; };
+               A2D7AD660C998AD30082CA33 /* Source.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Source.tiff; sourceTree = "<group>"; };
+               A9AC41DD0C918DB500DDF9B8 /* HBAdvancedController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = HBAdvancedController.m; sourceTree = "<group>"; };
+               A9AC41DE0C918DB500DDF9B8 /* HBAdvancedController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HBAdvancedController.h; sourceTree = "<group>"; };
+               B48359A70C82960500E04440 /* lang.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = lang.c; path = ../libhb/lang.c; sourceTree = SOURCE_ROOT; };
+               D289A9F20DBBE7AC00CE614B /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
+               E3003C7E0C88505D0072F2A8 /* DeleteHighlightPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = DeleteHighlightPressed.png; sourceTree = "<group>"; };
+               E3003CB40C8852B70072F2A8 /* DeletePressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = DeletePressed.png; sourceTree = "<group>"; };
+               E37167830C92F6180072B384 /* JobPassSecondSmall.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = JobPassSecondSmall.png; sourceTree = "<group>"; };
+               E37167840C92F6180072B384 /* JobPassSubtitleSmall.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = JobPassSubtitleSmall.png; sourceTree = "<group>"; };
+               E37167850C92F6180072B384 /* JobPassFirstSmall.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = JobPassFirstSmall.png; sourceTree = "<group>"; };
+               E37167A70C92FAA50072B384 /* JobPassUnknownSmall.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = JobPassUnknownSmall.png; sourceTree = "<group>"; };
+               E37172650C977D340072B384 /* HBImageAndTextCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = HBImageAndTextCell.m; sourceTree = "<group>"; };
+               E37172660C977D340072B384 /* HBImageAndTextCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HBImageAndTextCell.h; sourceTree = "<group>"; };
+               E37C893D0C83988F00C1B919 /* DeleteHighlight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = DeleteHighlight.png; sourceTree = "<group>"; };
+               E37C893E0C83988F00C1B919 /* Delete.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Delete.png; sourceTree = "<group>"; };
+               E37C893F0C83988F00C1B919 /* JobSmall.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = JobSmall.png; sourceTree = "<group>"; };
+               E37C89400C83988F00C1B919 /* JobLarge.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = JobLarge.png; sourceTree = "<group>"; };
+               E37C89450C83989F00C1B919 /* HBQueueController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = HBQueueController.mm; sourceTree = "<group>"; };
+               E37C89460C83989F00C1B919 /* HBQueueController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HBQueueController.h; sourceTree = "<group>"; };
+               E3997A260CAB58BC00287239 /* EncodeWorking3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EncodeWorking3.png; sourceTree = "<group>"; };
+               E3997A270CAB58BC00287239 /* EncodeWorking4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EncodeWorking4.png; sourceTree = "<group>"; };
+               E3997A280CAB58BC00287239 /* EncodeWorking1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EncodeWorking1.png; sourceTree = "<group>"; };
+               E3997A290CAB58BC00287239 /* EncodeWorking0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EncodeWorking0.png; sourceTree = "<group>"; };
+               E3997A2A0CAB58BC00287239 /* EncodeWorking2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EncodeWorking2.png; sourceTree = "<group>"; };
+               E3997A2B0CAB58BC00287239 /* EncodeWorking5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EncodeWorking5.png; sourceTree = "<group>"; };
+               E39AA4DB0D32DC0B0007A415 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
+               E39AA4DD0D32DC0B0007A415 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Queue.xib; sourceTree = "<group>"; };
+               E39AA4DF0D32DC0B0007A415 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Preferences.xib; sourceTree = "<group>"; };
+               E39AA4E10D32DC0B0007A415 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PictureSettings.xib; sourceTree = "<group>"; };
+               E39AA4E30D32DC0B0007A415 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/AdvancedView.xib; sourceTree = "<group>"; };
+               E39AA4E50D32DC0B0007A415 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/OutputPanel.xib; sourceTree = "<group>"; };
+               E3C844F20CA6B3F90013B683 /* RevealPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = RevealPressed.png; sourceTree = "<group>"; };
+               E3C844F30CA6B3F90013B683 /* RevealHighlightPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = RevealHighlightPressed.png; sourceTree = "<group>"; };
+               E3C844F40CA6B3F90013B683 /* RevealHighlight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = RevealHighlight.png; sourceTree = "<group>"; };
+               E3C844F50CA6B3F90013B683 /* Reveal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Reveal.png; sourceTree = "<group>"; };
+               E3C845860CA6E9080013B683 /* EncodeComplete.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EncodeComplete.png; sourceTree = "<group>"; };
+               E3FC10900D1611EC00470E7B /* EncodeCanceled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = EncodeCanceled.png; sourceTree = "<group>"; };
+               EAA526920C3B25D200944FF2 /* stream.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = stream.c; path = ../libhb/stream.c; sourceTree = SOURCE_ROOT; };
+               FC85194C0C59A02C0073812C /* denoise.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = denoise.c; path = ../libhb/denoise.c; sourceTree = SOURCE_ROOT; };
+               FC85194D0C59A02C0073812C /* deinterlace.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = deinterlace.c; path = ../libhb/deinterlace.c; sourceTree = SOURCE_ROOT; };
+               FC85194E0C59A02C0073812C /* deblock.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = deblock.c; path = ../libhb/deblock.c; sourceTree = SOURCE_ROOT; };
+               FC85194F0C59A02C0073812C /* detelecine.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = detelecine.c; path = ../libhb/detelecine.c; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               0D096DFD0B707D1200A845D4 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               0D096EA30B70884A00A845D4 /* libz.dylib in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               0DFF0B700B6BC6E600549488 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               0DFF0C080B6BCEC200549488 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               D289AAC40DBBF3F100CE614B /* IOKit.framework in Frameworks */,
+                               D289A9F30DBBE7AC00CE614B /* CoreServices.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               4DD93FA1082036E8008E1322 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               4DD93FA2082036E8008E1322 /* Cocoa.framework in Frameworks */,
+                               4DD93FA3082036E8008E1322 /* IOKit.framework in Frameworks */,
+                               4DD93FA4082036E8008E1322 /* OpenGL.framework in Frameworks */,
+                               4D1125D809D72FD200E0657B /* libz.dylib in Frameworks */,
+                               A29E05800BE1283E000533F5 /* Growl.framework in Frameworks */,
+                               A2D0A0AB0D3E5929002D57CB /* Sparkle.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               19C28FACFE9D520D11CA2CBB /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               0DFF0B720B6BC6E600549488 /* libhb.a */,
+                               0DFF0C0A0B6BCEC200549488 /* HandBrakeCLI */,
+                               0D6E35760B6BD4F0005AABB3 /* HandBrake.app */,
+                               0D096DFF0B707D1200A845D4 /* libhb.dylib */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+               29B97314FDCFA39411CA2CEA /* HandBrake */ = {
+                       isa = PBXGroup;
+                       children = (
+                               526FBC930B4CAA260064E04C /* HandBrake Sources */,
+                               526FBC920B4CAA120064E04C /* HandBrakeCLI Sources */,
+                               526FBC8D0B4CA9F90064E04C /* libhb Sources */,
+                               29B97315FDCFA39411CA2CEA /* Other Sources */,
+                               29B97317FDCFA39411CA2CEA /* Resources */,
+                               089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+                               29B97323FDCFA39411CA2CEA /* Frameworks */,
+                               19C28FACFE9D520D11CA2CBB /* Products */,
+                       );
+                       name = HandBrake;
+                       sourceTree = "<group>";
+               };
+               29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               29B97316FDCFA39411CA2CEA /* main.mm */,
+                       );
+                       name = "Other Sources";
+                       sourceTree = "<group>";
+               };
+               29B97317FDCFA39411CA2CEA /* Resources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A273E0460C57B39A00493A45 /* icons */,
+                               0DFA5C7A0B8DD1E90020BC09 /* HandBrake.icns */,
+                               E39AA4DA0D32DC0B0007A415 /* MainMenu.xib */,
+                               E39AA4E20D32DC0B0007A415 /* AdvancedView.xib */,
+                               E39AA4E40D32DC0B0007A415 /* OutputPanel.xib */,
+                               E39AA4E00D32DC0B0007A415 /* PictureSettings.xib */,
+                               E39AA4DE0D32DC0B0007A415 /* Preferences.xib */,
+                               E39AA4DC0D32DC0B0007A415 /* Queue.xib */,
+                       );
+                       name = Resources;
+                       sourceTree = "<group>";
+               };
+               29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               D289A9F20DBBE7AC00CE614B /* CoreServices.framework */,
+                               A2D0A0AA0D3E5929002D57CB /* Sparkle.framework */,
+                               A29E057F0BE1283E000533F5 /* Growl.framework */,
+                               4D1125D709D72FD200E0657B /* libz.dylib */,
+                               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+                               4DEB2024052B055F00C39CA9 /* IOKit.framework */,
+                               4DDE9724052B7B2B00C39CA9 /* OpenGL.framework */,
+                               29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+                               29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+                       );
+                       name = Frameworks;
+                       sourceTree = "<group>";
+               };
+               526FBC8D0B4CA9F90064E04C /* libhb Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A25289E50D87A27D00461D5B /* enctheora.c */,
+                               7497010E0DC281BB009200D8 /* decomb.c */,
+                               B48359A70C82960500E04440 /* lang.c */,
+                               EAA526920C3B25D200944FF2 /* stream.c */,
+                               0DFA5C7E0B8DD3B60020BC09 /* declpcm.c */,
+                               0DFA5C7F0B8DD3B60020BC09 /* decmpeg2.c */,
+                               0DFA5C800B8DD3B60020BC09 /* decsub.c */,
+                               0DFA5C810B8DD3B60020BC09 /* demuxmpeg.c */,
+                               0DFA5C820B8DD3B60020BC09 /* dvd.c */,
+                               0DFA5C830B8DD3B60020BC09 /* encavcodec.c */,
+                               0DFA5C840B8DD3B60020BC09 /* encfaac.c */,
+                               0DFA5C850B8DD3B60020BC09 /* enclame.c */,
+                               0DFA5C860B8DD3B60020BC09 /* encvorbis.c */,
+                               FC85194C0C59A02C0073812C /* denoise.c */,
+                               FC85194D0C59A02C0073812C /* deinterlace.c */,
+                               FC85194E0C59A02C0073812C /* deblock.c */,
+                               FC85194F0C59A02C0073812C /* detelecine.c */,
+                               0DFA5C870B8DD3B60020BC09 /* encx264.c */,
+                               0DFA5C880B8DD3B60020BC09 /* encxvid.c */,
+                               0DFA5C890B8DD3B60020BC09 /* fifo.c */,
+                               0DFA5C8A0B8DD3B60020BC09 /* hb.c */,
+                               0DFA5C920B8DD3B60020BC09 /* muxcommon.c */,
+                               A273E0950C57C19500493A45 /* muxmkv.c */,
+                               0DFA5C930B8DD3B60020BC09 /* muxmp4.c */,
+                               0DFA5C910B8DD3B60020BC09 /* muxavi.c */,
+                               0DFA5C940B8DD3B60020BC09 /* muxogm.c */,
+                               0DFA5C950B8DD3B60020BC09 /* ports.c */,
+                               0DFA5C970B8DD3B60020BC09 /* reader.c */,
+                               0DFA5C980B8DD3B60020BC09 /* render.c */,
+                               0DFA5C990B8DD3B60020BC09 /* scan.c */,
+                               0DFA5C9A0B8DD3B60020BC09 /* sync.c */,
+                               0DFA5C9B0B8DD3B60020BC09 /* update.c */,
+                               0DFA5C9C0B8DD3B60020BC09 /* work.c */,
+                               526FBC9B0B4CAB100064E04C /* common.c */,
+                               526FBC9D0B4CAB100064E04C /* deca52.c */,
+                               5558B5680BE3BADF00E15E27 /* decdca.c */,
+                               526FBC9E0B4CAB100064E04C /* decavcodec.c */,
+                       );
+                       name = "libhb Sources";
+                       sourceTree = "<group>";
+               };
+               526FBC920B4CAA120064E04C /* HandBrakeCLI Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               0DF377970B7BF99A00115CB0 /* fakexcode.cpp */,
+                               526FBC760B4CA8F40064E04C /* test.c */,
+                               59CBD2360BBB44DA004A3BE3 /* parsecsv.c */,
+                       );
+                       name = "HandBrakeCLI Sources";
+                       sourceTree = "<group>";
+               };
+               526FBC930B4CAA260064E04C /* HandBrake Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A22C85EA0D05D35000C10E36 /* HBPresets.h */,
+                               A22C85EB0D05D35000C10E36 /* HBPresets.m */,
+                               0DFA5D060B8DD9040020BC09 /* HandBrake.plist */,
+                               4D1FD381073D19CE00E46515 /* PictureController.h */,
+                               4D1FD382073D19CE00E46515 /* PictureController.mm */,
+                               4DF3C8CB052889CD00A80101 /* Controller.h */,
+                               4DF3C8CC052889CD00A80101 /* Controller.mm */,
+                               593034E90BBA39A100172349 /* ChapterTitles.h */,
+                               593034EA0BBA39A100172349 /* ChapterTitles.m */,
+                               A2A1EC300C76C35E00827E0D /* HBDVDDetector.h */,
+                               A2A1EC390C76C58400827E0D /* HBDVDDetector.m */,
+                               253885FF0BFE0A5B0064E995 /* HBOutputRedirect.h */,
+                               253886000BFE0A5B0064E995 /* HBOutputRedirect.m */,
+                               253886150BFE0C160064E995 /* HBOutputPanelController.h */,
+                               253886160BFE0C160064E995 /* HBOutputPanelController.m */,
+                               25DE1FB40C169A0C00F01FC8 /* HBPreferencesController.h */,
+                               25DE1FB50C169A0C00F01FC8 /* HBPreferencesController.m */,
+                               E37C89460C83989F00C1B919 /* HBQueueController.h */,
+                               E37C89450C83989F00C1B919 /* HBQueueController.mm */,
+                               A9AC41DE0C918DB500DDF9B8 /* HBAdvancedController.h */,
+                               A9AC41DD0C918DB500DDF9B8 /* HBAdvancedController.m */,
+                               E37172660C977D340072B384 /* HBImageAndTextCell.h */,
+                               E37172650C977D340072B384 /* HBImageAndTextCell.m */,
+                       );
+                       name = "HandBrake Sources";
+                       sourceTree = "<group>";
+               };
+               A273E0460C57B39A00493A45 /* icons */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A2D7AD660C998AD30082CA33 /* Source.tiff */,
+                               A273E04A0C57B39A00493A45 /* Pause.tiff */,
+                               A273E04B0C57B39A00493A45 /* Play.tiff */,
+                               A273E04C0C57B39A00493A45 /* Stop.tiff */,
+                               A2D7AD5F0C998AD30082CA33 /* AddToQueue.tiff */,
+                               A2D7AD650C998AD30082CA33 /* Queue.tiff */,
+                               A2D7AD5E0C998AD30082CA33 /* ActivityWindow.tiff */,
+                               A2D7AD600C998AD30082CA33 /* Drawer.tiff */,
+                               A2D7AD620C998AD30082CA33 /* pref-audio.tiff */,
+                               A2D7AD640C998AD30082CA33 /* pref-picture.tiff */,
+                               E37C893E0C83988F00C1B919 /* Delete.png */,
+                               E3003CB40C8852B70072F2A8 /* DeletePressed.png */,
+                               E37C893D0C83988F00C1B919 /* DeleteHighlight.png */,
+                               E3003C7E0C88505D0072F2A8 /* DeleteHighlightPressed.png */,
+                               E37C89400C83988F00C1B919 /* JobLarge.png */,
+                               E37C893F0C83988F00C1B919 /* JobSmall.png */,
+                               E37167850C92F6180072B384 /* JobPassFirstSmall.png */,
+                               E37167830C92F6180072B384 /* JobPassSecondSmall.png */,
+                               E37167840C92F6180072B384 /* JobPassSubtitleSmall.png */,
+                               E37167A70C92FAA50072B384 /* JobPassUnknownSmall.png */,
+                               E3C844F50CA6B3F90013B683 /* Reveal.png */,
+                               E3C844F20CA6B3F90013B683 /* RevealPressed.png */,
+                               E3C844F40CA6B3F90013B683 /* RevealHighlight.png */,
+                               E3C844F30CA6B3F90013B683 /* RevealHighlightPressed.png */,
+                               E3FC10900D1611EC00470E7B /* EncodeCanceled.png */,
+                               E3C845860CA6E9080013B683 /* EncodeComplete.png */,
+                               E3997A290CAB58BC00287239 /* EncodeWorking0.png */,
+                               E3997A280CAB58BC00287239 /* EncodeWorking1.png */,
+                               E3997A2A0CAB58BC00287239 /* EncodeWorking2.png */,
+                               E3997A260CAB58BC00287239 /* EncodeWorking3.png */,
+                               E3997A270CAB58BC00287239 /* EncodeWorking4.png */,
+                               E3997A2B0CAB58BC00287239 /* EncodeWorking5.png */,
+                       );
+                       path = icons;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+               0D096DFB0B707D1200A845D4 /* Headers */ = {
+                       isa = PBXHeadersBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               0DFF0B6E0B6BC6E600549488 /* Headers */ = {
+                       isa = PBXHeadersBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               593034EB0BBA39A100172349 /* ChapterTitles.h in Headers */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               4DD93F8E082036E8008E1322 /* Headers */ = {
+                       isa = PBXHeadersBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               4DD93F8F082036E8008E1322 /* Controller.h in Headers */,
+                               4DD93F92082036E8008E1322 /* PictureController.h in Headers */,
+                               A2A1EC310C76C35E00827E0D /* HBDVDDetector.h in Headers */,
+                               253886010BFE0A5B0064E995 /* HBOutputRedirect.h in Headers */,
+                               253886170BFE0C160064E995 /* HBOutputPanelController.h in Headers */,
+                               25DE1FB60C169A0C00F01FC8 /* HBPreferencesController.h in Headers */,
+                               E37C89480C83989F00C1B919 /* HBQueueController.h in Headers */,
+                               A9AC41E00C918DB500DDF9B8 /* HBAdvancedController.h in Headers */,
+                               E37172680C977D340072B384 /* HBImageAndTextCell.h in Headers */,
+                               A22C85EC0D05D35000C10E36 /* HBPresets.h in Headers */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+               0D096DFE0B707D1200A845D4 /* libhb dlib */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 0D096E650B707D5800A845D4 /* Build configuration list for PBXNativeTarget "libhb dlib" */;
+                       buildPhases = (
+                               0D096DFB0B707D1200A845D4 /* Headers */,
+                               0D096DFC0B707D1200A845D4 /* Sources */,
+                               0D096DFD0B707D1200A845D4 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = "libhb dlib";
+                       productName = "libmediafork dlib";
+                       productReference = 0D096DFF0B707D1200A845D4 /* libhb.dylib */;
+                       productType = "com.apple.product-type.library.dynamic";
+               };
+               0DFF0B710B6BC6E600549488 /* libhb */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 0DFF0B730B6BC70400549488 /* Build configuration list for PBXNativeTarget "libhb" */;
+                       buildPhases = (
+                               0DFF0B6E0B6BC6E600549488 /* Headers */,
+                               0DFF0B6F0B6BC6E600549488 /* Sources */,
+                               0DFF0B700B6BC6E600549488 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = libhb;
+                       productName = libmediafork;
+                       productReference = 0DFF0B720B6BC6E600549488 /* libhb.a */;
+                       productType = "com.apple.product-type.library.static";
+               };
+               0DFF0C090B6BCEC200549488 /* HandBrakeCLI */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 0DFF0C0C0B6BCEE000549488 /* Build configuration list for PBXNativeTarget "HandBrakeCLI" */;
+                       buildPhases = (
+                               0DFF0C070B6BCEC200549488 /* Sources */,
+                               0DFF0C080B6BCEC200549488 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               0D6E35910B6BD5FA005AABB3 /* PBXTargetDependency */,
+                       );
+                       name = HandBrakeCLI;
+                       productName = HandBrakeCLI;
+                       productReference = 0DFF0C0A0B6BCEC200549488 /* HandBrakeCLI */;
+                       productType = "com.apple.product-type.tool";
+               };
+               4DD93F8D082036E8008E1322 /* HandBrake */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 4D4E7BC0087804870051572B /* Build configuration list for PBXNativeTarget "HandBrake" */;
+                       buildPhases = (
+                               4DD93F8E082036E8008E1322 /* Headers */,
+                               4DD93F95082036E8008E1322 /* Resources */,
+                               4DD93F99082036E8008E1322 /* Sources */,
+                               4DD93FA1082036E8008E1322 /* Frameworks */,
+                               A29E05840BE12861000533F5 /* CopyFiles */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               0DFF0BF40B6BCCB900549488 /* PBXTargetDependency */,
+                       );
+                       name = HandBrake;
+                       productName = HandBrake;
+                       productReference = 0D6E35760B6BD4F0005AABB3 /* HandBrake.app */;
+                       productType = "com.apple.product-type.application";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               29B97313FDCFA39411CA2CEA /* Project object */ = {
+                       isa = PBXProject;
+                       buildConfigurationList = 4D4E7BC4087804870051572B /* Build configuration list for PBXProject "HandBrake" */;
+                       compatibilityVersion = "Xcode 2.4";
+                       hasScannedForEncodings = 1;
+                       mainGroup = 29B97314FDCFA39411CA2CEA /* HandBrake */;
+                       projectDirPath = "";
+                       projectRoot = "";
+                       targets = (
+                               4DD93F8D082036E8008E1322 /* HandBrake */,
+                               0DFF0B710B6BC6E600549488 /* libhb */,
+                               0DFF0C090B6BCEC200549488 /* HandBrakeCLI */,
+                               0D096DFE0B707D1200A845D4 /* libhb dlib */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+               4DD93F95082036E8008E1322 /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               4DD93F97082036E8008E1322 /* InfoPlist.strings in Resources */,
+                               0DFA5C7B0B8DD1E90020BC09 /* HandBrake.icns in Resources */,
+                               A273E0510C57B39A00493A45 /* Pause.tiff in Resources */,
+                               A273E0520C57B39A00493A45 /* Play.tiff in Resources */,
+                               A273E0530C57B39A00493A45 /* Stop.tiff in Resources */,
+                               E37C89410C83988F00C1B919 /* DeleteHighlight.png in Resources */,
+                               E37C89420C83988F00C1B919 /* Delete.png in Resources */,
+                               E37C89430C83988F00C1B919 /* JobSmall.png in Resources */,
+                               E37C89440C83988F00C1B919 /* JobLarge.png in Resources */,
+                               E3003C7F0C88505D0072F2A8 /* DeleteHighlightPressed.png in Resources */,
+                               E3003CB50C8852B70072F2A8 /* DeletePressed.png in Resources */,
+                               E37167890C92F6180072B384 /* JobPassSecondSmall.png in Resources */,
+                               E371678A0C92F6180072B384 /* JobPassSubtitleSmall.png in Resources */,
+                               E371678B0C92F6180072B384 /* JobPassFirstSmall.png in Resources */,
+                               E37167A90C92FAA50072B384 /* JobPassUnknownSmall.png in Resources */,
+                               A2D7AD670C998AD30082CA33 /* ActivityWindow.tiff in Resources */,
+                               A2D7AD680C998AD30082CA33 /* AddToQueue.tiff in Resources */,
+                               A2D7AD690C998AD30082CA33 /* Drawer.tiff in Resources */,
+                               A2D7AD6B0C998AD30082CA33 /* pref-audio.tiff in Resources */,
+                               A2D7AD6D0C998AD30082CA33 /* pref-picture.tiff in Resources */,
+                               A2D7AD6E0C998AD30082CA33 /* Queue.tiff in Resources */,
+                               A2D7AD6F0C998AD30082CA33 /* Source.tiff in Resources */,
+                               E3C844F60CA6B3F90013B683 /* RevealPressed.png in Resources */,
+                               E3C844F70CA6B3F90013B683 /* RevealHighlightPressed.png in Resources */,
+                               E3C844F80CA6B3F90013B683 /* RevealHighlight.png in Resources */,
+                               E3C844F90CA6B3F90013B683 /* Reveal.png in Resources */,
+                               E3C845870CA6E9080013B683 /* EncodeComplete.png in Resources */,
+                               E3997A2C0CAB58BC00287239 /* EncodeWorking3.png in Resources */,
+                               E3997A2D0CAB58BC00287239 /* EncodeWorking4.png in Resources */,
+                               E3997A2E0CAB58BC00287239 /* EncodeWorking1.png in Resources */,
+                               E3997A2F0CAB58BC00287239 /* EncodeWorking0.png in Resources */,
+                               E3997A300CAB58BC00287239 /* EncodeWorking2.png in Resources */,
+                               E3997A310CAB58BC00287239 /* EncodeWorking5.png in Resources */,
+                               E3FC10910D1611EC00470E7B /* EncodeCanceled.png in Resources */,
+                               E39AA4E60D32DC0B0007A415 /* MainMenu.xib in Resources */,
+                               E39AA4E70D32DC0B0007A415 /* Queue.xib in Resources */,
+                               E39AA4E80D32DC0B0007A415 /* Preferences.xib in Resources */,
+                               E39AA4E90D32DC0B0007A415 /* PictureSettings.xib in Resources */,
+                               E39AA4EA0D32DC0B0007A415 /* AdvancedView.xib in Resources */,
+                               E39AA4EB0D32DC0B0007A415 /* OutputPanel.xib in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+               0D096DFC0B707D1200A845D4 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               A25289E70D87A2CB00461D5B /* enctheora.c in Sources */,
+                               D4D49FED0C83355600F01215 /* lang.c in Sources */,
+                               0DFA5CD90B8DD4210020BC09 /* declpcm.c in Sources */,
+                               0DFA5CDA0B8DD4210020BC09 /* decmpeg2.c in Sources */,
+                               0DFA5CDB0B8DD4210020BC09 /* decsub.c in Sources */,
+                               0DFA5CDC0B8DD4210020BC09 /* demuxmpeg.c in Sources */,
+                               0DFA5CDD0B8DD4210020BC09 /* dvd.c in Sources */,
+                               0DFA5CDE0B8DD4210020BC09 /* encavcodec.c in Sources */,
+                               0DFA5CDF0B8DD4210020BC09 /* encfaac.c in Sources */,
+                               0DFA5CE00B8DD4210020BC09 /* enclame.c in Sources */,
+                               0DFA5CE10B8DD4210020BC09 /* encvorbis.c in Sources */,
+                               0DFA5CE20B8DD4210020BC09 /* encx264.c in Sources */,
+                               0DFA5CE30B8DD4210020BC09 /* encxvid.c in Sources */,
+                               0DFA5CE40B8DD4210020BC09 /* fifo.c in Sources */,
+                               0DFA5CE50B8DD4210020BC09 /* hb.c in Sources */,
+                               0DFA5CE70B8DD4210020BC09 /* muxavi.c in Sources */,
+                               0DFA5CE80B8DD4210020BC09 /* muxcommon.c in Sources */,
+                               0DFA5CE90B8DD4210020BC09 /* muxmp4.c in Sources */,
+                               0DFA5CEA0B8DD4210020BC09 /* muxogm.c in Sources */,
+                               0DFA5CEB0B8DD4210020BC09 /* ports.c in Sources */,
+                               0DFA5CEC0B8DD4210020BC09 /* reader.c in Sources */,
+                               0DFA5CED0B8DD4210020BC09 /* render.c in Sources */,
+                               0DFA5CEE0B8DD4210020BC09 /* scan.c in Sources */,
+                               0DFA5CEF0B8DD4210020BC09 /* sync.c in Sources */,
+                               0DFA5CF00B8DD4210020BC09 /* update.c in Sources */,
+                               0DFA5CF10B8DD4210020BC09 /* work.c in Sources */,
+                               0D096E010B707D3400A845D4 /* common.c in Sources */,
+                               0D096E020B707D3400A845D4 /* deca52.c in Sources */,
+                               0D096E030B707D3400A845D4 /* decavcodec.c in Sources */,
+                               5558B56A0BE3BADF00E15E27 /* decdca.c in Sources */,
+                               EAA526940C3B25D200944FF2 /* stream.c in Sources */,
+                               A273E09B0C57C1CD00493A45 /* muxmkv.c in Sources */,
+                               FC8519540C59A02C0073812C /* denoise.c in Sources */,
+                               FC8519550C59A02C0073812C /* deinterlace.c in Sources */,
+                               FC8519560C59A02C0073812C /* deblock.c in Sources */,
+                               FC8519570C59A02C0073812C /* detelecine.c in Sources */,
+                               749701100DC281BB009200D8 /* decomb.c in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               0DFF0B6F0B6BC6E600549488 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               0DFA5CC00B8DD3FE0020BC09 /* declpcm.c in Sources */,
+                               0DFA5CC10B8DD3FE0020BC09 /* decmpeg2.c in Sources */,
+                               0DFA5CC20B8DD3FE0020BC09 /* decsub.c in Sources */,
+                               0DFA5CC30B8DD3FE0020BC09 /* demuxmpeg.c in Sources */,
+                               0DFA5CC40B8DD3FE0020BC09 /* dvd.c in Sources */,
+                               0DFA5CC50B8DD3FE0020BC09 /* encavcodec.c in Sources */,
+                               0DFA5CC60B8DD3FE0020BC09 /* encfaac.c in Sources */,
+                               0DFA5CC70B8DD3FE0020BC09 /* enclame.c in Sources */,
+                               0DFA5CC80B8DD3FE0020BC09 /* encvorbis.c in Sources */,
+                               0DFA5CC90B8DD3FE0020BC09 /* encx264.c in Sources */,
+                               0DFA5CCA0B8DD3FE0020BC09 /* encxvid.c in Sources */,
+                               0DFA5CCB0B8DD3FE0020BC09 /* fifo.c in Sources */,
+                               0DFA5CCC0B8DD3FE0020BC09 /* hb.c in Sources */,
+                               0DFA5CCE0B8DD3FE0020BC09 /* muxavi.c in Sources */,
+                               0DFA5CCF0B8DD3FE0020BC09 /* muxcommon.c in Sources */,
+                               0DFA5CD00B8DD3FE0020BC09 /* muxmp4.c in Sources */,
+                               0DFA5CD10B8DD3FE0020BC09 /* muxogm.c in Sources */,
+                               0DFA5CD20B8DD3FE0020BC09 /* ports.c in Sources */,
+                               0DFA5CD30B8DD3FE0020BC09 /* reader.c in Sources */,
+                               0DFA5CD40B8DD3FE0020BC09 /* render.c in Sources */,
+                               0DFA5CD50B8DD3FE0020BC09 /* scan.c in Sources */,
+                               0DFA5CD60B8DD3FE0020BC09 /* sync.c in Sources */,
+                               0DFA5CD70B8DD3FE0020BC09 /* update.c in Sources */,
+                               0DFA5CD80B8DD3FE0020BC09 /* work.c in Sources */,
+                               0DFF0B770B6BC72A00549488 /* common.c in Sources */,
+                               0DFF0B790B6BC72A00549488 /* deca52.c in Sources */,
+                               0DFF0B7A0B6BC72A00549488 /* decavcodec.c in Sources */,
+                               593034EC0BBA39A100172349 /* ChapterTitles.m in Sources */,
+                               5558B5690BE3BADF00E15E27 /* decdca.c in Sources */,
+                               EAA526930C3B25D200944FF2 /* stream.c in Sources */,
+                               A273E09A0C57C1CC00493A45 /* muxmkv.c in Sources */,
+                               FC8519500C59A02C0073812C /* denoise.c in Sources */,
+                               FC8519510C59A02C0073812C /* deinterlace.c in Sources */,
+                               FC8519520C59A02C0073812C /* deblock.c in Sources */,
+                               FC8519530C59A02C0073812C /* detelecine.c in Sources */,
+                               B48359A80C82960500E04440 /* lang.c in Sources */,
+                               A25289E60D87A27D00461D5B /* enctheora.c in Sources */,
+                               7497010F0DC281BB009200D8 /* decomb.c in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               0DFF0C070B6BCEC200549488 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               0DFF0C100B6BCEE800549488 /* test.c in Sources */,
+                               0DF377980B7BF99A00115CB0 /* fakexcode.cpp in Sources */,
+                               59CBD2370BBB44DA004A3BE3 /* parsecsv.c in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               4DD93F99082036E8008E1322 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               59CBD2650BBB4D1B004A3BE3 /* ChapterTitles.m in Sources */,
+                               4DD93F9A082036E8008E1322 /* main.mm in Sources */,
+                               4DD93F9B082036E8008E1322 /* Controller.mm in Sources */,
+                               4DD93F9E082036E8008E1322 /* PictureController.mm in Sources */,
+                               A2A1EC3A0C76C58400827E0D /* HBDVDDetector.m in Sources */,
+                               253886020BFE0A5B0064E995 /* HBOutputRedirect.m in Sources */,
+                               253886180BFE0C160064E995 /* HBOutputPanelController.m in Sources */,
+                               25DE1FB70C169A0C00F01FC8 /* HBPreferencesController.m in Sources */,
+                               E37C89470C83989F00C1B919 /* HBQueueController.mm in Sources */,
+                               A9AC41DF0C918DB500DDF9B8 /* HBAdvancedController.m in Sources */,
+                               E37172670C977D340072B384 /* HBImageAndTextCell.m in Sources */,
+                               A22C85ED0D05D35100C10E36 /* HBPresets.m in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+               0D6E35910B6BD5FA005AABB3 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 0DFF0B710B6BC6E600549488 /* libhb */;
+                       targetProxy = 0D6E35900B6BD5FA005AABB3 /* PBXContainerItemProxy */;
+               };
+               0DFF0BF40B6BCCB900549488 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 0DFF0B710B6BC6E600549488 /* libhb */;
+                       targetProxy = 0DFF0BF30B6BCCB900549488 /* PBXContainerItemProxy */;
+               };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+               089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               089C165DFE840E0CC02AAC07 /* English */,
+                       );
+                       name = InfoPlist.strings;
+                       sourceTree = "<group>";
+               };
+               E39AA4DA0D32DC0B0007A415 /* MainMenu.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               E39AA4DB0D32DC0B0007A415 /* English */,
+                       );
+                       name = MainMenu.xib;
+                       sourceTree = "<group>";
+               };
+               E39AA4DC0D32DC0B0007A415 /* Queue.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               E39AA4DD0D32DC0B0007A415 /* English */,
+                       );
+                       name = Queue.xib;
+                       sourceTree = "<group>";
+               };
+               E39AA4DE0D32DC0B0007A415 /* Preferences.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               E39AA4DF0D32DC0B0007A415 /* English */,
+                       );
+                       name = Preferences.xib;
+                       sourceTree = "<group>";
+               };
+               E39AA4E00D32DC0B0007A415 /* PictureSettings.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               E39AA4E10D32DC0B0007A415 /* English */,
+                       );
+                       name = PictureSettings.xib;
+                       sourceTree = "<group>";
+               };
+               E39AA4E20D32DC0B0007A415 /* AdvancedView.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               E39AA4E30D32DC0B0007A415 /* English */,
+                       );
+                       name = AdvancedView.xib;
+                       sourceTree = "<group>";
+               };
+               E39AA4E40D32DC0B0007A415 /* OutputPanel.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               E39AA4E50D32DC0B0007A415 /* English */,
+                       );
+                       name = OutputPanel.xib;
+                       sourceTree = "<group>";
+               };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+               0D096E660B707D5800A845D4 /* Development */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb";
+                               COPY_PHASE_STRIP = NO;
+                               DYLIB_COMPATIBILITY_VERSION = 1;
+                               DYLIB_CURRENT_VERSION = 1;
+                               EXECUTABLE_PREFIX = lib;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "";
+                               HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include";
+                               INSTALL_PATH = /usr/local/lib;
+                               LIBRARY_SEARCH_PATHS = "";
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               OTHER_CFLAGS = (
+                                       "-D__LIBHB__",
+                                       "-DSYS_DARWIN",
+                                       "-DUSE_PTHREAD",
+                               );
+                               OTHER_LDFLAGS = (
+                                       ../contrib/lib/libmp4v2.a,
+                                       ../contrib/lib/liba52.a,
+                                       ../contrib/lib/libavformat.a,
+                                       ../contrib/lib/libavcodec.a,
+                                       ../contrib/lib/libavutil.a,
+                                       ../contrib/lib/libdvdread.a,
+                                       ../contrib/lib/libfaac.a,
+                                       ../contrib/lib/libmp3lame.a,
+                                       ../contrib/lib/libmpeg2.a,
+                                       ../contrib/lib/libvorbis.a,
+                                       ../contrib/lib/libvorbisenc.a,
+                                       ../contrib/lib/libogg.a,
+                                       ../contrib/lib/libsamplerate.a,
+                                       ../contrib/lib/libx264.a,
+                                       ../contrib/lib/libxvidcore.a,
+                                       ../contrib/lib/libdca.a,
+                                       ../contrib/lib/libmkv.a,
+                                       ../contrib/lib/libtheora.a,
+                                       ../contrib/lib/libswscale.a,
+                                       ../contrib/lib/libfaad.a,
+                                       "-lbz2",
+                                       "-ldl",
+                                       "-flat_namespace",
+                                       "-read_only_relocs",
+                                       suppress,
+                               );
+                               PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN";
+                               PREBINDING = NO;
+                               PRODUCT_NAME = hb;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               SEPARATE_STRIP = YES;
+                               ZERO_LINK = NO;
+                       };
+                       name = Development;
+               };
+               0D096E670B707D5800A845D4 /* Deployment */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb";
+                               COPY_PHASE_STRIP = YES;
+                               DYLIB_COMPATIBILITY_VERSION = 1;
+                               DYLIB_CURRENT_VERSION = 1;
+                               EXECUTABLE_PREFIX = lib;
+                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+                               GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "";
+                               HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include";
+                               INSTALL_PATH = /usr/local/lib;
+                               LIBRARY_SEARCH_PATHS = "";
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               OTHER_CFLAGS = (
+                                       "-D__LIBHB__",
+                                       "-DSYS_DARWIN",
+                                       "-DUSE_PTHREAD",
+                               );
+                               OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+                               OTHER_LDFLAGS = (
+                                       ../contrib/lib/libmp4v2.a,
+                                       ../contrib/lib/liba52.a,
+                                       ../contrib/lib/libavformat.a,
+                                       ../contrib/lib/libavcodec.a,
+                                       ../contrib/lib/libavutil.a,
+                                       ../contrib/lib/libdvdread.a,
+                                       ../contrib/lib/libfaac.a,
+                                       ../contrib/lib/libmp3lame.a,
+                                       ../contrib/lib/libmpeg2.a,
+                                       ../contrib/lib/libvorbis.a,
+                                       ../contrib/lib/libvorbisenc.a,
+                                       ../contrib/lib/libogg.a,
+                                       ../contrib/lib/libsamplerate.a,
+                                       ../contrib/lib/libx264.a,
+                                       ../contrib/lib/libxvidcore.a,
+                                       ../contrib/lib/libdca.a,
+                                       ../contrib/lib/libmkv.a,
+                                       ../contrib/lib/libtheora.a,
+                                       ../contrib/lib/libswscale.a,
+                                       ../contrib/lib/libfaad.a,
+                                       "-lbz2",
+                                       "-ldl",
+                                       "-flat_namespace",
+                                       "-read_only_relocs",
+                                       suppress,
+                               );
+                               PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN";
+                               PREBINDING = NO;
+                               PRODUCT_NAME = hb;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               SEPARATE_STRIP = YES;
+                               ZERO_LINK = NO;
+                       };
+                       name = Deployment;
+               };
+               0D096E690B707D5800A845D4 /* UB */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb";
+                               DYLIB_COMPATIBILITY_VERSION = 1;
+                               DYLIB_CURRENT_VERSION = 1;
+                               EXECUTABLE_PREFIX = lib;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "";
+                               HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include";
+                               INSTALL_PATH = /usr/local/lib;
+                               LIBRARY_SEARCH_PATHS = "";
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               OTHER_CFLAGS = (
+                                       "-D__LIBHB__",
+                                       "-DSYS_DARWIN",
+                                       "-DUSE_PTHREAD",
+                               );
+                               OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+                               OTHER_LDFLAGS = (
+                                       ../contrib/lib/libmp4v2.a,
+                                       ../contrib/lib/liba52.a,
+                                       ../contrib/lib/libavformat.a,
+                                       ../contrib/lib/libavcodec.a,
+                                       ../contrib/lib/libavutil.a,
+                                       ../contrib/lib/libdvdread.a,
+                                       ../contrib/lib/libfaac.a,
+                                       ../contrib/lib/libmp3lame.a,
+                                       ../contrib/lib/libmpeg2.a,
+                                       ../contrib/lib/libvorbis.a,
+                                       ../contrib/lib/libvorbisenc.a,
+                                       ../contrib/lib/libogg.a,
+                                       ../contrib/lib/libsamplerate.a,
+                                       ../contrib/lib/libx264.a,
+                                       ../contrib/lib/libxvidcore.a,
+                                       ../contrib/lib/libdca.a,
+                                       ../contrib/lib/libmkv.a,
+                                       ../contrib/lib/libtheora.a,
+                                       ../contrib/lib/libswscale.a,
+                                       ../contrib/lib/libfaad.a,
+                                       "-lbz2",
+                                       "-ldl",
+                                       "-flat_namespace",
+                                       "-read_only_relocs",
+                                       suppress,
+                               );
+                               PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN";
+                               PREBINDING = NO;
+                               PRODUCT_NAME = hb;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               SEPARATE_STRIP = YES;
+                               ZERO_LINK = NO;
+                       };
+                       name = UB;
+               };
+               0D88F56B0B6CDCD400F81F26 /* UB */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb";
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "";
+                               HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include";
+                               INSTALL_PATH = /usr/local/lib;
+                               MACOSX_DEPLOYMENT_TARGET = 10.3;
+                               OTHER_CFLAGS = (
+                                       "-D__LIBHB__",
+                                       "-DSYS_DARWIN",
+                                       "-DUSE_PTHREAD",
+                               );
+                               OTHER_LDFLAGS = "";
+                               PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN";
+                               PREBINDING = NO;
+                               PRODUCT_NAME = hb;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               ZERO_LINK = NO;
+                       };
+                       name = UB;
+               };
+               0D88F56C0B6CDCD400F81F26 /* UB */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               APPCAST_URL = "";
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/..";
+                               CURRENT_PROJECT_VERSION = "";
+                               FRAMEWORK_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
+                                       "$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",
+                               );
+                               FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\"";
+                               FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)\"";
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               GCC_TREAT_WARNINGS_AS_ERRORS = NO;
+                               HEADER_SEARCH_PATHS = (
+                                       ../libhb,
+                                       ../contrib/include,
+                               );
+                               INFOPLIST_FILE = HandBrake.plist;
+                               LIBRARY_SEARCH_PATHS = "";
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = (
+                                       ../libhb/libhb.a,
+                                       ../contrib/lib/libmp4v2.a,
+                                       ../contrib/lib/liba52.a,
+                                       ../contrib/lib/libavformat.a,
+                                       ../contrib/lib/libavcodec.a,
+                                       ../contrib/lib/libavutil.a,
+                                       ../contrib/lib/libdvdread.a,
+                                       ../contrib/lib/libfaac.a,
+                                       ../contrib/lib/libmp3lame.a,
+                                       ../contrib/lib/libmpeg2.a,
+                                       ../contrib/lib/libvorbis.a,
+                                       ../contrib/lib/libvorbisenc.a,
+                                       ../contrib/lib/libogg.a,
+                                       ../contrib/lib/libsamplerate.a,
+                                       ../contrib/lib/libx264.a,
+                                       ../contrib/lib/libxvidcore.a,
+                                       ../contrib/lib/libdca.a,
+                                       ../contrib/lib/libmkv.a,
+                                       ../contrib/lib/libswscale.a,
+                                       ../contrib/lib/libtheora.a,
+                                       ../contrib/lib/libfaad.a,
+                                       "-lbz2",
+                               );
+                               PRODUCT_NAME = HandBrake;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = (
+                                       "-Wmost",
+                                       "-Wno-four-char-constants",
+                                       "-Wno-unknown-pragmas",
+                               );
+                               WRAPPER_EXTENSION = app;
+                       };
+                       name = UB;
+               };
+               0D88F56E0B6CDCD400F81F26 /* UB */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = ..;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               HEADER_SEARCH_PATHS = ../libhb;
+                               INSTALL_PATH = /usr/local/bin;
+                               LIBRARY_SEARCH_PATHS = "";
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = (
+                                       ../libhb/libhb.a,
+                                       ../contrib/lib/libmp4v2.a,
+                                       ../contrib/lib/liba52.a,
+                                       ../contrib/lib/libavformat.a,
+                                       ../contrib/lib/libavcodec.a,
+                                       ../contrib/lib/libavutil.a,
+                                       ../contrib/lib/libdvdread.a,
+                                       ../contrib/lib/libfaac.a,
+                                       ../contrib/lib/libmp3lame.a,
+                                       ../contrib/lib/libmpeg2.a,
+                                       ../contrib/lib/libvorbis.a,
+                                       ../contrib/lib/libvorbisenc.a,
+                                       ../contrib/lib/libogg.a,
+                                       ../contrib/lib/libsamplerate.a,
+                                       ../contrib/lib/libx264.a,
+                                       ../contrib/lib/libxvidcore.a,
+                                       "-lz",
+                                       ../contrib/lib/libdca.a,
+                                       ../contrib/lib/libmkv.a,
+                                       ../contrib/lib/libswscale.a,
+                                       ../contrib/lib/libtheora.a,
+                                       ../contrib/lib/libfaad.a,
+                                       "-lbz2",
+                               );
+                               PREBINDING = NO;
+                               PRODUCT_NAME = HandBrakeCLI;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               ZERO_LINK = NO;
+                       };
+                       name = UB;
+               };
+               0D88F56F0B6CDCD400F81F26 /* UB */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = (
+                                       ppc,
+                                       i386,
+                               );
+                               GCC_MODEL_TUNING = G5;
+                               GCC_PREPROCESSOR_DEFINITIONS = "JOB_GROUPS=1";
+                               IBC_NOTICES = NO;
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               OTHER_CFLAGS = "";
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                       };
+                       name = UB;
+               };
+               0DFF0B740B6BC70400549488 /* Development */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb";
+                               COPY_PHASE_STRIP = NO;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "";
+                               HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include";
+                               INSTALL_PATH = /usr/local/lib;
+                               MACOSX_DEPLOYMENT_TARGET = 10.3;
+                               OTHER_CFLAGS = (
+                                       "-D__LIBHB__",
+                                       "-DSYS_DARWIN",
+                                       "-DUSE_PTHREAD",
+                               );
+                               OTHER_LDFLAGS = "";
+                               PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN";
+                               PREBINDING = NO;
+                               PRODUCT_NAME = hb;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               ZERO_LINK = NO;
+                       };
+                       name = Development;
+               };
+               0DFF0B750B6BC70400549488 /* Deployment */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb";
+                               COPY_PHASE_STRIP = YES;
+                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 3;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "";
+                               HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include";
+                               INSTALL_PATH = /usr/local/lib;
+                               MACOSX_DEPLOYMENT_TARGET = 10.3;
+                               OTHER_CFLAGS = (
+                                       "-D__LIBHB__",
+                                       "-DSYS_DARWIN",
+                                       "-DUSE_PTHREAD",
+                               );
+                               OTHER_LDFLAGS = "";
+                               PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN";
+                               PREBINDING = NO;
+                               PRODUCT_NAME = hb;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               ZERO_LINK = NO;
+                       };
+                       name = Deployment;
+               };
+               0DFF0C0D0B6BCEE000549488 /* Development */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = ..;
+                               COPY_PHASE_STRIP = NO;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               HEADER_SEARCH_PATHS = ../libhb;
+                               INSTALL_PATH = /usr/local/bin;
+                               LIBRARY_SEARCH_PATHS = "";
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = (
+                                       ../libhb/libhb.a,
+                                       ../contrib/lib/libmp4v2.a,
+                                       ../contrib/lib/liba52.a,
+                                       ../contrib/lib/libavformat.a,
+                                       ../contrib/lib/libavcodec.a,
+                                       ../contrib/lib/libavutil.a,
+                                       ../contrib/lib/libdvdread.a,
+                                       ../contrib/lib/libfaac.a,
+                                       ../contrib/lib/libmp3lame.a,
+                                       ../contrib/lib/libmpeg2.a,
+                                       ../contrib/lib/libvorbis.a,
+                                       ../contrib/lib/libvorbisenc.a,
+                                       ../contrib/lib/libogg.a,
+                                       ../contrib/lib/libsamplerate.a,
+                                       ../contrib/lib/libx264.a,
+                                       ../contrib/lib/libxvidcore.a,
+                                       "-lz",
+                                       ../contrib/lib/libdca.a,
+                                       ../contrib/lib/libmkv.a,
+                                       ../contrib/lib/libswscale.a,
+                                       ../contrib/lib/libtheora.a,
+                                       ../contrib/lib/libfaad.a,
+                                       "-lbz2",
+                               );
+                               PREBINDING = NO;
+                               PRODUCT_NAME = HandBrakeCLI;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               ZERO_LINK = NO;
+                       };
+                       name = Development;
+               };
+               0DFF0C0E0B6BCEE000549488 /* Deployment */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = ..;
+                               COPY_PHASE_STRIP = YES;
+                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               HEADER_SEARCH_PATHS = ../libhb;
+                               INSTALL_PATH = /usr/local/bin;
+                               LIBRARY_SEARCH_PATHS = "";
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = (
+                                       ../libhb/libhb.a,
+                                       ../contrib/lib/libmp4v2.a,
+                                       ../contrib/lib/liba52.a,
+                                       ../contrib/lib/libavformat.a,
+                                       ../contrib/lib/libavcodec.a,
+                                       ../contrib/lib/libavutil.a,
+                                       ../contrib/lib/libdvdread.a,
+                                       ../contrib/lib/libfaac.a,
+                                       ../contrib/lib/libmp3lame.a,
+                                       ../contrib/lib/libmpeg2.a,
+                                       ../contrib/lib/libvorbis.a,
+                                       ../contrib/lib/libvorbisenc.a,
+                                       ../contrib/lib/libogg.a,
+                                       ../contrib/lib/libsamplerate.a,
+                                       ../contrib/lib/libx264.a,
+                                       ../contrib/lib/libxvidcore.a,
+                                       "-lz",
+                                       ../contrib/lib/libdca.a,
+                                       ../contrib/lib/libmkv.a,
+                                       ../contrib/lib/libswscale.a,
+                                       ../contrib/lib/libtheora.a,
+                                       ../contrib/lib/libfaad.a,
+                                       "-lbz2",
+                               );
+                               PREBINDING = NO;
+                               PRODUCT_NAME = HandBrakeCLI;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               ZERO_LINK = NO;
+                       };
+                       name = Deployment;
+               };
+               4D4E7BC1087804870051572B /* Development */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               APPCAST_URL = "";
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/..";
+                               COPY_PHASE_STRIP = NO;
+                               CURRENT_PROJECT_VERSION = "";
+                               FRAMEWORK_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
+                                       "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+                               );
+                               FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\"";
+                               FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)\"";
+                               FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
+                               GCC_DYNAMIC_NO_PIC = YES;
+                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_TREAT_WARNINGS_AS_ERRORS = NO;
+                               HEADER_SEARCH_PATHS = (
+                                       ../libhb,
+                                       ../contrib/include,
+                               );
+                               INFOPLIST_FILE = HandBrake.plist;
+                               INFOPLIST_PREPROCESS = NO;
+                               LIBRARY_SEARCH_PATHS = "";
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = (
+                                       ../libhb/libhb.a,
+                                       ../contrib/lib/libmp4v2.a,
+                                       ../contrib/lib/liba52.a,
+                                       ../contrib/lib/libavformat.a,
+                                       ../contrib/lib/libavcodec.a,
+                                       ../contrib/lib/libavutil.a,
+                                       ../contrib/lib/libdvdread.a,
+                                       ../contrib/lib/libfaac.a,
+                                       ../contrib/lib/libmp3lame.a,
+                                       ../contrib/lib/libmpeg2.a,
+                                       ../contrib/lib/libvorbis.a,
+                                       ../contrib/lib/libvorbisenc.a,
+                                       ../contrib/lib/libogg.a,
+                                       ../contrib/lib/libsamplerate.a,
+                                       ../contrib/lib/libx264.a,
+                                       ../contrib/lib/libxvidcore.a,
+                                       ../contrib/lib/libdca.a,
+                                       ../contrib/lib/libmkv.a,
+                                       ../contrib/lib/libswscale.a,
+                                       ../contrib/lib/libtheora.a,
+                                       ../contrib/lib/libfaad.a,
+                                       "-lbz2",
+                               );
+                               PRODUCT_NAME = HandBrake;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = (
+                                       "-Wmost",
+                                       "-Wno-four-char-constants",
+                                       "-Wno-unknown-pragmas",
+                               );
+                               WRAPPER_EXTENSION = app;
+                               ZERO_LINK = NO;
+                       };
+                       name = Development;
+               };
+               4D4E7BC2087804870051572B /* Deployment */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               APPCAST_URL = "";
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/..";
+                               COPY_PHASE_STRIP = YES;
+                               CURRENT_PROJECT_VERSION = "";
+                               FRAMEWORK_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
+                                       "$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",
+                               );
+                               FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\"";
+                               FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)\"";
+                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               GCC_TREAT_WARNINGS_AS_ERRORS = NO;
+                               HEADER_SEARCH_PATHS = (
+                                       ../libhb,
+                                       ../contrib/include,
+                               );
+                               INFOPLIST_FILE = HandBrake.plist;
+                               LIBRARY_SEARCH_PATHS = "";
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = (
+                                       ../libhb/libhb.a,
+                                       ../contrib/lib/libmp4v2.a,
+                                       ../contrib/lib/liba52.a,
+                                       ../contrib/lib/libavformat.a,
+                                       ../contrib/lib/libavcodec.a,
+                                       ../contrib/lib/libavutil.a,
+                                       ../contrib/lib/libdvdread.a,
+                                       ../contrib/lib/libfaac.a,
+                                       ../contrib/lib/libmp3lame.a,
+                                       ../contrib/lib/libmpeg2.a,
+                                       ../contrib/lib/libvorbis.a,
+                                       ../contrib/lib/libvorbisenc.a,
+                                       ../contrib/lib/libogg.a,
+                                       ../contrib/lib/libsamplerate.a,
+                                       ../contrib/lib/libx264.a,
+                                       ../contrib/lib/libxvidcore.a,
+                                       ../contrib/lib/libdca.a,
+                                       ../contrib/lib/libmkv.a,
+                                       ../contrib/lib/libswscale.a,
+                                       ../contrib/lib/libtheora.a,
+                                       ../contrib/lib/libfaad.a,
+                                       "-lbz2",
+                               );
+                               PRODUCT_NAME = HandBrake;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = (
+                                       "-Wmost",
+                                       "-Wno-four-char-constants",
+                                       "-Wno-unknown-pragmas",
+                               );
+                               WRAPPER_EXTENSION = app;
+                               ZERO_LINK = NO;
+                       };
+                       name = Deployment;
+               };
+               4D4E7BC5087804870051572B /* Development */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               DEBUG_INFORMATION_FORMAT = dwarf;
+                               GCC_DEBUGGING_SYMBOLS = default;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               IBC_NOTICES = NO;
+                               IBC_WARNINGS = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               OTHER_CFLAGS = "";
+                               PREBINDING = NO;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               ZERO_LINK = NO;
+                       };
+                       name = Development;
+               };
+               4D4E7BC6087804870051572B /* Deployment */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_MODEL_TUNING = G5;
+                               GCC_PREPROCESSOR_DEFINITIONS = "JOB_GROUPS=1";
+                               IBC_NOTICES = NO;
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               OTHER_CFLAGS = "";
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                       };
+                       name = Deployment;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+               0D096E650B707D5800A845D4 /* Build configuration list for PBXNativeTarget "libhb dlib" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               0D096E660B707D5800A845D4 /* Development */,
+                               0D096E670B707D5800A845D4 /* Deployment */,
+                               0D096E690B707D5800A845D4 /* UB */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Deployment;
+               };
+               0DFF0B730B6BC70400549488 /* Build configuration list for PBXNativeTarget "libhb" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               0DFF0B740B6BC70400549488 /* Development */,
+                               0DFF0B750B6BC70400549488 /* Deployment */,
+                               0D88F56B0B6CDCD400F81F26 /* UB */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Deployment;
+               };
+               0DFF0C0C0B6BCEE000549488 /* Build configuration list for PBXNativeTarget "HandBrakeCLI" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               0DFF0C0D0B6BCEE000549488 /* Development */,
+                               0DFF0C0E0B6BCEE000549488 /* Deployment */,
+                               0D88F56E0B6CDCD400F81F26 /* UB */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Deployment;
+               };
+               4D4E7BC0087804870051572B /* Build configuration list for PBXNativeTarget "HandBrake" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               4D4E7BC1087804870051572B /* Development */,
+                               4D4E7BC2087804870051572B /* Deployment */,
+                               0D88F56C0B6CDCD400F81F26 /* UB */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Deployment;
+               };
+               4D4E7BC4087804870051572B /* Build configuration list for PBXProject "HandBrake" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               4D4E7BC5087804870051572B /* Development */,
+                               4D4E7BC6087804870051572B /* Deployment */,
+                               0D88F56F0B6CDCD400F81F26 /* UB */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Deployment;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/macosx/InstantHandBrake/Device.h b/macosx/InstantHandBrake/Device.h
new file mode 100644 (file)
index 0000000..92a7f18
--- /dev/null
@@ -0,0 +1,27 @@
+//
+//  Preset.h
+//  InstantHandBrake
+//
+//  Created by Damiano Galassi on 15/01/08.
+//  This file is part of the HandBrake source code.
+//  Homepage: <http://handbrake.fr/>.
+//  It may be used under the terms of the GNU General Public License.
+//
+//
+
+#import <Cocoa/Cocoa.h>
+#import "Preset.h"
+
+
+@interface Device : NSObject <NSCoding> {
+    NSString            * deviceName;
+    NSMutableArray      * presetsArray;
+}
+
+- (id) initWithDeviceName:(NSString *) name;
+- (void) addPreset: (Preset *) preset;
+
+- (NSString *) name;
+- (Preset *) firstPreset;
+
+@end
diff --git a/macosx/InstantHandBrake/Device.m b/macosx/InstantHandBrake/Device.m
new file mode 100644 (file)
index 0000000..fec63de
--- /dev/null
@@ -0,0 +1,63 @@
+//
+//  Preset.h
+//  InstantHandBrake
+//
+//  Created by Damiano Galassi on 15/01/08.
+//  This file is part of the HandBrake source code.
+//  Homepage: <http://handbrake.fr/>.
+//  It may be used under the terms of the GNU General Public License.
+//
+//
+
+#import "Device.h"
+
+
+@implementation Device
+
+- (id)initWithDeviceName:(NSString *) name
+{
+    if (self = [super init])
+    {
+        deviceName = name;
+        presetsArray = [[NSMutableArray alloc] init];
+    }
+    return self;
+}
+
+- (void) dealloc
+{
+    [presetsArray release];
+    [super dealloc];
+}
+
+- (id) initWithCoder:(NSCoder *) coder
+{
+    deviceName = [[coder decodeObjectForKey:@"DeviceName"] retain];
+    presetsArray = [[coder decodeObjectForKey:@"Presets"] retain];
+    
+    return self;
+}
+
+- (void) encodeWithCoder:(NSCoder *)encoder
+{
+    [encoder encodeObject: deviceName forKey:@"DeviceName"];
+    [encoder encodeObject: presetsArray forKey:@"Presets"];
+}
+
+- (void) addPreset: (Preset *) preset
+{
+    [presetsArray addObject:preset];
+    [preset release];
+}
+
+- (NSString *) name
+{
+    return deviceName;
+}
+
+- (Preset *) firstPreset
+{
+    return [presetsArray objectAtIndex:0];
+}
+
+@end
diff --git a/macosx/InstantHandBrake/DeviceController.h b/macosx/InstantHandBrake/DeviceController.h
new file mode 100644 (file)
index 0000000..7f8b47c
--- /dev/null
@@ -0,0 +1,28 @@
+//
+//  DeviceController.h
+//  InstantHandBrake
+//
+//  Created by Damiano Galassi on 23/01/08.
+//  This file is part of the HandBrake source code.
+//  Homepage: <http://handbrake.fr/>.
+//  It may be used under the terms of the GNU General Public License.
+//
+//
+
+#import <Cocoa/Cocoa.h>
+#import "device.h"
+
+@interface DeviceController : NSObject {
+    NSMutableArray      *devicesArray;
+    NSString            *appSupportPath;
+}
+
+- (id)init;
+- (BOOL) loadDevices;
+- (BOOL) loadBuiltInDevices;
+- (id)populateList;
+- (NSArray *) devicesList;
+- (BOOL) saveDevices;
+
+
+@end
diff --git a/macosx/InstantHandBrake/DeviceController.m b/macosx/InstantHandBrake/DeviceController.m
new file mode 100644 (file)
index 0000000..0834bbc
--- /dev/null
@@ -0,0 +1,159 @@
+//
+//  DeviceController.m
+//  InstantHandBrake
+//
+//  Created by Damiano Galassi on 23/01/08.
+//  This file is part of the HandBrake source code.
+//  Homepage: <http://handbrake.fr/>.
+//  It may be used under the terms of the GNU General Public License.
+//
+//
+
+#import "DeviceController.h"
+#import "hb.h"
+
+@implementation DeviceController
+
+- (id)init
+{
+    if (self = [super init])
+    {
+        devicesArray = [[NSMutableArray alloc] init];
+        appSupportPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Application Support/Instant HandBrake"];
+        [self loadBuiltInDevices];
+        [self loadDevices];
+    }
+    return self;
+}
+
+- (void) dealloc
+{
+    [devicesArray release];
+    [super dealloc];
+}
+
+- (BOOL) loadBuiltInDevices
+{
+    NSBundle *bundle = [NSBundle mainBundle];
+    NSArray *path = [bundle pathsForResourcesOfType:@"ihbdevice" inDirectory:@"Devices"];
+
+    Device *newDevice;
+    NSString *file;
+    
+    NSEnumerator *dirEnum = [path objectEnumerator];
+    while (file = [dirEnum nextObject])
+    {
+        newDevice = [NSKeyedUnarchiver unarchiveObjectWithFile:file];
+        [devicesArray addObject:newDevice];
+    }
+    
+    if ( ![devicesArray count] )
+        return NO;
+    else
+        return YES;
+}
+
+- (BOOL) loadDevices
+{
+    NSString *file;
+    NSFileManager *fileManager = [NSFileManager defaultManager];
+    Device *newDevice;
+    
+    NSDirectoryEnumerator *dirEnum = [fileManager enumeratorAtPath:appSupportPath];
+    while (file = [dirEnum nextObject])
+    {
+        if ([[file pathExtension] isEqualToString: @"ihbdevice"])
+        {
+            newDevice = [NSKeyedUnarchiver unarchiveObjectWithFile:[appSupportPath stringByAppendingPathComponent:file]];
+            [devicesArray addObject:newDevice];
+        }
+    }
+    
+    if ( ![devicesArray count] )
+        return NO;
+    else
+        return YES;
+}
+
+/* Use this to create a new device preset for now */
+
+- (id) populateList
+{
+    [devicesArray addObject:[[Device alloc] initWithDeviceName: @"iPod"]];
+    [devicesArray addObject:[[Device alloc] initWithDeviceName: @"PSP"]];
+    [devicesArray addObject:[[Device alloc] initWithDeviceName: @"AppleTV"]];
+    
+    Preset *newPreset;
+    newPreset = [[Preset alloc] initWithMuxer: HB_MUX_IPOD
+                                   videoCodec: HB_VCODEC_X264
+                                 videoBitRate: 1500
+                            videoCodecOptions: @"bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:subq=6:no-fast-pskip=1:level=30"
+                                   audioCodec: HB_ACODEC_FAAC
+                                 audioBitrate: 128
+                              audioSampleRate: 48000
+                                     maxWidth: 640
+                                    maxHeight: 480
+                                   anamorphic: 0];
+    
+    [[devicesArray objectAtIndex:0] addPreset:newPreset];
+    
+    newPreset = [[Preset alloc] initWithMuxer: HB_MUX_MP4
+                                   videoCodec: HB_VCODEC_X264
+                                 videoBitRate: 600
+                            videoCodecOptions: @""
+                                   audioCodec: HB_ACODEC_FAAC
+                                 audioBitrate: 128
+                              audioSampleRate: 48000
+                                     maxWidth: 480
+                                    maxHeight: 272
+                                   anamorphic: 0];
+                                   
+    [[devicesArray objectAtIndex:1] addPreset:newPreset];
+    
+    newPreset = [[Preset alloc] initWithMuxer: HB_MUX_MP4
+                                   videoCodec: HB_VCODEC_X264
+                                 videoBitRate: 2500
+                            videoCodecOptions: @"bframes=3:ref=1:subq=5:me=umh:no-fast-pskip=1:trellis=1:cabac=0"
+                                   audioCodec: HB_ACODEC_FAAC
+                                 audioBitrate: 160
+                              audioSampleRate: 48000
+                                     maxWidth: 720
+                                    maxHeight: 576
+                                   anamorphic: 1];
+                                   
+    [[devicesArray objectAtIndex:2] addPreset:newPreset];
+}
+
+- (NSArray *) devicesList
+{
+    NSArray *deviceList = [devicesArray copy];
+    [deviceList autorelease];
+    
+    return deviceList;
+}
+
+- (BOOL) saveDevices
+{
+    NSFileManager *fileManager = [NSFileManager defaultManager];
+    BOOL noErr = YES;
+    
+    if( ![fileManager fileExistsAtPath:appSupportPath] )
+        [fileManager createDirectoryAtPath:appSupportPath attributes:nil];
+    
+    NSEnumerator *enumerator;
+    Device *object;
+    enumerator = [devicesArray objectEnumerator];
+    
+    while( object = [enumerator nextObject] )
+    {
+        NSString * saveLocation = [NSString stringWithFormat:@"%@/%@.ihbdevice", appSupportPath, [object name]];
+        if (![fileManager fileExistsAtPath:saveLocation]) 
+        {
+            noErr = [NSKeyedArchiver archiveRootObject:object
+                        toFile:saveLocation];
+        }
+    }
+    return noErr;
+}
+
+@end
diff --git a/macosx/InstantHandBrake/Devices/AppleTV.ihbdevice b/macosx/InstantHandBrake/Devices/AppleTV.ihbdevice
new file mode 100644 (file)
index 0000000..3375fe5
Binary files /dev/null and b/macosx/InstantHandBrake/Devices/AppleTV.ihbdevice differ
diff --git a/macosx/InstantHandBrake/Devices/PSP.ihbdevice b/macosx/InstantHandBrake/Devices/PSP.ihbdevice
new file mode 100644 (file)
index 0000000..aadda3d
Binary files /dev/null and b/macosx/InstantHandBrake/Devices/PSP.ihbdevice differ
diff --git a/macosx/InstantHandBrake/Devices/iPod.ihbdevice b/macosx/InstantHandBrake/Devices/iPod.ihbdevice
new file mode 100644 (file)
index 0000000..61357e0
Binary files /dev/null and b/macosx/InstantHandBrake/Devices/iPod.ihbdevice differ
diff --git a/macosx/InstantHandBrake/DriveDetector.h b/macosx/InstantHandBrake/DriveDetector.h
new file mode 100644 (file)
index 0000000..a00f773
--- /dev/null
@@ -0,0 +1,23 @@
+/* DriveDetector.h $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#import <Cocoa/Cocoa.h>
+
+@interface DriveDetector : NSObject
+{
+    id                  fTarget;
+    SEL                 fSelector;
+    
+    int                 fCount;
+    NSMutableDictionary * fDrives;
+    NSTimer             * fTimer;
+}
+
+- (id)   initWithCallback: (id) target selector: (SEL) selector;
+- (void) run;
+- (void) stop;
+
+@end
diff --git a/macosx/InstantHandBrake/DriveDetector.m b/macosx/InstantHandBrake/DriveDetector.m
new file mode 100644 (file)
index 0000000..e9fe121
--- /dev/null
@@ -0,0 +1,142 @@
+/* DriveDetector.m $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include <paths.h>
+#include <IOKit/IOKitLib.h>
+#include <IOKit/IOBSD.h>
+#include <IOKit/storage/IOMedia.h>
+#include <IOKit/storage/IODVDMedia.h>
+
+#include "DriveDetector.h"
+#include "hb.h"
+
+@interface DriveDetector (Private)
+
+- (void) detectTimer: (NSTimer *) timer;
+
+@end
+
+@implementation DriveDetector
+
+- (void) dealloc
+{
+    [fDrives release];
+    [super dealloc];
+}
+
+- (id) initWithCallback: (id) target selector: (SEL) selector
+{
+    fTarget   = target;
+    fSelector = selector;
+    
+    fCount  = -1;
+    fDrives = [[NSMutableDictionary alloc] initWithCapacity: 1];
+    
+    return self;
+}
+
+- (void) run
+{
+    /* Set up a timer to check devices every second */
+    fTimer = [NSTimer scheduledTimerWithTimeInterval: 2.0 target: self
+        selector: @selector( detectTimer: ) userInfo: nil repeats: YES];
+    [[NSRunLoop currentRunLoop] addTimer: fTimer forMode:
+        NSModalPanelRunLoopMode];
+
+    /* Do a first update right away */
+    [fTimer fire];
+}
+
+- (void) stop
+{
+    [fTimer invalidate];
+}
+
+- (void) detectTimer: (NSTimer *) timer
+{
+    /* Scan DVD drives (stolen from VLC) */
+    io_object_t            next_media;
+    mach_port_t            master_port;
+    kern_return_t          kern_result;
+    io_iterator_t          media_iterator;
+    CFMutableDictionaryRef classes_to_match;
+
+    kern_result = IOMasterPort( MACH_PORT_NULL, &master_port );
+    if( kern_result != KERN_SUCCESS )
+    {
+        return;
+    }
+
+    classes_to_match = IOServiceMatching( kIODVDMediaClass );
+    if( classes_to_match == NULL )
+    {
+        return;
+    }
+
+    CFDictionarySetValue( classes_to_match, CFSTR( kIOMediaEjectableKey ),
+                          kCFBooleanTrue );
+
+    kern_result = IOServiceGetMatchingServices( master_port,
+            classes_to_match, &media_iterator );
+    if( kern_result != KERN_SUCCESS )
+    {
+        return;
+    }
+
+    [fDrives removeAllObjects];
+
+    next_media = IOIteratorNext( media_iterator );
+    if( next_media )
+    {
+        char * name;
+        char psz_buf[0x32];
+        size_t dev_path_length;
+        CFTypeRef str_bsd_path;
+        do
+        {
+            str_bsd_path =
+                IORegistryEntryCreateCFProperty( next_media,
+                                                 CFSTR( kIOBSDNameKey ),
+                                                 kCFAllocatorDefault,
+                                                 0 );
+            if( str_bsd_path == NULL )
+            {
+                IOObjectRelease( next_media );
+                continue;
+            }
+
+            snprintf( psz_buf, sizeof(psz_buf), "%s%c", _PATH_DEV, 'r' );
+            dev_path_length = strlen( psz_buf );
+
+            if( CFStringGetCString( (CFStringRef) str_bsd_path,
+                                    (char*)&psz_buf + dev_path_length,
+                                    sizeof(psz_buf) - dev_path_length,
+                                    kCFStringEncodingASCII ) )
+            {
+                if( ( name = hb_dvd_name( psz_buf ) ) )
+                {
+                    [fDrives setObject: [NSString stringWithCString: psz_buf]
+                        forKey: [NSString stringWithCString: name]];
+                }
+            }
+
+            CFRelease( str_bsd_path );
+
+            IOObjectRelease( next_media );
+
+        } while( ( next_media = IOIteratorNext( media_iterator ) ) );
+    }
+
+    IOObjectRelease( media_iterator );
+
+    if( [fDrives count] != fCount )
+    {
+        [fTarget performSelector: fSelector withObject: fDrives];
+        fCount = [fDrives count];
+    }
+}
+
+@end
diff --git a/macosx/InstantHandBrake/English.lproj/Express.xib b/macosx/InstantHandBrake/English.lproj/Express.xib
new file mode 100644 (file)
index 0000000..004cffa
--- /dev/null
@@ -0,0 +1,5131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.01">
+       <data>
+               <int key="IBDocument.SystemTarget">1050</int>
+               <string key="IBDocument.SystemVersion">9B18</string>
+               <string key="IBDocument.InterfaceBuilderVersion">629</string>
+               <string key="IBDocument.AppKitVersion">949</string>
+               <string key="IBDocument.HIToolboxVersion">343.00</string>
+               <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <integer value="259"/>
+                       <integer value="57"/>
+                       <integer value="248"/>
+               </object>
+               <object class="NSArray" key="IBDocument.PluginDependencies">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <string id="233394260">com.apple.InterfaceBuilder.CocoaPlugin</string>
+               </object>
+               <object class="NSMutableArray" key="IBDocument.RootObjects" id="596629462">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <object class="NSCustomObject" id="529790172">
+                               <object class="NSMutableString" key="NSClassName">
+                                       <characters key="NS.bytes">NSApplication</characters>
+                               </object>
+                       </object>
+                       <object class="NSCustomObject" id="766494232">
+                               <string key="NSClassName" id="423379096">FirstResponder</string>
+                       </object>
+                       <object class="NSCustomObject" id="675932571">
+                               <string key="NSClassName">NSApplication</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="387516152">
+                               <int key="NSWindowStyleMask">7</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{125, 826}, {213, 107}}</string>
+                               <int key="NSWTFlags">1881669632</int>
+                               <string key="NSWindowTitle" id="983961764">Instant HandBrake</string>
+                               <string key="NSWindowClass" id="16484047">NSWindow</string>
+                               <object class="NSMutableString" key="NSViewClass">
+                                       <characters key="NS.bytes">View</characters>
+                               </object>
+                               <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <string key="NSWindowContentMinSize">{213, 107}</string>
+                               <object class="NSView" key="NSWindowView" id="1703136">
+                                       <nil key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <string key="NSFrameSize">{213, 107}</string>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
+                               <string key="NSMinSize">{213, 129}</string>
+                               <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                       </object>
+                       <object class="NSMenu" id="168342202">
+                               <string key="NSTitle">Embedded</string>
+                               <object class="NSMutableArray" key="NSMenuItems">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSMenuItem" id="310264544">
+                                               <reference key="NSMenu" ref="168342202"/>
+                                               <reference key="NSTitle" ref="983961764"/>
+                                               <string key="NSKeyEquiv" id="554915519"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <object class="NSCustomResource" key="NSOnImage" id="258048823">
+                                                       <string key="NSClassName" id="23728786">NSImage</string>
+                                                       <string key="NSResourceName">NSMenuCheckmark</string>
+                                               </object>
+                                               <object class="NSCustomResource" key="NSMixedImage" id="816798025">
+                                                       <reference key="NSClassName" ref="23728786"/>
+                                                       <string key="NSResourceName">NSMenuMixedState</string>
+                                               </object>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="204695612">
+                                                       <reference key="NSTitle" ref="983961764"/>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="116469247">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <string key="NSTitle">About Instant HandBrake</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="840995182">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <string type="base64-UTF8" key="NSTitle">Q2hlY2sgZm9yIFVwZGF0ZeKApg</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="695986656">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <reference key="NSTitle" ref="554915519"/>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="1057810002">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <string type="base64-UTF8" key="NSTitle">UHJlZmVyZW5jZXPigKY</string>
+                                                                       <string key="NSKeyEquiv">,</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="449764258">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <reference key="NSTitle" ref="554915519"/>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="621359928">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <string key="NSTitle">Services</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                                       <string key="NSAction">submenuAction:</string>
+                                                                       <object class="NSMenu" key="NSSubmenu" id="414798761">
+                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                       <characters key="NS.bytes">Services</characters>
+                                                                               </object>
+                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               </object>
+                                                                               <string key="NSName">_NSServicesMenu</string>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="354604539">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <reference key="NSTitle" ref="554915519"/>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="120902271">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <string key="NSTitle">Hide Instant HandBrake</string>
+                                                                       <string key="NSKeyEquiv" id="299777839">h</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="832371069">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <string key="NSTitle">Hide Others</string>
+                                                                       <reference key="NSKeyEquiv" ref="299777839"/>
+                                                                       <int key="NSKeyEquivModMask">1572864</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="256307932">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <string key="NSTitle">Show All</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="252085536">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <reference key="NSTitle" ref="554915519"/>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="453993541">
+                                                                       <reference key="NSMenu" ref="204695612"/>
+                                                                       <string key="NSTitle">Quit Instant HandBrake</string>
+                                                                       <string key="NSKeyEquiv">q</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSName">_NSAppleMenu</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMenuItem" id="384779904">
+                                               <reference key="NSMenu" ref="168342202"/>
+                                               <string key="NSTitle">File</string>
+                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="258048823"/>
+                                               <reference key="NSMixedImage" ref="816798025"/>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="988316125">
+                                                       <object class="NSMutableString" key="NSTitle">
+                                                               <characters key="NS.bytes">File</characters>
+                                                       </object>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="1061253306">
+                                                                       <reference key="NSMenu" ref="988316125"/>
+                                                                       <string key="NSTitle">New</string>
+                                                                       <string key="NSKeyEquiv">n</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="773633184">
+                                                                       <reference key="NSMenu" ref="988316125"/>
+                                                                       <string type="base64-UTF8" key="NSTitle">T3BlbuKApg</string>
+                                                                       <string key="NSKeyEquiv">o</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="175884675">
+                                                                       <reference key="NSMenu" ref="988316125"/>
+                                                                       <string key="NSTitle">Open Recent</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                                       <string key="NSAction">submenuAction:</string>
+                                                                       <object class="NSMenu" key="NSSubmenu" id="675797001">
+                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                       <characters key="NS.bytes">Open Recent</characters>
+                                                                               </object>
+                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSMenuItem" id="354436703">
+                                                                                               <reference key="NSMenu" ref="675797001"/>
+                                                                                               <string key="NSTitle">Clear Menu</string>
+                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <string key="NSName">_NSRecentDocumentsMenu</string>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="116479453">
+                                                                       <reference key="NSMenu" ref="988316125"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <reference key="NSTitle" ref="554915519"/>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="817926297">
+                                                                       <reference key="NSMenu" ref="988316125"/>
+                                                                       <string key="NSTitle">Close</string>
+                                                                       <string key="NSKeyEquiv">w</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="354780417">
+                                                                       <reference key="NSMenu" ref="988316125"/>
+                                                                       <string key="NSTitle">Save</string>
+                                                                       <string key="NSKeyEquiv">s</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="93604882">
+                                                                       <reference key="NSMenu" ref="988316125"/>
+                                                                       <string type="base64-UTF8" key="NSTitle">U2F2ZSBBc+KApg</string>
+                                                                       <string key="NSKeyEquiv">S</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="944528127">
+                                                                       <reference key="NSMenu" ref="988316125"/>
+                                                                       <string key="NSTitle">Revert</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="109035207">
+                                                                       <reference key="NSMenu" ref="988316125"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <reference key="NSTitle" ref="554915519"/>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="633208303">
+                                                                       <reference key="NSMenu" ref="988316125"/>
+                                                                       <string type="base64-UTF8" key="NSTitle">UGFnZSBTZXR1cOKApg</string>
+                                                                       <string key="NSKeyEquiv">P</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="492993447">
+                                                                       <reference key="NSMenu" ref="988316125"/>
+                                                                       <string type="base64-UTF8" key="NSTitle">UHJpbnTigKY</string>
+                                                                       <string key="NSKeyEquiv">p</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSMenuItem" id="492425210">
+                                               <reference key="NSMenu" ref="168342202"/>
+                                               <string key="NSTitle">Edit</string>
+                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="258048823"/>
+                                               <reference key="NSMixedImage" ref="816798025"/>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="862115934">
+                                                       <object class="NSMutableString" key="NSTitle">
+                                                               <characters key="NS.bytes">Edit</characters>
+                                                       </object>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="605587333">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <string key="NSTitle">Undo</string>
+                                                                       <string key="NSKeyEquiv">z</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="370536361">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <string key="NSTitle">Redo</string>
+                                                                       <string key="NSKeyEquiv">Z</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="113236993">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <reference key="NSTitle" ref="554915519"/>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="128935717">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <string key="NSTitle">Cut</string>
+                                                                       <string key="NSKeyEquiv">x</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="548705799">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <string key="NSTitle">Copy</string>
+                                                                       <string key="NSKeyEquiv">c</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="208999334">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <string key="NSTitle">Paste</string>
+                                                                       <string key="NSKeyEquiv">v</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="82280793">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <string key="NSTitle">Paste and Match Style</string>
+                                                                       <string key="NSKeyEquiv">V</string>
+                                                                       <int key="NSKeyEquivModMask">1572864</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="60197220">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <string key="NSTitle">Delete</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="704469431">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <string key="NSTitle">Select All</string>
+                                                                       <string key="NSKeyEquiv">a</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="676435822">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <reference key="NSTitle" ref="554915519"/>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="101861958">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <string key="NSTitle">Find</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                                       <string key="NSAction">submenuAction:</string>
+                                                                       <object class="NSMenu" key="NSSubmenu" id="290694843">
+                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                       <characters key="NS.bytes">Find</characters>
+                                                                               </object>
+                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSMenuItem" id="486792374">
+                                                                                               <reference key="NSMenu" ref="290694843"/>
+                                                                                               <string type="base64-UTF8" key="NSTitle">RmluZOKApg</string>
+                                                                                               <string key="NSKeyEquiv">f</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                               <int key="NSTag">1</int>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="416590091">
+                                                                                               <reference key="NSMenu" ref="290694843"/>
+                                                                                               <string key="NSTitle">Find Next</string>
+                                                                                               <string key="NSKeyEquiv">g</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                               <int key="NSTag">2</int>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="1058311499">
+                                                                                               <reference key="NSMenu" ref="290694843"/>
+                                                                                               <string key="NSTitle">Find Previous</string>
+                                                                                               <string key="NSKeyEquiv">G</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                               <int key="NSTag">3</int>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="706475887">
+                                                                                               <reference key="NSMenu" ref="290694843"/>
+                                                                                               <string key="NSTitle">Use Selection for Find</string>
+                                                                                               <string key="NSKeyEquiv">e</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                               <int key="NSTag">7</int>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="828049674">
+                                                                                               <reference key="NSMenu" ref="290694843"/>
+                                                                                               <string key="NSTitle">Jump to Selection</string>
+                                                                                               <string key="NSKeyEquiv">j</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="593397208">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <string key="NSTitle" id="340605502">Spelling</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                                       <string key="NSAction">submenuAction:</string>
+                                                                       <object class="NSMenu" key="NSSubmenu" id="525385576">
+                                                                               <reference key="NSTitle" ref="340605502"/>
+                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSMenuItem" id="929731840">
+                                                                                               <reference key="NSMenu" ref="525385576"/>
+                                                                                               <string type="base64-UTF8" key="NSTitle">U3BlbGxpbmfigKY</string>
+                                                                                               <string key="NSKeyEquiv">:</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="182161666">
+                                                                                               <reference key="NSMenu" ref="525385576"/>
+                                                                                               <string key="NSTitle">Check Spelling</string>
+                                                                                               <string key="NSKeyEquiv">;</string>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="308562408">
+                                                                                               <reference key="NSMenu" ref="525385576"/>
+                                                                                               <string key="NSTitle">Check Spelling as You Type</string>
+                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="258300456">
+                                                                       <reference key="NSMenu" ref="862115934"/>
+                                                                       <string key="NSTitle" id="221412796">Speech</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                                       <string key="NSAction">submenuAction:</string>
+                                                                       <object class="NSMenu" key="NSSubmenu" id="1043252385">
+                                                                               <reference key="NSTitle" ref="221412796"/>
+                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSMenuItem" id="246223398">
+                                                                                               <reference key="NSMenu" ref="1043252385"/>
+                                                                                               <string key="NSTitle">Start Speaking</string>
+                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                       </object>
+                                                                                       <object class="NSMenuItem" id="88993156">
+                                                                                               <reference key="NSMenu" ref="1043252385"/>
+                                                                                               <string key="NSTitle">Stop Speaking</string>
+                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSMenuItem" id="420115045">
+                                               <reference key="NSMenu" ref="168342202"/>
+                                               <string key="NSTitle" id="852936394">Window</string>
+                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="258048823"/>
+                                               <reference key="NSMixedImage" ref="816798025"/>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="1068274357">
+                                                       <object class="NSMutableString" key="NSTitle">
+                                                               <characters key="NS.bytes">Window</characters>
+                                                       </object>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="411462580">
+                                                                       <reference key="NSMenu" ref="1068274357"/>
+                                                                       <string key="NSTitle">Minimize</string>
+                                                                       <string key="NSKeyEquiv">m</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="521550646">
+                                                                       <reference key="NSMenu" ref="1068274357"/>
+                                                                       <string key="NSTitle">Zoom</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="593776241">
+                                                                       <reference key="NSMenu" ref="1068274357"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <reference key="NSTitle" ref="554915519"/>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="97713116">
+                                                                       <reference key="NSMenu" ref="1068274357"/>
+                                                                       <string key="NSTitle">Bring All to Front</string>
+                                                                       <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSName">_NSWindowsMenu</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMenuItem" id="968817846">
+                                               <reference key="NSMenu" ref="168342202"/>
+                                               <string key="NSTitle">Help</string>
+                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="258048823"/>
+                                               <reference key="NSMixedImage" ref="816798025"/>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="839389072">
+                                                       <object class="NSMutableString" key="NSTitle">
+                                                               <characters key="NS.bytes">Help</characters>
+                                                       </object>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="418274352">
+                                                                       <reference key="NSMenu" ref="839389072"/>
+                                                                       <string key="NSTitle">Instant HandBrake Help</string>
+                                                                       <string key="NSKeyEquiv">?</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="258048823"/>
+                                                                       <reference key="NSMixedImage" ref="816798025"/>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSName">_NSMainMenu</string>
+                       </object>
+                       <object class="NSCustomView" id="731167877">
+                               <reference key="NSNextResponder"/>
+                               <int key="NSvFlags">256</int>
+                               <object class="NSMutableArray" key="NSSubviews">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSTextField" id="989775410">
+                                               <reference key="NSNextResponder" ref="731167877"/>
+                                               <int key="NSvFlags">268</int>
+                                               <string key="NSFrame">{{17, 185}, {99, 17}}</string>
+                                               <reference key="NSSuperview" ref="731167877"/>
+                                               <reference key="NSWindow"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="557238685">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">272629760</int>
+                                                       <string key="NSContents">Select a Source</string>
+                                                       <object class="NSFont" key="NSSupport" id="889564864">
+                                                               <string key="NSName" id="836411727">LucidaGrande</string>
+                                                               <double key="NSSize">1.300000e+01</double>
+                                                               <int key="NSfFlags">1044</int>
+                                                       </object>
+                                                       <reference key="NSControlView" ref="989775410"/>
+                                                       <object class="NSColor" key="NSBackgroundColor" id="789448078">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName" id="782690597">System</string>
+                                                               <string key="NSColorName">controlColor</string>
+                                                               <object class="NSColor" key="NSColor" id="677155824">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <object class="NSColor" key="NSTextColor" id="268986666">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <reference key="NSCatalogName" ref="782690597"/>
+                                                               <string key="NSColorName">controlTextColor</string>
+                                                               <object class="NSColor" key="NSColor" id="782009920">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MAA</bytes>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSButton" id="350715131">
+                                               <reference key="NSNextResponder" ref="731167877"/>
+                                               <int key="NSvFlags">289</int>
+                                               <string key="NSFrame">{{295, 12}, {79, 32}}</string>
+                                               <reference key="NSSuperview" ref="731167877"/>
+                                               <reference key="NSWindow"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSButtonCell" key="NSCell" id="116282848">
+                                                       <int key="NSCellFlags">-2080244224</int>
+                                                       <int key="NSCellFlags2">134217728</int>
+                                                       <string key="NSContents">Open</string>
+                                                       <reference key="NSSupport" ref="889564864"/>
+                                                       <reference key="NSControlView" ref="350715131"/>
+                                                       <int key="NSButtonFlags">-2038284033</int>
+                                                       <int key="NSButtonFlags2">1</int>
+                                                       <reference key="NSAlternateImage" ref="889564864"/>
+                                                       <reference key="NSAlternateContents" ref="554915519"/>
+                                                       <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
+                                                       <int key="NSPeriodicDelay">200</int>
+                                                       <int key="NSPeriodicInterval">25</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSBox" id="905380397">
+                                               <reference key="NSNextResponder" ref="731167877"/>
+                                               <int key="NSvFlags">268</int>
+                                               <object class="NSMutableArray" key="NSSubviews">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSView" id="62254939">
+                                                               <reference key="NSNextResponder" ref="905380397"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <object class="NSMatrix" id="238927539">
+                                                                               <reference key="NSNextResponder" ref="62254939"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{13, 41}, {135, 57}}</string>
+                                                                               <reference key="NSSuperview" ref="62254939"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <int key="NSNumRows">2</int>
+                                                                               <int key="NSNumCols">1</int>
+                                                                               <object class="NSMutableArray" key="NSCells">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSButtonCell" id="387240670">
+                                                                                               <int key="NSCellFlags">-2080244224</int>
+                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                               <string key="NSContents">DVD Drive:</string>
+                                                                                               <reference key="NSSupport" ref="889564864"/>
+                                                                                               <reference key="NSControlView" ref="238927539"/>
+                                                                                               <int key="NSButtonFlags">1211912703</int>
+                                                                                               <int key="NSButtonFlags2">0</int>
+                                                                                               <object class="NSButtonImageSource" key="NSAlternateImage" id="64284579">
+                                                                                                       <string key="NSImageName">NSRadioButton</string>
+                                                                                               </object>
+                                                                                               <object class="NSMutableString" key="NSAlternateContents" id="118433709">
+                                                                                                       <characters key="NS.bytes"/>
+                                                                                               </object>
+                                                                                               <reference key="NSKeyEquivalent" ref="118433709"/>
+                                                                                               <int key="NSPeriodicDelay">200</int>
+                                                                                               <int key="NSPeriodicInterval">25</int>
+                                                                                       </object>
+                                                                                       <object class="NSButtonCell" id="19238775">
+                                                                                               <int key="NSCellFlags">67239424</int>
+                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                               <string key="NSContents">DVD Folder / File:</string>
+                                                                                               <reference key="NSSupport" ref="889564864"/>
+                                                                                               <int key="NSTag">1</int>
+                                                                                               <reference key="NSControlView" ref="238927539"/>
+                                                                                               <int key="NSButtonFlags">1211912703</int>
+                                                                                               <int key="NSButtonFlags2">0</int>
+                                                                                               <reference key="NSAlternateImage" ref="64284579"/>
+                                                                                               <reference key="NSAlternateContents" ref="118433709"/>
+                                                                                               <reference key="NSKeyEquivalent" ref="118433709"/>
+                                                                                               <int key="NSPeriodicDelay">200</int>
+                                                                                               <int key="NSPeriodicInterval">25</int>
+                                                                                       </object>
+                                                                               </object>
+                                                                               <string key="NSCellSize">{135, 18}</string>
+                                                                               <string key="NSIntercellSpacing">{4, 21}</string>
+                                                                               <int key="NSMatrixFlags">1143472128</int>
+                                                                               <string key="NSCellClass">NSActionCell</string>
+                                                                               <object class="NSButtonCell" key="NSProtoCell" id="280254324">
+                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                       <string key="NSContents">Radio</string>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <int key="NSButtonFlags">1211912703</int>
+                                                                                       <int key="NSButtonFlags2">0</int>
+                                                                                       <object class="NSImage" key="NSNormalImage">
+                                                                                               <int key="NSImageFlags">549453824</int>
+                                                                                               <string key="NSSize">{18, 18}</string>
+                                                                                               <object class="NSMutableArray" key="NSReps">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <object class="NSArray">
+                                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                               <integer value="0"/>
+                                                                                                               <object class="NSBitmapImageRep">
+                                                                                                                       <object class="NSData" key="NSTIFFRepresentation">
+                                                                                                                               <bytes key="NS.bytes">TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw
+IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/
+29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5
+dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA
+AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG
+AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/
+0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/
+7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/
+5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/
+3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD
+AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns
+AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/
+6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/
+/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/
+///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl
+YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA
+AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD
+AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu
+AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB
+AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES
+AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABBxwAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS
+AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
+                                                                                                                       </object>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <object class="NSColor" key="NSColor">
+                                                                                                       <int key="NSColorSpace">3</int>
+                                                                                                       <bytes key="NSWhite">MCAwAA</bytes>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <reference key="NSAlternateImage" ref="64284579"/>
+                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                               </object>
+                                                                               <reference key="NSSelectedCell" ref="387240670"/>
+                                                                               <reference key="NSBackgroundColor" ref="789448078"/>
+                                                                               <object class="NSColor" key="NSCellBackgroundColor" id="180837716">
+                                                                                       <int key="NSColorSpace">3</int>
+                                                                                       <bytes key="NSWhite">MQA</bytes>
+                                                                               </object>
+                                                                               <reference key="NSFont" ref="889564864"/>
+                                                                       </object>
+                                                                       <object class="NSPopUpButton" id="931746997">
+                                                                               <reference key="NSNextResponder" ref="62254939"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{153, 75}, {181, 26}}</string>
+                                                                               <reference key="NSSuperview" ref="62254939"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="699666019">
+                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="931746997"/>
+                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                       <reference key="NSAlternateImage" ref="889564864"/>
+                                                                                       <reference key="NSAlternateContents" ref="554915519"/>
+                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                               <characters key="NS.bytes"/>
+                                                                                       </object>
+                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="814346452">
+                                                                                               <reference key="NSMenu" ref="555581872"/>
+                                                                                               <string key="NSTitle">Item1</string>
+                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <int key="NSState">1</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                               <reference key="NSTarget" ref="699666019"/>
+                                                                                       </object>
+                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                       <object class="NSMenu" key="NSMenu" id="555581872">
+                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                               </object>
+                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <reference ref="814346452"/>
+                                                                                                       <object class="NSMenuItem" id="874029565">
+                                                                                                               <reference key="NSMenu" ref="555581872"/>
+                                                                                                               <string key="NSTitle">Item2</string>
+                                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="699666019"/>
+                                                                                                       </object>
+                                                                                                       <object class="NSMenuItem" id="287885753">
+                                                                                                               <reference key="NSMenu" ref="555581872"/>
+                                                                                                               <string key="NSTitle">Item3</string>
+                                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="699666019"/>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                       <int key="NSArrowPosition">1</int>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSTextField" id="760276484">
+                                                                               <reference key="NSNextResponder" ref="62254939"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{156, 40}, {175, 22}}</string>
+                                                                               <reference key="NSSuperview" ref="62254939"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSTextFieldCell" key="NSCell" id="3304954">
+                                                                                       <int key="NSCellFlags">-1804468671</int>
+                                                                                       <int key="NSCellFlags2">272630784</int>
+                                                                                       <reference key="NSContents" ref="554915519"/>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="760276484"/>
+                                                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                                                       <object class="NSColor" key="NSBackgroundColor" id="696584221">
+                                                                                               <int key="NSColorSpace">6</int>
+                                                                                               <reference key="NSCatalogName" ref="782690597"/>
+                                                                                               <string key="NSColorName">textBackgroundColor</string>
+                                                                                               <reference key="NSColor" ref="180837716"/>
+                                                                                       </object>
+                                                                                       <object class="NSColor" key="NSTextColor">
+                                                                                               <int key="NSColorSpace">6</int>
+                                                                                               <reference key="NSCatalogName" ref="782690597"/>
+                                                                                               <string key="NSColorName">textColor</string>
+                                                                                               <reference key="NSColor" ref="782009920"/>
+                                                                                       </object>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSButton" id="480614555">
+                                                                               <reference key="NSNextResponder" ref="62254939"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{256, 8}, {80, 28}}</string>
+                                                                               <reference key="NSSuperview" ref="62254939"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSButtonCell" key="NSCell" id="909242683">
+                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                       <int key="NSCellFlags2">134348800</int>
+                                                                                       <string type="base64-UTF8" key="NSContents">QnJvd3Nl4oCmA</string>
+                                                                                       <object class="NSFont" key="NSSupport" id="26">
+                                                                                               <reference key="NSName" ref="836411727"/>
+                                                                                               <double key="NSSize">1.100000e+01</double>
+                                                                                               <int key="NSfFlags">3100</int>
+                                                                                       </object>
+                                                                                       <reference key="NSControlView" ref="480614555"/>
+                                                                                       <int key="NSButtonFlags">-2038284033</int>
+                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                       <object class="NSFont" key="NSAlternateImage">
+                                                                                               <reference key="NSName" ref="836411727"/>
+                                                                                               <double key="NSSize">1.100000e+01</double>
+                                                                                               <int key="NSfFlags">16</int>
+                                                                                       </object>
+                                                                                       <reference key="NSAlternateContents" ref="554915519"/>
+                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                               <characters key="NS.bytes"/>
+                                                                                       </object>
+                                                                                       <int key="NSPeriodicDelay">200</int>
+                                                                                       <int key="NSPeriodicInterval">25</int>
+                                                                               </object>
+                                                                       </object>
+                                                               </object>
+                                                               <string key="NSFrame">{{1, 1}, {346, 115}}</string>
+                                                               <reference key="NSSuperview" ref="905380397"/>
+                                                               <reference key="NSWindow"/>
+                                                       </object>
+                                               </object>
+                                               <string key="NSFrame">{{20, 60}, {348, 117}}</string>
+                                               <reference key="NSSuperview" ref="731167877"/>
+                                               <reference key="NSWindow"/>
+                                               <string key="NSOffsets" id="835776367">{0, 0}</string>
+                                               <object class="NSTextFieldCell" key="NSTitleCell">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <string key="NSContents" id="302583894">Box</string>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSBackgroundColor" ref="696584221"/>
+                                                       <object class="NSColor" key="NSTextColor">
+                                                               <int key="NSColorSpace">3</int>
+                                                               <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                       </object>
+                                               </object>
+                                               <reference key="NSContentView" ref="62254939"/>
+                                               <int key="NSBorderType">1</int>
+                                               <int key="NSBoxType">3</int>
+                                               <int key="NSTitlePosition">0</int>
+                                               <bool key="NSTransparent">NO</bool>
+                                       </object>
+                                       <object class="NSProgressIndicator" id="917303327">
+                                               <reference key="NSNextResponder" ref="731167877"/>
+                                               <int key="NSvFlags">-2147482356</int>
+                                               <object class="NSPSMatrix" key="NSDrawMatrix"/>
+                                               <string key="NSFrame">{{18, -29}, {352, 20}}</string>
+                                               <reference key="NSSuperview" ref="731167877"/>
+                                               <reference key="NSWindow"/>
+                                               <int key="NSpiFlags">16396</int>
+                                               <double key="NSMaxValue">1.000000e+02</double>
+                                       </object>
+                                       <object class="NSTextField" id="438464906">
+                                               <reference key="NSNextResponder" ref="731167877"/>
+                                               <int key="NSvFlags">268</int>
+                                               <string key="NSFrame">{{17, 20}, {279, 17}}</string>
+                                               <reference key="NSSuperview" ref="731167877"/>
+                                               <reference key="NSWindow"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="777791531">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">272629760</int>
+                                                       <reference key="NSContents" ref="554915519"/>
+                                                       <reference key="NSSupport" ref="889564864"/>
+                                                       <reference key="NSControlView" ref="438464906"/>
+                                                       <reference key="NSBackgroundColor" ref="789448078"/>
+                                                       <reference key="NSTextColor" ref="268986666"/>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSFrameSize">{388, 212}</string>
+                               <reference key="NSSuperview"/>
+                               <reference key="NSWindow"/>
+                               <object class="NSMutableString" key="NSClassName">
+                                       <characters key="NS.bytes">NSView</characters>
+                               </object>
+                               <string key="NSExtension" id="571520125">NSResponder</string>
+                       </object>
+                       <object class="NSCustomView" id="987276066">
+                               <reference key="NSNextResponder"/>
+                               <int key="NSvFlags">256</int>
+                               <object class="NSMutableArray" key="NSSubviews">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSTextField" id="794371242">
+                                               <reference key="NSNextResponder" ref="987276066"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{17, 393}, {139, 17}}</string>
+                                               <reference key="NSSuperview" ref="987276066"/>
+                                               <reference key="NSWindow"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="558940821">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">272629760</int>
+                                                       <string key="NSContents">Select DVD Features</string>
+                                                       <reference key="NSSupport" ref="889564864"/>
+                                                       <reference key="NSControlView" ref="794371242"/>
+                                                       <reference key="NSBackgroundColor" ref="789448078"/>
+                                                       <reference key="NSTextColor" ref="268986666"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSProgressIndicator" id="480161215">
+                                               <reference key="NSNextResponder" ref="987276066"/>
+                                               <int key="NSvFlags">1280</int>
+                                               <object class="NSPSMatrix" key="NSDrawMatrix"/>
+                                               <string key="NSFrame">{{18, 16}, {352, 20}}</string>
+                                               <reference key="NSSuperview" ref="987276066"/>
+                                               <reference key="NSWindow"/>
+                                               <int key="NSpiFlags">16396</int>
+                                               <double key="NSMaxValue">1.000000e+02</double>
+                                       </object>
+                                       <object class="NSTextField" id="134945040">
+                                               <reference key="NSNextResponder" ref="987276066"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{17, 273}, {59, 17}}</string>
+                                               <reference key="NSSuperview" ref="987276066"/>
+                                               <reference key="NSWindow"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="969218242">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">272629760</int>
+                                                       <string key="NSContents">Settings</string>
+                                                       <reference key="NSSupport" ref="889564864"/>
+                                                       <reference key="NSControlView" ref="134945040"/>
+                                                       <reference key="NSBackgroundColor" ref="789448078"/>
+                                                       <reference key="NSTextColor" ref="268986666"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSBox" id="748577971">
+                                               <reference key="NSNextResponder" ref="987276066"/>
+                                               <int key="NSvFlags">256</int>
+                                               <object class="NSMutableArray" key="NSSubviews">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSView" id="788901776">
+                                                               <reference key="NSNextResponder" ref="748577971"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <object class="NSPopUpButton" id="974333112">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{166, 41}, {166, 26}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="704933364">
+                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="974333112"/>
+                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                       <reference key="NSAlternateImage" ref="889564864"/>
+                                                                                       <reference key="NSAlternateContents" ref="554915519"/>
+                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                               <characters key="NS.bytes"/>
+                                                                                       </object>
+                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="377807140">
+                                                                                               <reference key="NSMenu" ref="406002025"/>
+                                                                                               <string type="base64-UTF8" key="NSTitle" id="741256849">4oCmA</string>
+                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <int key="NSState">1</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                               <reference key="NSTarget" ref="704933364"/>
+                                                                                       </object>
+                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                       <object class="NSMenu" key="NSMenu" id="406002025">
+                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                               </object>
+                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <reference ref="377807140"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                       <int key="NSArrowPosition">1</int>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSTextField" id="756716156">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{58, 47}, {106, 17}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSTextFieldCell" key="NSCell" id="250050000">
+                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                       <string key="NSContents">Preferred audio:</string>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="756716156"/>
+                                                                                       <reference key="NSBackgroundColor" ref="789448078"/>
+                                                                                       <reference key="NSTextColor" ref="268986666"/>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSTextField" id="520754405">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{87, 137}, {77, 17}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSTextFieldCell" key="NSCell" id="357908493">
+                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                       <string key="NSContents">File format:</string>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="520754405"/>
+                                                                                       <reference key="NSBackgroundColor" ref="789448078"/>
+                                                                                       <reference key="NSTextColor" ref="268986666"/>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSPopUpButton" id="209443714">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{166, 131}, {166, 26}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="759680945">
+                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="209443714"/>
+                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                       <reference key="NSAlternateImage" ref="889564864"/>
+                                                                                       <reference key="NSAlternateContents" ref="554915519"/>
+                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                               <characters key="NS.bytes"/>
+                                                                                       </object>
+                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                       <nil key="NSMenuItem"/>
+                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                       <object class="NSMenu" key="NSMenu" id="818968097">
+                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                               </object>
+                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <int key="NSSelectedIndex">-1</int>
+                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                       <int key="NSArrowPosition">1</int>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSTextField" id="883251677">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{14, 167}, {150, 17}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSTextFieldCell" key="NSCell" id="772706255">
+                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                       <string key="NSContents">Save converted files to:</string>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="883251677"/>
+                                                                                       <reference key="NSBackgroundColor" ref="789448078"/>
+                                                                                       <reference key="NSTextColor" ref="268986666"/>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSPopUpButton" id="73177792">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{166, 161}, {166, 26}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="628758664">
+                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="73177792"/>
+                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                       <reference key="NSAlternateImage" ref="889564864"/>
+                                                                                       <reference key="NSAlternateContents" ref="554915519"/>
+                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                               <characters key="NS.bytes"/>
+                                                                                       </object>
+                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="743243700">
+                                                                                               <reference key="NSMenu" ref="43580679"/>
+                                                                                               <reference key="NSTitle" ref="741256849"/>
+                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <int key="NSState">1</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                               <reference key="NSTarget" ref="628758664"/>
+                                                                                       </object>
+                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                       <object class="NSMenu" key="NSMenu" id="43580679">
+                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                               </object>
+                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <reference ref="743243700"/>
+                                                                                                       <object class="NSMenuItem" id="861216580">
+                                                                                                               <reference key="NSMenu" ref="43580679"/>
+                                                                                                               <bool key="NSIsDisabled">YES</bool>
+                                                                                                               <bool key="NSIsSeparator">YES</bool>
+                                                                                                               <reference key="NSTitle" ref="554915519"/>
+                                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="628758664"/>
+                                                                                                       </object>
+                                                                                                       <object class="NSMenuItem" id="1055069863">
+                                                                                                               <reference key="NSMenu" ref="43580679"/>
+                                                                                                               <string type="base64-UTF8" key="NSTitle">T3RoZXLigKY</string>
+                                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="628758664"/>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                       <int key="NSArrowPosition">1</int>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSPopUpButton" id="481859478">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{166, 11}, {166, 26}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="924080416">
+                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="481859478"/>
+                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                       <reference key="NSAlternateImage" ref="889564864"/>
+                                                                                       <reference key="NSAlternateContents" ref="554915519"/>
+                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                               <characters key="NS.bytes"/>
+                                                                                       </object>
+                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="190127574">
+                                                                                               <reference key="NSMenu" ref="315291325"/>
+                                                                                               <string type="base64-UTF8" key="NSTitle">4oCmIA</string>
+                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <int key="NSState">1</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                               <reference key="NSTarget" ref="924080416"/>
+                                                                                       </object>
+                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                       <object class="NSMenu" key="NSMenu" id="315291325">
+                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                               </object>
+                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <reference ref="190127574"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                       <int key="NSArrowPosition">1</int>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSTextField" id="77959229">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{36, 17}, {128, 17}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSTextFieldCell" key="NSCell" id="53742849">
+                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                       <string key="NSContents">Preferred subtitles:</string>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="77959229"/>
+                                                                                       <reference key="NSBackgroundColor" ref="789448078"/>
+                                                                                       <reference key="NSTextColor" ref="268986666"/>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSTextField" id="330951148">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{66, 107}, {98, 17}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSTextFieldCell" key="NSCell" id="977695033">
+                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                       <string key="NSContents">Picture Aspect:</string>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="330951148"/>
+                                                                                       <reference key="NSBackgroundColor" ref="789448078"/>
+                                                                                       <reference key="NSTextColor" ref="268986666"/>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSPopUpButton" id="886708797">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{166, 101}, {166, 26}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="599934816">
+                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="886708797"/>
+                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                       <reference key="NSAlternateImage" ref="889564864"/>
+                                                                                       <reference key="NSAlternateContents" ref="554915519"/>
+                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                               <characters key="NS.bytes"/>
+                                                                                       </object>
+                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="800243038">
+                                                                                               <reference key="NSMenu" ref="516423135"/>
+                                                                                               <string key="NSTitle" id="797755604">Original</string>
+                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <int key="NSState">1</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                               <reference key="NSTarget" ref="599934816"/>
+                                                                                       </object>
+                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                       <object class="NSMenu" key="NSMenu" id="516423135">
+                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                               </object>
+                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <reference ref="800243038"/>
+                                                                                                       <object class="NSMenuItem" id="74930922">
+                                                                                                               <reference key="NSMenu" ref="516423135"/>
+                                                                                                               <string key="NSTitle">4 by 3</string>
+                                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="599934816"/>
+                                                                                                       </object>
+                                                                                                       <object class="NSMenuItem" id="355639808">
+                                                                                                               <reference key="NSMenu" ref="516423135"/>
+                                                                                                               <string key="NSTitle">16 by 9</string>
+                                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="599934816"/>
+                                                                                                       </object>
+                                                                                                       <object class="NSMenuItem" id="66439489">
+                                                                                                               <reference key="NSMenu" ref="516423135"/>
+                                                                                                               <string key="NSTitle">Anamorphic</string>
+                                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="599934816"/>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                       <int key="NSArrowPosition">1</int>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSPopUpButton" id="221748721">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{166, 71}, {166, 26}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSPopUpButtonCell" key="NSCell" id="935187078">
+                                                                                       <int key="NSCellFlags">-2076049856</int>
+                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="221748721"/>
+                                                                                       <int key="NSButtonFlags">109199615</int>
+                                                                                       <int key="NSButtonFlags2">1</int>
+                                                                                       <object class="NSFont" key="NSAlternateImage">
+                                                                                               <reference key="NSName" ref="836411727"/>
+                                                                                               <double key="NSSize">1.300000e+01</double>
+                                                                                               <int key="NSfFlags">16</int>
+                                                                                       </object>
+                                                                                       <reference key="NSAlternateContents" ref="554915519"/>
+                                                                                       <object class="NSMutableString" key="NSKeyEquivalent">
+                                                                                               <characters key="NS.bytes"/>
+                                                                                       </object>
+                                                                                       <int key="NSPeriodicDelay">400</int>
+                                                                                       <int key="NSPeriodicInterval">75</int>
+                                                                                       <object class="NSMenuItem" key="NSMenuItem" id="970323694">
+                                                                                               <reference key="NSMenu" ref="320562235"/>
+                                                                                               <string key="NSTitle">640</string>
+                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                               <int key="NSState">1</int>
+                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                               <reference key="NSTarget" ref="935187078"/>
+                                                                                       </object>
+                                                                                       <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                                                       <object class="NSMenu" key="NSMenu" id="320562235">
+                                                                                               <object class="NSMutableString" key="NSTitle">
+                                                                                                       <characters key="NS.bytes">OtherViews</characters>
+                                                                                               </object>
+                                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <object class="NSMenuItem" id="965174492">
+                                                                                                               <reference key="NSMenu" ref="320562235"/>
+                                                                                                               <reference key="NSTitle" ref="797755604"/>
+                                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="935187078"/>
+                                                                                                       </object>
+                                                                                                       <reference ref="970323694"/>
+                                                                                                       <object class="NSMenuItem" id="43693359">
+                                                                                                               <reference key="NSMenu" ref="320562235"/>
+                                                                                                               <string key="NSTitle">480</string>
+                                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="935187078"/>
+                                                                                                       </object>
+                                                                                                       <object class="NSMenuItem" id="41252332">
+                                                                                                               <reference key="NSMenu" ref="320562235"/>
+                                                                                                               <string key="NSTitle">320</string>
+                                                                                                               <reference key="NSKeyEquiv" ref="554915519"/>
+                                                                                                               <int key="NSKeyEquivModMask">1048576</int>
+                                                                                                               <int key="NSMnemonicLoc">2147483647</int>
+                                                                                                               <reference key="NSOnImage" ref="258048823"/>
+                                                                                                               <reference key="NSMixedImage" ref="816798025"/>
+                                                                                                               <string key="NSAction">_popUpItemAction:</string>
+                                                                                                               <reference key="NSTarget" ref="935187078"/>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <int key="NSSelectedIndex">1</int>
+                                                                                       <int key="NSPreferredEdge">3</int>
+                                                                                       <bool key="NSUsesItemFromMenu">YES</bool>
+                                                                                       <bool key="NSAltersState">YES</bool>
+                                                                                       <int key="NSArrowPosition">1</int>
+                                                                               </object>
+                                                                       </object>
+                                                                       <object class="NSTextField" id="35720189">
+                                                                               <reference key="NSNextResponder" ref="788901776"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <string key="NSFrame">{{42, 77}, {122, 17}}</string>
+                                                                               <reference key="NSSuperview" ref="788901776"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <bool key="NSEnabled">YES</bool>
+                                                                               <object class="NSTextFieldCell" key="NSCell" id="848481335">
+                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                       <int key="NSCellFlags2">71303168</int>
+                                                                                       <string key="NSContents">Max Picture Width:</string>
+                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                       <reference key="NSControlView" ref="35720189"/>
+                                                                                       <reference key="NSBackgroundColor" ref="789448078"/>
+                                                                                       <reference key="NSTextColor" ref="268986666"/>
+                                                                               </object>
+                                                                       </object>
+                                                               </object>
+                                                               <string key="NSFrame">{{1, 1}, {346, 200}}</string>
+                                                               <reference key="NSSuperview" ref="748577971"/>
+                                                               <reference key="NSWindow"/>
+                                                       </object>
+                                               </object>
+                                               <string key="NSFrame">{{20, 69}, {348, 202}}</string>
+                                               <reference key="NSSuperview" ref="987276066"/>
+                                               <reference key="NSWindow"/>
+                                               <reference key="NSOffsets" ref="835776367"/>
+                                               <object class="NSTextFieldCell" key="NSTitleCell">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <reference key="NSContents" ref="302583894"/>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSBackgroundColor" ref="696584221"/>
+                                                       <object class="NSColor" key="NSTextColor">
+                                                               <int key="NSColorSpace">3</int>
+                                                               <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                       </object>
+                                               </object>
+                                               <reference key="NSContentView" ref="788901776"/>
+                                               <int key="NSBorderType">1</int>
+                                               <int key="NSBoxType">3</int>
+                                               <int key="NSTitlePosition">0</int>
+                                               <bool key="NSTransparent">NO</bool>
+                                       </object>
+                                       <object class="NSTextField" id="740652553">
+                                               <reference key="NSNextResponder" ref="987276066"/>
+                                               <int key="NSvFlags">256</int>
+                                               <string key="NSFrame">{{17, 44}, {354, 17}}</string>
+                                               <reference key="NSSuperview" ref="987276066"/>
+                                               <reference key="NSWindow"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="124162753">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">272629760</int>
+                                                       <string key="NSContents">Ready</string>
+                                                       <reference key="NSSupport" ref="889564864"/>
+                                                       <reference key="NSControlView" ref="740652553"/>
+                                                       <reference key="NSBackgroundColor" ref="789448078"/>
+                                                       <reference key="NSTextColor" ref="268986666"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSBox" id="139839684">
+                                               <reference key="NSNextResponder" ref="987276066"/>
+                                               <int key="NSvFlags">256</int>
+                                               <object class="NSMutableArray" key="NSSubviews">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSView" id="1059297053">
+                                                               <reference key="NSNextResponder" ref="139839684"/>
+                                                               <int key="NSvFlags">256</int>
+                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <object class="NSScrollView" id="187663135">
+                                                                               <reference key="NSNextResponder" ref="1059297053"/>
+                                                                               <int key="NSvFlags">256</int>
+                                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                       <object class="NSClipView" id="349280401">
+                                                                                               <reference key="NSNextResponder" ref="187663135"/>
+                                                                                               <int key="NSvFlags">2304</int>
+                                                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <object class="NSTableView" id="947341082">
+                                                                                                               <reference key="NSNextResponder" ref="349280401"/>
+                                                                                                               <int key="NSvFlags">256</int>
+                                                                                                               <string key="NSFrameSize">{347, 77}</string>
+                                                                                                               <reference key="NSSuperview" ref="349280401"/>
+                                                                                                               <reference key="NSWindow"/>
+                                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                                               <object class="NSTableHeaderView" key="NSHeaderView" id="890825038">
+                                                                                                                       <reference key="NSNextResponder" ref="804523325"/>
+                                                                                                                       <int key="NSvFlags">256</int>
+                                                                                                                       <string key="NSFrameSize">{347, 17}</string>
+                                                                                                                       <reference key="NSSuperview" ref="804523325"/>
+                                                                                                                       <reference key="NSWindow"/>
+                                                                                                                       <reference key="NSTableView" ref="947341082"/>
+                                                                                                               </object>
+                                                                                                               <object class="_NSCornerView" key="NSCornerView" id="240571974">
+                                                                                                                       <reference key="NSNextResponder" ref="187663135"/>
+                                                                                                                       <int key="NSvFlags">-2147483392</int>
+                                                                                                                       <string key="NSFrame">{{-26, 0}, {16, 17}}</string>
+                                                                                                                       <reference key="NSSuperview" ref="187663135"/>
+                                                                                                                       <reference key="NSWindow"/>
+                                                                                                               </object>
+                                                                                                               <object class="NSMutableArray" key="NSTableColumns">
+                                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                                       <object class="NSTableColumn" id="927247421">
+                                                                                                                               <string key="NSIdentifier">Check</string>
+                                                                                                                               <double key="NSWidth">2.300000e+01</double>
+                                                                                                                               <double key="NSMinWidth">1.000000e+01</double>
+                                                                                                                               <double key="NSMaxWidth">1.000000e+03</double>
+                                                                                                                               <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                                                       <reference key="NSContents" ref="554915519"/>
+                                                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                                                       <object class="NSColor" key="NSBackgroundColor" id="390235381">
+                                                                                                                                               <int key="NSColorSpace">6</int>
+                                                                                                                                               <reference key="NSCatalogName" ref="782690597"/>
+                                                                                                                                               <string key="NSColorName">headerColor</string>
+                                                                                                                                               <reference key="NSColor" ref="180837716"/>
+                                                                                                                                       </object>
+                                                                                                                                       <object class="NSColor" key="NSTextColor" id="1020517874">
+                                                                                                                                               <int key="NSColorSpace">6</int>
+                                                                                                                                               <reference key="NSCatalogName" ref="782690597"/>
+                                                                                                                                               <string key="NSColorName">headerTextColor</string>
+                                                                                                                                               <reference key="NSColor" ref="782009920"/>
+                                                                                                                                       </object>
+                                                                                                                               </object>
+                                                                                                                               <object class="NSTextFieldCell" key="NSDataCell" id="864164384">
+                                                                                                                                       <int key="NSCellFlags">337772096</int>
+                                                                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                                                                       <string key="NSContents" id="1039412303">Text Cell</string>
+                                                                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                                                                       <reference key="NSControlView" ref="947341082"/>
+                                                                                                                                       <object class="NSColor" key="NSBackgroundColor" id="281544205">
+                                                                                                                                               <int key="NSColorSpace">6</int>
+                                                                                                                                               <reference key="NSCatalogName" ref="782690597"/>
+                                                                                                                                               <string key="NSColorName">controlBackgroundColor</string>
+                                                                                                                                               <reference key="NSColor" ref="677155824"/>
+                                                                                                                                       </object>
+                                                                                                                                       <reference key="NSTextColor" ref="268986666"/>
+                                                                                                                               </object>
+                                                                                                                               <int key="NSResizingMask">3</int>
+                                                                                                                               <bool key="NSIsResizeable">YES</bool>
+                                                                                                                               <bool key="NSIsEditable">YES</bool>
+                                                                                                                               <reference key="NSTableView" ref="947341082"/>
+                                                                                                                       </object>
+                                                                                                                       <object class="NSTableColumn" id="33037969">
+                                                                                                                               <string key="NSIdentifier" id="614031179">Title</string>
+                                                                                                                               <double key="NSWidth">6.399365e+01</double>
+                                                                                                                               <double key="NSMinWidth">4.199365e+01</double>
+                                                                                                                               <double key="NSMaxWidth">1.000000e+03</double>
+                                                                                                                               <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                                                       <int key="NSCellFlags">75628032</int>
+                                                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                                                       <reference key="NSContents" ref="614031179"/>
+                                                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                                                       <object class="NSColor" key="NSBackgroundColor">
+                                                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                                                               <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+                                                                                                                                       </object>
+                                                                                                                                       <reference key="NSTextColor" ref="1020517874"/>
+                                                                                                                               </object>
+                                                                                                                               <object class="NSTextFieldCell" key="NSDataCell" id="410742283">
+                                                                                                                                       <int key="NSCellFlags">337772096</int>
+                                                                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                                                                       <reference key="NSContents" ref="1039412303"/>
+                                                                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                                                                       <reference key="NSControlView" ref="947341082"/>
+                                                                                                                                       <reference key="NSBackgroundColor" ref="281544205"/>
+                                                                                                                                       <reference key="NSTextColor" ref="268986666"/>
+                                                                                                                               </object>
+                                                                                                                               <int key="NSResizingMask">3</int>
+                                                                                                                               <bool key="NSIsResizeable">YES</bool>
+                                                                                                                               <bool key="NSIsEditable">YES</bool>
+                                                                                                                               <reference key="NSTableView" ref="947341082"/>
+                                                                                                                       </object>
+                                                                                                                       <object class="NSTableColumn" id="154488326">
+                                                                                                                               <string key="NSIdentifier" id="575534713">Duration</string>
+                                                                                                                               <double key="NSWidth">1.336582e+02</double>
+                                                                                                                               <double key="NSMinWidth">6.765820e+01</double>
+                                                                                                                               <double key="NSMaxWidth">1.000000e+03</double>
+                                                                                                                               <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                                                       <reference key="NSContents" ref="575534713"/>
+                                                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                                                       <reference key="NSBackgroundColor" ref="390235381"/>
+                                                                                                                                       <reference key="NSTextColor" ref="1020517874"/>
+                                                                                                                               </object>
+                                                                                                                               <object class="NSTextFieldCell" key="NSDataCell" id="134898927">
+                                                                                                                                       <int key="NSCellFlags">337772096</int>
+                                                                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                                                                       <reference key="NSContents" ref="1039412303"/>
+                                                                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                                                                       <reference key="NSControlView" ref="947341082"/>
+                                                                                                                                       <reference key="NSBackgroundColor" ref="281544205"/>
+                                                                                                                                       <reference key="NSTextColor" ref="268986666"/>
+                                                                                                                               </object>
+                                                                                                                               <int key="NSResizingMask">3</int>
+                                                                                                                               <bool key="NSIsResizeable">YES</bool>
+                                                                                                                               <bool key="NSIsEditable">YES</bool>
+                                                                                                                               <reference key="NSTableView" ref="947341082"/>
+                                                                                                                       </object>
+                                                                                                                       <object class="NSTableColumn" id="250812599">
+                                                                                                                               <string key="NSIdentifier">Size</string>
+                                                                                                                               <double key="NSWidth">1.138560e+02</double>
+                                                                                                                               <double key="NSMinWidth">9.000000e+01</double>
+                                                                                                                               <double key="NSMaxWidth">1.000000e+03</double>
+                                                                                                                               <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                                                       <int key="NSCellFlags">67239424</int>
+                                                                                                                                       <int key="NSCellFlags2">0</int>
+                                                                                                                                       <string key="NSContents">Size (Converted)</string>
+                                                                                                                                       <reference key="NSSupport" ref="26"/>
+                                                                                                                                       <reference key="NSBackgroundColor" ref="390235381"/>
+                                                                                                                                       <reference key="NSTextColor" ref="1020517874"/>
+                                                                                                                               </object>
+                                                                                                                               <object class="NSTextFieldCell" key="NSDataCell" id="747882536">
+                                                                                                                                       <int key="NSCellFlags">337772096</int>
+                                                                                                                                       <int key="NSCellFlags2">2048</int>
+                                                                                                                                       <reference key="NSContents" ref="1039412303"/>
+                                                                                                                                       <reference key="NSSupport" ref="889564864"/>
+                                                                                                                                       <reference key="NSControlView" ref="947341082"/>
+                                                                                                                                       <reference key="NSBackgroundColor" ref="281544205"/>
+                                                                                                                                       <reference key="NSTextColor" ref="268986666"/>
+                                                                                                                               </object>
+                                                                                                                               <int key="NSResizingMask">3</int>
+                                                                                                                               <bool key="NSIsResizeable">YES</bool>
+                                                                                                                               <bool key="NSIsEditable">YES</bool>
+                                                                                                                               <reference key="NSTableView" ref="947341082"/>
+                                                                                                                       </object>
+                                                                                                               </object>
+                                                                                                               <double key="NSIntercellSpacingWidth">3.000000e+00</double>
+                                                                                                               <double key="NSIntercellSpacingHeight">2.000000e+00</double>
+                                                                                                               <reference key="NSBackgroundColor" ref="180837716"/>
+                                                                                                               <object class="NSColor" key="NSGridColor">
+                                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                                       <reference key="NSCatalogName" ref="782690597"/>
+                                                                                                                       <string key="NSColorName">gridColor</string>
+                                                                                                                       <object class="NSColor" key="NSColor">
+                                                                                                                               <int key="NSColorSpace">3</int>
+                                                                                                                               <bytes key="NSWhite">MC41AA</bytes>
+                                                                                                                       </object>
+                                                                                                               </object>
+                                                                                                               <double key="NSRowHeight">1.700000e+01</double>
+                                                                                                               <int key="NSTvFlags">316669952</int>
+                                                                                                               <int key="NSColumnAutoresizingStyle">4</int>
+                                                                                                               <int key="NSDraggingSourceMaskForLocal">15</int>
+                                                                                                               <int key="NSDraggingSourceMaskForNonLocal">0</int>
+                                                                                                               <bool key="NSAllowsTypeSelect">YES</bool>
+                                                                                                       </object>
+                                                                                               </object>
+                                                                                               <string key="NSFrame">{{1, 17}, {346, 77}}</string>
+                                                                                               <reference key="NSSuperview" ref="187663135"/>
+                                                                                               <reference key="NSWindow"/>
+                                                                                               <reference key="NSNextKeyView" ref="947341082"/>
+                                                                                               <reference key="NSDocView" ref="947341082"/>
+                                                                                               <reference key="NSBGColor" ref="281544205"/>
+                                                                                               <int key="NScvFlags">4</int>
+                                                                                       </object>
+                                                                                       <object class="NSScroller" id="953529258">
+                                                                                               <reference key="NSNextResponder" ref="187663135"/>
+                                                                                               <int key="NSvFlags">-2147483392</int>
+                                                                                               <string key="NSFrame">{{332, 17}, {15, 77}}</string>
+                                                                                               <reference key="NSSuperview" ref="187663135"/>
+                                                                                               <reference key="NSWindow"/>
+                                                                                               <reference key="NSTarget" ref="187663135"/>
+                                                                                               <string key="NSAction" id="763402684">_doScroller:</string>
+                                                                                               <double key="NSPercent">4.052632e-01</double>
+                                                                                       </object>
+                                                                                       <object class="NSScroller" id="968783268">
+                                                                                               <reference key="NSNextResponder" ref="187663135"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{-100, -100}, {379, 15}}</string>
+                                                                                               <reference key="NSSuperview" ref="187663135"/>
+                                                                                               <reference key="NSWindow"/>
+                                                                                               <bool key="NSEnabled">YES</bool>
+                                                                                               <int key="NSsFlags">1</int>
+                                                                                               <reference key="NSTarget" ref="187663135"/>
+                                                                                               <reference key="NSAction" ref="763402684"/>
+                                                                                               <double key="NSPercent">9.358025e-01</double>
+                                                                                       </object>
+                                                                                       <object class="NSClipView" id="804523325">
+                                                                                               <reference key="NSNextResponder" ref="187663135"/>
+                                                                                               <int key="NSvFlags">2304</int>
+                                                                                               <object class="NSMutableArray" key="NSSubviews">
+                                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                                       <reference ref="890825038"/>
+                                                                                               </object>
+                                                                                               <string key="NSFrame">{{1, 0}, {346, 17}}</string>
+                                                                                               <reference key="NSSuperview" ref="187663135"/>
+                                                                                               <reference key="NSWindow"/>
+                                                                                               <reference key="NSNextKeyView" ref="890825038"/>
+                                                                                               <reference key="NSDocView" ref="890825038"/>
+                                                                                               <reference key="NSBGColor" ref="281544205"/>
+                                                                                               <int key="NScvFlags">4</int>
+                                                                                       </object>
+                                                                                       <reference ref="240571974"/>
+                                                                               </object>
+                                                                               <string key="NSFrame">{{-1, -1}, {348, 95}}</string>
+                                                                               <reference key="NSSuperview" ref="1059297053"/>
+                                                                               <reference key="NSWindow"/>
+                                                                               <reference key="NSNextKeyView" ref="349280401"/>
+                                                                               <int key="NSsFlags">658</int>
+                                                                               <reference key="NSVScroller" ref="953529258"/>
+                                                                               <reference key="NSHScroller" ref="968783268"/>
+                                                                               <reference key="NSContentView" ref="349280401"/>
+                                                                               <reference key="NSHeaderClipView" ref="804523325"/>
+                                                                               <reference key="NSCornerView" ref="240571974"/>
+                                                                               <bytes key="NSScrollAmts">AAAAAAAAAABBmAAAQZgAAA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                               <string key="NSFrame">{{1, 1}, {346, 93}}</string>
+                                                               <reference key="NSSuperview" ref="139839684"/>
+                                                               <reference key="NSWindow"/>
+                                                       </object>
+                                               </object>
+                                               <string key="NSFrame">{{20, 295}, {348, 95}}</string>
+                                               <reference key="NSSuperview" ref="987276066"/>
+                                               <reference key="NSWindow"/>
+                                               <reference key="NSOffsets" ref="835776367"/>
+                                               <object class="NSTextFieldCell" key="NSTitleCell">
+                                                       <int key="NSCellFlags">67239424</int>
+                                                       <int key="NSCellFlags2">0</int>
+                                                       <reference key="NSContents" ref="302583894"/>
+                                                       <reference key="NSSupport" ref="26"/>
+                                                       <reference key="NSBackgroundColor" ref="696584221"/>
+                                                       <object class="NSColor" key="NSTextColor">
+                                                               <int key="NSColorSpace">3</int>
+                                                               <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+                                                       </object>
+                                               </object>
+                                               <reference key="NSContentView" ref="1059297053"/>
+                                               <int key="NSBorderType">1</int>
+                                               <int key="NSBoxType">3</int>
+                                               <int key="NSTitlePosition">0</int>
+                                               <bool key="NSTransparent">NO</bool>
+                                       </object>
+                               </object>
+                               <string key="NSFrameSize">{388, 420}</string>
+                               <reference key="NSSuperview"/>
+                               <reference key="NSWindow"/>
+                               <object class="NSMutableString" key="NSClassName">
+                                       <characters key="NS.bytes">NSView</characters>
+                               </object>
+                               <reference key="NSExtension" ref="571520125"/>
+                       </object>
+                       <object class="NSCustomObject" id="125725512">
+                               <string key="NSClassName" id="1010">ExpressController</string>
+                       </object>
+                       <object class="NSCustomView" id="500554145">
+                               <nil key="NSNextResponder"/>
+                               <int key="NSvFlags">256</int>
+                               <string key="NSFrameSize">{135, 65}</string>
+                               <string key="NSClassName" id="1059390944">NSView</string>
+                               <reference key="NSExtension" ref="571520125"/>
+                       </object>
+               </object>
+               <object class="IBObjectContainer" key="IBDocument.Objects">
+                       <object class="NSMutableArray" key="connectionRecords">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">performMiniaturize:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="411462580"/>
+                                       </object>
+                                       <int key="connectionID">37</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">arrangeInFront:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="97713116"/>
+                                       </object>
+                                       <int key="connectionID">39</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">print:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="492993447"/>
+                                       </object>
+                                       <int key="connectionID">86</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">runPageLayout:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="633208303"/>
+                                       </object>
+                                       <int key="connectionID">87</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">showHelp:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="418274352"/>
+                                       </object>
+                                       <int key="connectionID">122</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">clearRecentDocuments:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="354436703"/>
+                                       </object>
+                                       <int key="connectionID">127</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">terminate:</string>
+                                               <reference key="source" ref="529790172"/>
+                                               <reference key="destination" ref="453993541"/>
+                                       </object>
+                                       <int key="connectionID">139</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">orderFrontStandardAboutPanel:</string>
+                                               <reference key="source" ref="529790172"/>
+                                               <reference key="destination" ref="116469247"/>
+                                       </object>
+                                       <int key="connectionID">142</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">hideOtherApplications:</string>
+                                               <reference key="source" ref="529790172"/>
+                                               <reference key="destination" ref="832371069"/>
+                                       </object>
+                                       <int key="connectionID">146</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">hide:</string>
+                                               <reference key="source" ref="529790172"/>
+                                               <reference key="destination" ref="120902271"/>
+                                       </object>
+                                       <int key="connectionID">152</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">unhideAllApplications:</string>
+                                               <reference key="source" ref="529790172"/>
+                                               <reference key="destination" ref="256307932"/>
+                                       </object>
+                                       <int key="connectionID">153</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">performClose:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="817926297"/>
+                                       </object>
+                                       <int key="connectionID">193</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">toggleContinuousSpellChecking:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="308562408"/>
+                                       </object>
+                                       <int key="connectionID">222</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">undo:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="605587333"/>
+                                       </object>
+                                       <int key="connectionID">223</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">copy:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="548705799"/>
+                                       </object>
+                                       <int key="connectionID">224</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">checkSpelling:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="182161666"/>
+                                       </object>
+                                       <int key="connectionID">225</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">paste:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="208999334"/>
+                                       </object>
+                                       <int key="connectionID">226</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">stopSpeaking:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="88993156"/>
+                                       </object>
+                                       <int key="connectionID">227</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">cut:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="128935717"/>
+                                       </object>
+                                       <int key="connectionID">228</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">showGuessPanel:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="929731840"/>
+                                       </object>
+                                       <int key="connectionID">230</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">redo:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="370536361"/>
+                                       </object>
+                                       <int key="connectionID">231</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">selectAll:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="704469431"/>
+                                       </object>
+                                       <int key="connectionID">232</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">startSpeaking:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="246223398"/>
+                                       </object>
+                                       <int key="connectionID">233</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">delete:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="60197220"/>
+                                       </object>
+                                       <int key="connectionID">235</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">performZoom:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="521550646"/>
+                                       </object>
+                                       <int key="connectionID">240</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label" id="1013723480">performFindPanelAction:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="486792374"/>
+                                       </object>
+                                       <int key="connectionID">241</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <reference key="label" ref="1013723480"/>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="416590091"/>
+                                       </object>
+                                       <int key="connectionID">242</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <reference key="label" ref="1013723480"/>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="1058311499"/>
+                                       </object>
+                                       <int key="connectionID">243</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <reference key="label" ref="1013723480"/>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="706475887"/>
+                                       </object>
+                                       <int key="connectionID">244</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">centerSelectionInVisibleArea:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="828049674"/>
+                                       </object>
+                                       <int key="connectionID">245</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">pasteAsPlainText:</string>
+                                               <reference key="source" ref="766494232"/>
+                                               <reference key="destination" ref="82280793"/>
+                                       </object>
+                                       <int key="connectionID">247</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label" id="954544688">delegate</string>
+                                               <reference key="source" ref="529790172"/>
+                                               <reference key="destination" ref="125725512"/>
+                                       </object>
+                                       <int key="connectionID">291</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fOpenView</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="731167877"/>
+                                       </object>
+                                       <int key="connectionID">292</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fConvertView</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="987276066"/>
+                                       </object>
+                                       <int key="connectionID">293</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fWindow</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="387516152"/>
+                                       </object>
+                                       <int key="connectionID">294</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fEmptyView</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="500554145"/>
+                                       </object>
+                                       <int key="connectionID">304</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">openGo:</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="350715131"/>
+                                       </object>
+                                       <int key="connectionID">320</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fOpenGoButton</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="350715131"/>
+                                       </object>
+                                       <int key="connectionID">323</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fConvertIndicator</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="480161215"/>
+                                       </object>
+                                       <int key="connectionID">331</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">openBrowse:</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="480614555"/>
+                                       </object>
+                                       <int key="connectionID">358</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">openMatrixChanged:</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="238927539"/>
+                                       </object>
+                                       <int key="connectionID">359</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fOpenBrowseButton</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="480614555"/>
+                                       </object>
+                                       <int key="connectionID">360</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fOpenFolderField</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="760276484"/>
+                                       </object>
+                                       <int key="connectionID">361</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fOpenIndicator</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="917303327"/>
+                                       </object>
+                                       <int key="connectionID">362</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fOpenMatrix</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="238927539"/>
+                                       </object>
+                                       <int key="connectionID">363</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fOpenPopUp</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="931746997"/>
+                                       </object>
+                                       <int key="connectionID">364</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fConvertTableView</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="947341082"/>
+                                       </object>
+                                       <int key="connectionID">405</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fConvertFolderPopUp</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="73177792"/>
+                                       </object>
+                                       <int key="connectionID">406</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">dataSource</string>
+                                               <reference key="source" ref="947341082"/>
+                                               <reference key="destination" ref="125725512"/>
+                                       </object>
+                                       <int key="connectionID">407</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <reference key="label" ref="954544688"/>
+                                               <reference key="source" ref="947341082"/>
+                                               <reference key="destination" ref="125725512"/>
+                                       </object>
+                                       <int key="connectionID">408</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fOpenProgressField</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="438464906"/>
+                                       </object>
+                                       <int key="connectionID">409</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fConvertAspectPopUp</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="886708797"/>
+                                       </object>
+                                       <int key="connectionID">412</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fConvertFormatPopUp</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="209443714"/>
+                                       </object>
+                                       <int key="connectionID">413</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fConvertAudioPopUp</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="974333112"/>
+                                       </object>
+                                       <int key="connectionID">415</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fConvertSubtitlePopUp</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="481859478"/>
+                                       </object>
+                                       <int key="connectionID">416</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fConvertMaxWidthPopUp</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="221748721"/>
+                                       </object>
+                                       <int key="connectionID">425</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">fConvertInfoString</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="740652553"/>
+                                       </object>
+                                       <int key="connectionID">427</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">selectFolderSheetShow:</string>
+                                               <reference key="source" ref="125725512"/>
+                                               <reference key="destination" ref="1055069863"/>
+                                       </object>
+                                       <int key="connectionID">465</int>
+                               </object>
+                       </object>
+                       <object class="IBMutableOrderedSet" key="objectRecords">
+                               <object class="NSArray" key="orderedObjects">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">0</int>
+                                               <object class="NSArray" key="object" id="895597890">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <reference key="children" ref="596629462"/>
+                                               <nil key="parent"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-2</int>
+                                               <reference key="object" ref="529790172"/>
+                                               <reference key="parent" ref="895597890"/>
+                                               <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-1</int>
+                                               <reference key="object" ref="766494232"/>
+                                               <reference key="parent" ref="895597890"/>
+                                               <string key="objectName">First Responder</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-3</int>
+                                               <reference key="object" ref="675932571"/>
+                                               <reference key="parent" ref="895597890"/>
+                                               <string key="objectName">Application</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">21</int>
+                                               <reference key="object" ref="387516152"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1703136"/>
+                                               </object>
+                                               <reference key="parent" ref="895597890"/>
+                                               <reference key="objectName" ref="852936394"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">2</int>
+                                               <reference key="object" ref="1703136"/>
+                                               <reference key="parent" ref="387516152"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">29</int>
+                                               <reference key="object" ref="168342202"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="420115045"/>
+                                                       <reference ref="310264544"/>
+                                                       <reference ref="384779904"/>
+                                                       <reference ref="968817846"/>
+                                                       <reference ref="492425210"/>
+                                               </object>
+                                               <reference key="parent" ref="895597890"/>
+                                               <string key="objectName">MainMenu</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">19</int>
+                                               <reference key="object" ref="420115045"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1068274357"/>
+                                               </object>
+                                               <reference key="parent" ref="168342202"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">24</int>
+                                               <reference key="object" ref="1068274357"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="97713116"/>
+                                                       <reference ref="411462580"/>
+                                                       <reference ref="593776241"/>
+                                                       <reference ref="521550646"/>
+                                               </object>
+                                               <reference key="parent" ref="420115045"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">5</int>
+                                               <reference key="object" ref="97713116"/>
+                                               <reference key="parent" ref="1068274357"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">23</int>
+                                               <reference key="object" ref="411462580"/>
+                                               <reference key="parent" ref="1068274357"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">92</int>
+                                               <reference key="object" ref="593776241"/>
+                                               <reference key="parent" ref="1068274357"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">239</int>
+                                               <reference key="object" ref="521550646"/>
+                                               <reference key="parent" ref="1068274357"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">56</int>
+                                               <reference key="object" ref="310264544"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="204695612"/>
+                                               </object>
+                                               <reference key="parent" ref="168342202"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">57</int>
+                                               <reference key="object" ref="204695612"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="116469247"/>
+                                                       <reference ref="1057810002"/>
+                                                       <reference ref="621359928"/>
+                                                       <reference ref="120902271"/>
+                                                       <reference ref="453993541"/>
+                                                       <reference ref="449764258"/>
+                                                       <reference ref="354604539"/>
+                                                       <reference ref="832371069"/>
+                                                       <reference ref="252085536"/>
+                                                       <reference ref="256307932"/>
+                                                       <reference ref="695986656"/>
+                                                       <reference ref="840995182"/>
+                                               </object>
+                                               <reference key="parent" ref="310264544"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">58</int>
+                                               <reference key="object" ref="116469247"/>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">129</int>
+                                               <reference key="object" ref="1057810002"/>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">131</int>
+                                               <reference key="object" ref="621359928"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="414798761"/>
+                                               </object>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">130</int>
+                                               <reference key="object" ref="414798761"/>
+                                               <reference key="parent" ref="621359928"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">134</int>
+                                               <reference key="object" ref="120902271"/>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">136</int>
+                                               <reference key="object" ref="453993541"/>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">143</int>
+                                               <reference key="object" ref="449764258"/>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">144</int>
+                                               <reference key="object" ref="354604539"/>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">145</int>
+                                               <reference key="object" ref="832371069"/>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">149</int>
+                                               <reference key="object" ref="252085536"/>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">150</int>
+                                               <reference key="object" ref="256307932"/>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">236</int>
+                                               <reference key="object" ref="695986656"/>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">83</int>
+                                               <reference key="object" ref="384779904"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="988316125"/>
+                                               </object>
+                                               <reference key="parent" ref="168342202"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">81</int>
+                                               <reference key="object" ref="988316125"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="773633184"/>
+                                                       <reference ref="817926297"/>
+                                                       <reference ref="109035207"/>
+                                                       <reference ref="354780417"/>
+                                                       <reference ref="633208303"/>
+                                                       <reference ref="492993447"/>
+                                                       <reference ref="116479453"/>
+                                                       <reference ref="93604882"/>
+                                                       <reference ref="1061253306"/>
+                                                       <reference ref="944528127"/>
+                                                       <reference ref="175884675"/>
+                                               </object>
+                                               <reference key="parent" ref="384779904"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">72</int>
+                                               <reference key="object" ref="773633184"/>
+                                               <reference key="parent" ref="988316125"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">73</int>
+                                               <reference key="object" ref="817926297"/>
+                                               <reference key="parent" ref="988316125"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">74</int>
+                                               <reference key="object" ref="109035207"/>
+                                               <reference key="parent" ref="988316125"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">75</int>
+                                               <reference key="object" ref="354780417"/>
+                                               <reference key="parent" ref="988316125"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">77</int>
+                                               <reference key="object" ref="633208303"/>
+                                               <reference key="parent" ref="988316125"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">78</int>
+                                               <reference key="object" ref="492993447"/>
+                                               <reference key="parent" ref="988316125"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">79</int>
+                                               <reference key="object" ref="116479453"/>
+                                               <reference key="parent" ref="988316125"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">80</int>
+                                               <reference key="object" ref="93604882"/>
+                                               <reference key="parent" ref="988316125"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">82</int>
+                                               <reference key="object" ref="1061253306"/>
+                                               <reference key="parent" ref="988316125"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">112</int>
+                                               <reference key="object" ref="944528127"/>
+                                               <reference key="parent" ref="988316125"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">124</int>
+                                               <reference key="object" ref="175884675"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="675797001"/>
+                                               </object>
+                                               <reference key="parent" ref="988316125"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">125</int>
+                                               <reference key="object" ref="675797001"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="354436703"/>
+                                               </object>
+                                               <reference key="parent" ref="175884675"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">126</int>
+                                               <reference key="object" ref="354436703"/>
+                                               <reference key="parent" ref="675797001"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">103</int>
+                                               <reference key="object" ref="968817846"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="839389072"/>
+                                               </object>
+                                               <reference key="parent" ref="168342202"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">106</int>
+                                               <reference key="object" ref="839389072"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="418274352"/>
+                                               </object>
+                                               <reference key="parent" ref="968817846"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">111</int>
+                                               <reference key="object" ref="418274352"/>
+                                               <reference key="parent" ref="839389072"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">217</int>
+                                               <reference key="object" ref="492425210"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="862115934"/>
+                                               </object>
+                                               <reference key="parent" ref="168342202"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">205</int>
+                                               <reference key="object" ref="862115934"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="548705799"/>
+                                                       <reference ref="704469431"/>
+                                                       <reference ref="128935717"/>
+                                                       <reference ref="60197220"/>
+                                                       <reference ref="208999334"/>
+                                                       <reference ref="113236993"/>
+                                                       <reference ref="605587333"/>
+                                                       <reference ref="258300456"/>
+                                                       <reference ref="676435822"/>
+                                                       <reference ref="370536361"/>
+                                                       <reference ref="593397208"/>
+                                                       <reference ref="101861958"/>
+                                                       <reference ref="82280793"/>
+                                               </object>
+                                               <reference key="parent" ref="492425210"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">197</int>
+                                               <reference key="object" ref="548705799"/>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">198</int>
+                                               <reference key="object" ref="704469431"/>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">199</int>
+                                               <reference key="object" ref="128935717"/>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">202</int>
+                                               <reference key="object" ref="60197220"/>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">203</int>
+                                               <reference key="object" ref="208999334"/>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">206</int>
+                                               <reference key="object" ref="113236993"/>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">207</int>
+                                               <reference key="object" ref="605587333"/>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">211</int>
+                                               <reference key="object" ref="258300456"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1043252385"/>
+                                               </object>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">212</int>
+                                               <reference key="object" ref="1043252385"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="88993156"/>
+                                                       <reference ref="246223398"/>
+                                               </object>
+                                               <reference key="parent" ref="258300456"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">195</int>
+                                               <reference key="object" ref="88993156"/>
+                                               <reference key="parent" ref="1043252385"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">196</int>
+                                               <reference key="object" ref="246223398"/>
+                                               <reference key="parent" ref="1043252385"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">214</int>
+                                               <reference key="object" ref="676435822"/>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">215</int>
+                                               <reference key="object" ref="370536361"/>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">216</int>
+                                               <reference key="object" ref="593397208"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="525385576"/>
+                                               </object>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">200</int>
+                                               <reference key="object" ref="525385576"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="182161666"/>
+                                                       <reference ref="929731840"/>
+                                                       <reference ref="308562408"/>
+                                               </object>
+                                               <reference key="parent" ref="593397208"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">201</int>
+                                               <reference key="object" ref="182161666"/>
+                                               <reference key="parent" ref="525385576"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">204</int>
+                                               <reference key="object" ref="929731840"/>
+                                               <reference key="parent" ref="525385576"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">219</int>
+                                               <reference key="object" ref="308562408"/>
+                                               <reference key="parent" ref="525385576"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">218</int>
+                                               <reference key="object" ref="101861958"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="290694843"/>
+                                               </object>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">220</int>
+                                               <reference key="object" ref="290694843"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="416590091"/>
+                                                       <reference ref="486792374"/>
+                                                       <reference ref="828049674"/>
+                                                       <reference ref="1058311499"/>
+                                                       <reference ref="706475887"/>
+                                               </object>
+                                               <reference key="parent" ref="101861958"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">208</int>
+                                               <reference key="object" ref="416590091"/>
+                                               <reference key="parent" ref="290694843"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">209</int>
+                                               <reference key="object" ref="486792374"/>
+                                               <reference key="parent" ref="290694843"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">210</int>
+                                               <reference key="object" ref="828049674"/>
+                                               <reference key="parent" ref="290694843"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">213</int>
+                                               <reference key="object" ref="1058311499"/>
+                                               <reference key="parent" ref="290694843"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">221</int>
+                                               <reference key="object" ref="706475887"/>
+                                               <reference key="parent" ref="290694843"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">246</int>
+                                               <reference key="object" ref="82280793"/>
+                                               <reference key="parent" ref="862115934"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">248</int>
+                                               <reference key="object" ref="731167877"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="989775410"/>
+                                                       <reference ref="350715131"/>
+                                                       <reference ref="905380397"/>
+                                                       <reference ref="917303327"/>
+                                                       <reference ref="438464906"/>
+                                               </object>
+                                               <reference key="parent" ref="895597890"/>
+                                               <string key="objectName">OpenView</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">249</int>
+                                               <reference key="object" ref="989775410"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="557238685"/>
+                                               </object>
+                                               <reference key="parent" ref="731167877"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">297</int>
+                                               <reference key="object" ref="350715131"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="116282848"/>
+                                               </object>
+                                               <reference key="parent" ref="731167877"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">333</int>
+                                               <reference key="object" ref="905380397"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="238927539"/>
+                                                       <reference ref="931746997"/>
+                                                       <reference ref="760276484"/>
+                                                       <reference ref="480614555"/>
+                                               </object>
+                                               <reference key="parent" ref="731167877"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">356</int>
+                                               <reference key="object" ref="917303327"/>
+                                               <reference key="parent" ref="731167877"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">396</int>
+                                               <reference key="object" ref="438464906"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="777791531"/>
+                                               </object>
+                                               <reference key="parent" ref="731167877"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">259</int>
+                                               <reference key="object" ref="987276066"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="794371242"/>
+                                                       <reference ref="480161215"/>
+                                                       <reference ref="134945040"/>
+                                                       <reference ref="748577971"/>
+                                                       <reference ref="740652553"/>
+                                                       <reference ref="139839684"/>
+                                               </object>
+                                               <reference key="parent" ref="895597890"/>
+                                               <string key="objectName">ConvertView</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">260</int>
+                                               <reference key="object" ref="794371242"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="558940821"/>
+                                               </object>
+                                               <reference key="parent" ref="987276066"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">289</int>
+                                               <reference key="object" ref="480161215"/>
+                                               <reference key="parent" ref="987276066"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">365</int>
+                                               <reference key="object" ref="134945040"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="969218242"/>
+                                               </object>
+                                               <reference key="parent" ref="987276066"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">366</int>
+                                               <reference key="object" ref="748577971"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="974333112"/>
+                                                       <reference ref="756716156"/>
+                                                       <reference ref="520754405"/>
+                                                       <reference ref="209443714"/>
+                                                       <reference ref="883251677"/>
+                                                       <reference ref="73177792"/>
+                                                       <reference ref="481859478"/>
+                                                       <reference ref="77959229"/>
+                                                       <reference ref="330951148"/>
+                                                       <reference ref="886708797"/>
+                                                       <reference ref="221748721"/>
+                                                       <reference ref="35720189"/>
+                                               </object>
+                                               <reference key="parent" ref="987276066"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">397</int>
+                                               <reference key="object" ref="740652553"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="124162753"/>
+                                               </object>
+                                               <reference key="parent" ref="987276066"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">398</int>
+                                               <reference key="object" ref="139839684"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="187663135"/>
+                                               </object>
+                                               <reference key="parent" ref="987276066"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">290</int>
+                                               <reference key="object" ref="125725512"/>
+                                               <reference key="parent" ref="895597890"/>
+                                               <reference key="objectName" ref="1010"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">303</int>
+                                               <reference key="object" ref="500554145"/>
+                                               <reference key="parent" ref="895597890"/>
+                                               <string key="objectName">EmptyView</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">429</int>
+                                               <reference key="object" ref="557238685"/>
+                                               <reference key="parent" ref="989775410"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">430</int>
+                                               <reference key="object" ref="116282848"/>
+                                               <reference key="parent" ref="350715131"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">434</int>
+                                               <reference key="object" ref="777791531"/>
+                                               <reference key="parent" ref="438464906"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">435</int>
+                                               <reference key="object" ref="558940821"/>
+                                               <reference key="parent" ref="794371242"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">436</int>
+                                               <reference key="object" ref="969218242"/>
+                                               <reference key="parent" ref="134945040"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">449</int>
+                                               <reference key="object" ref="124162753"/>
+                                               <reference key="parent" ref="740652553"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">345</int>
+                                               <reference key="object" ref="238927539"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="280254324"/>
+                                                       <reference ref="19238775"/>
+                                                       <reference ref="387240670"/>
+                                               </object>
+                                               <reference key="parent" ref="905380397"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">450</int>
+                                               <reference key="object" ref="280254324"/>
+                                               <reference key="parent" ref="238927539"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">347</int>
+                                               <reference key="object" ref="19238775"/>
+                                               <reference key="parent" ref="238927539"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">346</int>
+                                               <reference key="object" ref="387240670"/>
+                                               <reference key="parent" ref="238927539"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">348</int>
+                                               <reference key="object" ref="931746997"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="699666019"/>
+                                               </object>
+                                               <reference key="parent" ref="905380397"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">431</int>
+                                               <reference key="object" ref="699666019"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="555581872"/>
+                                               </object>
+                                               <reference key="parent" ref="931746997"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">349</int>
+                                               <reference key="object" ref="555581872"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="287885753"/>
+                                                       <reference ref="874029565"/>
+                                                       <reference ref="814346452"/>
+                                               </object>
+                                               <reference key="parent" ref="699666019"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">350</int>
+                                               <reference key="object" ref="287885753"/>
+                                               <reference key="parent" ref="555581872"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">351</int>
+                                               <reference key="object" ref="874029565"/>
+                                               <reference key="parent" ref="555581872"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">352</int>
+                                               <reference key="object" ref="814346452"/>
+                                               <reference key="parent" ref="555581872"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">353</int>
+                                               <reference key="object" ref="760276484"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="3304954"/>
+                                               </object>
+                                               <reference key="parent" ref="905380397"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">432</int>
+                                               <reference key="object" ref="3304954"/>
+                                               <reference key="parent" ref="760276484"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">354</int>
+                                               <reference key="object" ref="480614555"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="909242683"/>
+                                               </object>
+                                               <reference key="parent" ref="905380397"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">433</int>
+                                               <reference key="object" ref="909242683"/>
+                                               <reference key="parent" ref="480614555"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">372</int>
+                                               <reference key="object" ref="974333112"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="704933364"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">437</int>
+                                               <reference key="object" ref="704933364"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="406002025"/>
+                                               </object>
+                                               <reference key="parent" ref="974333112"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">373</int>
+                                               <reference key="object" ref="406002025"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="377807140"/>
+                                               </object>
+                                               <reference key="parent" ref="704933364"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">374</int>
+                                               <reference key="object" ref="377807140"/>
+                                               <reference key="parent" ref="406002025"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">375</int>
+                                               <reference key="object" ref="756716156"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="250050000"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">438</int>
+                                               <reference key="object" ref="250050000"/>
+                                               <reference key="parent" ref="756716156"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">376</int>
+                                               <reference key="object" ref="520754405"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="357908493"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">439</int>
+                                               <reference key="object" ref="357908493"/>
+                                               <reference key="parent" ref="520754405"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">377</int>
+                                               <reference key="object" ref="209443714"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="759680945"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">440</int>
+                                               <reference key="object" ref="759680945"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="818968097"/>
+                                               </object>
+                                               <reference key="parent" ref="209443714"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">378</int>
+                                               <reference key="object" ref="818968097"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <reference key="parent" ref="759680945"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">381</int>
+                                               <reference key="object" ref="883251677"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="772706255"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">441</int>
+                                               <reference key="object" ref="772706255"/>
+                                               <reference key="parent" ref="883251677"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">382</int>
+                                               <reference key="object" ref="73177792"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="628758664"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">442</int>
+                                               <reference key="object" ref="628758664"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="43580679"/>
+                                               </object>
+                                               <reference key="parent" ref="73177792"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">383</int>
+                                               <reference key="object" ref="43580679"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="743243700"/>
+                                                       <reference ref="861216580"/>
+                                                       <reference ref="1055069863"/>
+                                               </object>
+                                               <reference key="parent" ref="628758664"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">384</int>
+                                               <reference key="object" ref="743243700"/>
+                                               <reference key="parent" ref="43580679"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">385</int>
+                                               <reference key="object" ref="861216580"/>
+                                               <reference key="parent" ref="43580679"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">386</int>
+                                               <reference key="object" ref="1055069863"/>
+                                               <reference key="parent" ref="43580679"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">387</int>
+                                               <reference key="object" ref="481859478"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="924080416"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">443</int>
+                                               <reference key="object" ref="924080416"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="315291325"/>
+                                               </object>
+                                               <reference key="parent" ref="481859478"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">388</int>
+                                               <reference key="object" ref="315291325"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="190127574"/>
+                                               </object>
+                                               <reference key="parent" ref="924080416"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">389</int>
+                                               <reference key="object" ref="190127574"/>
+                                               <reference key="parent" ref="315291325"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">390</int>
+                                               <reference key="object" ref="77959229"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="53742849"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">444</int>
+                                               <reference key="object" ref="53742849"/>
+                                               <reference key="parent" ref="77959229"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">391</int>
+                                               <reference key="object" ref="330951148"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="977695033"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">445</int>
+                                               <reference key="object" ref="977695033"/>
+                                               <reference key="parent" ref="330951148"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">392</int>
+                                               <reference key="object" ref="886708797"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="599934816"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">446</int>
+                                               <reference key="object" ref="599934816"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="516423135"/>
+                                               </object>
+                                               <reference key="parent" ref="886708797"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">393</int>
+                                               <reference key="object" ref="516423135"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="800243038"/>
+                                                       <reference ref="74930922"/>
+                                                       <reference ref="355639808"/>
+                                                       <reference ref="66439489"/>
+                                               </object>
+                                               <reference key="parent" ref="599934816"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">394</int>
+                                               <reference key="object" ref="800243038"/>
+                                               <reference key="parent" ref="516423135"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">395</int>
+                                               <reference key="object" ref="74930922"/>
+                                               <reference key="parent" ref="516423135"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">419</int>
+                                               <reference key="object" ref="221748721"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="935187078"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">447</int>
+                                               <reference key="object" ref="935187078"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="320562235"/>
+                                               </object>
+                                               <reference key="parent" ref="221748721"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">420</int>
+                                               <reference key="object" ref="320562235"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="970323694"/>
+                                                       <reference ref="41252332"/>
+                                                       <reference ref="965174492"/>
+                                                       <reference ref="43693359"/>
+                                               </object>
+                                               <reference key="parent" ref="935187078"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">422</int>
+                                               <reference key="object" ref="970323694"/>
+                                               <reference key="parent" ref="320562235"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">423</int>
+                                               <reference key="object" ref="41252332"/>
+                                               <reference key="parent" ref="320562235"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">424</int>
+                                               <reference key="object" ref="35720189"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="848481335"/>
+                                               </object>
+                                               <reference key="parent" ref="748577971"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">448</int>
+                                               <reference key="object" ref="848481335"/>
+                                               <reference key="parent" ref="35720189"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">400</int>
+                                               <reference key="object" ref="187663135"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="890825038"/>
+                                                       <reference ref="968783268"/>
+                                                       <reference ref="953529258"/>
+                                                       <reference ref="947341082"/>
+                                               </object>
+                                               <reference key="parent" ref="139839684"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">457</int>
+                                               <reference key="object" ref="890825038"/>
+                                               <reference key="parent" ref="187663135"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">456</int>
+                                               <reference key="object" ref="968783268"/>
+                                               <reference key="parent" ref="187663135"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">455</int>
+                                               <reference key="object" ref="953529258"/>
+                                               <reference key="parent" ref="187663135"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">401</int>
+                                               <reference key="object" ref="947341082"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="250812599"/>
+                                                       <reference ref="154488326"/>
+                                                       <reference ref="33037969"/>
+                                                       <reference ref="927247421"/>
+                                               </object>
+                                               <reference key="parent" ref="187663135"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">410</int>
+                                               <reference key="object" ref="250812599"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="747882536"/>
+                                               </object>
+                                               <reference key="parent" ref="947341082"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">404</int>
+                                               <reference key="object" ref="154488326"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="134898927"/>
+                                               </object>
+                                               <reference key="parent" ref="947341082"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">403</int>
+                                               <reference key="object" ref="33037969"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="410742283"/>
+                                               </object>
+                                               <reference key="parent" ref="947341082"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">402</int>
+                                               <reference key="object" ref="927247421"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="864164384"/>
+                                               </object>
+                                               <reference key="parent" ref="947341082"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">451</int>
+                                               <reference key="object" ref="864164384"/>
+                                               <reference key="parent" ref="927247421"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">452</int>
+                                               <reference key="object" ref="410742283"/>
+                                               <reference key="parent" ref="33037969"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">453</int>
+                                               <reference key="object" ref="134898927"/>
+                                               <reference key="parent" ref="154488326"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">454</int>
+                                               <reference key="object" ref="747882536"/>
+                                               <reference key="parent" ref="250812599"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">466</int>
+                                               <reference key="object" ref="355639808"/>
+                                               <reference key="parent" ref="516423135"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">467</int>
+                                               <reference key="object" ref="965174492"/>
+                                               <reference key="parent" ref="320562235"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">468</int>
+                                               <reference key="object" ref="43693359"/>
+                                               <reference key="parent" ref="320562235"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">469</int>
+                                               <reference key="object" ref="66439489"/>
+                                               <reference key="parent" ref="516423135"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">470</int>
+                                               <reference key="object" ref="840995182"/>
+                                               <reference key="parent" ref="204695612"/>
+                                       </object>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="flattenedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>-1.IBPluginDependency</string>
+                                       <string>-2.IBPluginDependency</string>
+                                       <string>-3.IBPluginDependency</string>
+                                       <string>-3.ImportedFromIB2</string>
+                                       <string>103.IBPluginDependency</string>
+                                       <string>103.ImportedFromIB2</string>
+                                       <string>106.IBPluginDependency</string>
+                                       <string>106.ImportedFromIB2</string>
+                                       <string>106.editorWindowContentRectSynchronizationRect</string>
+                                       <string>111.IBPluginDependency</string>
+                                       <string>111.ImportedFromIB2</string>
+                                       <string>112.IBPluginDependency</string>
+                                       <string>112.ImportedFromIB2</string>
+                                       <string>124.IBPluginDependency</string>
+                                       <string>124.ImportedFromIB2</string>
+                                       <string>125.IBPluginDependency</string>
+                                       <string>125.ImportedFromIB2</string>
+                                       <string>125.editorWindowContentRectSynchronizationRect</string>
+                                       <string>126.IBPluginDependency</string>
+                                       <string>126.ImportedFromIB2</string>
+                                       <string>129.IBPluginDependency</string>
+                                       <string>129.ImportedFromIB2</string>
+                                       <string>130.IBPluginDependency</string>
+                                       <string>130.ImportedFromIB2</string>
+                                       <string>130.editorWindowContentRectSynchronizationRect</string>
+                                       <string>131.IBPluginDependency</string>
+                                       <string>131.ImportedFromIB2</string>
+                                       <string>134.IBPluginDependency</string>
+                                       <string>134.ImportedFromIB2</string>
+                                       <string>136.IBPluginDependency</string>
+                                       <string>136.ImportedFromIB2</string>
+                                       <string>143.IBPluginDependency</string>
+                                       <string>143.ImportedFromIB2</string>
+                                       <string>144.IBPluginDependency</string>
+                                       <string>144.ImportedFromIB2</string>
+                                       <string>145.IBPluginDependency</string>
+                                       <string>145.ImportedFromIB2</string>
+                                       <string>149.IBPluginDependency</string>
+                                       <string>149.ImportedFromIB2</string>
+                                       <string>150.IBPluginDependency</string>
+                                       <string>150.ImportedFromIB2</string>
+                                       <string>19.IBPluginDependency</string>
+                                       <string>19.ImportedFromIB2</string>
+                                       <string>195.IBPluginDependency</string>
+                                       <string>195.ImportedFromIB2</string>
+                                       <string>196.IBPluginDependency</string>
+                                       <string>196.ImportedFromIB2</string>
+                                       <string>197.IBPluginDependency</string>
+                                       <string>197.ImportedFromIB2</string>
+                                       <string>198.IBPluginDependency</string>
+                                       <string>198.ImportedFromIB2</string>
+                                       <string>199.IBPluginDependency</string>
+                                       <string>199.ImportedFromIB2</string>
+                                       <string>2.IBPluginDependency</string>
+                                       <string>2.ImportedFromIB2</string>
+                                       <string>200.IBPluginDependency</string>
+                                       <string>200.ImportedFromIB2</string>
+                                       <string>201.IBPluginDependency</string>
+                                       <string>201.ImportedFromIB2</string>
+                                       <string>202.IBPluginDependency</string>
+                                       <string>202.ImportedFromIB2</string>
+                                       <string>203.IBPluginDependency</string>
+                                       <string>203.ImportedFromIB2</string>
+                                       <string>204.IBPluginDependency</string>
+                                       <string>204.ImportedFromIB2</string>
+                                       <string>205.IBPluginDependency</string>
+                                       <string>205.ImportedFromIB2</string>
+                                       <string>205.editorWindowContentRectSynchronizationRect</string>
+                                       <string>206.IBPluginDependency</string>
+                                       <string>206.ImportedFromIB2</string>
+                                       <string>207.IBPluginDependency</string>
+                                       <string>207.ImportedFromIB2</string>
+                                       <string>208.IBPluginDependency</string>
+                                       <string>208.ImportedFromIB2</string>
+                                       <string>209.IBPluginDependency</string>
+                                       <string>209.ImportedFromIB2</string>
+                                       <string>21.IBPluginDependency</string>
+                                       <string>21.IBWindowTemplateEditedContentRect</string>
+                                       <string>21.ImportedFromIB2</string>
+                                       <string>21.NSWindowTemplate.visibleAtLaunch</string>
+                                       <string>21.editorWindowContentRectSynchronizationRect</string>
+                                       <string>21.windowTemplate.hasMaxSize</string>
+                                       <string>21.windowTemplate.hasMinSize</string>
+                                       <string>21.windowTemplate.maxSize</string>
+                                       <string>21.windowTemplate.minSize</string>
+                                       <string>210.IBPluginDependency</string>
+                                       <string>210.ImportedFromIB2</string>
+                                       <string>211.IBPluginDependency</string>
+                                       <string>211.ImportedFromIB2</string>
+                                       <string>212.IBPluginDependency</string>
+                                       <string>212.ImportedFromIB2</string>
+                                       <string>213.IBPluginDependency</string>
+                                       <string>213.ImportedFromIB2</string>
+                                       <string>214.IBPluginDependency</string>
+                                       <string>214.ImportedFromIB2</string>
+                                       <string>215.IBPluginDependency</string>
+                                       <string>215.ImportedFromIB2</string>
+                                       <string>216.IBPluginDependency</string>
+                                       <string>216.ImportedFromIB2</string>
+                                       <string>217.IBPluginDependency</string>
+                                       <string>217.ImportedFromIB2</string>
+                                       <string>218.IBPluginDependency</string>
+                                       <string>218.ImportedFromIB2</string>
+                                       <string>219.IBPluginDependency</string>
+                                       <string>219.ImportedFromIB2</string>
+                                       <string>220.IBPluginDependency</string>
+                                       <string>220.ImportedFromIB2</string>
+                                       <string>221.IBPluginDependency</string>
+                                       <string>221.ImportedFromIB2</string>
+                                       <string>23.IBPluginDependency</string>
+                                       <string>23.ImportedFromIB2</string>
+                                       <string>236.IBPluginDependency</string>
+                                       <string>236.ImportedFromIB2</string>
+                                       <string>239.IBPluginDependency</string>
+                                       <string>239.ImportedFromIB2</string>
+                                       <string>24.IBPluginDependency</string>
+                                       <string>24.ImportedFromIB2</string>
+                                       <string>24.editorWindowContentRectSynchronizationRect</string>
+                                       <string>246.IBPluginDependency</string>
+                                       <string>246.ImportedFromIB2</string>
+                                       <string>248.IBPluginDependency</string>
+                                       <string>248.ImportedFromIB2</string>
+                                       <string>248.editorWindowContentRectSynchronizationRect</string>
+                                       <string>249.IBPluginDependency</string>
+                                       <string>249.ImportedFromIB2</string>
+                                       <string>259.IBPluginDependency</string>
+                                       <string>259.ImportedFromIB2</string>
+                                       <string>259.editorWindowContentRectSynchronizationRect</string>
+                                       <string>260.IBPluginDependency</string>
+                                       <string>260.ImportedFromIB2</string>
+                                       <string>289.IBPluginDependency</string>
+                                       <string>289.ImportedFromIB2</string>
+                                       <string>29.IBPluginDependency</string>
+                                       <string>29.ImportedFromIB2</string>
+                                       <string>29.editorWindowContentRectSynchronizationRect</string>
+                                       <string>290.IBPluginDependency</string>
+                                       <string>290.ImportedFromIB2</string>
+                                       <string>297.IBPluginDependency</string>
+                                       <string>297.ImportedFromIB2</string>
+                                       <string>303.IBPluginDependency</string>
+                                       <string>303.ImportedFromIB2</string>
+                                       <string>303.editorWindowContentRectSynchronizationRect</string>
+                                       <string>333.CustomClassName</string>
+                                       <string>333.IBPluginDependency</string>
+                                       <string>333.ImportedFromIB2</string>
+                                       <string>345.IBPluginDependency</string>
+                                       <string>345.ImportedFromIB2</string>
+                                       <string>346.IBPluginDependency</string>
+                                       <string>346.ImportedFromIB2</string>
+                                       <string>347.IBPluginDependency</string>
+                                       <string>347.ImportedFromIB2</string>
+                                       <string>348.IBPluginDependency</string>
+                                       <string>348.ImportedFromIB2</string>
+                                       <string>349.IBPluginDependency</string>
+                                       <string>349.ImportedFromIB2</string>
+                                       <string>350.IBPluginDependency</string>
+                                       <string>350.ImportedFromIB2</string>
+                                       <string>351.IBPluginDependency</string>
+                                       <string>351.ImportedFromIB2</string>
+                                       <string>352.IBPluginDependency</string>
+                                       <string>352.ImportedFromIB2</string>
+                                       <string>353.IBPluginDependency</string>
+                                       <string>353.ImportedFromIB2</string>
+                                       <string>354.IBPluginDependency</string>
+                                       <string>354.ImportedFromIB2</string>
+                                       <string>356.IBPluginDependency</string>
+                                       <string>356.ImportedFromIB2</string>
+                                       <string>365.IBPluginDependency</string>
+                                       <string>365.ImportedFromIB2</string>
+                                       <string>366.CustomClassName</string>
+                                       <string>366.IBPluginDependency</string>
+                                       <string>366.ImportedFromIB2</string>
+                                       <string>372.IBPluginDependency</string>
+                                       <string>372.ImportedFromIB2</string>
+                                       <string>373.IBPluginDependency</string>
+                                       <string>373.ImportedFromIB2</string>
+                                       <string>374.IBPluginDependency</string>
+                                       <string>374.ImportedFromIB2</string>
+                                       <string>375.IBPluginDependency</string>
+                                       <string>375.ImportedFromIB2</string>
+                                       <string>376.IBPluginDependency</string>
+                                       <string>376.ImportedFromIB2</string>
+                                       <string>377.IBPluginDependency</string>
+                                       <string>377.ImportedFromIB2</string>
+                                       <string>378.IBPluginDependency</string>
+                                       <string>378.ImportedFromIB2</string>
+                                       <string>378.editorWindowContentRectSynchronizationRect</string>
+                                       <string>381.IBPluginDependency</string>
+                                       <string>381.ImportedFromIB2</string>
+                                       <string>382.IBPluginDependency</string>
+                                       <string>382.ImportedFromIB2</string>
+                                       <string>383.IBPluginDependency</string>
+                                       <string>383.ImportedFromIB2</string>
+                                       <string>383.editorWindowContentRectSynchronizationRect</string>
+                                       <string>384.IBPluginDependency</string>
+                                       <string>384.ImportedFromIB2</string>
+                                       <string>385.IBPluginDependency</string>
+                                       <string>385.ImportedFromIB2</string>
+                                       <string>386.IBPluginDependency</string>
+                                       <string>386.ImportedFromIB2</string>
+                                       <string>387.IBPluginDependency</string>
+                                       <string>387.ImportedFromIB2</string>
+                                       <string>388.IBPluginDependency</string>
+                                       <string>388.ImportedFromIB2</string>
+                                       <string>389.IBPluginDependency</string>
+                                       <string>389.ImportedFromIB2</string>
+                                       <string>390.IBPluginDependency</string>
+                                       <string>390.ImportedFromIB2</string>
+                                       <string>391.IBPluginDependency</string>
+                                       <string>391.ImportedFromIB2</string>
+                                       <string>392.IBPluginDependency</string>
+                                       <string>392.ImportedFromIB2</string>
+                                       <string>393.IBPluginDependency</string>
+                                       <string>393.ImportedFromIB2</string>
+                                       <string>393.editorWindowContentRectSynchronizationRect</string>
+                                       <string>394.IBPluginDependency</string>
+                                       <string>394.ImportedFromIB2</string>
+                                       <string>395.IBPluginDependency</string>
+                                       <string>395.ImportedFromIB2</string>
+                                       <string>396.IBPluginDependency</string>
+                                       <string>396.ImportedFromIB2</string>
+                                       <string>397.IBPluginDependency</string>
+                                       <string>397.ImportedFromIB2</string>
+                                       <string>398.IBPluginDependency</string>
+                                       <string>398.ImportedFromIB2</string>
+                                       <string>400.IBPluginDependency</string>
+                                       <string>400.ImportedFromIB2</string>
+                                       <string>401.IBPluginDependency</string>
+                                       <string>401.ImportedFromIB2</string>
+                                       <string>402.IBPluginDependency</string>
+                                       <string>402.ImportedFromIB2</string>
+                                       <string>403.IBPluginDependency</string>
+                                       <string>403.ImportedFromIB2</string>
+                                       <string>404.IBPluginDependency</string>
+                                       <string>404.ImportedFromIB2</string>
+                                       <string>410.IBPluginDependency</string>
+                                       <string>410.ImportedFromIB2</string>
+                                       <string>419.IBPluginDependency</string>
+                                       <string>419.ImportedFromIB2</string>
+                                       <string>420.IBPluginDependency</string>
+                                       <string>420.ImportedFromIB2</string>
+                                       <string>420.editorWindowContentRectSynchronizationRect</string>
+                                       <string>422.IBPluginDependency</string>
+                                       <string>422.ImportedFromIB2</string>
+                                       <string>423.IBPluginDependency</string>
+                                       <string>423.ImportedFromIB2</string>
+                                       <string>424.IBPluginDependency</string>
+                                       <string>424.ImportedFromIB2</string>
+                                       <string>451.IBShouldRemoveOnLegacySave</string>
+                                       <string>452.IBShouldRemoveOnLegacySave</string>
+                                       <string>453.IBShouldRemoveOnLegacySave</string>
+                                       <string>454.IBShouldRemoveOnLegacySave</string>
+                                       <string>455.IBShouldRemoveOnLegacySave</string>
+                                       <string>456.IBShouldRemoveOnLegacySave</string>
+                                       <string>457.IBShouldRemoveOnLegacySave</string>
+                                       <string>466.IBPluginDependency</string>
+                                       <string>467.IBPluginDependency</string>
+                                       <string>468.IBPluginDependency</string>
+                                       <string>469.IBPluginDependency</string>
+                                       <string>470.IBPluginDependency</string>
+                                       <string>5.IBPluginDependency</string>
+                                       <string>5.ImportedFromIB2</string>
+                                       <string>56.IBPluginDependency</string>
+                                       <string>56.ImportedFromIB2</string>
+                                       <string>57.IBPluginDependency</string>
+                                       <string>57.ImportedFromIB2</string>
+                                       <string>57.editorWindowContentRectSynchronizationRect</string>
+                                       <string>58.IBPluginDependency</string>
+                                       <string>58.ImportedFromIB2</string>
+                                       <string>72.IBPluginDependency</string>
+                                       <string>72.ImportedFromIB2</string>
+                                       <string>73.IBPluginDependency</string>
+                                       <string>73.ImportedFromIB2</string>
+                                       <string>74.IBPluginDependency</string>
+                                       <string>74.ImportedFromIB2</string>
+                                       <string>75.IBPluginDependency</string>
+                                       <string>75.ImportedFromIB2</string>
+                                       <string>77.IBPluginDependency</string>
+                                       <string>77.ImportedFromIB2</string>
+                                       <string>78.IBPluginDependency</string>
+                                       <string>78.ImportedFromIB2</string>
+                                       <string>79.IBPluginDependency</string>
+                                       <string>79.ImportedFromIB2</string>
+                                       <string>80.IBPluginDependency</string>
+                                       <string>80.ImportedFromIB2</string>
+                                       <string>81.IBPluginDependency</string>
+                                       <string>81.ImportedFromIB2</string>
+                                       <string>81.editorWindowContentRectSynchronizationRect</string>
+                                       <string>82.IBPluginDependency</string>
+                                       <string>82.ImportedFromIB2</string>
+                                       <string>83.IBPluginDependency</string>
+                                       <string>83.ImportedFromIB2</string>
+                                       <string>92.IBPluginDependency</string>
+                                       <string>92.ImportedFromIB2</string>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <reference ref="233394260"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="233394260"/>
+                                       <integer value="1" id="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{402, 708}, {234, 23}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{428, 668}, {146, 23}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{428, 713}, {64, 6}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{287, 488}, {253, 243}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <string>{{505, 676}, {213, 107}}</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>{{505, 676}, {213, 107}}</string>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <string>{3.40282e+38, 3.40282e+38}</string>
+                                       <string>{213, 107}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{331, 658}, {197, 73}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{533, 500}, {388, 212}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{404, 449}, {388, 420}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{81, 731}, {382, 20}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{57, 930}, {135, 65}}</string>
+                                       <string id="1061">WhiteBox</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="1061"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{488, 560}, {166, 4}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{488, 541}, {166, 53}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{602, 580}, {166, 83}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{602, 550}, {166, 83}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="233394260"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{93, 528}, {263, 203}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <string>{{245, 528}, {183, 203}}</string>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                                       <reference ref="233394260"/>
+                                       <reference ref="9"/>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="unlocalizedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="activeLocalization"/>
+                       <object class="NSMutableDictionary" key="localizations">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="sourceID"/>
+                       <int key="maxID">470</int>
+               </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes">
+                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">WhiteBox</string>
+                                       <string key="superclassName" id="759638804">NSBox</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey" id="393613534">IBProjectSource</string>
+                                               <string key="minorKey">WhiteBox.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <reference key="className" ref="1061"/>
+                                       <reference key="superclassName" ref="759638804"/>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey" id="1036851212">IBUserSource</string>
+                                               <reference key="minorKey" ref="554915519"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <reference key="className" ref="423379096"/>
+                                       <nil key="superclassName"/>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <reference key="majorKey" ref="1036851212"/>
+                                               <reference key="minorKey" ref="554915519"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <reference key="className" ref="1010"/>
+                                       <string key="superclassName" id="1039892128">NSObject</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <reference key="majorKey" ref="1036851212"/>
+                                               <reference key="minorKey" ref="554915519"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">ExpressController</string>
+                                       <reference key="superclassName" ref="1039892128"/>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>convertCancel:</string>
+                                                       <string>convertGo:</string>
+                                                       <string>openBrowse:</string>
+                                                       <string>openGo:</string>
+                                                       <string>openMatrixChanged:</string>
+                                                       <string>openShow:</string>
+                                                       <string>selectFolderSheetShow:</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string id="763273944">id</string>
+                                                       <reference ref="763273944"/>
+                                                       <reference ref="763273944"/>
+                                                       <reference ref="763273944"/>
+                                                       <reference ref="763273944"/>
+                                                       <reference ref="763273944"/>
+                                                       <reference ref="763273944"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>fConvertAspectPopUp</string>
+                                                       <string>fConvertAudioPopUp</string>
+                                                       <string>fConvertFolderPopUp</string>
+                                                       <string>fConvertFormatPopUp</string>
+                                                       <string>fConvertIndicator</string>
+                                                       <string>fConvertInfoString</string>
+                                                       <string>fConvertMaxWidthPopUp</string>
+                                                       <string>fConvertSubtitlePopUp</string>
+                                                       <string>fConvertTableView</string>
+                                                       <string>fConvertView</string>
+                                                       <string>fEmptyView</string>
+                                                       <string>fOpenBrowseButton</string>
+                                                       <string>fOpenFolderField</string>
+                                                       <string>fOpenGoButton</string>
+                                                       <string>fOpenIndicator</string>
+                                                       <string>fOpenMatrix</string>
+                                                       <string>fOpenPopUp</string>
+                                                       <string>fOpenProgressField</string>
+                                                       <string>fOpenView</string>
+                                                       <string>fToolbar</string>
+                                                       <string>fWindow</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string id="1053025402">NSPopUpButton</string>
+                                                       <reference ref="1053025402"/>
+                                                       <reference ref="1053025402"/>
+                                                       <reference ref="1053025402"/>
+                                                       <string>NSProgressIndicator</string>
+                                                       <string id="888526260">NSTextField</string>
+                                                       <reference ref="1053025402"/>
+                                                       <reference ref="1053025402"/>
+                                                       <string>NSTableView</string>
+                                                       <reference ref="1059390944"/>
+                                                       <reference ref="1059390944"/>
+                                                       <string id="840177870">NSButton</string>
+                                                       <reference ref="888526260"/>
+                                                       <reference ref="840177870"/>
+                                                       <string>NSProgressIndicator</string>
+                                                       <string>NSMatrix</string>
+                                                       <reference ref="1053025402"/>
+                                                       <reference ref="888526260"/>
+                                                       <reference ref="1059390944"/>
+                                                       <string>NSToolbar</string>
+                                                       <reference ref="16484047"/>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <reference key="majorKey" ref="393613534"/>
+                                               <string key="minorKey">ExpressController.h</string>
+                                       </object>
+                               </object>
+                       </object>
+               </object>
+               <int key="IBDocument.localizationMode">0</int>
+               <string key="IBDocument.LastKnownRelativeProjectPath">../../InstantHandBrake.xcodeproj</string>
+               <int key="IBDocument.defaultPropertyAccessControl">3</int>
+               <object class="NSMutableData" key="IBDocument.RunnableNib">
+                       <bytes key="NS.bytes">YnBsaXN0MDDUAAEAAgADAAQABQAGAAkAClgkdmVyc2lvblQkdG9wWSRhcmNoaXZlclgkb2JqZWN0cxIA
+AYag0QAHAAhdSUIub2JqZWN0ZGF0YYABXxAPTlNLZXllZEFyY2hpdmVyrxEEDAALAAwAMQA1ADkAQABD
+AEQASQBlAGYAZwBoAGsAbABtAGwAdQB5AHoAawB7AH4AggC/AMcAygDLAO4A/wALAQABCAESARMBFgEd
+ATIBMwE2AT0BUgFTAV8BYAFoAWkBbAF2AXcBeAF8AX4BgwGEAYcBjQGXAZgBnQGiAaMBpgGrAawBrgGx
+AbsBvAHDAcYBzQHXAdgB3gHlAe8B8AH2AfcB/gICAgcCCAILAg4CDwITAhcCJwIsAi0CLgIzAjQCNQI4
+AjwCPQJAAkECRAJIAk8CVAJVAlYCWwJjAmoCawKIAooClgKaApsCnAKfAqMCpQKqAq4CrwK0Ar0CxwAL
+AsgC1QLWAtcC2QLbAtwC4ALnAugC6QLqAu8DCgMRAxIDFwMgAyEDJQMmAykDKwM0AzUDNgGLAzcDPgM/
+A0cDSANMANwDUQNVA1YDWgNcA18DYQNmA2cDagNrA3ADeAN5A4UDhwOQA5QCmwOVA5cDnQOmApsDpwOw
+ApsDsQOyA7cDvwPEA8UDxgPHA8wD1APdA94D5gPnA+oD/gP/BAAEBAQLBBMEFAQfBCQEJQQqBCsEMwQ0
+BD0EPgRCBEQERQRGBEcETQROBFEEVARhBGMEZgRnBGoEcgRzBHoACwR7AHgEfQSABIEEhQSMBJAEkQSS
+BJMEmASgBKEErwSxBLUEtwS6BLsEwATBBMUEzATQBNEE0gTTBNcE3gTfBOAE4QTlBOwE8ATxBPIE9wT/
+BQAFDAUOBRcFGwKbBRwFHgUiBSMFJwUuBTIFMwU0BTUFOgVDBUcCmwVIBVQFVQVZBWAFYQViBWMFaAVx
+BXoFggWDBYoFiwWTBZUFlgWeBZ8FpgWnBbQFuAXHBc8F0AXYBdkF4QXiBekF6gXyBfMF+gX7BgMGBAYG
+ApsGDwYRBhcCmwYkBiwGLQY0BjUGPQY+BkUGRgZOBk8GWwZdBmYGagKbBmsGbQZ0Bn0CmwZ+BocCmwaI
+BpECmwaSBpoGmwanBqoGrAa1BrkCmwa6BrwGwwKbBswG1QKbBtYG3wKbBuAG6AbpBvAG8QbyBvMG+Qb7
+BwMHBAcLBwwHFwcbByIHJgcuBzIHMwc2B0AHQQdCB0UHTwdQB1QHVQdWB1kHWgdbB2EHYwdlAAsHZgdo
+B2kHbgdvB3QHdQd5B4AHgQeCB4MHhweOB48HkAeVB5wHnQeeB6IHqQeuB68HsAexB7UHvAe9B74HvwfD
+B8oHzgfPB9AH0QfVB9wH3QfeB+MH5AfpB+oH7wfwB/UH9gf7B/wIAAgHCAgICQgOCBUIFggXCBwIHQgi
+CCMIJwguCC8IMAgxCDYINwg8CD0IQghIAHcISQhKCE4IVQhWCFcIWAhcCGMIZAhlCGYIawhyCHMIdAh4
+CH8IgAiBCIYIhwiMCI0IkQiYCJkImgieCKUIpginCKsIsgizCLQItQi5CMAIwQjCCMMIyAjJCM0I1AjV
+CNYI2wjiCOMI5AjlCOoI7gj1CPYI9wmcCaMJpAmlCawJrQmuCbcJvgm/CcIJxgnPCdQJ1wnaCdsJ5Ant
+CfYKAAnBCgUKBgoPCdYKBQoYChsKKQowCjEKMgo7CgUKPAo+CkIKQwpKCksKTApTClQKVQpcCl0KYApw
+CnkKggqLCgUKjAqOCpYKnwoFCqAKpgqvCgUKsAq1ChoKBQq+Cs0KzgA4CtEK1ArbCuQK5QpfCgUK7grv
+CvcKBQsACtMKBQsJCwoLrwxVDPsM/Az9DP4M/w0ADQENAg0DDQQNBQ0GDQcNCA0JDQoNCw0MDQ0NDg0P
+DRANEQ0SDRMNFA0VDRYNFw0YDRkNGg0bDRwNHQ0eDR8NIA0hDSINIw0kDSUNJg0nDSgNKQ0qDSsNLA0t
+DS4NLw0wDTENMg0zDTQNNQ02DTcNOA05DToNOw08DT0NPg0/DUANQQ1CDUMNRA1FDUYNRw1IDUkNSg1L
+DUwNTQ1ODU8NUA1RDVINUw1UDVUNVg1XDVgNWQ1aDVsNXA1dDV4NXw1gDWENYg1jDWQNZQ1mDWcNaA1p
+DWoNaw1sDW0Nbg1vDXANcQ1yDXMNdA11DXYNdw14DXkNeg17DXwNfQ1+DX8NgA2BDYINgw2EDYUNhg2H
+DYgNiQ2KDYsNjA2NDY4Njw2QDZENkg2TDZQNlQ2WDZcNmA2ZDZoNmw2cDaENpg6GD2YPZw9oD2kPag9r
+D2wPbQ9uD28PcA9xD3IPcw90D3UPdg93D3gPeQ96D3sPfA99D34Pfw+AD4EPgg+DD4QPhQ+GD4cPiA+J
+D4oPiw+MD40Pjg+PD5APkQ+SD5MPlA+VD5YPlw+YD5kPmg+bD5wPnQ+eD58PoA+hD6IPow+kD6UPpg+n
+D6gPqQ+qD6sPrA+tD64Prw+wD7EPsgKFD7MPtA+1D7YPtw+4D7kPug+7ArkPvA+9D74Pvw/AD8EPwg/D
+D8QPxQ/GD8cPyA/JD8oPyw/MD80Pzg/PD9AP0Q/SD9MAYQ/UD9UP1g/XD9gP2Q/aD9sP3A/dD94P3w/g
+D+EP4g/jD+QP5Q/mD+cP6A/pD+oP6w/sD+0P7g/vD/AP8Q/yD/MC0g/0D/UP9g/3D/gP+Q/6D/sP/A/9
+D/4P/xAAEAEQAhADEAQQBRAGEAcQCBAJEAoQCxAMEA0QDhAPEBAQERASEBMQFBAVEBYQFxAYEBkQGhAb
+EBwQHRAeEB8QIBAhECIQIxAkECUQJhAnECgQKRAqECsQLBAtEC4QLxAwAnwQMRAyEDMQNBA1EDYQNxA4
+EDkQOhA7EDwQPRA+EEEQRBBHVSRudWxs3xASAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwA
+HQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwVk5TUm9vdFYkY2xhc3NdTlNPYmpl
+Y3RzS2V5c18QD05TQ2xhc3Nlc1ZhbHVlc18QGU5TQWNjZXNzaWJpbGl0eU9pZHNWYWx1ZXNdTlNDb25u
+ZWN0aW9uc1tOU05hbWVzS2V5c1tOU0ZyYW1ld29ya11OU0NsYXNzZXNLZXlzWk5TT2lkc0tleXNdTlNO
+YW1lc1ZhbHVlc18QGU5TQWNjZXNzaWJpbGl0eUNvbm5lY3RvcnNdTlNGb250TWFuYWdlcl8QEE5TVmlz
+aWJsZVdpbmRvd3NfEA9OU09iamVjdHNWYWx1ZXNfEBdOU0FjY2Vzc2liaWxpdHlPaWRzS2V5c1lOU05l
+eHRPaWRcTlNPaWRzVmFsdWVzgAKBBAuBAi2BAyiBBAqAF4EChIAGgQMngQMpgQKFgQQIgACAB4ECg4EE
+CREB2IEDKtIADgAyADMANFtOU0NsYXNzTmFtZYAFgAPSAA4ANgA3ADhZTlMuc3RyaW5ngARdTlNBcHBs
+aWNhdGlvbtIAOgA7ADwAPVgkY2xhc3Nlc1okY2xhc3NuYW1lowA9AD4AP18QD05TTXV0YWJsZVN0cmlu
+Z1hOU1N0cmluZ1hOU09iamVjdNIAOgA7AEEAQqIAQgA/Xk5TQ3VzdG9tT2JqZWN0XxAQSUJDb2NvYUZy
+YW1ld29ya9IADgBFAEYAR1pOUy5vYmplY3RzgBahAEiACN4ASgAOAEsATABNAE4ATwBQAFEAUgBTAFQA
+VQBWAFcAWABZAFoAWwBcAF0AXgBfAGAAYQBiAGMAZFxOU1dpbmRvd1ZpZXdfEBZOU1dpbmRvd0NvbnRl
+bnRNYXhTaXplXE5TU2NyZWVuUmVjdF1OU1dpbmRvd1RpdGxlWU5TV1RGbGFnc11OU1dpbmRvd0NsYXNz
+XxAWTlNXaW5kb3dDb250ZW50TWluU2l6ZVxOU1dpbmRvd1JlY3RZTlNNYXhTaXplXxAPTlNXaW5kb3dC
+YWNraW5nXxARTlNXaW5kb3dTdHlsZU1hc2tZTlNNaW5TaXplW05TVmlld0NsYXNzgA+AFYANgBKAChJw
+KAAAgAuADoAJgBQQAhAHgBOADF8QGHt7MTI1LCA4MjZ9LCB7MjEzLCAxMDd9fV8QEUluc3RhbnQgSGFu
+ZEJyYWtlWE5TV2luZG930gAOADYANwBqgARUVmlld18QGnszLjQwMjgyZSszOCwgMy40MDI4MmUrMzh9
+WnsyMTMsIDEwN33UAG4ADgBvAHAAKwByAHMAdF8QD05TTmV4dFJlc3BvbmRlclhOU3ZGbGFnc1tOU0Zy
+YW1lU2l6ZYAAgBERAQCAENIAOgA7AHYAd6MAdwB4AD9WTlNWaWV3W05TUmVzcG9uZGVyXxAWe3swLCAw
+fSwgezE2ODAsIDEwMjh9fVp7MjEzLCAxMjl90gA6ADsAfAB9ogB9AD9fEBBOU1dpbmRvd1RlbXBsYXRl
+0gA6ADsAfwCAowCAAIEAP1xOU011dGFibGVTZXRVTlNTZXTSAA4ARQCDAISAUK8QOgCFAIYAhwCIAIkA
+igCLAIwAjQCOAI8AkACRAJIAkwCUAJUAlgCXAJgAmQCaAJsAnACdAJ4AnwCgAKEAogCjAKQApQCmAKcA
+qACpAKoAqwCsAK0ArgCvALAAsQCyALMAtAC1ALYAtwC4ALkAugC7ALwAvQC+gBiAV4BlgGqAeoCFgIqA
+q4C9gMOA8YD3gQEAgQECgQEIgQENgQESgQEegQEkgQErgQEwgQGrgQGtgQGvgQG0gQG4gQG8gQHCgQHH
+gQHNgQHRgQHTgQHVgQHXgQHZgQHbgQHfgQHjgQHlgQHngQHsgQHugQHwgQH1gQH6gQH/gQIDgQIHgQIJ
+gQILgQIPgQITgQIYgQIdgQIfgQIjgQIogQIp1AAOAMAAwQDCAMMAxADFAMZdTlNEZXN0aW5hdGlvblhO
+U1NvdXJjZVdOU0xhYmVsgFaAG4AZgFXSAA4AMgAzAMmABYAaXxARRXhwcmVzc0NvbnRyb2xsZXLfEBQA
+bgDMAA4AzQDOAM8A0ADRANIA0wDUAG8AcADVAGcA1gDXANgA2QDaANsA3ADdAN4A3wDgAOEA4gDjAOQA
+5QBzAOYA4QDoAOkA6gDbAOwA7V8QH05TRHJhZ2dpbmdTb3VyY2VNYXNrRm9yTm9uTG9jYWxZTlNUdkZs
+YWdzXE5TSGVhZGVyVmlld18QEU5TQmFja2dyb3VuZENvbG9yXxASTlNBbGxvd3NUeXBlU2VsZWN0XE5T
+Q29ybmVyVmlld18QF05TSW50ZXJjZWxsU3BhY2luZ1dpZHRoXxAZTlNDb2x1bW5BdXRvcmVzaXppbmdT
+dHlsZV8QGE5TSW50ZXJjZWxsU3BhY2luZ0hlaWdodFlOU0VuYWJsZWRbTlNHcmlkQ29sb3JfEBxOU0Ry
+YWdnaW5nU291cmNlTWFza0ZvckxvY2FsW05TU3VwZXJ2aWV3Xk5TVGFibGVDb2x1bW5zW05TUm93SGVp
+Z2h0gBwQAIBUEhLgAACAH4AyCYAjI0AIAAAAAAAAEAQjQAAAAAAAAACAHQmAHoBREA+AHIAnI0AxAAAA
+AAAA2wBuAA4A7wDwAPEAbwDyAGcA8wDYAPQA9QD2APcA5AD4APkAxADoAPwA9QDEV05TRnJhbWVZTlNj
+dkZsYWdzWk5TU3Vidmlld3NZTlNEb2NWaWV3WU5TQkdDb2xvcl1OU05leHRLZXlWaWV3gCSBAZeBAZaB
+AZURCQCAG4AegDuAJIAbWXszNDcsIDc3fdcAbgAOAG8AcABnANgBAQECAQMAcwEEAOgBAgDEW05TVGFi
+bGVWaWV3gCCAIoAhgB6AIIAb2wBuAA4A7wDwAPEAbwDyAGcA8wDYAPQA9QD2AQsA5AEMAPkA3wDoAPwA
+9QDfgCSBAZeBAZ+BAZ6AH4AegDuAJIAfWXszNDcsIDE3fdIAOgA7ARQBFaQBFQB3AHgAP18QEU5TVGFi
+bGVIZWFkZXJWaWV31gBuAA4A7wBvAGcA2AD1ARgBGQEaAOgA9YAkgCaAJRP/////gAABAIAegCTfEA8A
+bgEeAA4A7wEfANEBIADxASEAbwBnANgBIgD0ASMBJAElASYBJwEoAOIBAgErASwAcwDoASQBLwDbANtb
+TlNIU2Nyb2xsZXJYTlNzRmxhZ3NfEBBOU0hlYWRlckNsaXBWaWV3XE5TU2Nyb2xsQW10c1tOU1ZTY3Jv
+bGxlcl1OU0NvbnRlbnRWaWV3gQGSgQGcgQGhgQGgEQKSgCOAIIEBlE8QEAAAAAAAAAAAQZgAAEGYAACA
+HoEBkoEBmIAcgBxfEBR7ey0yNiwgMH0sIHsxNiwgMTd9fdIAOgA7ATQBNaQBNQB3AHgAP11fTlNDb3Ju
+ZXJWaWV30gAOAEUAgwE4gFCkATkBOgE7ATyAKIBCgEeAS9sBPgAOAT8BQAFBAUIBQwFEAUUBRgEBAOEB
+SAFJAUoBSwFMAU0BTgFPAOEAxF5OU0lzUmVzaXplYWJsZVxOU0hlYWRlckNlbGxcTlNJZGVudGlmaWVy
+V05TV2lkdGhaTlNEYXRhQ2VsbF5OU1Jlc2l6aW5nTWFza1pOU01pbldpZHRoWk5TTWF4V2lkdGhcTlNJ
+c0VkaXRhYmxlCYBBgCqAKSNANwAAAAAAAIA4EAMjQCQAAAAAAAAjQI9AAAAAAAAJgBtVQ2hlY2vXAVQA
+DgDPAVUBVgFXAVgBWQFaAVsBXAFdANwBXltOU0NlbGxGbGFnc1pOU0NvbnRlbnRzWU5TU3VwcG9ydFxO
+U0NlbGxGbGFnczJbTlNUZXh0Q29sb3ISBAH+AIA3gC+AK4AsgDRQ1AAOAWEBYgFjAWQBZQFmAWdWTlNT
+aXplVk5TTmFtZVhOU2ZGbGFnc4AuI0AmAAAAAAAAgC0RDBxcTHVjaWRhR3JhbmRl0gA6ADsBagFrogFr
+AD9WTlNGb2501QAOAW0BbgFvAXABcQDgAXMBdAF1V05TQ29sb3JcTlNDb2xvclNwYWNlW05TQ29sb3JO
+YW1lXU5TQ2F0YWxvZ05hbWWAM4AyEAaAMYAwVlN5c3RlbVtoZWFkZXJDb2xvctMADgFuAXkBcQFNAXtX
+TlNXaGl0ZYAzQjEA0gA6ADsBfQFtogFtAD/VAA4BbQFuAW8BcAFxAYABcwGBAXWAM4A2gDWAMF8QD2hl
+YWRlclRleHRDb2xvctMADgFuAXkBcQFNAYaAM0IwANIAOgA7AYgBiaUBiQGKAYsBjAA/XxARTlNUYWJs
+ZUhlYWRlckNlbGxfEA9OU1RleHRGaWVsZENlbGxcTlNBY3Rpb25DZWxsVk5TQ2VsbNgBVAAOAM8BVQFW
+AY4BVwFYAY8BkAD8AZIBkwDEAZUBll1OU0NvbnRyb2xWaWV3EhQh/kCAQIA7gDmAOoAbEQgAgD5ZVGV4
+dCBDZWxs1AAOAWEBYgFjAWQBmgFmAZyALiNAKgAAAAAAAIAtEQQU1QAOAW0BbgFvAXABcQGfAXMBoAF1
+gDOAPYA8gDBfEBZjb250cm9sQmFja2dyb3VuZENvbG9y0wAOAW4BeQFxAU0BpYAzSzAuNjY2NjY2NjkA
+1QAOAW0BbgFvAXABcQGAAXMBqQF1gDOANoA/gDBfEBBjb250cm9sVGV4dENvbG9y0gA6ADsBrQGKpAGK
+AYsBjAA/0gA6ADsBrwGwogGwAD9dTlNUYWJsZUNvbHVtbtsBPgAOAT8BQAFBAUIBQwFEAUUBRgEBAOEB
+SAG0AbUBtgG3AU0BuAFPAOEAxAmAQYBEgEMjQE//L+AAAACARiNARP8v4AAAAAmAG1VUaXRsZdcBVAAO
+AM8BVQFWAVcBWAG9AVoBvwG1AV0A3AFeEgSB/gCAN4BFgEOALIA00wAOAW4BeQFxAU0BxYAzSzAuMzMz
+MzMyOTkA2AFUAA4AzwFVAVYBjgFXAVgBjwGQAPwBkgGTAMQBlQGWgECAO4A5gDqAG4A+2wE+AA4BPwFA
+AUEBQgFDAUQBRQFGAQEA4QFIAdAB0QHSAdMBTQHUAU8A4QDECYBBgEmASCNAYLUQAAAAAIBKI0BQ6iAA
+AAAACYAbWER1cmF0aW9u1wFUAA4AzwFVAVYBVwFYAVkBWgFbAdEBXQDcAV6AN4AvgEiALIA02AFUAA4A
+zwFVAVYBjgFXAVgBjwGQAPwBkgGTAMQBlQGWgECAO4A5gDqAG4A+2wE+AA4BPwFAAUEBQgFDAUQBRQFG
+AQEA4QFIAegB6QHqAesBTQHsAU8A4QDECYBBgE2ATCNAXHbIwAAAAIBPI0BWgAAAAAAACYAbVFNpemXX
+AVQADgDPAVUBVgFXAVgBWQFaAVsB8wFdANwBXoA3gC+AToAsgDRfEBBTaXplIChDb252ZXJ0ZWQp2AFU
+AA4AzwFVAVYBjgFXAVgBjwGQAPwBkgGTAMQBlQGWgECAO4A5gDqAG4A+0gA6ADsB/wIAowIAAgEAP15O
+U011dGFibGVBcnJheVdOU0FycmF51QAOAW0BbgFvAXABcQIEAXMCBQF1gDOAU4BSgDBZZ3JpZENvbG9y
+0wAOAW4BeQFxAU0CCoAzRDAuNQDSADoAOwIMAQGlAQECDQB3AHgAP1lOU0NvbnRyb2xfEBFmQ29udmVy
+dFRhYmxlVmlld9IAOgA7AhACEaMCEQISAD9fEBROU05pYk91dGxldENvbm5lY3Rvcl5OU05pYkNvbm5l
+Y3RvctMADgDBAMICFAIVAhaAZIBYgGPYAA4CGAIZAhoCGwIcAh0CHgIfAiACIQIiAiMCJAIlAiZXTlNU
+aXRsZV8QEU5TS2V5RXF1aXZNb2RNYXNrWk5TS2V5RXF1aXZdTlNNbmVtb25pY0xvY1lOU09uSW1hZ2Vc
+TlNNaXhlZEltYWdlVk5TTWVudYBigFoSABAAAIBbEn////+AXIBggFnTAA4CGAIoAikCKgIrW05TTWVu
+dUl0ZW1zgHaBAlyBAl1UVW5kb1F60wAOADICLwIwAjECMl5OU1Jlc291cmNlTmFtZYBfgF2AXldOU0lt
+YWdlXxAPTlNNZW51Q2hlY2ttYXJr0gA6ADsCNgI3ogI3AD9fEBBOU0N1c3RvbVJlc291cmNl0wAOADIC
+LwIwAjECO4BfgF2AYV8QEE5TTWVudU1peGVkU3RhdGXSADoAOwI+Aj+iAj8AP1pOU01lbnVJdGVtVXVu
+ZG860gA6ADsCQgJDowJDAhIAP18QFU5TTmliQ29udHJvbENvbm5lY3RvctMADgDBAMICFAJGAkeAZIBm
+gGnYAA4CGAIZAhoCGwIcAh0CHgIfAkoCIQFcAiMCJAIlAk6AYoBogCuAXIBggGfUAA4CGAFiAigCKQJR
+AlICU4B2gQJRgQJTgQJSWkNsZWFyIE1lbnVfEBVjbGVhclJlY2VudERvY3VtZW50czrUAA4AwADBAMIA
+wwJYAMUCWoBWgGuAGYB52ABuAA4A7wGMAG8A1QBnANgCXAJdAl4CXwBzAOEA6AJcgGyAeIBtgG4JgB6A
+bNcAbgAOAO8A8QBvAGcA2AJkAHICZgJnAHMA6AJkgQE+gBGBAYiBAUCAHoEBPl8QFnt7MTY2LCAxMX0s
+IHsxNjYsIDI2fX3fEBMBVAJsAm0CbgJvAA4CcAJxAnIBVgI/AY4CcwJ0AnUCdgFXAh4CdwJ4AOECegFc
+AnwCfQJ6AZMCfwGTAoECWAFNAOEA4QKFAZUChgKHXxAaTlNNZW51SXRlbVJlc3BlY3RBbGlnbm1lbnRf
+EA9OU0Fycm93UG9zaXRpb25fEBNOU0FsdGVybmF0ZUNvbnRlbnRzXxASTlNQZXJpb2RpY0ludGVydmFs
+Xk5TQnV0dG9uRmxhZ3MyXxAQTlNBbHRlcm5hdGVJbWFnZV8QD05TS2V5RXF1aXZhbGVudF8QD05TUHJl
+ZmVycmVkRWRnZV8QEk5TVXNlc0l0ZW1Gcm9tTWVudV1OU0FsdGVyc1N0YXRlXxAPTlNQZXJpb2RpY0Rl
+bGF5XU5TQnV0dG9uRmxhZ3MT/////4RB/kAJEAGAKxBLgHeAOoBvgDqAcIBrCQkRAZCAcRIGgkD/0gAO
+ADYANwFfgATbAosADgIYAhkCGgIbAhwCHQIeAowCjQJfAh8CkAIhAVwCIwIkAiUChgKVAnpYTlNUYXJn
+ZXRYTlNBY3Rpb25XTlNTdGF0ZYBugGKAcoArgFyAYIBxgHPTAA4CGAIoAikCmAKZgHaAdIB1YiAmACBf
+EBFfcG9wVXBJdGVtQWN0aW9uOtIADgA2ADcCnoAEWk90aGVyVmlld3PSAA4ARQCDAqGAUKECgYBw0gA6
+ADsCpAIeogIeAD/SADoAOwKmAqemAqcCqAKpAYsBjAA/XxARTlNQb3BVcEJ1dHRvbkNlbGxeTlNNZW51
+SXRlbUNlbGxcTlNCdXR0b25DZWxs0gA6ADsCqwKspgKsAq0CDQB3AHgAP11OU1BvcFVwQnV0dG9uWE5T
+QnV0dG9uXxAVZkNvbnZlcnRTdWJ0aXRsZVBvcFVw1AAOAMAAwQDCAMMCsQDFArOAVoB7gBmAhNgAbgAO
+AO8BjABvANUAZwDYArUCtgK3ArgCuQDhArsCtYB8gIOAfYB/EQEhCYB+gHzZAG4ADgDxAG8AcABnADIC
+vgDYArsCwALBAHMCwgK7AsQCxQLGW05TRXh0ZW5zaW9ugH6A74DEgOuAfoDtgO6A7F8QFXt7Mjk1LCAx
+Mn0sIHs3OSwgMzJ9fd0BVAAOAm4CbwJwAnECcgFVAVYBjgJ2AVcCdwLJAsoBXALMAnoBkwLOAs8BkwKx
+AtIC0wLUE/////+EAf4AgIKAKxAZgDqAgYCAgDqAexDIEggAAAAT/////4aCQP9UT3BlblEN0gA6ADsC
+2AKppAKpAYsBjAA/0gA6ADsC2gKtpQKtAg0AdwB4AD9dZk9wZW5Hb0J1dHRvbtMADgDBAMICFALeAt+A
+ZICGgInYAA4CGAIZAhoCGwIcAh0CHgIfAuICIQLjAiMCJAIlAiaAYoCHgIiAXIBggFlTQ3V0UXhUY3V0
+OtQADgDAAMEAwgDDAuwAxQLugFaAi4AZgKrfEBMAbgAOAO8C8ALxAvIAzwLzAvQBawL1AG8A1QBnAvYA
+2AL3AvgC+QL6AvsC/AL9AGEC/gL/AwAA4AGTAwMAcwDhArsCegL6AwcDCAMJW05TUHJvdG9DZWxsWU5T
+TnVtUm93c15OU1NlbGVjdGVkQ2VsbFtOU0NlbGxDbGFzc18QFU5TQ2VsbEJhY2tncm91bmRDb2xvclpO
+U0NlbGxTaXplWU5TTnVtQ29sc18QEk5TSW50ZXJjZWxsU3BhY2luZ11OU01hdHJpeEZsYWdzV05TQ2Vs
+bHOAjICpgI2AmoCPgKeAmYAygDqAlwmAfoCMgJgSRCgAAICO1wBuAA4A7wDxAG8AZwDYAwsAcgMNAw4A
+cwK7AwuAyoARgNyAzoB+gMpfEBV7ezEzLCA0MX0sIHsxMzUsIDU3fX3SAA4ARQCDAxSAUKIC/gMWgI+A
+ld0BVAAOAm4CbwJwAnECcgFVAVYBjgJ2AVcCdwLJAsoDGQLMANwDGgMZAxwBkwLsAtIA3AMfgIKAlICR
+gJSAkIA6gIsSSDxR/1pEVkQgRHJpdmU60gAOAyIDIwMkW05TSW1hZ2VOYW1lgJOAkl1OU1JhZGlvQnV0
+dG9u0gA6ADsDJwMoogMoAD9fEBNOU0J1dHRvbkltYWdlU291cmNl0gAOADYANwFfgATeAVQADgJuAm8C
+cAJxAnIBVQFWAY4CdgFXAncDLAFZAsoDGQLMANwDGgMZAzEBkwLsAtIA3AMfAnpVTlNUYWeAgoCUgJGA
+lICWgDqAi18QEkRWRCBGb2xkZXIgLyBGaWxlOll7MTM1LCAxOH1XezQsIDIxfdsBVAAOAzgCbwJwAnEB
+VQFWAnYBVwJ3AVkCygM6AnwA3AMaAzwBkwKFANwDH11OU05vcm1hbEltYWdlgIKAnICRgJuAOlVSYWRp
+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
+AA4AwADBAMIAwwNtAMUDb4BWgKyAGYC82ABuAA4A7wGMAG8A1QBnANgC+gJdA3MDdABzAOECuwL6gIyA
+eICtgK4JgH6AjF8QFnt7MTUzLCA3NX0sIHsxODEsIDI2fX3fEBMBVAJsAm0CbgJvAA4CcAJxAnIBVgI/
+AY4CcwJ0AnUCdgFXAh4CdwJ4AOECegFcAnwCfQJ6AZMDfgGTA4ADbQFNAOEA4QKFAZUDhAKHCYArgHeA
+OoCvgDqAsICsCQmAsdIADgA2ADcBX4AE2wKLAA4CGAIZAhoCGwIcAh0CHgKMAo0DdAIfA4oCIQFcAiMC
+JAIlA4QDjwJ6gK6AYoCygCuAXIBggLGAs9MADgIYAigCKQOSA5OAdoC0gLVVSXRlbTHSAA4ANgA3Ap6A
+BNIADgBFAIMDmYBQowOAA5sDnICwgLaAudoCiwAOAhgCGQIaAhsCHAIdAh4CjAN0Ah8DoAIhAVwCIwIk
+AiUDhAOlgK6AYoC3gCuAXIBggLGAuFVJdGVtMtoCiwAOAhgCGQIaAhsCHAIdAh4CjAN0Ah8DqgIhAVwC
+IwIkAiUDhAOvgK6AYoC6gCuAXIBggLGAu1VJdGVtM1pmT3BlblBvcFVw1AAOAMAAwQDCAhQAHwO1A7aA
+ZIACgL6AwtgADgIYAhkCGgIbAhwCHQIeAh8DuQO6A7sCIwIkAiUDvoBigMASABgAAIDBgFyAYIC/1AAO
+AhgBYgIoAikAWwPCA8OAdoAKgQJxgQJwW0hpZGUgT3RoZXJzUWhfEBZoaWRlT3RoZXJBcHBsaWNhdGlv
+bnM61AAOAMAAwQDCAMMCtQDFA8uAVoB8gBmA8NIADgBFAIMDzoBQpQPPArEDCwPSA9OAxYB7gMqA44Do
+2ABuAA4A7wGMAG8A1QBnANgCtQPWA9cD2APZAOECuwK1gHyAyYDGgMcRAQwJgH6AfF8QFXt7MTcsIDE4
+NX0sIHs5OSwgMTd9fdgBVAAOAM8BVQFWAY4BVwFYAVkBkAL/A+EBkwPPA+QBloBAgKeAyIA6gMUSEEAA
+AIA+XxAPU2VsZWN0IGEgU291cmNl0gA6ADsD6APppQPpAg0AdwB4AD9bTlNUZXh0RmllbGTfEBAAbgPr
+AA4D7ADvA+0D7gDxAG8D7wBnADID8APxANgBIwK1AU0D8wP0A/UD9gP3A/gD2QJ6ArsD+gP7ANwCtQL6
+WU5TQm94VHlwZVtOU1RpdGxlQ2VsbF8QE05TT3JpZ2luYWxDbGFzc05hbWVdTlNUcmFuc3BhcmVudFxO
+U0JvcmRlclR5cGVZTlNPZmZzZXRzXxAPTlNUaXRsZVBvc2l0aW9ugHyA4oDfgN2AzAiAzYB+gMuA3oB8
+gIxYV2hpdGVCb3hVTlNCb3jSAA4ARQCDBAKAUKEC+oCM0gAOAEUAgwQGgFCkAuwDbQQJBAqAi4CsgM+A
+1tgAbgAOAO8BjABvANUAZwDYAvoD1gQOBA8AcwDhArsC+oCMgMmA0IDRCYB+gIxfEBZ7ezE1NiwgNDB9
+LCB7MTc1LCAyMn192QFUAA4AzwFVAVYBjgFXBBUBWAQWAZAEGAFcAZMECQQcAOEEHl8QEU5TRHJhd3NC
+YWNrZ3JvdW5kE/////+Ucf5BgECA0oArgDqAzxIQQAQACYDU1QAOAW0BbgFvAXABcQDgAXMEIgF1gDOA
+MoDTgDBfEBN0ZXh0QmFja2dyb3VuZENvbG9y1QAOAW0BbgFvAXABcQGAAXMEKAF1gDOANoDVgDBZdGV4
+dENvbG9y2ABuAA4A7wGMAG8A1QBnANgC+gK2BC4ELwBzAOECuwL6gIyAg4DXgNgJgH6AjF8QFHt7MjU2
+LCA4fSwgezgwLCAyOH193QFUAA4CbgJvAnACcQJyAVUBVgGOAnYBVwJ3AVkCygFcAswCegQ3BDgEOQFd
+BAoC0gQ8AtSAgoArgNqA24DZgCyA1hIIAgAAZwBCAHIAbwB3AHMAZSAm1AAOAWEBYgFjAWQBZQFmBEGA
+LoAtEBDSAA4ANgA3AV+ABF8QFHt7MSwgMX0sIHszNDYsIDExNX19XxAWe3syMCwgNjB9LCB7MzQ4LCAx
+MTd9fVZ7MCwgMH3XAVQADgDPAVUBVgFXAVgBWQGQBBgESgFdANwETIBAgNKA4IAsgOFTQm940wAOAW4B
+eQFxAU0EUIAzTTAgMC44MDAwMDAwMQDSADoAOwRSBFOiBFMAP15OU0NsYXNzU3dhcHBlctkAbgAOAO8E
+VQBvAGcEVgDYBFcCtQRZBFoEWwRcArsEXgK1BGBaTlNNYXhWYWx1ZVlOU3BpRmxhZ3NcTlNEcmF3TWF0
+cml4gHyA54DmI0BZAAAAAAAAE/////+AAAUMgH4RQAyAfIDk0QAOBGKA5dIAOgA7BGQEZaIEZQA/Wk5T
+UFNNYXRyaXhfEBZ7ezE4LCAtMjl9LCB7MzUyLCAyMH190gA6ADsEaARppARpAHcAeAA/XxATTlNQcm9n
+cmVzc0luZGljYXRvctgAbgAOAO8BjABvANUAZwDYArUD1gRtBG4D2QDhArsCtYB8gMmA6YDqCYB+gHxf
+EBV7ezE3LCAyMH0sIHsyNzksIDE3fX3YAVQADgDPAVUBVgGOAVcBWAFZAZAC/wFcAZMD0wPkAZaAQICn
+gCuAOoDogD5aezM4OCwgMjEyfdIADgA2ADcAd4AE0gA6ADsEfgR/pAR/AHcAeAA/XE5TQ3VzdG9tVmll
+d1lmT3BlblZpZXfTAA4AwQDCAhQEgwSEgGSA8oD22QAOAhgCGQIaAhsCHAIdAh4DLAIfBIcCIQSIAiMC
+JAIlBIsAYoBigPSA9YBcgGCA89MADgIYAigCKQSOBI+AdoECY4ECZF8QFlVzZSBTZWxlY3Rpb24gZm9y
+IEZpbmRRZV8QF3BlcmZvcm1GaW5kUGFuZWxBY3Rpb2461AAOAMAAwQDCAMMElQDFBJeAVoD4gBmA/9gA
+bgAOAO8BjABvANUAZwDYAlwCXQSbBJwAcwDhAOgCXIBsgHiA+YD6CYAegGxfEBd7ezE2NiwgMTMxfSwg
+ezE2NiwgMjZ9fd8QFAFUAmwCbQJuAm8ADgJwAnECcgFWAj8BjgJzAnQCdQJ2AVcCHgJ3BKICeADhAnoB
+XAJ8An0CegGTBKcBkwArBJUBTQDhAOEChQGVBK0ChwSuXxAPTlNTZWxlY3RlZEluZGV4CYArgHeAOoD7
+gDqAAID4CQmA/BP//////////9IADgA2ADcBX4AE0wAOAhgCKAIpBLMEtIB2gP2A/tIADgA2ADcCnoAE
+0gAOAEUAgwS5gFCgXxATZkNvbnZlcnRGb3JtYXRQb3BVcNQADgDAAMEAwgIUAMUCsQS/gGSAGYB7gQEB
+V29wZW5HbzrTAA4AwQDCAhQEwwTEgGSBAQOBAQfYAA4CGAIZAhoCGwIcAh0CHgIfBMcCIQTIAiMCJAIl
+BMuAYoEBBYEBBoBcgGCBAQTTAA4CGAIoAikEzgTPgHaBAjeBAjhfEBZJbnN0YW50IEhhbmRCcmFrZSBI
+ZWxwUT9Zc2hvd0hlbHA60wAOAMEAwgIUBNUE1oBkgQEJgQEM2AAOAhgCGQIaAhsCHAIdAh4CHwTZAiEE
+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
+DgDvAYwAbwDVAGcA2AJcA9YF3AXdAHMA4QDoAlyAbIDJgQFGgQFHCYAegGxfEBV7ezg3LCAxMzd9LCB7
+NzcsIDE3fX3YAVQADgDPAVUBVgGOAVcBWAFZAZAC/wXlAZMFvQXWAZaAQICngQFIgDqBAUWAPlxGaWxl
+IGZvcm1hdDrYAG4ADgDvAYwAbwDVAGcA2AJcA9YF7QXuAHMA4QDoAlyAbIDJgQFKgQFLCYAegGxfEBZ7
+ezE0LCAxNjd9LCB7MTUwLCAxN3192AFUAA4AzwFVAVYBjgFXAVgBWQGQAv8F9gGTBb8F1gGWgECAp4EB
+TIA6gQFJgD5fEBhTYXZlIGNvbnZlcnRlZCBmaWxlcyB0bzrYAG4ADgDvAYwAbwDVAGcA2AJcAl0F/gU7
+AHMA4QDoAlyAbIB4gQFOgQEpCYAegGxfEBd7ezE2NiwgMTYxfSwgezE2NiwgMjZ9fdIADgA2ADcBX4AE
+2wKLAA4CGAIZAhoCGwIcAh0CHgKMAo0FOwIfBRECIQFcAiMCJAIlBUEGDgJ6gQEpgGKBARmAK4BcgGCB
+ASaBAVHSAA4ANgA3Ap6ABNIADgBFAIMGE4BQowVPBhUFOIEBUIEBVIEBJdwCiwAOAhgCGQYYAhoGGQIb
+AhwCHQIeAowFOwIfAVwCIQDhAVwA4QIjAiQCJQVBBiNdTlNJc1NlcGFyYXRvclxOU0lzRGlzYWJsZWSB
+ASmAYoArCYArCYBcgGCBASaBAVXYAG4ADgDvAYwAbwDVAGcA2AJcA9YGJwYoAHMA4QDoAlyAbIDJgQFX
+gQFYCYAegGxfEBV7ezM2LCAxN30sIHsxMjgsIDE3fX3YAVQADgDPAVUBVgGOAVcBWAFZAZAC/wYwAZMF
+wgXWAZaAQICngQFZgDqBAVaAPl8QFFByZWZlcnJlZCBzdWJ0aXRsZXM62ABuAA4A7wGMAG8A1QBnANgC
+XAPWBjgGOQBzAOEA6AJcgGyAyYEBW4EBXAmAHoBsXxAVe3s2NiwgMTA3fSwgezk4LCAxN3192AFUAA4A
+zwFVAVYBjgFXAVgBWQGQAv8GQQGTBcMF1gGWgECAp4EBXYA6gQFagD5fEA9QaWN0dXJlIEFzcGVjdDrY
+AG4ADgDvAYwAbwDVAGcA2AJcAl0GSQZKAHMA4QDoAlyAbIB4gQFfgQFgCYAegGxfEBd7ezE2NiwgMTAx
+fSwgezE2NiwgMjZ9fd8QEwFUAmwCbQJuAm8ADgJwAnECcgFWAj8BjgJzAnQCdQJ2AVcCHgJ3AngA4QJ6
+AVwCfAJ9AnoBkwZUAZMGVgXEAU0A4QDhAoUBlQZaAocJgCuAd4A6gQFhgDqBAWKBAV4JCYEBY9IADgA2
+ADcBX4AE2wKLAA4CGAIZAhoCGwIcAh0CHgKMAo0GSgIfBmACIQFcAiMCJAIlBloGZQJ6gQFggGKBAWSA
+K4BcgGCBAWOBAWXTAA4CGAIoAikGaAZpgHaBAWaBAWdYT3JpZ2luYWzSAA4ANgA3Ap6ABNIADgBFAIMG
+b4BQpAZWBnEGcgZzgQFigQFogQFrgQFu2gKLAA4CGAIZAhoCGwIcAh0CHgKMBkoCHwZ3AiEBXAIjAiQC
+JQZaBnyBAWCAYoEBaYArgFyAYIEBY4EBalY0IGJ5IDPaAosADgIYAhkCGgIbAhwCHQIeAowGSgIfBoEC
+IQFcAiMCJAIlBloGhoEBYIBigQFsgCuAXIBggQFjgQFtVzE2IGJ5IDnaAosADgIYAhkCGgIbAhwCHQIe
+AowGSgIfBosCIQFcAiMCJAIlBloGkIEBYIBigQFvgCuAXIBggQFjgQFwWkFuYW1vcnBoaWPYAG4ADgDv
+AYwAbwDVAGcA2AJcAl0GlQaWAHMA4QDoAlyAbIB4gQFygQFzCYAegGxfEBZ7ezE2NiwgNzF9LCB7MTY2
+LCAyNn193xAUAVQCbAJtAm4CbwAOAnACcQJyAVYCPwGOAnMCdAJ1AnYBVwIeAncEogJ4AOECegFcAnwC
+fQJ6Bp8GoAGTBqIFxQFNAOEA4QKFAZUGpgKHAnoJgCuAd4EBdIEBdYA6gQF2gQFxCQmBAXfUAA4BYQFi
+AWMBZAGaAWYEQYAugC3SAA4ANgA3AV+ABNsCiwAOAhgCGQIaAhsCHAIdAh4CjAKNBpYCHwavAiEBXAIj
+AiQCJQamBrQCeoEBc4BigQF4gCuAXIBggQF3gQF50wAOAhgCKAIpBrcGuIB2gQF6gQF7UzY0MNIADgA2
+ADcCnoAE0gAOAEUAgwa+gFCkBr8GogbBBsKBAXyBAXaBAX6BAYHaAosADgIYAhkCGgIbAhwCHQIeAowG
+lgIfBmACIQFcAiMCJAIlBqYGy4EBc4BigQFkgCuAXIBggQF3gQF92gKLAA4CGAIZAhoCGwIcAh0CHgKM
+BpYCHwbPAiEBXAIjAiQCJQamBtSBAXOAYoEBf4ArgFyAYIEBd4EBgFM0ODDaAosADgIYAhkCGgIbAhwC
+HQIeAowGlgIfBtkCIQFcAiMCJAIlBqYG3oEBc4BigQGCgCuAXIBggQF3gQGDUzMyMNgAbgAOAO8BjABv
+ANUAZwDYAlwD1gbjBuQAcwDhAOgCXIBsgMmBAYWBAYYJgB6AbF8QFXt7NDIsIDc3fSwgezEyMiwgMTd9
+fdgBVAAOAM8BVQFWAY4BVwFYAVkBkAL/BuwBkwXGBdYBloBAgKeBAYeAOoEBhIA+XxASTWF4IFBpY3R1
+cmUgV2lkdGg6XxAUe3sxLCAxfSwgezM0NiwgMjAwfX1fEBZ7ezIwLCA2OX0sIHszNDgsIDIwMn191wFU
+AA4AzwFVAVYBVwFYAVkBkAQYBEoBXQDcBviAQIDSgOCALIEBi9MADgFuAXkBcQFNBFCAM9gAbgAOAO8B
+jABvANUAZwDYBWUD1gb+Bv8AcwDhAOgFZYEBMYDJgQGNgQGOCYAegQExXxAVe3sxNywgNDR9LCB7MzU0
+LCAxN3192AFUAA4AzwFVAVYBjgFXAVgBWQGQAv8HBwGTBXgD5AGWgECAp4EBj4A6gQGMgD5VUmVhZHne
+AG4D6wAOA+wA7wPuAPEAbwPvAGcD8APxANgBIwVlAU0HDgcPBxAD9wcSAHMCegDoA/sA3AVlASSBATGB
+AaaBAaSBAaMIgQGRgB6A3oEBMYEBktIADgBFAIMHGYBQoQEkgQGS1wBuAA4A7wDxAG8AZwDYBXkAcgce
+Bx8AcwDoBXmBAZCAEYEBooEBk4AegQGQ0gAOAEUAgwckgFChAPWAJNIADgBFAIMHKIBQpQDbAS8BJQEC
+AOKAHIEBmIEBnIAggCPSAA4ARQCDBzCAUKEAxIAbXxAUe3sxLCAxN30sIHszNDYsIDc3fX3SADoAOwc0
+BzWkBzUAdwB4AD9aTlNDbGlwVmlld9kAbgKLAA4A7wBvAGcCjADYBzcA9QD1BzoHOwEaAOgHPQD1Bz9Z
+TlNQZXJjZW50gCSAJIEBm4EBmYAegQGagCQjP9nv1QAAAABfEBV7ezMzMiwgMTd9LCB7MTUsIDc3fX1c
+X2RvU2Nyb2xsZXI60gA6ADsHQwdEpQdEAg0AdwB4AD9aTlNTY3JvbGxlctsAbgKLAA4A7wEfAG8A1QBn
+AowA2Ac3APUA9Qc6B0kCegBzAOEA6Ac9APUHToAkgCSBAZuBAZ0JgB6BAZqAJCM/7fIYIAAAAF8QGXt7
+LTEwMCwgLTEwMH0sIHszNzksIDE1fX3SAA4ARQCDB1KAUKEA34AfXxATe3sxLCAwfSwgezM0NiwgMTd9
+fV8QFXt7LTEsIC0xfSwgezM0OCwgOTV9fdIAOgA7B1cHWKQHWAB3AHgAP1xOU1Njcm9sbFZpZXdfEBN7
+ezEsIDF9LCB7MzQ2LCA5M319XxAWe3syMCwgMjk1fSwgezM0OCwgOTV9fdcBVAAOAM8BVQFWAVcBWAFZ
+AZAEGARKAV0A3AdggECA0oDggCyBAaXTAA4BbgF5AXEBTQRQgDPSADoAOwdkA/+kA/8AdwB4AD9aezM4
+OCwgNDIwfdIADgA2ADcAd4AEXGZDb252ZXJ0Vmlld9QADgDAAMEAwgDDAEgAxQdtgFaACIAZgQGsV2ZX
+aW5kb3fUAA4AwADBAMIAwwV4AMUHc4BWgQGMgBmBAa5fEBJmQ29udmVydEluZm9TdHJpbmfTAA4AwQDC
+AhQHdwd4gGSBAbCBAbPYAA4CGAIZAhoCGwIcAh0CHgIfB3sCIQd8AiMCJAIlAiaAYoEBsYEBsoBcgGCA
+WVRSZWRvUVpVcmVkbzrTAA4AwQDCAhQHhQeGgGSBAbWBAbfYAA4CGAIZAhoCGwIcAh0CHgIfB4kCIQFc
+AiMCJAIlAiaAYoEBtoArgFyAYIBZVkRlbGV0ZVdkZWxldGU61AAOAMAAwQDCAhQAHweTB5SAZIACgQG5
+gQG71wAOAhgCGgIbAhwCHQIeAh8HlwFcAiMCJAIlA76AYoEBuoArgFyAYIC/XxAXQWJvdXQgSW5zdGFu
+dCBIYW5kQnJha2VfEB1vcmRlckZyb250U3RhbmRhcmRBYm91dFBhbmVsOtMADgDBAMICFAegB6GAZIEB
+vYEBwdgADgIYAhkCGgIbAhwCHQIeAh8HpAIhB6UCIwIkAiUHqIBigQG/gQHAgFyAYIEBvtQADgIYAWIC
+KAIpB6sHrAetgHaBAnSBAneBAnVYTWluaW1pemVRbV8QE3BlcmZvcm1NaW5pYXR1cml6ZTrTAA4AwQDC
+AhQHswe0gGSBAcOBAcbYAA4CGAIZAhoCGwIcAh0CHgIfB7cCIQe4AiMCJAIlAiaAYoEBxIEBxYBcgGCA
+WVpTZWxlY3QgQWxsUWFac2VsZWN0QWxsOtMADgDBAMICFAfBB8KAZIEByIEBzNgADgIYAhkCGgIbAhwC
+HQIeAh8HxQIhB8YCIwIkAiUHyYBigQHKgQHLgFyAYIEBydMADgIYAigCKQfMB82AdoECSYECSlVDbG9z
+ZVF3XXBlcmZvcm1DbG9zZTrTAA4AwQDCAhQH0wfUgGSBAc6BAdDYAA4CGAIZAhoCGwIcAh0CHgIfB9cC
+IQFcAiMCJAIlBOuAYoEBz4ArgFyAYIEBD15TdGFydCBTcGVha2luZ15zdGFydFNwZWFraW5nOtQADgDA
+AMEAwgIUAMUC7AfigGSAGYCLgQHSXxASb3Blbk1hdHJpeENoYW5nZWQ61AAOAMAAwQDCAMMFxADFB+iA
+VoEBXoAZgQHUXxATZkNvbnZlcnRBc3BlY3RQb3BVcNQADgDAAMEAwgIUAMUECgfugGSAGYDWgQHWW29w
+ZW5Ccm93c2U61AAOAMAAwQDCAMMECgDFB/SAVoDWgBmBAdhfEBFmT3BlbkJyb3dzZUJ1dHRvbtQADgDA
+AMEAwgDDA9MAxQf6gFaA6IAZgQHaXxASZk9wZW5Qcm9ncmVzc0ZpZWxk0wAOAMEAwgIUB/4H/4BkgQHc
+gQHe2AAOAhgCGQIaAhsCHAIdAh4CHwgCAiEBXAIjAiQCJQeogGKBAd2AK4BcgGCBAb5fEBJCcmluZyBB
+bGwgdG8gRnJvbnRfEA9hcnJhbmdlSW5Gcm9udDrUAA4AwADBAMICFAAfCAwIDYBkgAKBAeCBAeLYAA4C
+GAIZAhoCGwIcAh0CHgIfCBACIQO7AiMCJAIlA76AYoEB4YDBgFyAYIC/XxAWSGlkZSBJbnN0YW50IEhh
+bmRCcmFrZVVoaWRlOtQADgDAAMEAwgDDBAkAxQgbgFaAz4AZgQHkXxAQZk9wZW5Gb2xkZXJGaWVsZNQA
+DgDAAMEAwgDDBcUAxQghgFaBAXGAGYEB5l8QFWZDb252ZXJ0TWF4V2lkdGhQb3BVcNMADgDBAMICFAgl
+CCaAZIEB6IEB69gADgIYAhkCGgIbAhwCHQIeAh8IKQO6CCoCIwIkAiUCJoBigQHpgQHqgFyAYIBZXxAV
+UGFzdGUgYW5kIE1hdGNoIFN0eWxlUVZfEBFwYXN0ZUFzUGxhaW5UZXh0OtQADgDAAMEAwgDDAMUAxAg1
+gFaAGYAbgQHtWmRhdGFTb3VyY2XUAA4AwADBAMIAwwDFAMQIO4BWgBmAG4EB71hkZWxlZ2F0ZdQADgDA
+AMEAwgDDCD8AxQhBgFaBAfGAGYEB9NYAbgAOAG8AcAAyAr4AKwLAAHMIRQhGAsWAAIDvgQHygQHzgO5Z
+ezEzNSwgNjV9WmZFbXB0eVZpZXfTAA4AwQDCAhQITAhNgGSBAfaBAfnYAA4CGAIZAhoCGwIcAh0CHgIf
+CFACIQhRAiMCJAIlBIuAYoEB94EB+IBcgGCA818QEUp1bXAgdG8gU2VsZWN0aW9uUWpfEB1jZW50ZXJT
+ZWxlY3Rpb25JblZpc2libGVBcmVhOtMADgDBAMICFAhaCFuAZIEB+4EB/tgADgIYAhkCGgIbAhwCHQIe
+Ah8IXgIhCF8CIwIkAiUHyYBigQH8gQH9gFyAYIEByWsAUABhAGcAZQAgAFMAZQB0AHUAcCAmUVBecnVu
+UGFnZUxheW91dDrUAA4AwADBAMICFAAfCGkIaoBkgAKBAgCBAgLYAA4CGAIZAhoCGwIcAh0CHgIfCG0C
+IQFcAiMCJAIlA76AYoECAYArgFyAYIC/WFNob3cgQWxsXxAWdW5oaWRlQWxsQXBwbGljYXRpb25zOtMA
+DgDBAMICFAh2CHeAZIECBIECBtgADgIYAhkCGgIbAhwCHQIeAh8IegIhAVwCIwIkAiUHqIBigQIFgCuA
+XIBggQG+VFpvb21ccGVyZm9ybVpvb2061AAOAMAAwQDCAMMD0gDFCIWAVoDjgBmBAgheZk9wZW5JbmRp
+Y2F0b3LUAA4AwADBAMIAwwV1AMUIi4BWgQE3gBmBAgpfEBFmQ29udmVydEluZGljYXRvctMADgDBAMIC
+FAiPBISAZIECDID22QAOAhgCGQIaAhsCHAIdAh4DLAIfCJMCIQiUAiMCJAIlBIsAYYBigQINgQIOgFyA
+YIDzWUZpbmQgTmV4dFFn0wAOAMEAwgIUCJwEhIBkgQIQgPbZAA4CGAIZAhoCGwIcAh0CHgMsAh8IoAIh
+CKECIwIkAiUEiwFNgGKBAhGBAhKAXIBggPNdRmluZCBQcmV2aW91c1FH0wAOAMEAwgIUCKkIqoBkgQIU
+gQIX2AAOAhgCGQIaAhsCHAIdAh4CHwitAiEIrgIjAiQCJQfJgGKBAhWBAhaAXIBggQHJZgBQAHIAaQBu
+AHQgJlFwVnByaW50OtMADgDBAMICFAi3CLiAZIECGYECHNgADgIYAhkCGgIbAhwCHQIeAh8IuwIhCLwC
+IwIkAiUCJoBigQIagQIbgFyAYIBZVENvcHlRY1Vjb3B5OtQADgDAAMEAwgDDBVAAxQjHgFaBAU2AGYEC
+Hl8QE2ZDb252ZXJ0Rm9sZGVyUG9wVXDTAA4AwQDCAhQIywSEgGSBAiCA9tkADgIYAhkCGgIbAhwCHQIe
+AywCHwjPAiEI0AIjAiQCJQSLAnqAYoECIYECIoBcgGCA82UARgBpAG4AZCAmUWbUAA4AwADBAMICFAAf
+CNkI2oBkgAKBAiSBAifYAA4CGAIZAhoCGwIcAh0CHgIfCN0CIQjeAiMCJAIlA76AYoECJYECJoBcgGCA
+v18QFlF1aXQgSW5zdGFudCBIYW5kQnJha2VRcVp0ZXJtaW5hdGU61AAOAMAAwQDCAMMAxQAfCDuAVoAZ
+gAKBAe/TAA4AwQDCAhQI7AjtgGSBAiqBAizYAA4CGAIZAhoCGwIcAh0CHgIfCPACIQFcAiMCJAIlBS2A
+YoECK4ArgFyAYIEBIF8QGkNoZWNrIFNwZWxsaW5nIGFzIFlvdSBUeXBlXxAedG9nZ2xlQ29udGludW91
+c1NwZWxsQ2hlY2tpbmc60gAOAEUDTQj5gKSvEKIHwQW9BlYBJQj+BIMJAAkBBcUAVwkEBMsJBgBIA5sC
+WAV0BTsC7AW8A9IIjwEvAMUHdwE8BVcGWgK1CGkGSgkZAoYIWgkcCJwIDAkfBG4BOgkiAbcGFQa/A88F
+dgZzCSkJKgHTCSwHyQImAhUFLQezAv4H0wb/BNUHkwk3A9gFOAk6ATsH/gO+BWUFQQlAB6AFJQeoCUQC
+uAlGBAkDgAJfBjkGwQXGAv0CsQXLBOMJUQglBXgJVANtCHYFeQlYBcIHhQlbAwsElQYoAxYEDwTDCLcE
+9AXdCWUCRgZyCOwBOQVQAN8BTAltBC8FTwXECD8ErQWaBsIDnAUHCNkA9QULBPsGpgl8CEwFfgJkA4QF
+dQXDAesJhAXuCYYJhwmICMsGlgbkA3QFvwZxCKkCgQTrA9MDtQJOCZUEiwaiBAoEnADEAt6BAciBAUWB
+AWKBAZyBAi6A8oECMYECNIEBcYAPgQI1gQEEgQI5gAiAtoBrgQEzgQEpgIuBAUGA44ECDIEBmIAZgQGw
+gEuBASyBAWOAfIECAIEBYIECOoBxgQH7gQI+gQIQgQHggQI/gOqAQoECQIBGgQFUgQF8gMWBATqBAW6B
+AkGBAkWASoECRoEByYBZgFiBASCBAcOAj4EBzoEBjoEBCYEBuYECXoDHgQElgQJtgEeBAdyAv4EBMYEB
+JoECcoEBvYEBH4EBvoECeIB/gQJLgM+AsIBugQFcgQF+gQGEgJqAe4EBQ4EBDoECToEB6IEBjIECZYCs
+gQIEgQGQgQJagQFWgQG1gQJCgMqA+IEBWICVgNGBAQOBAhmBAROBAUeBAnaAZoEBa4ECKoAogQFNgB+A
+OIECf4DYgQFQgQFegQHxgPyBATyBAYGAuYEBF4ECJIAkgQEYgQEVgQF3gQJfgQH2gQE1gQE+gLGBATeB
+AVqAT4ECV4EBS4ECfYECVIECaYECIIEBc4EBhoCugQFJgQFogQIUgHCBAQ+A6IC+gGeBAmCA84EBdoDW
+gPqAG4CG2AAOAhgCGQIaAhsCHAIdAh4CHwmeAiEJnwIjAiQCJQO+gGKBAi+BAjCAXIBggL9sAFAAcgBl
+AGYAZQByAGUAbgBjAGUAcyAmUSzYAA4CGAIZAhoCGwIcAh0CHgIfCacCIQmoAiMCJAIlB8mAYoECMoEC
+M4BcgGCBAcllAE8AcABlAG4gJlFv2gAOAhgCGQYYAhoGGQIbAhwCHQIeAh8BXAIhAOEBXADhAiMCJAIl
+B8mAYoArCYArCYBcgGCBAcnYAA4CGAIZAhoCGwIcAh0CHgIfCbkCIQFcAiMCJAIlA76AYoECNoArgFyA
+YIC/bxARAEMAaABlAGMAawAgAGYAbwByACAAVQBwAGQAYQB0AGUgJtIADgA2ADcJwYAEVEhlbHDSAA4A
+RQCDCcSAUKEEw4EBA9oADgIYAhkGGAIaBhkCGwIcAh0CHgIfAVwCIQDhAVwA4QIjAiQCJQO+gGKAKwmA
+KwmAXIBggL/UAA4CGAFiAigCKQnRCdIJ04B2gQI7gQI9gQI80gAOADYANwnWgARYU2VydmljZXPSAA4A
+RQCDCdmAUKBfEA9fTlNTZXJ2aWNlc01lbnXaAA4CGAIZBhgCGgYZAhsCHAIdAh4CHwFcAiEA4QFcAOEC
+IwIkAiUHyYBigCsJgCsJgFyAYIEBydoADgIYAhkGGAIaBhkCGwIcAh0CHgIfAVwCIQDhAVwA4QIjAiQC
+JQO+gGKAKwmAKwmAXIBggL/aAA4CGAIZBhgCGgYZAhsCHAIdAh4CHwFcAiEA4QFcAOECIwIkAiUDvoBi
+gCsJgCsJgFyAYIC/2gAOCfcCGAIZAhoCGwIcAh0CHgKMAh8Eywn6AiEBXAIjAiQCJQlbCf9ZTlNTdWJt
+ZW51gGKBAQSBAkOAK4BcgGCBAkKBAkTUAA4CGAFiAigCKQoCCgMKBIB2gQJ7gQKCgQJ8XnN1Ym1lbnVB
+Y3Rpb2462gAOAhgCGQYYAhoGGQIbAhwCHQIeAh8BXAIhAOEBXADhAiMCJAIlA76AYoArCYArCYBcgGCA
+v9oADgn3AhgCGQIaAhsCHAIdAh4CjAIfCRkKEgIhAVwCIwIkAiUDvgoXgGKBAjqBAkeAK4BcgGCAv4EC
+SNIADgA2ADcKGoAEVEZpbGXSAA4ARQCDCh2AUKsJRgkACVEJAQfBCYcJhAlYCRwIWgipgQJLgQIxgQJO
+gQI0gQHIgQJUgQJXgQJagQI+gQH7gQIU2AAOAhgCGQIaAhsCHAIdAh4CHworAiEKLAIjAiQCJQfJgGKB
+AkyBAk2AXIBggQHJU05ld1Fu2gAOCfcCGAIZAhoCGwIcAh0CHgKMAh8CTgo1AiEBXAIjAiQCJQfJCjqA
+YoBngQJPgCuAXIBggQHJgQJQW09wZW4gUmVjZW500gAOADYANwo7gATSAA4ARQCDCkCAUKECRoBmXxAW
+X05TUmVjZW50RG9jdW1lbnRzTWVuddgADgIYAhkCGgIbAhwCHQIeAh8KRQIhCkYCIwIkAiUHyYBigQJV
+gQJWgFyAYIEByVRTYXZlUXPYAA4CGAIZAhoCGwIcAh0CHgIfCk4CIQpPAiMCJAIlB8mAYoECWIECWYBc
+gGCBAcloAFMAYQB2AGUAIABBAHMgJlFT1wAOAhgCGgIbAhwCHQIeAh8KVwFcAiMCJAIlB8mAYoECW4Ar
+gFyAYIEByVZSZXZlcnTSAA4ANgA3Cl+ABFRFZGl00gAOAEUAgwpigFCtAhUHdwk3At4ItwTVCCUHhQez
+CXwJlQlUCYiAWIEBsIECXoCGgQIZgQEJgQHogQG1gQHDgQJfgQJggQJlgQJp2gAOAhgCGQYYAhoGGQIb
+AhwCHQIeAh8BXAIhAOEBXADhAiMCJAIlAiaAYoArCYArCYBcgGCAWdoADgIYAhkGGAIaBhkCGwIcAh0C
+HgIfAVwCIQDhAVwA4QIjAiQCJQImgGKAKwmAKwmAXIBggFnaAA4J9wIYAhkCGgIbAhwCHQIeAowCHwSL
+CoUCIQFcAiMCJAIlAiYKioBigPOBAmGAK4BcgGCAWYECYlRGaW5k0gAOADYANwqLgATSAA4ARQCDCpCA
+UKUIywiPCJwEgwhMgQIggQIMgQIQgPKBAfbaAA4J9wIYAhkCGgIbAhwCHQIeAowCHwUtBTACIQFcAiMC
+JAIlAiYKnoBigQEggQJmgCuAXIBggFmBAmdYU3BlbGxpbmfSAA4ARQCDCqKAUKMFJQVXCOyBAR+BASyB
+AiraAA4J9wIYAhkCGgIbAhwCHQIeAowCHwTrBO4CIQFcAiMCJAIlAiYKroBigQEPgQJqgCuAXIBggFmB
+AmtWU3BlZWNo0gAOAEUAgwqygFCiB9ME44EBzoEBDtoADgn3AhgCGQIaAhsCHAIdAh4CjAIfB8kKuAIh
+AVwCIwIkAiUJWwq9gGKBAcmBAm6AK4BcgGCBAkKBAm/SAA4ARQCDCsCAUKwHkwkECSoI/gkiCSwJBggM
+A7UIaQkfCNmBAbmBAjWBAkWBAi6BAkCBAkaBAjmBAeCAvoECAIECP4ECJFxfTlNBcHBsZU1lbnXSAA4A
+MgAzCtCABYECc9IADgA2ADcK04AEVldpbmRvd9IADgBFAIMK1oBQpAegCHYJZQf+gQG9gQIEgQJ2gQHc
+2gAOAhgCGQYYAhoGGQIbAhwCHQIeAh8BXAIhAOEBXADhAiMCJAIlB6iAYoArCYArCYBcgGCBAb5eX05T
+V2luZG93c01lbnXaAA4J9wIYAhkCGgIbAhwCHQIeAowCHwImCugCIQFcAiMCJAIlCVsK7YBigFmBAnmA
+K4BcgGCBAkKBAnpYRW1iZWRkZWTSAA4ARQCDCvGAUKUJhgk6CUQJbQkpgQJ9gQJtgQJ4gQJ/gQJB2gAO
+CfcCGAIZAhoCGwIcAh0CHgKMAh8DvgBbAiEBXAIjAiQCJQlbCv+AYoC/gAqAK4BcgGCBAkKBAn7aAA4J
+9wIYAhkCGgIbAhwCHQIeAowCHweoCwMCIQFcAiMCJAIlCVsLCIBigQG+gQKAgCuAXIBggQJCgQKBW19O
+U01haW5NZW510gAOAEUDTQsMgKSvEKIHyQJkBloA9QO+BIsHyQfJAmQASAO+CSkDvgAfA4QCZAVlBVAD
+CwJkArUEiwD1AB8CJgDEBS0GSgAfA74FxAksAl8HyQfJBIsDvgO+A9MAxAO+AToFQQamArUFZQZaCVsD
+vgE7A74JOglEAiYJVAImAuwE6wV4AiYDvgImA88FQQlbAMQHqAmGAB8FOwAfB6gFLQltCVsCsQfJAwsD
+hAJYBcMGpgJkAuwCtQW8BOsHyQImBWUCJgMLB6gFZQfJAmQCJgAfArUCZAXCAuwECQTLAiYCZAW9B6gC
+TgZaBS0AxAJkAPUBOQlbBAoFQQJkAB8EnAV2BqYDhAULA74FeQT7BPQGlgImBIsFdAVlA3QFZQJkATwH
+yQW/CVsHyQImBIsFxQXGA20CZAZaB8kChgmIArUDvglRAiYJlQamAwsElQD1AiaBAcmBAT6BAWOAJIC/
+gPOBAcmBAcmBAT6ACIC/gQJBgL+AAoCxgQE+gQExgQFNgMqBAT6AfIDzgCSAAoBZgBuBASCBAWCAAoC/
+gQFegQJGgG6BAcmBAcmA84C/gL+A6IAbgL+AQoEBJoEBd4B8gQExgQFjgQJCgL+AR4C/gQJtgQJ4gFmB
+AmWAWYCLgQEPgQGMgFmAv4BZgMWBASaBAkKAG4EBvoECfYACgQEpgAKBAb6BASCBAn+BAkKAe4EByYDK
+gLGAa4EBWoEBd4EBPoCLgHyBAUGBAQ+BAcmAWYEBMYBZgMqBAb6BATGBAcmBAT6AWYACgHyBAT6BAVaA
+i4DPgQEEgFmBAT6BAUWBAb6AZ4EBY4EBIIAbgQE+gCSAKIECQoDWgQEmgQE+gAKA+oEBOoEBd4CxgQEY
+gL+BAZCBARWBAROBAXOAWYDzgQEzgQExgK6BATGBAT6AS4EByYEBSYECQoEByYBZgPOBAXGBAYSArIEB
+PoEBY4EByYBxgQJpgHyAv4ECToBZgQJggQF3gMqA+IAkgFnSAA4ARQNNC7GApK8QowW9B8EBJQZWCP4E
+gwkACQEFxQBXCQQEywkGAEgCWAObBXQFOwLsBbwD0giPAS8AxQd3ATwFVwZaArUIaQZKCRkChghaCRwI
+nAgMCR8EbgE6CSIBtwYVBr8DzwV2BnMJKQkqAdMHyQImAhUJLAUtB7MG/wL+ATsD2ATVCTcHkwfTCToF
+OAf+A74AHwVlBUEJQAegBjkHqAlEArgJRgQJBcYCXwUlA4AGwQL9ArEFywTjCVEIJQV4CVQDbQV5CHYJ
+WAXCB4UJWwMLBJUGKAMWBA8EwwT0CD8ItwllBd0BOQJGCOwFUADfAUwJbQXEBC8FTwZyBK0FmgbCA5wF
+BwjZAPUFCwT7BqYJfAhMBX4CZAOEBXUFwwHrCYQF7gmGCYcJiAaWCMsG5AN0Bb8GcQipAoEE6wPTCZUD
+tQJOBIsGogQKAMQEnALegQFFgQHIgQGcgQFigQIugPKBAjGBAjSBAXGAD4ECNYEBBIECOYAIgGuAtoEB
+M4EBKYCLgQFBgOOBAgyBAZiAGYEBsIBLgQEsgQFjgHyBAgCBAWCBAjqAcYEB+4ECPoECEIEB4IECP4Dq
+gEKBAkCARoEBVIEBfIDFgQE6gQFugQJBgQJFgEqBAcmAWYBYgQJGgQEggQHDgQGOgI+AR4DHgQEJgQJe
+gQG5gQHOgQJtgQElgQHcgL+AAoEBMYEBJoECcoEBvYEBXIEBvoECeIB/gQJLgM+BAYSAboEBH4CwgQF+
+gJqAe4EBQ4EBDoECToEB6IEBjIECZYCsgQGQgQIEgQJagQFWgQG1gQJCgMqA+IEBWICVgNGBAQOBAROB
+AfGBAhmBAnaBAUeAKIBmgQIqgQFNgB+AOIECf4EBXoDYgQFQgQFrgPyBATyBAYGAuYEBF4ECJIAkgQEY
+gQEVgQF3gQJfgQH2gQE1gQE+gLGBATeBAVqAT4ECV4EBS4ECfYECVIECaYEBc4ECIIEBhoCugQFJgQFo
+gQIUgHCBAQ+A6IECYIC+gGeA84EBdoDWgBuA+oCG0gAOAEUDTQxXgKSvEKMMWAxZDFoMWwxcDF0MXgxf
+DGAMYQxiDGMMZAsDDGYMZwxoDGkMagxrDGwMbQxuAMkMcAxxDHIMcwx0DHUMdgx3DHgMeQx6DHsMfAx9
+DH4MfwyADIEMggyDDIQMhQyGDIcMiAyJDIoMiwyMDI0MjgyPDJAMkQySDJMMlAyVDJYMlwyYDJkMmgyb
+DJwMnQyeDJ8MoAyhDKIMowykDKUMpgynDKgMqQyqDKsMrAytDK4MrwywDLEMsgyzDLQMtQy2DLcMuAy5
+DLoMuwy8DL0Mvgy/DMAMwQzCDMMMxAzFDMYMxwzIDMkMygzLDMwMzQzODM8M0AzRDNIM0wzUDNUM1gzX
+DNgM2QzaDNsM3AzdDN4M3wzgDOEM4gzjDOQM5QzmDOcM6AzpDOoM6wzsDO0M7gzvDPAM8QzyDPMM9Az1
+DPYM9wz4DPkM+oEChoECh4ECiIECiYECioECi4ECjIECjYECjoECj4ECkIECkYECkoECgIECk4EClIEC
+lYECloECl4ECmIECmYECmoECm4AagQKcgQKdgQKegQKfgQKggQKhgQKigQKjgQKkgQKlgQKmgQKngQKo
+gQKpgQKqgQKrgQKsgQKtgQKugQKvgQKwgQKxgQKygQKzgQK0gQK1gQK2gQK3gQK4gQK5gQK6gQK7gQK8
+gQK9gQK+gQK/gQLAgQLBgQLCgQLDgQLEgQLFgQLGgQLHgQLIgQLJgQLKgQLLgQLMgQLNgQLOgQLPgQLQ
+gQLRgQLSgQLTgQLUgQLVgQLWgQLXgQLYgQLZgQLagQLbgQLcgQLdgQLegQLfgQLggQLhgQLigQLjgQLk
+gQLlgQLmgQLngQLogQLpgQLqgQLrgQLsgQLtgQLugQLvgQLwgQLxgQLygQLzgQL0gQL1gQL2gQL3gQL4
+gQL5gQL6gQL7gQL8gQL9gQL+gQL/gQMAgQMBgQMCgQMDgQMEgQMFgQMGgQMHgQMIgQMJgQMKgQMLgQMM
+gQMNgQMOgQMPgQMQgQMRgQMSgQMTgQMUgQMVgQMWgQMXgQMYgQMZgQMagQMbgQMcgQMdgQMegQMfgQMg
+gQMhgQMigQMjgQMkgQMlgQMmXxAaU3RhdGljIFRleHQgKEZpbGUgZm9ybWF0OilfEBFNZW51IEl0ZW0g
+KENsb3NlKV8QE0hvcml6b250YWwgU2Nyb2xsZXJfEBZNZW51IEl0ZW0gKE9yaWdpbmFsKS0xbxAYAE0A
+ZQBuAHUAIABJAHQAZQBtACAAKABQAHIAZQBmAGUAcgBlAG4AYwBlAHMgJgApXxAiTWVudSBJdGVtIChV
+c2UgU2VsZWN0aW9uIGZvciBGaW5kKW8QEQBNAGUAbgB1ACAASQB0AGUAbQAgACgATwBwAGUAbiAmAClZ
+U2VwYXJhdG9yXxASUG9wdXAgQnV0dG9uICg2NDApXENvbnRlbnQgVmlld28QHQBNAGUAbgB1ACAASQB0
+AGUAbQAgACgAQwBoAGUAYwBrACAAZgBvAHIAIABVAHAAZABhAHQAZSAmAClbTWVudSAoSGVscClbU2Vw
+YXJhdG9yLTVvEBEAUABvAHAAdQBwACAAQgB1AHQAdABvAG4AIAAoICYAIAApXxARTWVudSBJdGVtIChJ
+dGVtMilfECFTdGF0aWMgVGV4dCAoU2VsZWN0IERWRCBGZWF0dXJlcylvEBgAUABvAHAAIABVAHAAIABC
+AHUAdAB0AG8AbgAgAEMAZQBsAGwAIAAoICYAKQAtADFWTWF0cml4XxAeU3RhdGljIFRleHQgKFByZWZl
+cnJlZCBhdWRpbzopXxAdSG9yaXpvbnRhbCBQcm9ncmVzcyBJbmRpY2F0b3JfEBVNZW51IEl0ZW0gKEZp
+bmQgTmV4dClfEBFWZXJ0aWNhbCBTY3JvbGxlcl8QEE1lbnUgSXRlbSAoUmVkbylfEBNUYWJsZSBDb2x1
+bW4gKFNpemUpXxAaTWVudSBJdGVtIChDaGVjayBTcGVsbGluZylfEBNNZW51IChPdGhlclZpZXdzKS02
+WE9wZW5WaWV3XxAUTWVudSBJdGVtIChTaG93IEFsbClfEB1Qb3AgVXAgQnV0dG9uIENlbGwgKE9yaWdp
+bmFsKV8QD01lbnUgKFNlcnZpY2VzKV8QE01lbnUgKE90aGVyVmlld3MpLTJvEBcATQBlAG4AdQAgAEkA
+dABlAG0AIAAoAFAAYQBnAGUAIABTAGUAdAB1AHAgJgApW1NlcGFyYXRvci0xXxAZTWVudSBJdGVtIChG
+aW5kIFByZXZpb3VzKV8QIk1lbnUgSXRlbSAoSGlkZSBJbnN0YW50IEhhbmRCcmFrZSlbU2VwYXJhdG9y
+LTZfEA9UZXh0IEZpZWxkIENlbGxfEBRUYWJsZSBDb2x1bW4gKFRpdGxlKVtTZXBhcmF0b3ItN18QHVRl
+eHQgRmllbGQgQ2VsbCAoVGV4dCBDZWxsKS0xW1NlcGFyYXRvci05XxAUTWVudSBJdGVtIChPcmlnaW5h
+bClfEB1TdGF0aWMgVGV4dCAoU2VsZWN0IGEgU291cmNlKV8QFlN0YXRpYyBUZXh0IChTZXR0aW5ncylf
+EBZNZW51IEl0ZW0gKEFuYW1vcnBoaWMpXxAQTWVudSBJdGVtIChIZWxwKVtTZXBhcmF0b3ItOF8QHVRl
+eHQgRmllbGQgQ2VsbCAoVGV4dCBDZWxsKS0yW01lbnUgKEZpbGUpW01lbnUgKEVkaXQpXxAQTWVudSBJ
+dGVtIChVbmRvKV8QFE1lbnUgSXRlbSAoU2VydmljZXMpXxAPTWVudSAoU3BlbGxpbmcpXxAWTWVudSBJ
+dGVtIChTZWxlY3QgQWxsKV8QF1RleHQgRmllbGQgQ2VsbCAoUmVhZHkpXxAYQnV0dG9uIENlbGwgKERW
+RCBEcml2ZTopXxAXVGFibGUgQ29sdW1uIChEdXJhdGlvbilfECFUZXh0IEZpZWxkIENlbGwgKFNlbGVj
+dCBhIFNvdXJjZSlfEBFNZW51IEl0ZW0gKFBhc3RlKVtTZXBhcmF0b3ItMl8QI01lbnUgSXRlbSAoQWJv
+dXQgSW5zdGFudCBIYW5kQnJha2UpXxAaTWVudSBJdGVtIChTdGFydCBTcGVha2luZylfEBBNZW51IEl0
+ZW0gKEZpbGUpbxASAE0AZQBuAHUAIABJAHQAZQBtACAAKABPAHQAaABlAHIgJgApXxAeTWVudSBJdGVt
+IChCcmluZyBBbGwgdG8gRnJvbnQpXxAYTWVudSAoSW5zdGFudCBIYW5kQnJha2UpXEZpbGUncyBPd25l
+cltDb252ZXJ0Vmlld18QE01lbnUgKE90aGVyVmlld3MpLTVbQXBwbGljYXRpb25fEBRNZW51IEl0ZW0g
+KE1pbmltaXplKV8QIVRleHQgRmllbGQgQ2VsbCAoUGljdHVyZSBBc3BlY3Q6KV1NZW51IChXaW5kb3cp
+XxAQTWVudSBJdGVtIChFZGl0KV8QEkJ1dHRvbiBDZWxsIChPcGVuKV8QD01lbnUgSXRlbSAoTmV3KVpU
+ZXh0IEZpZWxkXxAgU3RhdGljIFRleHQgKE1heCBQaWN0dXJlIFdpZHRoOilvEBcAUABvAHAAIABVAHAA
+IABCAHUAdAB0AG8AbgAgAEMAZQBsAGwAIAAoICYAIAApbxAVAE0AZQBuAHUAIABJAHQAZQBtACAAKABT
+AHAAZQBsAGwAaQBuAGcgJgApXxARTWVudSBJdGVtIChJdGVtMSlfEA9NZW51IEl0ZW0gKDQ4MClfECdQ
+cm90b3R5cGUgUHJvdG90eXBlIEJ1dHRvbiBDZWxsIChSYWRpbylfEBJQdXNoIEJ1dHRvbiAoT3Blbilf
+ECJUZXh0IEZpZWxkIENlbGwgKFByZWZlcnJlZCBhdWRpbzopXxAZTWVudSBJdGVtIChTdG9wIFNwZWFr
+aW5nKV8QF01lbnUgSXRlbSAoT3BlbiBSZWNlbnQpXxAhTWVudSBJdGVtIChQYXN0ZSBhbmQgTWF0Y2gg
+U3R5bGUpXxATU3RhdGljIFRleHQgKFJlYWR5KV8QFE1lbnUgSXRlbSAoU3BlbGxpbmcpXxAUUG9wdXAg
+QnV0dG9uIChJdGVtMSlbQm94IChCb3gpLTFfEBBNZW51IEl0ZW0gKFpvb20pXxASTWVudSBJdGVtIChS
+ZXZlcnQpXxAiU3RhdGljIFRleHQgKFByZWZlcnJlZCBzdWJ0aXRsZXM6KV8QEk1lbnUgSXRlbSAoRGVs
+ZXRlKVhNYWluTWVudVlCb3ggKEJveClcUG9wdXAgQnV0dG9uXxAmVGV4dCBGaWVsZCBDZWxsIChQcmVm
+ZXJyZWQgc3VidGl0bGVzOilfECBCdXR0b24gQ2VsbCAoRFZEIEZvbGRlciAvIEZpbGU6KV8QEVRleHQg
+RmllbGQgQ2VsbC0xXxAiTWVudSBJdGVtIChJbnN0YW50IEhhbmRCcmFrZSBIZWxwKW8QEABQAG8AcAB1
+AHAAIABCAHUAdAB0AG8AbgAgACggJgApWUVtcHR5Vmlld18QEE1lbnUgSXRlbSAoQ29weSlbU2VwYXJh
+dG9yLTRfEB5UZXh0IEZpZWxkIENlbGwgKEZpbGUgZm9ybWF0OilfEBRUYWJsZSBDb2x1bW4gKENoZWNr
+KV8QFk1lbnUgSXRlbSAoQ2xlYXIgTWVudSlfECZNZW51IEl0ZW0gKENoZWNrIFNwZWxsaW5nIGFzIFlv
+dSBUeXBlKW8QEgBQAG8AcAB1AHAAIABCAHUAdAB0AG8AbgAgACggJgApAC0AMV8QEVRhYmxlIEhlYWRl
+ciBWaWV3XxAdVGV4dCBGaWVsZCBDZWxsIChUZXh0IENlbGwpLTNfEBJNZW51IEl0ZW0gKFdpbmRvdylf
+EBdQb3B1cCBCdXR0b24gKE9yaWdpbmFsKW8QFQBCAHUAdAB0AG8AbgAgAEMAZQBsAGwAIAAoAEIAcgBv
+AHcAcwBlICYAKW8QDwBNAGUAbgB1ACAASQB0AGUAbQAgACggJgApAC0AMV8QE01lbnUgSXRlbSAoMTYg
+YnkgOSlfEBNNZW51IChPdGhlclZpZXdzKS0zXxAaVGV4dCBGaWVsZCBDZWxsIChTZXR0aW5ncylfEA9N
+ZW51IEl0ZW0gKDMyMClfEBFNZW51IEl0ZW0gKEl0ZW0zKW0ATQBlAG4AdQAgAEkAdABlAG0AIAAoICYA
+KV8QIk1lbnUgSXRlbSAoUXVpdCBJbnN0YW50IEhhbmRCcmFrZSlbU2Nyb2xsIFZpZXdfEBNNZW51IChP
+dGhlclZpZXdzKS00bxAWAFAAbwBwACAAVQBwACAAQgB1AHQAdABvAG4AIABDAGUAbABsACAAKCAmAClf
+EBNNZW51IChPdGhlclZpZXdzKS0xW1NlcGFyYXRvci0zXxAdTWVudSBJdGVtIChKdW1wIHRvIFNlbGVj
+dGlvbilfECVUZXh0IEZpZWxkIENlbGwgKFNlbGVjdCBEVkQgRmVhdHVyZXMpW0JveCAoQm94KS0yXxAR
+TWVudSAoT3RoZXJWaWV3cylfEB9Ib3Jpem9udGFsIFByb2dyZXNzIEluZGljYXRvci0xXxAdU3RhdGlj
+IFRleHQgKFBpY3R1cmUgQXNwZWN0OilfEBtUZXh0IEZpZWxkIENlbGwgKFRleHQgQ2VsbClvEBQATQBl
+AG4AdQAgAEkAdABlAG0AIAAoAFMAYQB2AGUAIABBAHMgJgApXxAqVGV4dCBGaWVsZCBDZWxsIChTYXZl
+IGNvbnZlcnRlZCBmaWxlcyB0bzopXxAdTWVudSBJdGVtIChJbnN0YW50IEhhbmRCcmFrZSlfEBBNZW51
+IEl0ZW0gKFNhdmUpXxASTWVudSBJdGVtIChTcGVlY2gpXxAYUG9wIFVwIEJ1dHRvbiBDZWxsICg2NDAp
+bxARAE0AZQBuAHUAIABJAHQAZQBtACAAKABGAGkAbgBkICYAKV8QJFRleHQgRmllbGQgQ2VsbCAoTWF4
+IFBpY3R1cmUgV2lkdGg6KV8QGlBvcCBVcCBCdXR0b24gQ2VsbCAoSXRlbTEpXxAmU3RhdGljIFRleHQg
+KFNhdmUgY29udmVydGVkIGZpbGVzIHRvOilfEBJNZW51IEl0ZW0gKDQgYnkgMylvEBIATQBlAG4AdQAg
+AEkAdABlAG0AIAAoAFAAcgBpAG4AdCAmACluAE0AZQBuAHUAIABJAHQAZQBtACAAKCAmACAAKV1NZW51
+IChTcGVlY2gpW1N0YXRpYyBUZXh0XxAQTWVudSBJdGVtIChGaW5kKV8QF01lbnUgSXRlbSAoSGlkZSBP
+dGhlcnMpXxASTWVudSAoT3BlbiBSZWNlbnQpW01lbnUgKEZpbmQpXxAPTWVudSBJdGVtICg2NDApbxAV
+AFAAdQBzAGgAIABCAHUAdAB0AG8AbgAgACgAQgByAG8AdwBzAGUgJgApXxAuVGFibGUgVmlldyAoVGl0
+bGUsIER1cmF0aW9uLCBTaXplIChDb252ZXJ0ZWQpKV8QElBvcCBVcCBCdXR0b24gQ2VsbF8QD01lbnUg
+SXRlbSAoQ3V0KdIADgBFA00NnoCkogMLAmSAyoEBPtIADgBFA00No4CkogP6A/qAy4DL0gAOAEUDTQ2o
+gKSvEN0AtAC+ALgAjAkABcUJBACGCQYAigCbA5sCWACsBXQC7AW8A9IIjwDFAI4GWgK1BkoJGQCNCRwB
+OgkiA88AnACrAhUCJgE7Av4E1QC9AK4JOgVlAIgJQAUlALAHqAbBALECXwQJA4AFxgL9AJcJUQlUA20I
+dglYBcIAsgC6AI8DCwSVAxYAnwi3BPQGcgE5AKQFUAWaBsIArQUHAPUFCwCYBPsGpgl8ALkAlQV+ALcF
+dQXDAesAkQaWCYgIywbkA3QFvwipAoEE6wmVAKECTgClB8EFvQZWASUI/gSDALYJAQBXBMsAhwBIBTsA
+kgCdAS8AqAd3ATwAogVXCGkAqgKGCFoAmgicCAwJHwRuAbcGFQa/BXYGcwkpAIsJKgHTCSwHyQUtALMH
+swb/B9MAuwPYB5MJNwU4ALwH/gO+AB8FQQY5B6AAtQlEArgJRgCTAKAApgCWArEFywTjCCUFeAV5B4UJ
+WwYoBA8EwwXdCD8BTAllAkYI7ADfCW0ELwVPBcQErQCQA5wI2QhMAmQAqQOEAKcArwCUCYQF7gCeCYYJ
+hwCFBnEAiQPTA7UAmQSLBqIECgScAMQAowLegQIHgQIpgQITgKuBAjGBAXGBAjWAV4ECOYCFgQGtgLaA
+a4EB54EBM4CLgQFBgOOBAgyAGYDDgQFjgHyBAWCBAjqAvYECPoBCgQJAgMWBAa+BAeWAWIBZgEeAj4EB
+CYECKIEB7oECbYEBMYBqgQJygQEfgQH1gQG+gQF+gQH6gG6Az4CwgQGEgJqBASSBAk6BAmWArIECBIEC
+WoEBVoEB/4ECHYDxgMqA+ICVgQG8gQIZgQETgQFrgCiBAdOBAU2BATyBAYGBAeyBAReAJIEBGIEBK4EB
+FYEBd4ECX4ECGIEBEoEBNYECD4EBN4EBWoBPgQEAgQFzgQJpgQIggQGGgK6BAUmBAhSAcIEBD4ECYIEB
+x4BngQHVgQHIgQFFgQFigQGcgQIugPKBAguBAjSAD4EBBIBlgAiBASmBAQKBAbSBAZiBAduBAbCAS4EB
+zYEBLIECAIEB44BxgQH7gQGrgQIQgQHggQI/gOqARoEBVIEBfIEBOoEBboECQYCKgQJFgEqBAkaBAcmB
+ASCBAgOBAcOBAY6BAc6BAh+Ax4EBuYECXoEBJYECI4EB3IC/gAKBASaBAVyBAb2BAgmBAniAf4ECS4EB
+CIEBwoEB14EBHoB7gQFDgQEOgQHogQGMgQGQgQG1gQJCgQFYgNGBAQOBAUeBAfGAOIECdoBmgQIqgB+B
+An+A2IEBUIEBXoD8gPeAuYECJIEB9oEBPoEB34CxgQHZgQHwgQENgQJXgQFLgQG4gQJ9gQJUgBiBAWiA
+eoDogL6BATCA84EBdoDWgPqAG4EB0YCG0gAOAEUDTQ6IgKSvEN0OiQ6KDosOjA6NDo4Ojw6QDpEOkg6T
+DpQOlQ6WDpcOmA6ZDpoOmw6cDp0Ong6fDqAOoQ6iDqMOpA6lDqYOpw6oDqkOqg6rDqwOrQ6uDq8OsA6x
+DrIOsw60DrUOtg63DrgOuQ66DrsOvA69Dr4Ovw7ADsEOwg7DDsQOxQ7GDscOyA7JDsoOyw7MDs0Ozg7P
+DtAO0Q7SDtMO1A7VDtYO1w7YDtkO2g7bDtwO3Q7eDt8O4A7hDuIO4w7kDuUO5g7nDugO6Q7qDusO7A7t
+Du4O7w7wDvEO8g7zDvQO9Q72DvcO+A75DvoO+w78Dv0O/g7/DwAPAQ8CDwMPBA8FDwYPBw8IDwkPCg8L
+DwwPDQ8ODw8PEA8RDxIPEw8UDxUPFg8XDxgPGQ8aDxsPHA8dDx4PHw8gDyEPIg8jDyQPJQ8mDycPKA8p
+DyoPKw8sDy0PLg8vDzAPMQ8yDzMPNA81DzYPNw84DzkPOg87DzwPPQ8+Dz8PQA9BD0IPQw9ED0UPRg9H
+D0gPSQ9KD0sPTA9ND04PTw9QD1EPUg9TD1QPVQ9WD1cPWA9ZD1oPWw9cD10PXg9fD2APYQ9iD2MPZA9l
+gQMrgQMsgQMtgQMugQMvgQMwgQMxgQMygQMzgQM0gQM1gQM2gQM3gQM4gQM5gQM6gQM7gQM8gQM9gQM+
+gQM/gQNAgQNBgQNCgQNDgQNEgQNFgQNGgQNHgQNIgQNJgQNKgQNLgQNMgQNNgQNOgQNPgQNQgQNRgQNS
+gQNTgQNUgQNVgQNWgQNXgQNYgQNZgQNagQNbgQNcgQNdgQNegQNfgQNggQNhgQNigQNjgQNkgQNlgQNm
+gQNngQNogQNpgQNqgQNrgQNsgQNtgQNugQNvgQNwgQNxgQNygQNzgQN0gQN1gQN2gQN3gQN4gQN5gQN6
+gQN7gQN8gQN9gQN+gQN/gQOAgQOBgQOCgQODgQOEgQOFgQOGgQOHgQOIgQOJgQOKgQOLgQOMgQONgQOO
+gQOPgQOQgQORgQOSgQOTgQOUgQOVgQOWgQOXgQOYgQOZgQOagQObgQOcgQOdgQOegQOfgQOggQOhgQOi
+gQOjgQOkgQOlgQOmgQOngQOogQOpgQOqgQOrgQOsgQOtgQOugQOvgQOwgQOxgQOygQOzgQO0gQO1gQO2
+gQO3gQO4gQO5gQO6gQO7gQO8gQO9gQO+gQO/gQPAgQPBgQPCgQPDgQPEgQPFgQPGgQPHgQPIgQPJgQPK
+gQPLgQPMgQPNgQPOgQPPgQPQgQPRgQPSgQPTgQPUgQPVgQPWgQPXgQPYgQPZgQPagQPbgQPcgQPdgQPe
+gQPfgQPggQPhgQPigQPjgQPkgQPlgQPmgQPngQPogQPpgQPqgQPrgQPsgQPtgQPugQPvgQPwgQPxgQPy
+gQPzgQP0gQP1gQP2gQP3gQP4gQP5gQP6gQP7gQP8gQP9gQP+gQP/gQQAgQQBgQQCgQQDgQQEgQQFgQQG
+gQQHEQFqEN4QVhEBbBBIEQGjEQHWEN8QkBDkEQGrEQFfEQGDEPcRAQQRAVkRAXcRAWQQ0BEBIhEBJBEB
+iRD4EQG+EIIQkhBKEQGTEI8Q+RDnEQGpEM8QzREBlBEBWhDLEQEjEQGYEFMRAQMRAaAT//////////0Q
+zBD1EBgRAdQQVxEBuxEBYREBYBEBqBEBwhEB0RB8ENgRAVwQ7xBwEQGGEJkRAZYQ9BEBTREBeREBWxAl
+EMURAXQRAdIRAZIRAZwRAX4RAbQRAacRAZcRAXYRAXUQ4REBtREBpBDWEOARAZ8RAbMQ8xEBhxEBxhEB
+QBEBvxDTENERAcARAa8RAX0QThEBhRDUENoQwRB9EQFmEEkRAXgRAYoRAcgQgRDdEPIQTxBqEH8QFREB
+uhB6EOsRAccQJxDXEQGaEOkQyRCWEQFpEQGEEE0RASYQ1RCGEJURAbIRAcQRAYERAdMRAW0RAdUQZxEB
+axDsEQHFEIMQURDwEMYRAcEQxBDxEQGtEDoQzhEBghCLEAUQOREB1xEBfxEBvRAXEQFLENkRAa4QUhDi
+EOgRAWgQ5hEBKREBthDDEPYRAY0RAY4QyhAdEQG8EQGwEG8RAbcRAS8RAcMQXBB+ENsRAckQExEBsREB
+gBEBiBEBehEBnREBXhCIENIRAW4QmBEBXREBmREBMBDjEFARAbkQjhA4EQGVEQGLEQFDEQGMEJERASUQ
+3BEBphEBYhEBuBEBkREBZxDH0gAOAEUAgxBAgFCg0gAOAEUDTRBDgKSg0gAOAEUDTRBGgKSg0gA6ADsQ
+SBBJohBJAD9eTlNJQk9iamVjdERhdGEACAAZACIAJwAxADoAPwBEAFIAVABmCIIIiAjTCNoI4QjvCQEJ
+HQkrCTcJQwlRCVwJagmGCZQJpwm5CdMJ3QnqCewJ7wnyCfUJ+An6Cf0J/woCCgUKCAoLCg0KDwoSChUK
+GAobCiQKMAoyCjQKPQpHCkkKVwpgCmkKdAp7Co0KlgqfCqgKrQq8Cs8K2ArjCuUK6ArqCyMLMAtJC1YL
+ZAtuC3wLlQuiC6wLvgvSC9wL6AvqC+wL7gvwC/IL9wv5C/sL/Qv/DAEMAwwFDAcMIgw2DD8MSAxKDE8M
+bAx3DIgMmgyjDK8MsQyzDLYMuAzBDMgMzwzbDPQM/w0IDQ0NIA0pDTANPQ1DDUwNTg3FDccNyQ3LDc0N
+zw3RDdMN1Q3XDdkN2w3dDeAN4w3mDekN7A3vDfIN9Q34DfsN/g4BDgQOBw4KDg0OEA4TDhYOGQ4cDh8O
+Ig4lDigOKw4uDjEONA43DjoOPQ5ADkMORg5JDkwOTw5SDlUOWA5bDl4OYQ5kDmcOeA6GDo8Olw6ZDpsO
+nQ6fDqgOqg6sDsAPEw81Dz8PTA9gD3UPgg+cD7gP0w/dD+kQCBAUECMQLxAxEDMQNRA6EDwQPhA/EEEQ
+ShBMEFUQVxBYEFoQXBBeEGAQYhBrEJgQoBCqELUQvxDJENcQ2RDcEN8Q4hDlEOcQ6RDrEO0Q7xD5ERYR
+IhEkESYRKBEqESwRLhFbEV0RYBFjEWYRaBFqEWwRbhFwEXoRgxGMEaARuRG7Eb0RvxHIEcoRzBILEhcS
+IBIzEkASTBJaEl0SYBJjEmYSaRJrEm0ScBKDEoUSiBKLEo0SjxKmEq8SuBLGEs8S0RLaEtwS3hLgEuIT
+DxMeEysTOBNAE0sTWhNlE3ATfRN+E4ATghOEE40TjxORE5oToxOkE6YTrBPJE9UT4BPqE/cUAxQIFAoU
+DBQOFBAUEhQTFCQUKxQyFDsUPRRGFEgUSxRYFGEUZhRtFIIUihSXFKMUsRSzFLUUtxS5FLsUwhTOFNsU
+4xTlFOgU8RT2FQsVDRUPFREVExUlFTIVNBU3FUAVSxVfFXEVfhWFFaYVtBW5FbsVvRW/FcEVwxXGFcgV
+0hXjFeUV7hXwFfMWCBYKFgwWDhYQFikWNhY4FkQWWRZbFl0WXxZhFnQWfRaGFo8WlBaiFs8W0BbSFtQW
+1hbfFuEW6hbrFu0W8xcQFxUXFxcZFxsXHRcfFywXLhc6F1sXXRdfF2EXYxdlF2cXlBeVF5cXmRebF6QX
+phevF7AXshe7F9gX2hfcF94X4BfiGAMYBRgHGAkYCxgNGA8YPBg9GD8YQRhDGEwYThhXGFgYWhhfGHwY
+fhiAGIIYhBiGGJkYuhi8GL4YwBjCGMQYxhjPGNYY5RjtGQIZBBkGGQgZChkUGSEZIxkoGTEZPBlGGVoZ
+YxlqGYEZkBmdGZ8ZoRmjGcQZzBngGesZ+RoDGhAaFxoZGhsaIBoiGicaKRorGi0aOhpGGkgaSxpOGlMa
+VRpiGnEacxp1GncafxqRGpoanxqyGr8awRrDGsUa2BrhGuYa8Rr3GwAbBxsfGywbLhswGzIbUxtVG1cb
+WRtbG10bXxtwG3IbdRt4G3sbhhueG68bsRuzG7UbtxvYG9ob3BveG+Ab4RvjG+UcAhwFHAccChwNHA8c
+EhwrHHoclxypHL8c1BzjHPYdCB0aHS8dPR1PHV0dZh1nHWkdax1tHW8dcR1zHXUddx15HXodex1+HYAd
+hR2OHZAdvR3GHc8d1x3ZHdsd3R3fHeEd4x3lHecd9B32Hfgd+h3/HhMeHB4eHikeMh40HjceOR5CHkce
+UB5dHnEegB6NHpYeox6xHroe0h7jHuUe5x7pHusfDB8OHxAfEh8UHxcfGB8aHxwfQR9NH08fUR9TH1Uf
+Vx9ZH1sfXR91H6ofsx+1H7cfuR+7H70fvx/BH8MfxR/KH9Mf2B/aH+Mf7B/1IAAgDiAbIB0gHyAhIEIg
+RCBGIEggSiBMIE4gUiBUIFkgaiBsIG4gcCByIMEgzSDXIOYg8iEKIRUhHyE0IUIhSiFMIU4hUCFSIVQh
+ViFYIVohXCFeIV8hYSFjIWUhaiFsIYkhiyGNIY8hkSGTIZUhrSG2IbghvSG/IcEh9iH4Ifoh/CH+IgAi
+AiIEIgkiFCIdIikiKyItIjsiRCJJIl8iaCJqIqMiqSKrIq0iryKxIrMitSK3Iswi1iLeIwsjGSMbIx0j
+HyMhIyMjKSM+I0sjUiNUI1YjWyNdI18jaCNxI3MjdiN4I4EjgyOII4ojjCOVI6wjriOwKX4phymOKaEp
+rCm1KbopxynJKc4p1yncKfEp8yn1Kfcp+SoGKg8qGiojKi8qQCpCKkQqRipIKmkqayptKm8qcSpyKnQq
+diqPKt4q3yrhKuMq5SrnKukq6yrtKu4q7yrxKvoq/CspKysrLSsvKzErMys1KzcrOStGK0grSitMK1Ir
+WytdK2YraCtvK3Ercyt1K54roCuiK6QrpiuoK6orrCuuK7Qr3SvfK+Er4yvlK+cr6SvrK+0r8yv+LA8s
+ESwTLBUsFyw4LDosPCxBLEMsRSxHLEksWixcLF4sYSxkLHAsciyLLJwsniygLKIspCytLK8suiy8LL4s
+wCzCLMQs5SznLOks6yztLPAs8SzzLPUtDS0uLTAtMi00LTYtOC09LT8tUS1aLWUtcS20Lb4tyi3gLe4t
++y4FLhcuGS4bLh0uHy4hLiIuJC4mLiguKi4sLi4uNy49LkYuSC5LLk0uVi5YLmEuYy5lLmcuaS6KLowu
+ji6QLpIuky6VLpcusC7VLuku8i70LvYu+C76LvwvAS8CLwQvGS8bLx0vHy8hLzcvTC9OL1AvUi9UL14v
+fy+BL4MvhS+HL4gvii+ML6Mv2C/aL9wv3i/gL+Iv5C/mL+sv+jALMA0wDzARMBowHDAzMEwwUzBwMHIw
+dDB2MHgwejB+MIswjTCbMKQwqTC4MN0w6DDyMP8xATEDMQUxDjEXMRkxHDEeMSAxJTEnMTAxNTFAMVkx
+YjFrMYExojGkMaYxqDGqMasxrTGvMccx6DHqMewx7jHwMfIx9DH/MggyCjITMhwyKTIzMkAyQjJEMkYy
+azJtMm8ycTJzMnUydzKEMoYyiTKMMqUypzLBMtIy1DLWMtgy2jL7Mv0y/zMBMwMzBDMGMwgzIjN1M4cz
+iDOKM4wzjjOQM5IzlDOWM5czmDOaM6MzrDOuM7szvTO/M8EzyjPMM9Uz1zPYM+4z/zQBNAM0BTQINBA0
+HTQfNCI0JTRGNEg0SzRONFA0UjRVNGI0ZDRnNGo0gzSFNI80nDSeNKE0pDTFNMc0yjTNNM800TTTNNk0
+2zTiNO808TT0NPc1GDUaNR01HzUhNSM1JjUzNTU1ODU7NUk1VzVoNWo1bTVvNXI1kzWVNZc1mjWdNZ41
+oDWiNbs2CjYLNg02DzYRNhQ2FjYZNhw2HTYeNiE2KjYsNlk2XDZeNmE2YzZlNmc2ajZtNno2fDZ/NoI2
+hTaONpA2mTabNp42oTa2NsM2xTbINss27DbuNvE29Db2Nvg2+zcINwo3DTcQNyM3JTc3N0g3SjdMN083
+Ujd7N343gDeDN4U3hzeJN4w3jzecN543oTekN7E4ADgBOAM4BTgHOAo4DDgPOBI4EzgUOBc4MDg9OD84
+QjhFOGY4aDhrOG44cDhyOHU4hDiGOJU4pjioOKs4rTiwONU41zjZONw43zjhOOQ45jjpOPI49DkBOQQ5
+BzkKOQ05EDkTOTQ5Nzk5OTw5PzlAOUI5RTleOX85gTmDOYY5iDmLOY05oznIOcs5zTnQOdM51TnYOds5
+4DniOfo6GzoeOiA6IzomOic6KTosOkQ6ZTpnOmk6bDpuOnE6czp8Or86wjrEOsc6yjrMOs060DrSOtQ6
+1jrZOts65DrmOuk66zr0OvY7DzsSOxU7GDsaOx07IDsiOyU7KDsrOy47MTtSO1Q7VjtZO1w7XTtfO2E7
+eTuaO5w7njuhO6M7pjurO607wDvhO+M75TvoO+s77DvuO/A8CDwpPCs8LTwwPDI8NTw3PEQ8ZTxnPGk8
+bDxvPHA8cjx0PI08rjywPLI8tTy3PLo8vDzXPPg8+jz8PP89Aj0DPQU9Bz0hPSo9LD1ZPVw9Xj1hPWM9
+ZT1nPWo9bT12PXg9gT2DPYo9jT2QPZM9xD3SPd894j3kPeY95z3pPeo97D3uPfE99D4VPhc+GT4cPh8+
+ID4iPiQ+PD5dPl8+YT5kPmY+aT5rPoI+oz6lPqc+qj6tPq4+sD6yPso+6z7tPu8+8j70Pvc++T8LPyw/
+Lj8wPzM/Nj83Pzk/Oz9VP6Q/pT+nP6k/qz+uP7A/sz+2P7c/uD+7P8Q/xj/zP/Y/+D/7P/0//0ABQARA
+B0AUQBZAGUAcQCVALkAwQDlAO0BEQEdASkBNQFBAeUB8QH5AgUCDQIVAh0CKQI1AlEC9QMBAwkDFQMdA
+yUDLQM5A0UDZQQJBBUEHQQpBDEEOQRBBE0EWQSFBQkFEQUZBSUFMQU1BT0FRQWpBvUG+QcBBwkHFQchB
+ykHNQdBB0UHSQdVB5kHoQepB80H1QiJCJUInQipCLEIuQjBCM0I2QkNCRUJIQktCT0JYQlpCY0JlQm5C
+cUJ0QndCekKjQqZCqEKrQq1Cr0KxQrRCt0LgQuNC5ULoQupC7ELuQvFC9EL4QyFDJEMmQylDK0MtQy9D
+MkM1QzlDWkNcQ15DYUNkQ2VDZ0NpQ4FDokOkQ6ZDqUOrQ65DsEPFQ9xD9UQSRBREFkQYRBpEHUQqRCxE
+TURQRFJEVURYRFlEW0ReRHZEl0SZRJtEnkSgRKNEpUSrRORE50TqRO1E8ETxRPRE9kT4RPtE/kUHRQlF
+DEUPRSxFL0UxRTRFN0U5RTxFRUVHRUpFTEVVRVdFYkVkRWdFakVsRW5Fd0V5RXxFfkWVRZ5Fp0WyRddF
+4UXjReVF6EXrRe1F8EXyRftGE0YgRilGNEY/RmxGbkZwRnNGdkZ3RnlGfEZ+RodGo0asRq5GsUazRslG
+4UbqRvNHAEcWRy9HTEdOR1BHUkdUR1dHZEdmR29HeEeDR4xHjkebR6xHrkewR7JHtUe9R85H0EfTR9VH
+2EftR/pH/Ef/SAJII0glSChIK0gtSC9IMUg2SDhIPkhLSE1IUEhTSHRIdkh5SHtIfUh/SIFIiEiQSKFI
+o0ilSKhIq0jISMpIzUjPSNFI00jVSO9JD0kcSR5JIUkkSUVJR0lKSU1JT0lRSVRJZUlnSWpJbUlwSXlJ
+e0mRSZ5JoEmjSaZJx0nJScxJz0nRSdNJ1UngSeJJ7Un6SfxJ/0oCSiNKJUooSitKLUovSjJKP0pBSkRK
+R0pNSk9KXUpqSmxKb0pySpNKlUqYSppKnEqeSqFKsEq/StBK0krUStZK2UruSv9LAUsESwZLCUsfSzBL
+Mks0SzZLOUtFS1ZLWEtaS1xLX0tzS4RLhkuIS4pLjUuiS69LsUu0S7dL2EvaS91L30vhS+NL5kv7TA1M
+HkwgTCJMJUwoTElMS0xOTFBMUkxUTFZMb0x1TIZMiEyKTIxMj0yiTLNMtUy4TLpMvUzVTOJM5EznTOpN
+C00NTRBNE00VTRdNGU0xTTNNR01YTVpNXE1eTWFNbE19TX9NgU2DTYZNj02gTaJNpU2nTapNw03FTcdN
+yk3NTc9N2U3kTfFN8032TflOGk4cTh9OIk4kTiZOKE48Tj5OXk5rTm1OcE5zTpROlk6ZTpxOnk6gTqNO
+uk68TstO3E7eTuBO407mTwdPCU8MTw5PEE8STxRPHU82T0NPRU9IT0tPbE9uT3FPc091T3dPek9/T4xP
+nU+fT6FPo0+mT7VPxk/IT8tPzU/QT+RP8U/zT/ZP+FAdUB9QIlAlUCdQKVArUDVQN1BEUEZQSVBLUHBQ
+clB1UHhQelB8UH5QjFCOUJtQnVCgUKNQxFDGUMlQzFDOUNBQ01DgUOJQ6VD2UPhQ+1D+UR9RIVEkUSdR
+KVErUS1RMlE0UTpRS1FNUVBRUlFVUWtReFF6UX1Rf1GkUaZRqVGsUa5RsFGyUb1Rv1HQUdJR1FHXUdpR
++1H9UgBSA1IFUgdSCVIiUiRSL1JAUkJSRFJGUklSVlJYUltSXlJ/UoFShFKGUohSilKNUqpSy1LUUtZU
+HVQgVCNUJlQpVCxULlQxVDRUN1Q5VDxUP1RCVERURlRIVEtUTlRQVFNUVVRYVFtUXVRgVGJUZVRoVGpU
+bVRwVHNUdVR4VHtUflSBVIRUhlSIVItUjVSQVJNUlVSYVJtUnlShVKNUplSpVKtUrVSwVLNUtVS4VLtU
+vlTBVMRUxlTJVMxUzlTRVNNU1lTZVNxU31TiVOVU6FTqVO1U71TxVPNU9lT5VPxU/lUAVQNVBlUJVQxV
+D1USVRRVF1UaVR1VIFUjVSZVKFUqVS1VL1UxVTRVN1U6VT1VQFVCVUVVSFVKVU1VT1VRVVRVVlVZVVxV
+X1VhVWRVZ1VpVWxVb1VxVXRVd1V6VX1VgFWDVYZViFWLVY5VkFWTVZZVmVWcVZ9VolWlVahVqlWtVbBV
+s1W1VbhVulW8Vb5VwVXDVcZVyFXKVcxVzlXvVfFV9FX3VflV+1X9VhZWGFY5VjtWPlZBVkNWRVZIVlNW
+VVZ+VoBWglaDVoVWhlaIVopWjVauVrBWs1a1VrdWuVa7VuBW6VbrVvBW+Vb7Vv5XAVcqVyxXLlcvVzFX
+Mlc0VzZXOFdJV0tXTldRV1RXXVdfV2hXcVdzV3RXhlevV7FXs1e0V7ZXt1e5V7tXvlfnV+lX61fsV+5X
+71fxV/NX9VgeWCBYIlgjWCVYJlgoWCpYLFhVWF9YYVhkWGdYaVhrWG1YcFhzWIRYhliJWIxYj1ieWMdY
+yVjLWMxYzljPWNFY01jVWP5ZAFkDWQZZCFkKWQxZDlkRWRpZHFkhWSpZLFlDWUZZSVlMWU9ZUllVWVhZ
+W1leWWFZZFmFWYdZilmNWY9ZkVmUWZhZmlnDWcVZx1nKWcxZzlnQWdNZ1lniWetZ7Vn2WfhZ+1n9WhZa
+N1o5WjxaP1pBWkNaRlpLWk1ablpwWnNadlp4WnpafVqOWpBarVqvWrJatFq2Wrhau1rCWstazVrSWtta
+3Vr4Wvpa/VsAWwJbBVsIWwtbDlsRWxRbF1saWx1bRltIW0pbS1tNW05bUFtSW1RbfVt/W4FbgluEW4Vb
+h1uJW4tbtFu2W7hbu1u9W79bwVvDW8Zby1vUW9Zb31vhW+xb71vyW/Vb91v6XCNcJVwoXCtcLVwvXDFc
+M1w2XD9cSFxKXFFcVFxXXFpcg1yFXIhci1yNXI9ckVyTXJZcnVymXKhcrVywXLNc3FzeXOFc5FzmXOhc
+6lztXPBc+Vz7XRRdF10aXR1dIF0jXSZdKV0sXS5dMV00XTddRF1NXU9dUl1bXV1dZF1tXW9deF17XX5d
+gV2EXa1dr12xXbJdtF21XbdduV28Xctd9F32Xfhd+139Xf9eAV4EXgdeEF4ZXhteJl4pXixeL14yXjVe
+Xl5gXmJeZF5mXmheal5tXnBemV6bXp5eoV6jXqVep16qXq1euV7CXsRgC2AOYBFgFGAWYBhgGmAdYCBg
+I2AlYCdgKmAsYC5gMGAzYDZgOWA7YD5gQGBCYERgRmBIYEpgTWBQYFJgVGBXYFpgXGBfYGJgZGBmYGhg
+amBsYG5gcGBzYHZgeGB7YH5ggWCDYIVgh2CKYI1gj2CSYJRglmCZYJxgnmCgYKJgpGCnYKpgrGCvYLJg
+tGC3YLlgvGC/YMJgxWDHYMpgzGDOYNBg02DWYNlg22DdYOBg42DmYOhg62DtYO9g8mD1YPhg+2D9YP9h
+AWEEYQdhCWELYQ5hEGETYRZhGWEbYR5hIWEjYSZhKGEqYS1hL2EyYTVhN2E5YTxhP2FBYURhRmFJYUxh
+T2FSYVRhVmFZYVxhXmFhYWRhZmFpYWxhb2FyYXRhdmF5YXxhfmGBYYRhh2GJYYxhjmGQYZNhlWGYYZth
+nWGfYaFho2GsYa5i92L6Yv1jAGMDYwZjCGMLYw5jEWMTYxZjGWMcYx5jIGMiYyVjKGMqYy1jL2MyYzVj
+N2M6YzxjP2NCY0RjR2NKY01jT2NSY1VjWGNbY15jYGNiY2VjZ2NqY21jb2NyY3VjeGN7Y31jgGOCY4Rj
+h2OKY41jkGOSY5RjlmOZY5xjn2OiY6VjqGOrY61jr2OyY7VjuGO7Y75jwWPEY8ZjyWPLY85j0GPTY9Vj
+2GPaY9xj32PiY+Vj6GPrY+5j8GPzY/Zj+WP8Y/9kAmQEZAZkCWQLZA1kEGQTZBZkGWQcZB9kIWQjZCZk
+KWQrZC1kMGQzZDVkOGQ7ZD1kQGRDZEVkSGRLZE1kUGRTZFZkWWRcZF9kYmRkZGdkamRsZG9kcmR1ZHhk
+e2R+ZIFkhGSGZIlkjGSPZJFklGSWZJlkm2SdZJ9komSkZKZkqGSqZLNktWX+ZgFmBGYHZgpmDWYQZhNm
+FmYZZhxmH2YiZiVmKGYrZi5mMWY0ZjdmOmY9ZkBmQ2ZFZkhmS2ZOZlFmVGZXZlpmXWZgZmNmZmZpZmxm
+b2ZyZnVmeGZ7Zn5mgWaEZodmimaNZpBmk2aWZplmnGafZqJmpWaoZqtmrmaxZrRmt2a6Zr1mwGbDZsZm
+yWbMZs9m0mbVZthm22beZuFm5GbnZupm7WbwZvNm9mb5Zvxm/2cCZwVnCGcLZw5nEWcUZxdnGmcdZyBn
+I2cmZylnLGcvZzJnNWc4ZztnPmdBZ0RnR2dKZ01nUGdTZ1ZnWWdcZ19nYmdlZ2hna2duZ3FndGd3Z3pn
+fWeAZ4NnhmeJZ4xnj2eSZ5VnmGebZ55noWekZ6dnqmetZ7Bns2e2Z7lnvGe/Z8JnxWfIZ8tnzmfRZ9Rn
+12faZ91n4GfjZ+ZoA2gXaC1oRmh5aJ5ow2jNaOJo72ksaThpRGlpaX1poWnUadtp/GocajRqSGpbanFq
+jmqkaq1qxGrkavZrDGs9a0lrZWuKa5ZrqGu/a8tr62v3bA5sLmxHbGBsc2x/bJ9sq2y3bMps4WzzbQxt
+Jm1BbVttf22TbZ9txW3ibfVuHG49blhuZW5xboduk26qbs5u3G7vbwRvFm8hb0RvdW+ib7ZvyG/ycAdw
+LHBIcGJwhnCccLNwynDWcOlw/nEjcThxQXFLcVhxgXGkcbhx3XIAcgpyHXIpckpyYXJ6cqNyynLecv5z
+E3Mtc1pze3ORc6dzxHPWc+p0BXQqdDZ0THR7dJF0nXS9dOV08XUFdSd1R3VldZB1vXXddfB2BXYgdkV2
+bHaJdrJ2x3budwt3GXcldzh3Undnd3N3hXeyd+N3+HgKeBN4FXgaeBx4H3goeCp4L3gxeDN4PHg+eft5
+/noBegR6BnoJegx6D3oRehR6FnoZeht6HXogeiN6JXooeip6LXovejF6NHo2ejl6PHo+ekF6Q3pGekh6
+S3pOelB6UnpUelZ6WXpcel96Ynplemd6anptenB6c3p2enl6e3p9en96gnqEeod6inqNeo96knqVeph6
+m3qeeqB6onqkeqZ6qXqseq96snq0erd6unq9esB6w3rGesh6y3rOetF61HrXetp63XrgeuN65nrpeut6
+7nrxevR693r6evx6/3sCewR7B3sKew17D3sSexV7GHsbex57IXsjeyZ7KXsrey57MHsyezV7OHs7ez57
+QXtEe0Z7SXtMe097UntUe1d7Wntde2B7Y3tle2d7antte3B7c3t2e3h7e3t9e4B7g3uGe4l7jHuPe5J7
+lXuXe5p7nXuge6N7pnuoe6p7rXuwe7N7tnu5e7t7vnvBe8R7x3vKe8x7z3vSe9V72Hvbe9574Xvke+Z7
+6Xvse+978Xv0e/Z7+Xv7e/58AHwDfAZ8CHwKfAx8D3wSfBV8GHwafB18IHwjfCZ8KXwsfC98Mnw0fDd8
+OXw7fD18QHxCfEV8R3xJfEt8TnxQfFl8W34Yfht+Hn4hfiR+J34qfi1+MH4zfjZ+OX48fj9+Qn5Ffkh+
+S35OflF+VH5Xflp+XX5gfmN+Zn5pfmx+b35yfnV+eH57fn5+gX6Efod+in6NfpB+k36Wfpl+nH6ffqJ+
+pX6ofqt+rn6xfrR+t366fr1+wH7DfsZ+yX7Mfs9+0n7Vfth+237efuF+5H7nfup+7X7wfvN+9n75fvx+
+/38CfwV/CH8Lfw5/EX8Ufxd/Gn8dfyB/I38mfyl/LH8vfzJ/NX84fzt/Pn9Bf0R/R39Kf01/UH9Tf1Z/
+WX9cf19/Yn9lf2h/a39uf3F/dH93f3p/fX+Af4N/hn+Jf4x/j3+Sf5V/mH+bf55/oX+kf6d/qn+tf7B/
+s3+2f7l/vH+/f8J/xX/If8t/zn/Rf9R/13/af91/4H/jf+Z/6X/sf+9/8n/1f/h/+3/+gAGABIAHgAqA
+DYAQgBOAFoAZgByAH4AigCWAKIArgC6AMYA0gDeAOoA9gECAQ4BGgEmATIBPgFKAVYBYgFuAXoBhgGSA
+Z4BqgG2AcIBzgHaAeYB8gH+AgoCFgIiAi4COgJGAlICXgJqAnYCggKOApoCpgKyAr4CygLSAtoC5gLuA
+voDBgMOAxYDHgMqAzYDQgNKA1YDYgNuA3oDggOOA5oDpgOuA7oDwgPKA9ID3gPmA+4D9gQCBAoEEgQeB
+CoEMgQ+BEoEUgReBGoEjgSWBJ4EpgSyBLoExgTSBN4E6gT2BQIFCgUSBR4FJgUuBToFQgVOBVYFYgVuB
+XoFggWKBZYFogWuBboFxgXSBd4F6gX2BgIGCgYWBiIGKgYyBj4GSgZSBl4GagZ2BoIGigaSBp4Gqga2B
+r4GygbSBtoG4gbqBvYG/gcKBxYHIgcqBzIHOgdCB0oHUgdaB2YHbgd2B4IHigeSB54HpgeuB7YHwgfOB
+9YH4gfqB/IH+ggGCBIIHggqCDYIQghKCFYIXghqCHIIegiCCIoIlgieCKYIsgi6CMIIzgjWCN4I5gjyC
+P4JCgkSCR4JJgkyCToJQglKCVYJXglqCXYJfgmGCZIJngmmCa4JugnGCc4J2gnmCfIJ+goCCgoKFgoeC
+ioKNgpCCk4KWgpmCm4KdgqCCooKlgqiCq4Ktgq+CsoK0graCuYK8gr+CwoLEgseCyYLMgs+C0oLVgtiC
+2oLjguWC5oLvgvGC8oL7gv2C/oMHgwwAAAAAAAACAgAAAAAAABBKAAAAAAAAAAAAAAAAAACDGw</bytes>
+               </object>
+       </data>
+</archive>
diff --git a/macosx/InstantHandBrake/English.lproj/InfoPlist.strings b/macosx/InstantHandBrake/English.lproj/InfoPlist.strings
new file mode 100644 (file)
index 0000000..a0c2c55
--- /dev/null
@@ -0,0 +1,4 @@
+/* Localized versions of Info.plist keys */
+
+CFBundleName = "Instant HandBrake";
+NSHumanReadableCopyright = "Copyright Â© 2004 - 2008, HandBrake Devs";
diff --git a/macosx/InstantHandBrake/Express.plist b/macosx/InstantHandBrake/Express.plist
new file mode 100644 (file)
index 0000000..15fb48a
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>BuildDate</key>
+       <string>BUILDDATE</string>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleDocumentTypes</key>
+       <array/>
+       <key>CFBundleExecutable</key>
+       <string>${EXECUTABLE_NAME}</string>
+       <key>CFBundleIconFile</key>
+       <string>HandBrake</string>
+       <key>CFBundleIdentifier</key>
+       <string>fr.handbrake.instant</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleShortVersionString</key>
+       <string>1.0a3</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleVersion</key>
+       <string>BUILDID</string>
+       <key>LSMinimumSystemVersion</key>
+       <string>10.4.0</string>
+       <key>NSMainNibFile</key>
+       <string>Express</string>
+       <key>NSPrincipalClass</key>
+       <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/macosx/InstantHandBrake/ExpressController.h b/macosx/InstantHandBrake/ExpressController.h
new file mode 100644 (file)
index 0000000..4bdcfa6
--- /dev/null
@@ -0,0 +1,65 @@
+/* ExpressController
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#import <Cocoa/Cocoa.h>
+#import <Growl/Growl.h>
+
+#import "DriveDetector.h"
+#import "DeviceController.h"
+#import "HBCore.h"
+#import "hb.h"
+
+@interface ExpressController : NSObject <GrowlApplicationBridgeDelegate>
+
+{
+    hb_handle_t                  * fHandle;
+    hb_list_t                    * fList;
+    const hb_state_t                   * fState;
+
+    IBOutlet NSWindow            * fWindow;
+    IBOutlet NSView              * fEmptyView;
+    IBOutlet NSToolbar           * fToolbar;
+
+    IBOutlet NSView              * fOpenView;
+    IBOutlet NSMatrix            * fOpenMatrix;
+    IBOutlet NSPopUpButton       * fOpenPopUp;
+    IBOutlet NSTextField         * fOpenFolderField;
+    IBOutlet NSButton            * fOpenBrowseButton;
+    IBOutlet NSTextField         * fOpenProgressField;
+    IBOutlet NSProgressIndicator * fOpenIndicator;
+    IBOutlet NSButton            * fOpenGoButton;
+    NSString                     * fOpenFolderString;
+
+    IBOutlet NSView              * fConvertView;
+    IBOutlet NSTableView         * fConvertTableView;
+    IBOutlet NSPopUpButton       * fConvertFolderPopUp;
+    IBOutlet NSPopUpButton       * fConvertFormatPopUp;
+    IBOutlet NSPopUpButton       * fConvertMaxWidthPopUp;
+    IBOutlet NSPopUpButton       * fConvertAspectPopUp;
+    IBOutlet NSPopUpButton       * fConvertAudioPopUp;
+    IBOutlet NSPopUpButton       * fConvertSubtitlePopUp;
+    IBOutlet NSTextField         * fConvertInfoString;
+    IBOutlet NSProgressIndicator * fConvertIndicator;
+    NSMutableArray               * fConvertCheckArray;
+    NSString                     * fConvertFolderString;
+
+    DriveDetector                * fDriveDetector;
+    HBCore                       * fCore;
+    DeviceController             * fDevice;
+    NSDictionary                 * fDrives;
+}
+
+- (void) openShow: (id) sender;
+- (void) openMatrixChanged: (id) sender;
+- (void) openBrowse: (id) sender;
+- (void) openGo: (id) sender;
+
+- (void) selectFolderSheetShow: (id) sender;
+- (void) convertGo: (id) sender;
+- (void) convertCancel: (id) sender;
+
+@end
+
diff --git a/macosx/InstantHandBrake/ExpressController.m b/macosx/InstantHandBrake/ExpressController.m
new file mode 100644 (file)
index 0000000..37ab8b0
--- /dev/null
@@ -0,0 +1,808 @@
+/* This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#import "ExpressController.h"
+
+#define INSERT_STRING       @"Insert a DVD"
+#define TOOLBAR_START       @"TOOLBAR_START"
+#define TOOLBAR_PAUSE       @"TOOLBAR_PAUSE"
+#define TOOLBAR_OPEN        @"TOOLBAR_OPEN"
+#define TOOLBAR_ADVANCED    @"TOOLBAR_ADVANCED"
+
+#define p fState->param
+
+#import "Device.h"
+
+@interface ExpressController (Private)
+
+- (void) openUpdateDrives: (NSDictionary *) drives;
+- (void) openBrowseDidEnd: (NSOpenPanel *) sheet returnCode: (int)
+    returnCode contextInfo: (void *) contextInfo;
+- (void) openEnable: (BOOL) b;
+
+- (id) updatePopUpIcon: (id) value;
+- (void) convertShow;
+- (void) convertEnable: (BOOL) b;
+
+@end
+
+@implementation ExpressController
+
+/***********************************************************************
+ * Application delegate methods
+ **********************************************************************/
+- (void) awakeFromNib
+{
+    NSEnumerator * enumerator;
+    
+    /* NSToolbar initializations */
+    fToolbar = [[NSToolbar alloc] initWithIdentifier: @"InstantHandBrake Toolbar"];
+    [fToolbar setDelegate: self];
+    [fToolbar setAllowsUserCustomization: NO];
+    [fToolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
+    [fToolbar setVisible:NO];
+    [fWindow setShowsToolbarButton:NO];
+    [fWindow setToolbar: fToolbar];
+        
+    /* Show the "Open DVD" interface */
+    fDriveDetector = [[DriveDetector alloc] initWithCallback: self
+        selector: @selector( openUpdateDrives: )];
+    [fDriveDetector run];
+    [self openEnable: YES];
+    [fWindow setContentSize: [fOpenView frame].size];
+    [fWindow setContentView: fOpenView];
+    [fWindow center];
+    [fWindow makeKeyAndOrderFront: nil];
+
+    /* NSTableView initializations */
+     NSButtonCell * buttonCell;
+     NSTableColumn * tableColumn;
+     enumerator = [[fConvertTableView tableColumns] objectEnumerator];
+     while( ( tableColumn = [enumerator nextObject] ) )
+     {
+         [tableColumn setEditable: NO];
+     }
+     tableColumn = [fConvertTableView tableColumnWithIdentifier: @"Check"];
+     buttonCell = [[[NSButtonCell alloc] initTextCell: @""] autorelease];
+    [buttonCell setEditable: YES];
+    [buttonCell setButtonType: NSSwitchButton];
+    [tableColumn setDataCell: buttonCell];
+
+    /* Preferences */
+    fConvertFolderString = [NSHomeDirectory() stringByAppendingPathComponent:@"Desktop"];
+    [fConvertFolderString retain];
+}
+
+- (void) applicationWillFinishLaunching: (NSNotification *) n
+{
+    fCore = [[HBCore alloc] init];
+    [fCore openInDebugMode:NO checkForUpdates:NO];
+    fHandle = [fCore hb_handle];
+    fState = [fCore hb_state];
+    fList   = hb_get_titles( fHandle );
+    
+    fDevice = [[DeviceController alloc] init];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self
+    selector:@selector(scanningSource:)
+    name:@"HBCoreScanningNotification" object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self
+    selector:@selector(scanDone:)
+    name:@"HBCoreScanDoneNotification" object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self
+    selector:@selector(muxing:)
+    name:@"HBCoreMuxingNotification" object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self
+    selector:@selector(working:)
+    name:@"HBCoreWorkingNotification" object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self
+    selector:@selector(workDone:)
+    name:@"HBCoreWorkDoneNotification" object:nil];
+    
+    [GrowlApplicationBridge setGrowlDelegate: self];
+}
+
+- (void) applicationWillTerminate: (NSNotification *) n
+{
+    [fCore close];
+}
+
+- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag
+{
+    if( !flag ) {
+        [fWindow  makeKeyAndOrderFront:nil];
+        return YES;
+    }
+    return NO;
+}
+
+- (NSToolbarItem *) toolbar: (NSToolbar *) toolbar itemForItemIdentifier: (NSString *) ident
+                    willBeInsertedIntoToolbar: (BOOL) flag
+{
+    NSToolbarItem * item;
+    item = [[NSToolbarItem alloc] initWithItemIdentifier: ident];
+
+    if ([ident isEqualToString: TOOLBAR_START])
+    {
+        [item setLabel: NSLocalizedString(@"Convert", "Convert")];
+        [item setPaletteLabel: NSLocalizedString(@"Convert/Cancel", @"Convert/Cancel")];
+        [item setImage: [NSImage imageNamed: @"Play"]];
+        [item setTarget: self];
+        [item setAction: @selector(convertGo:)];
+    }
+    else if ([ident isEqualToString: TOOLBAR_PAUSE])
+    {
+        [item setLabel: NSLocalizedString(@"Pause", "Pause")];
+        [item setPaletteLabel: NSLocalizedString(@"Pause/Resume", @"Pause/Resume")];
+        [item setImage: [NSImage imageNamed: @"Pause"]];
+        [item setTarget: self];
+        [item setAction: @selector(pauseGo:)];
+    }
+    else if ([ident isEqualToString: TOOLBAR_OPEN])
+    {
+        [item setLabel: NSLocalizedString(@"Open...", "Open...")];
+        [item setPaletteLabel: NSLocalizedString(@"Open Another Source", "Open Another Source")];
+        [item setImage: [NSImage imageNamed: @"Open"]];
+        [item setTarget: self];
+        [item setAction: @selector(openShow:)];
+    }
+    else
+    {
+        [item release];
+        return nil;
+    }
+
+    return item;
+}
+
+- (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar
+{
+    return [NSArray arrayWithObjects: TOOLBAR_START, TOOLBAR_PAUSE,
+                                    NSToolbarFlexibleSpaceItemIdentifier, TOOLBAR_OPEN, nil];
+}
+
+- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar
+{
+    return [NSArray arrayWithObjects: TOOLBAR_START, TOOLBAR_PAUSE,
+                                        TOOLBAR_OPEN, NSToolbarFlexibleSpaceItemIdentifier, nil];
+}
+
+/***********************************************************************
+ * Tableview datasource methods
+ **********************************************************************/
+- (int) numberOfRowsInTableView: (NSTableView *) t
+{
+    if( !fHandle )
+        return 0;
+
+    return hb_list_count( fList );
+}
+
+- (id) tableView:(NSTableView *) t objectValueForTableColumn:
+    (NSTableColumn *) col row: (int) row
+{
+    if( [[col identifier] isEqualToString: @"Check"] )
+    {
+        return [fConvertCheckArray objectAtIndex: row];
+    }
+    else
+    {
+        hb_title_t * title = hb_list_item( fList, row );
+        if( [[col identifier] isEqualToString: @"Title"] )
+        {
+            return [@"Title " stringByAppendingFormat: @"%d",
+                    title->index];
+        }
+        else if( [[col identifier] isEqualToString: @"Duration"] )
+        {
+            if( title->hours > 0 )
+            {
+                return [NSString stringWithFormat:
+                    @"%d hour%s %d min%s", title->hours,
+                    title->hours > 1 ? "s" : "", title->minutes,
+                    title->minutes > 1 ? "s": ""];
+            }
+            else if( title->minutes > 0 )
+            {
+                return [NSString stringWithFormat:
+                    @"%d min%s %d sec%s", title->minutes,
+                    title->minutes > 1 ? "s" : "", title->seconds,
+                    title->seconds > 1 ? "s": ""];
+            }
+            else
+            {
+                return [NSString stringWithFormat: @"%d seconds",
+                        title->seconds];
+            }
+        }
+        else if( [[col identifier] isEqualToString: @"Size"] )
+        {
+            return [NSString stringWithFormat:@"-"];
+        }
+    }
+    return nil;
+}
+
+- (void) tableView: (NSTableView *) t setObjectValue: (id) object
+    forTableColumn: (NSTableColumn *) col row: (int) row
+{
+    if( [[col identifier] isEqualToString: @"Check"] )
+    {
+        [fConvertCheckArray replaceObjectAtIndex: row withObject: object];
+    }
+}
+
+/***********************************************************************
+ * User events methods
+ **********************************************************************/
+- (void) openShow: (id) sender
+{
+    NSRect frame  = [fWindow frame];
+    float  offset = ( [fConvertView frame].size.height -
+                    [fOpenView frame].size.height ) * [fWindow userSpaceScaleFactor];
+
+    frame.origin.y    += offset;
+    frame.size.height -= offset;
+    [fWindow setContentView: fEmptyView];
+    [fWindow setFrame: frame display: YES animate: YES];
+    [fToolbar setVisible:NO];
+    [fOpenProgressField setStringValue: @""];
+    [fWindow setContentView: fOpenView];
+
+    [fDriveDetector run];
+}
+
+- (void) openMatrixChanged: (id) sender
+{
+    [self openEnable: YES];
+    if( [fOpenMatrix selectedRow] )
+    {
+        [self openBrowse: self];
+    }
+}
+
+- (void) openBrowse: (id) sender
+{
+    NSOpenPanel * panel = [NSOpenPanel openPanel];
+    [panel setAllowsMultipleSelection: NO];
+    [panel setCanChooseFiles: YES];
+    [panel setCanChooseDirectories: YES ];
+    [panel beginSheetForDirectory: nil file: nil types: nil
+        modalForWindow: fWindow modalDelegate: self
+        didEndSelector: @selector( openBrowseDidEnd:returnCode:contextInfo: )
+        contextInfo: nil];                                                      
+}
+
+- (void) openGo: (id) sender
+{
+    [self openEnable: NO];
+    [fOpenIndicator setIndeterminate: YES];
+    [fOpenIndicator startAnimation: nil];
+    [fOpenProgressField setStringValue: NSLocalizedString( @"Opening...", @"Opening...") ];
+    [fDriveDetector stop];
+
+    if( [fOpenMatrix selectedRow] )
+    {
+        hb_scan( fHandle, [fOpenFolderString UTF8String], 0 );
+    }
+    else
+    {
+        hb_scan( fHandle, [[fDrives objectForKey: [fOpenPopUp
+                 titleOfSelectedItem]] UTF8String], 0 );
+    }
+}
+
+- (void) selectFolderSheetShow: (id) sender
+{
+    NSOpenPanel * panel = [NSOpenPanel openPanel];
+
+    [panel setPrompt: NSLocalizedString(@"Select", @"Convert -> Save panel prompt")];
+    [panel setAllowsMultipleSelection: NO];
+    [panel setCanChooseFiles: NO];
+    [panel setCanChooseDirectories: YES];
+    [panel setCanCreateDirectories: YES];
+
+    [panel beginSheetForDirectory: nil file: nil types: nil
+        modalForWindow: fWindow modalDelegate: self didEndSelector:
+        @selector(selectFolderSheetClosed:returnCode:contextInfo:) contextInfo: nil];
+}
+
+- (void) selectFolderSheetClosed: (NSOpenPanel *) sheet returnCode: (int)
+    returnCode contextInfo: (void *) contextInfo
+{
+    if( returnCode != NSOKButton )
+        return;
+
+    if( fConvertFolderString )
+        [fConvertFolderString release];
+    fConvertFolderString = [[[sheet filenames] objectAtIndex: 0] retain];
+    [[fConvertFolderPopUp itemAtIndex: 0] setTitle: [fConvertFolderString lastPathComponent]];
+    [fConvertFolderPopUp selectItemAtIndex:0];
+    
+    NSMenuItem * item = [fConvertFolderPopUp itemAtIndex: 0];
+    [item setImage: [self updatePopUpIcon:fConvertFolderString]];
+    
+}
+
+- (void) convertGo: (id) sender
+{
+    int i, j;
+    Preset * currentPreset = [[[fDevice devicesList] objectAtIndex:[fConvertFormatPopUp indexOfSelectedItem]] firstPreset];
+
+    for( i = 0; i < hb_list_count( fList ); i++ )
+    {
+        if( ![[fConvertCheckArray objectAtIndex: i] boolValue] )
+            continue;
+
+        hb_title_t * title = hb_list_item( fList, i );
+        hb_job_t   * job   = title->job;
+
+               int maxwidth = [currentPreset maxWidth];
+        int maxheight = [currentPreset maxHeight];
+        int pixels = maxwidth * maxheight;
+               int aspect = title->aspect;
+        
+               if( [fConvertAspectPopUp indexOfSelectedItem] == 1 )
+               {
+            aspect = 4 * HB_ASPECT_BASE / 3;
+               }
+        else if ( [fConvertAspectPopUp indexOfSelectedItem] == 2 )
+        {
+            aspect = 16 * HB_ASPECT_BASE / 9;
+        }
+
+               job->vbitrate = [currentPreset videoBitRate];
+               
+        if( [fConvertMaxWidthPopUp indexOfSelectedItem] == 2 )
+               {
+            maxwidth = 480;
+                       job->vbitrate /= 1.5;
+        }
+        else if ( [fConvertMaxWidthPopUp indexOfSelectedItem] == 3 )
+        {
+            maxwidth = 320;
+                       job->vbitrate /= 2;
+        }
+        
+        if ( [fConvertAspectPopUp indexOfSelectedItem] > 0 )
+        {
+            do
+            {
+                hb_set_size( job, aspect, pixels );
+                pixels -= 10;
+            } while(job->width > maxwidth || job->height > maxheight);
+        }
+        else
+        {
+            /* Reset job->crop values */
+            memcpy( job->crop, job->title->crop, 4 * sizeof( int ) );
+            job->width = maxwidth;
+            hb_fix_aspect( job, HB_KEEP_WIDTH );
+        }
+               
+        job->mux        = [currentPreset muxer];
+        job->vcodec     = [currentPreset videoCodec];
+        job->x264opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */  
+        strcpy(job->x264opts, [[currentPreset videoCodecOptions] UTF8String]);
+        job->chapter_markers = 1;
+        job->vquality = -1.0;
+
+        const char * lang;
+
+        /* Audio selection */
+        hb_audio_t * audio;
+        lang = [[fConvertAudioPopUp titleOfSelectedItem] UTF8String];
+        job->audios[0] = -1;
+        for( j = 0; j < hb_list_count( title->list_audio ); j++ )
+        {
+            /* Choose the first track that matches the language */
+            audio = hb_list_item( title->list_audio, j );
+            if( !strcmp( lang, audio->lang_simple ) )
+            {
+                job->audios[0] = j;
+                break;
+            }
+        }
+        if( job->audios[0] == -1 )
+        {
+            /* If the language isn't available in this title, choose
+               the first track */
+            job->audios[0] = 0;
+        }
+        job->audios[1] = -1;
+
+        job->audio_mixdowns[0] = HB_AMIXDOWN_DOLBYPLII;
+        
+        /* Subtitle selection */
+        hb_subtitle_t * subtitle;
+        lang = [[fConvertSubtitlePopUp titleOfSelectedItem] UTF8String];
+        job->subtitle = -1;
+        for( j = 0; j < hb_list_count( title->list_subtitle ); j++ )
+        {
+            /* Choose the first track that matches the language */
+            subtitle = hb_list_item( title->list_subtitle, j );
+            if( !strcmp( lang, subtitle->lang ) )
+            {
+                job->subtitle = j;
+                break;
+            }
+        }
+        
+        job->file = strdup( [[NSString stringWithFormat:                 
+                @"%@/%s - Title %d.m4v", fConvertFolderString,      
+                title->name, title->index] UTF8String] );
+        hb_add( fHandle, job );
+    }
+
+    hb_start( fHandle );
+
+    [self convertEnable: NO];
+}
+
+- (void) convertCancel: (id) sender
+{
+    hb_stop( fHandle );
+    [self convertEnable: YES];
+}
+
+@end
+
+/***********************************************************************
+ * Private methods
+ **********************************************************************/
+
+@implementation ExpressController (Private)
+
+- (void) openUpdateDrives: (NSDictionary *) drives
+{
+    if( fDrives )
+    {
+        [fDrives release];
+    }
+    fDrives = [[NSDictionary alloc] initWithDictionary: drives];
+
+    NSString * device;
+    NSEnumerator * enumerator = [fDrives keyEnumerator];
+    [fOpenPopUp removeAllItems];
+    while( ( device = [enumerator nextObject] ) )
+    {
+        [fOpenPopUp addItemWithTitle: device];
+    }
+
+    if( ![fOpenPopUp numberOfItems] )
+    {
+        [fOpenPopUp addItemWithTitle: INSERT_STRING];
+    }
+    [fOpenPopUp selectItemAtIndex: 0];
+    if( [fOpenMatrix isEnabled] )
+    {
+        [self openEnable: YES];
+    }
+}
+
+- (void) openBrowseDidEnd: (NSOpenPanel *) sheet returnCode: (int)
+    returnCode contextInfo: (void *) contextInfo
+{
+    if( returnCode != NSOKButton )
+        return;
+
+    if( fOpenFolderString )
+        [fOpenFolderString release];
+    fOpenFolderString = [[[sheet filenames] objectAtIndex: 0] retain];
+    [fOpenFolderField setStringValue: [fOpenFolderString lastPathComponent]];
+    [self openGo: self];
+}
+
+- (BOOL)validateToolbarItem: (NSToolbarItem *) toolbarItem
+{
+    NSString * ident = [toolbarItem itemIdentifier];
+    
+    if ([ident isEqualToString: TOOLBAR_START] && [HBStateWorking isEqualToString:[fCore state]])
+    {
+        [toolbarItem setAction: @selector(convertCancel:)];
+        [toolbarItem setLabel:NSLocalizedString(@"Cancel", @"Cancel")];
+        return YES;
+    }
+    else if ([ident isEqualToString: TOOLBAR_START] && [HBStateWorkDone isEqualToString:[fCore state]])
+    {
+        [toolbarItem setAction: @selector(convertGo:)];
+        [toolbarItem setLabel:NSLocalizedString(@"Convert", @"Convert")];
+        return YES;
+    }
+    else if ([ident isEqualToString: TOOLBAR_OPEN] && [HBStateWorking isEqualToString:[fCore state]])
+    {
+        return NO;
+    }
+    
+    return YES;
+}
+
+- (void) openEnable: (BOOL) b
+{
+    [fOpenMatrix       setEnabled: b];
+    [fOpenPopUp        setEnabled: b];
+    [fOpenFolderField  setEnabled: b];
+    [fOpenBrowseButton setEnabled: b];
+    [fOpenGoButton     setEnabled: b]; 
+
+    if( b )
+    {
+        if( [fOpenMatrix selectedRow] )
+        {
+            [fOpenPopUp setEnabled: NO];
+        }
+        else
+        {
+            [fOpenFolderField  setEnabled: NO];
+            [fOpenBrowseButton setEnabled: NO];
+            if( [[fOpenPopUp titleOfSelectedItem]
+                    isEqualToString: INSERT_STRING] )
+            {
+                [fOpenGoButton setEnabled: NO];
+            }
+        }
+    }
+}
+
+- (void) scanningSource: (NSNotification *) n
+{
+    [fOpenIndicator setIndeterminate: NO];
+    [fOpenIndicator setDoubleValue: 100.0 *
+            ( (float) p.scanning.title_cur - 0.5 ) / p.scanning.title_count];
+    [fOpenProgressField setStringValue: [NSString
+            stringWithFormat: @"Scanning title %d of %d...",
+            p.scanning.title_cur, p.scanning.title_count]];
+}
+
+- (void) scanDone: (NSNotification *) n
+{    
+    [fOpenIndicator setIndeterminate: NO];
+    [fOpenIndicator setDoubleValue: 0.0];
+   
+     [self openEnable: YES];
+
+    if( hb_list_count( fList ) )
+    {
+        [self convertShow];
+    }
+    else
+    {
+        [fDriveDetector run];
+        [fOpenProgressField setStringValue: NSLocalizedString(@"No Title Found...",@"No Title Found...")];
+    }
+}
+
+- (void) convertShow
+{
+    int i, j;
+
+    fConvertCheckArray = [[NSMutableArray alloc] initWithCapacity:
+        hb_list_count( fList )];
+    [fConvertAudioPopUp removeAllItems];
+    [fConvertSubtitlePopUp removeAllItems];
+    [fConvertSubtitlePopUp addItemWithTitle: @"None"];
+    for( i = 0; i < hb_list_count( fList ); i++ )
+    {
+        /* Default is to convert titles longer than 30 minutes. */
+        hb_title_t * title = hb_list_item( fList, i );
+        [fConvertCheckArray addObject: [NSNumber numberWithBool:
+            ( 60 * title->hours + title->minutes > 30 )]];
+
+        /* Update audio popup */
+        hb_audio_t * audio;
+        for( j = 0; j < hb_list_count( title->list_audio ); j++ )
+        {
+            audio = hb_list_item( title->list_audio, j );
+            [fConvertAudioPopUp addItemWithTitle:
+                [NSString stringWithUTF8String: audio->lang_simple]];
+        }
+               [fConvertAudioPopUp selectItemWithTitle: @"English"];
+        
+        if ( [fConvertAudioPopUp selectedItem] == nil )
+            [fConvertAudioPopUp selectItemAtIndex:0];
+
+        /* Update subtitle popup */
+        hb_subtitle_t * subtitle;
+        for( j = 0; j < hb_list_count( title->list_subtitle ); j++ )
+        {
+            subtitle = hb_list_item( title->list_subtitle, j );
+            [fConvertSubtitlePopUp addItemWithTitle:
+                [NSString stringWithUTF8String: subtitle->lang]];
+        }
+    }
+    [fConvertTableView reloadData];
+    
+    NSEnumerator * enumerator;
+    Device * device;
+    enumerator = [[fDevice devicesList] objectEnumerator];
+    
+    while( ( device = [enumerator nextObject] ) )
+        [fConvertFormatPopUp addItemWithTitle:[device name]];
+
+    NSRect frame  = [fWindow frame];
+    float  offset = ( [fConvertView frame].size.height -
+                    [fOpenView frame].size.height ) * [fWindow userSpaceScaleFactor];;
+    frame.origin.y    -= offset;
+    frame.size.height += offset;
+    [fWindow setContentView: fEmptyView];
+    [fWindow setFrame: frame display: YES animate: YES];
+    [fToolbar setVisible:YES];
+    [fWindow setContentView: fConvertView];
+
+    NSMenuItem * item = [fConvertFolderPopUp itemAtIndex: 0];
+    [item setTitle: [fConvertFolderString lastPathComponent]];
+    [item setImage: [self updatePopUpIcon:fConvertFolderString]];
+    
+    [self convertEnable: YES];
+}
+
+- (void) convertEnable: (BOOL) b
+{
+    [fConvertTableView setEnabled: b];
+    [fConvertFolderPopUp setEnabled: b];
+    [fConvertFormatPopUp setEnabled: b];
+    [fConvertAspectPopUp setEnabled: b];
+    [fConvertMaxWidthPopUp setEnabled: b];
+    [fConvertAudioPopUp setEnabled: b];
+    [fConvertSubtitlePopUp setEnabled: b];
+}
+
+/***********************************************************************
+* UpdateDockIcon
+***********************************************************************
+* Shows a progression bar on the dock icon, filled according to
+* 'progress' (0.0 <= progress <= 1.0).
+* Called with progress < 0.0 or progress > 1.0, restores the original
+* icon.
+**********************************************************************/
+- (void) UpdateDockIcon: (float) progress
+{
+    NSImage * icon;
+    NSData * tiff;
+    NSBitmapImageRep * bmp;
+    uint32_t * pen;
+    uint32_t black = htonl( 0x000000FF );
+    uint32_t red   = htonl( 0xFF0000FF );
+    uint32_t white = htonl( 0xFFFFFFFF );
+    int row_start, row_end;
+    int i, j;
+       
+    /* Get application original icon */
+    icon = [NSImage imageNamed: @"NSApplicationIcon"];
+       
+    if( progress < 0.0 || progress > 1.0 )
+    {
+        [NSApp setApplicationIconImage: icon];
+        return;
+    }
+       
+    /* Get it in a raw bitmap form */
+    tiff = [icon TIFFRepresentationUsingCompression:
+                                          NSTIFFCompressionNone factor: 1.0];
+    bmp = [NSBitmapImageRep imageRepWithData: tiff];
+    
+    /* Draw the progression bar */
+    /* It's pretty simple (ugly?) now, but I'm no designer */
+       
+    row_start = 3 * (int) [bmp size].height / 4;
+    row_end   = 7 * (int) [bmp size].height / 8;
+       
+    for( i = row_start; i < row_start + 2; i++ )
+    {
+        pen = (uint32_t *) ( [bmp bitmapData] + i * [bmp bytesPerRow] );
+        for( j = 0; j < (int) [bmp size].width; j++ )
+        {
+            pen[j] = black;
+        }
+    }
+    for( i = row_start + 2; i < row_end - 2; i++ )
+    {
+        pen = (uint32_t *) ( [bmp bitmapData] + i * [bmp bytesPerRow] );
+        pen[0] = black;
+        pen[1] = black;
+        for( j = 2; j < (int) [bmp size].width - 2; j++ )
+        {
+            if( j < 2 + (int) ( ( [bmp size].width - 4.0 ) * progress ) )
+            {
+                pen[j] = red;
+            }
+            else
+            {
+                pen[j] = white;
+            }
+        }
+        pen[j]   = black;
+        pen[j+1] = black;
+    }
+    for( i = row_end - 2; i < row_end; i++ )
+    {
+        pen = (uint32_t *) ( [bmp bitmapData] + i * [bmp bytesPerRow] );
+        for( j = 0; j < (int) [bmp size].width; j++ )
+        {
+            pen[j] = black;
+        }
+    }
+       
+    /* Now update the dock icon */
+    tiff = [bmp TIFFRepresentationUsingCompression:
+                                         NSTIFFCompressionNone factor: 1.0];
+    icon = [[NSImage alloc] initWithData: tiff];
+    [NSApp setApplicationIconImage: icon];
+    [icon release];
+}
+
+- (id) updatePopUpIcon: (id) value
+{
+    if (!value)
+        return nil;
+    
+    NSImage * icon;
+    
+    icon = [[NSWorkspace sharedWorkspace] iconForFile: value];
+    
+    [icon setScalesWhenResized: YES];
+    [icon setSize: NSMakeSize(16.0 , 16.0)];
+    
+    return icon;
+}
+
+- (void) working: (NSNotification *) n
+{
+   float progress_total = ( p.working.progress + p.working.job_cur - 1 ) / p.working.job_count;
+    NSMutableString * string = [NSMutableString stringWithFormat: @"Converting: %.1f %%", 100.0 * progress_total];
+    
+    if( p.working.seconds > -1 )
+    {
+        [string appendFormat: @" (%.1f fps, ", p.working.rate_avg];
+        if( p.working.hours > 0 )
+        {
+        [string appendFormat: @"%d hour%s %d min%s",
+            p.working.hours, p.working.hours == 1 ? "" : "s",
+            p.working.minutes, p.working.minutes == 1 ? "" : "s"];
+        }
+        else if( p.working.minutes > 0 )
+        {
+            [string appendFormat: @"%d min%s %d sec%s",
+                p.working.minutes, p.working.minutes == 1 ? "" : "s",
+                p.working.seconds, p.working.seconds == 1 ? "" : "s"];
+        }
+        else
+        {
+            [string appendFormat: @"%d second%s",
+                p.working.seconds, p.working.seconds == 1 ? "" : "s"];
+        }
+            [string appendString: @" left)"];
+    }
+    
+    [fConvertInfoString setStringValue: string];
+    [fConvertIndicator setIndeterminate: NO];
+    [fConvertIndicator setDoubleValue: 100.0 * progress_total];
+    [self UpdateDockIcon: progress_total];
+}
+
+- (void) muxing: (NSNotification *) n
+{
+    [fConvertInfoString setStringValue: NSLocalizedString(@"Muxing...",@"Muxing...")];
+    [fConvertIndicator setIndeterminate: YES];
+    [fConvertIndicator startAnimation: nil];
+    [self UpdateDockIcon: 1.0];
+}
+
+- (void) workDone: (NSNotification *) n
+{    
+    [fConvertIndicator setIndeterminate: NO];
+    [fConvertIndicator setDoubleValue: 0.0];
+    [self UpdateDockIcon: -1.0];
+    [self convertEnable: YES];
+        
+    [fConvertInfoString setStringValue: NSLocalizedString(@"Done.",@"Done.")];
+
+    [fCore removeAllJobs];
+}
+
+@end
diff --git a/macosx/InstantHandBrake/HBCore.h b/macosx/InstantHandBrake/HBCore.h
new file mode 100644 (file)
index 0000000..477c3d7
--- /dev/null
@@ -0,0 +1,53 @@
+/**
+ * @file
+ * Interface of class HBCore.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+extern const NSString *HBStateIdle;
+extern const NSString *HBStateScanning;
+extern const NSString *HBStateScanDone;
+extern const NSString *HBStateWorking;
+extern const NSString *HBStatePaused;
+extern const NSString *HBStateWorkDone;
+extern const NSString *HBStateMuxing;
+extern const NSString *HBStateAll;
+
+extern NSString *HBCoreScanningNotification;
+extern NSString *HBCoreScanDoneNotification;
+extern NSString *HBCoreWorkingNotification;
+extern NSString *HBCorePausedNotification;
+extern NSString *HBCoreWorkDoneNotification;
+extern NSString *HBCoreMuxingNotification;
+
+/**
+ * HBCore is an Objective-C interface to the low-level HandBrake library.
+ * HBCore monitors state changes of libhb and provides notifications via
+ * NSNotificationCenter to any object who needs them. It can also be used
+ * to implement properties that can be directly bound to elements of the gui.
+ */
+@interface HBCore : NSObject
+{
+    /// Pointer to libhb handle.
+    struct hb_handle_s *hb_handle;
+    
+    /// Pointer to latest state information returned by libhb.
+    struct hb_state_s *hb_state;
+    
+    /// Timer used to poll libhb for state changes.
+    NSTimer *updateTimer;
+
+    /// Current state of HBCore; one of the HBState* constants.
+    const NSString *state;  
+}
+
+- (id)init;
+- (BOOL)openInDebugMode:(BOOL)debugMode checkForUpdates:(BOOL)checkForUpdates;
+- (BOOL)close;
+- (void)removeAllJobs;
+- (NSString *)state;
+- (struct hb_handle_s *)hb_handle;
+- (const struct hb_state_s *)hb_state;
+
+@end
diff --git a/macosx/InstantHandBrake/HBCore.m b/macosx/InstantHandBrake/HBCore.m
new file mode 100644 (file)
index 0000000..3d502b6
--- /dev/null
@@ -0,0 +1,282 @@
+/**
+ * @file
+ * Implementation of class HBCore.
+ */
+
+#import "HBCore.h"
+#include "hb.h"
+
+// These constants specify the current state of HBCore.
+
+const NSString *HBStateIdle = @"HBStateIdle";           ///< HB is doing nothing (HB_STATE_IDLE)
+const NSString *HBStateScanning = @"HBStateScanning";   ///< HB is scanning (HB_STATE_SCANNING)
+const NSString *HBStateScanDone = @"HBStateScanDone";   ///< Scanning has been completed (HB_STATE_SCANDONE)
+const NSString *HBStateWorking = @"HBStateWorking";     ///< HB is encoding (HB_STATE_WORKING)
+const NSString *HBStatePaused = @"HBStatePaused";       ///< Encoding is paused (HB_STATE_PAUSED)
+const NSString *HBStateWorkDone = @"HBStateWorkDone";   ///< Encoding has been completed (HB_STATE_WORKDONE)
+const NSString *HBStateMuxing = @"HBStateMuxing";       ///< HB is muxing (HB_STATE_MUXING)
+
+
+// These constants specify various status notifications sent by HBCore
+
+/// Notification sent to update status while scanning. Matches HB_STATE_SCANNING constant in libhb.
+NSString *HBCoreScanningNotification = @"HBCoreScanningNotification";
+
+/// Notification sent after scanning is complete. Matches HB_STATE_SCANDONE constant in libhb.
+NSString *HBCoreScanDoneNotification = @"HBCoreScanDoneNotification";
+
+/// Notification sent to update status while encoding. Matches HB_STATE_WORKING constant in libhb.
+NSString *HBCoreWorkingNotification = @"HBCoreWorkingNotification";
+
+/// Notification sent when encoding is paused. Matches HB_STATE_PAUSED constant in libhb.
+NSString *HBCorePausedNotification = @"HBCorePausedNotification";
+
+/// Notification sent after encoding is complete. Matches HB_STATE_WORKDONE constant in libhb.
+NSString *HBCoreWorkDoneNotification = @"HBCoreWorkDoneNotification";
+
+/// Notification sent to update status while muxing. Matches HB_STATE_MUXING constant in libhb.
+NSString *HBCoreMuxingNotification = @"HBCoreMuxingNotification";
+
+/**
+ * Private methods of HBCore.
+ */
+@interface HBCore (Private)
+- (NSString *)stateAsString:(int)stateValue;
+@end
+
+@implementation HBCore
+
+/**
+ * Initializes HBCore.
+ */
+- (id)init
+{
+    if (self = [super init])
+    {
+        state = HBStateIdle;    
+        hb_state = malloc(sizeof(struct hb_state_s));   
+    }
+    return self;
+}
+
+/**
+ * Releases resources.
+ */
+- (void)dealloc
+{
+    free(hb_state);    
+    [super dealloc];
+}
+
+/**
+ * Opens low level HandBrake library. This should be called once before other
+ * functions HBCore are used.
+ *
+ * @param debugMode         If set to YES, libhb will print verbose debug output.
+ * @param checkForUpdates   If set to YES, libhb checks for updated versions.
+ *
+ * @return YES if libhb was opened, NO if there was an error.
+ */
+- (BOOL)openInDebugMode:(BOOL)debugMode checkForUpdates:(BOOL)checkForUpdates;
+{
+    NSAssert(!hb_handle, @"[HBCore openInDebugMode:checkForUpdates:] libhb is already open");
+    if (hb_handle)
+        return NO;
+
+    state = HBStateIdle;    
+
+    hb_handle = hb_init(debugMode ? HB_DEBUG_ALL : HB_DEBUG_NONE, checkForUpdates);
+    if (!hb_handle)
+        return NO;
+
+    updateTimer = [[NSTimer scheduledTimerWithTimeInterval:0.5
+                                                    target:self
+                                                  selector:@selector(stateUpdateTimer:) 
+                                                  userInfo:NULL 
+                                                   repeats:YES] retain];
+
+    [[NSRunLoop currentRunLoop] addTimer:updateTimer forMode:NSEventTrackingRunLoopMode];        
+    return YES;
+}
+
+/**
+ * Closes low level HandBrake library and releases resources.
+ *
+ * @return YES if libhb was closed successfully, NO if there was an error.
+ */
+- (BOOL)close
+{
+    NSAssert(hb_handle, @"[HBCore close] libhb is not open");
+    if (!hb_handle)
+        return NO;
+        
+    [updateTimer invalidate];
+    [updateTimer release];
+    updateTimer = nil;
+    hb_close(&hb_handle);
+    hb_handle = NULL;
+    return YES;
+}
+
+/**
+ * Removes all jobs from the queue.
+ */ 
+- (void) removeAllJobs
+{
+    hb_job_t * job;
+    while( ( job = hb_job( hb_handle, 0 ) ) )
+        hb_rem( hb_handle, job );
+}
+
+/**
+ * Returns libhb handle used by this HBCore instance.
+ */ 
+- (struct hb_handle_s *)hb_handle
+{
+    return hb_handle;
+}
+
+/**
+ * Returns current state of HBCore.
+ *
+ * @return One of the HBState* string constants.
+ */
+- (const NSString *)state
+{
+    return state;
+}
+
+/**
+ * Returns latest hb_state_s information struct returned by libhb.
+ *
+ * @return Pointer to a hb_state_s struct containing state information of libhb.
+ */
+- (const struct hb_state_s *)hb_state
+{
+    return hb_state;
+}
+
+@end 
+
+@implementation HBCore (Private)
+
+/**
+ * Transforms a libhb state constant to a matching HBCore state constant.
+ */
+- (const NSString *)stateAsString:(int)stateValue
+{
+    switch (stateValue)
+    {
+        case HB_STATE_IDLE:
+            return HBStateIdle;        
+        case HB_STATE_SCANNING:
+            return HBStateScanning;
+        case HB_STATE_SCANDONE:
+            return HBStateScanDone;
+        case HB_STATE_WORKING:
+            return HBStateWorking;
+        case HB_STATE_PAUSED:
+            return HBStatePaused;
+        case HB_STATE_WORKDONE:
+            return HBStateWorkDone;
+        case HB_STATE_MUXING:
+            return HBStateMuxing;        
+        default:
+            NSAssert1(NO, @"[HBCore stateAsString:] unknown state %d", stateValue);
+            return nil;
+    }
+}
+
+/**
+ * This method polls libhb continuously for state changes and processes them.
+ * Additional processing for each state is performed in methods that start
+ * with 'handle' (e.g. handleHBStateScanning).
+ */
+- (void)stateUpdateTimer:(NSTimer *)timer
+{
+    if (!hb_handle)
+    {
+        // Libhb is not open so we cannot do anything.
+        return;
+    }
+
+    hb_get_state(hb_handle, hb_state);
+
+    if (hb_state->state == HB_STATE_IDLE)
+    {
+        // Libhb reported HB_STATE_IDLE, so nothing interesting has happened.
+        return;
+    }
+        
+    // Update HBCore state to reflect the current state of libhb
+    NSString *newState = [self stateAsString:hb_state->state];
+    if (newState != state)
+    {
+        [self willChangeValueForKey:@"state"];
+        state = newState;
+        [self didChangeValueForKey:@"state"];
+    }
+
+    // Determine name of the method that does further processing for this state
+    // and call it. 
+    SEL sel = NSSelectorFromString([NSString stringWithFormat:@"handle%@", state]);
+    if ([self respondsToSelector:sel])
+        [self performSelector:sel];
+}
+
+/**
+ * Processes HBStateScanning state information. Current implementation just
+ * sends HBCoreScanningNotification.
+ */
+- (void)handleHBStateScanning
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCoreScanningNotification object:self];    
+}
+
+/**
+ * Processes HBStateScanDone state information. Current implementation just
+ * sends HBCoreScanDoneNotification.
+ */
+- (void)handleHBStateScanDone
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCoreScanDoneNotification object:self];    
+}
+
+/**
+ * Processes HBStateWorking state information. Current implementation just
+ * sends HBCoreWorkingNotification.
+ */
+- (void)handleHBStateWorking
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCoreWorkingNotification object:self];    
+}
+
+/**
+ * Processes HBStatePaused state information. Current implementation just
+ * sends HBCorePausedNotification.
+ */
+- (void)handleHBStatePaused
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCorePausedNotification object:self];    
+}
+
+/**
+ * Processes HBStateWorkDone state information. Current implementation just
+ * sends HBCoreWorkDoneNotification.
+ */
+- (void)handleHBStateWorkDone
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCoreWorkDoneNotification object:self];    
+}
+
+/**
+ * Processes HBStateMuxing state information. Current implementation just
+ * sends HBCoreMuxingNotification.
+ */
+- (void)handleHBStateMuxing
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:HBCoreMuxingNotification object:self];    
+}
+
+@end
diff --git a/macosx/InstantHandBrake/InstantHandBrake.xcodeproj/project.pbxproj b/macosx/InstantHandBrake/InstantHandBrake.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..e6c34f4
--- /dev/null
@@ -0,0 +1,614 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 44;
+       objects = {
+
+/* Begin PBXAggregateTarget section */
+               A95DD4FA0D4BA8A30056F1F2 /* Plist Macros */ = {
+                       isa = PBXAggregateTarget;
+                       buildConfigurationList = A95DD5070D4BA8E90056F1F2 /* Build configuration list for PBXAggregateTarget "Plist Macros" */;
+                       buildPhases = (
+                               A95DD4F90D4BA8A30056F1F2 /* ShellScript */,
+                       );
+                       dependencies = (
+                       );
+                       name = "Plist Macros";
+                       productName = "Plist Macros";
+               };
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+               4D1EA2EA0993B09A00FDC1A2 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.mm */; };
+               4D1EA2F60993B0CA00FDC1A2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+               4D1EA31C0993B24700FDC1A2 /* ExpressController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1EA31B0993B24700FDC1A2 /* ExpressController.m */; };
+               4D2AEA1A09CCB332007E18F6 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DEB2024052B055F00C39CA9 /* IOKit.framework */; };
+               4D3ECC2709A4917000B2E45F /* WhiteBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D3ECC2609A4917000B2E45F /* WhiteBox.m */; };
+               A2122D820C7EAF6600AB87A4 /* DriveDetector.m in Sources */ = {isa = PBXBuildFile; fileRef = A2122D810C7EAF6600AB87A4 /* DriveDetector.m */; };
+               A952EBCE0D3BB1B100A3DCA7 /* Open.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A952EBCD0D3BB1B100A3DCA7 /* Open.tiff */; };
+               A9595E4A0D4E2CBC003906A9 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A9595E480D4E2CBC003906A9 /* InfoPlist.strings */; };
+               A95C08560D50858F00084DA8 /* Devices in Resources */ = {isa = PBXBuildFile; fileRef = A95C08510D50858F00084DA8 /* Devices */; };
+               A95DD5490D4BACF50056F1F2 /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B706E50D356BC800385AF2 /* Growl.framework */; };
+               A95DD6260D4BAD950056F1F2 /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A9B706E50D356BC800385AF2 /* Growl.framework */; };
+               A98B18070D3CDF290093A591 /* Preset.m in Sources */ = {isa = PBXBuildFile; fileRef = A98B18060D3CDF290093A591 /* Preset.m */; };
+               A98B180A0D3CDF380093A591 /* Device.m in Sources */ = {isa = PBXBuildFile; fileRef = A98B18090D3CDF380093A591 /* Device.m */; };
+               A9B70A030D3570F100385AF2 /* HandBrake.icns in Resources */ = {isa = PBXBuildFile; fileRef = A9B70A020D3570F100385AF2 /* HandBrake.icns */; };
+               A9B70A0F0D35719900385AF2 /* HBCore.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B70A0D0D35719900385AF2 /* HBCore.m */; };
+               A9C0EDB90D478699005CA5CF /* DeviceController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C0EDB80D478699005CA5CF /* DeviceController.m */; };
+               A9DB3A1F0D37EC6800F77345 /* libhb.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB3A0F0D37EC2800F77345 /* libhb.a */; };
+               A9ED4EF20D36226F004341F5 /* Play.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A9ED4EEF0D36226F004341F5 /* Play.tiff */; };
+               A9ED4EF30D36226F004341F5 /* Pause.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A9ED4EF00D36226F004341F5 /* Pause.tiff */; };
+               A9ED4EF40D36226F004341F5 /* Stop.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A9ED4EF10D36226F004341F5 /* Stop.tiff */; };
+               A9ED502E0D36477D004341F5 /* Express.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9ED502C0D36477D004341F5 /* Express.xib */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+               A95DD4FE0D4BA8D50056F1F2 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = A95DD4FA0D4BA8A30056F1F2;
+                       remoteInfo = "Plist Macros";
+               };
+               A9DB3A0E0D37EC2800F77345 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = A9DB3A080D37EC2800F77345 /* libhb.xcodeproj */;
+                       proxyType = 2;
+                       remoteGlobalIDString = 0DFF0B720B6BC6E600549488;
+                       remoteInfo = libhb;
+               };
+               A9DB3A140D37EC4200F77345 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = A9DB3A080D37EC2800F77345 /* libhb.xcodeproj */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 0DFF0B710B6BC6E600549488;
+                       remoteInfo = libhb;
+               };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+               A95DD6D60D4BAD9D0056F1F2 /* CopyFiles */ = {
+                       isa = PBXCopyFilesBuildPhase;
+                       buildActionMask = 2147483647;
+                       dstPath = "";
+                       dstSubfolderSpec = 10;
+                       files = (
+                               A95DD6260D4BAD950056F1F2 /* Growl.framework in CopyFiles */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+               29B97316FDCFA39411CA2CEA /* main.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
+               29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+               29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+               4D1EA2DA0993B01000FDC1A2 /* Instant HandBrake.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Instant HandBrake.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+               4D1EA2DC0993B01000FDC1A2 /* Express.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Express.plist; sourceTree = "<group>"; };
+               4D1EA31A0993B24700FDC1A2 /* ExpressController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExpressController.h; sourceTree = "<group>"; };
+               4D1EA31B0993B24700FDC1A2 /* ExpressController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = ExpressController.m; sourceTree = "<group>"; };
+               4D3ECC2509A4917000B2E45F /* WhiteBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WhiteBox.h; sourceTree = "<group>"; };
+               4D3ECC2609A4917000B2E45F /* WhiteBox.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WhiteBox.m; sourceTree = "<group>"; };
+               4DEB2024052B055F00C39CA9 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
+               A2122D800C7EAF6500AB87A4 /* DriveDetector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DriveDetector.h; sourceTree = "<group>"; };
+               A2122D810C7EAF6600AB87A4 /* DriveDetector.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = DriveDetector.m; sourceTree = "<group>"; };
+               A952EBCD0D3BB1B100A3DCA7 /* Open.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Open.tiff; sourceTree = "<group>"; };
+               A9595E490D4E2CBC003906A9 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+               A95C08510D50858F00084DA8 /* Devices */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Devices; sourceTree = "<group>"; };
+               A98B18050D3CDF290093A591 /* Preset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Preset.h; sourceTree = "<group>"; };
+               A98B18060D3CDF290093A591 /* Preset.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Preset.m; sourceTree = "<group>"; };
+               A98B18080D3CDF380093A591 /* Device.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Device.h; sourceTree = "<group>"; };
+               A98B18090D3CDF380093A591 /* Device.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Device.m; sourceTree = "<group>"; };
+               A9B706E50D356BC800385AF2 /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = ../Growl.framework; sourceTree = SOURCE_ROOT; };
+               A9B70A010D3570D300385AF2 /* hb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hb.h; path = ../../libhb/hb.h; sourceTree = SOURCE_ROOT; };
+               A9B70A020D3570F100385AF2 /* HandBrake.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = HandBrake.icns; path = ../HandBrake.icns; sourceTree = SOURCE_ROOT; };
+               A9B70A0D0D35719900385AF2 /* HBCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBCore.m; sourceTree = "<group>"; };
+               A9B70A0E0D35719900385AF2 /* HBCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBCore.h; sourceTree = "<group>"; };
+               A9C0EDB70D478699005CA5CF /* DeviceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceController.h; sourceTree = "<group>"; };
+               A9C0EDB80D478699005CA5CF /* DeviceController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeviceController.m; sourceTree = "<group>"; };
+               A9DB3A080D37EC2800F77345 /* libhb.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = libhb.xcodeproj; sourceTree = "<group>"; };
+               A9ED4EEF0D36226F004341F5 /* Play.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Play.tiff; path = ../icons/Play.tiff; sourceTree = SOURCE_ROOT; };
+               A9ED4EF00D36226F004341F5 /* Pause.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Pause.tiff; path = ../icons/Pause.tiff; sourceTree = SOURCE_ROOT; };
+               A9ED4EF10D36226F004341F5 /* Stop.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Stop.tiff; path = ../icons/Stop.tiff; sourceTree = SOURCE_ROOT; };
+               A9ED502D0D36477D004341F5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Express.xib; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               4D1EA2D80993B01000FDC1A2 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               A95DD5490D4BACF50056F1F2 /* Growl.framework in Frameworks */,
+                               A9DB3A1F0D37EC6800F77345 /* libhb.a in Frameworks */,
+                               4D1EA2F60993B0CA00FDC1A2 /* Cocoa.framework in Frameworks */,
+                               4D2AEA1A09CCB332007E18F6 /* IOKit.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               19C28FACFE9D520D11CA2CBB /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               4D1EA2DA0993B01000FDC1A2 /* Instant HandBrake.app */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+               29B97314FDCFA39411CA2CEA /* HandBrake */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A98B18080D3CDF380093A591 /* Device.h */,
+                               A98B18090D3CDF380093A591 /* Device.m */,
+                               A98B18050D3CDF290093A591 /* Preset.h */,
+                               A98B18060D3CDF290093A591 /* Preset.m */,
+                               A9C0EDB70D478699005CA5CF /* DeviceController.h */,
+                               A9C0EDB80D478699005CA5CF /* DeviceController.m */,
+                               4D3ECC2509A4917000B2E45F /* WhiteBox.h */,
+                               4D3ECC2609A4917000B2E45F /* WhiteBox.m */,
+                               A2122D800C7EAF6500AB87A4 /* DriveDetector.h */,
+                               A2122D810C7EAF6600AB87A4 /* DriveDetector.m */,
+                               4D1EA31A0993B24700FDC1A2 /* ExpressController.h */,
+                               4D1EA31B0993B24700FDC1A2 /* ExpressController.m */,
+                               A9B70A0E0D35719900385AF2 /* HBCore.h */,
+                               A9B70A0D0D35719900385AF2 /* HBCore.m */,
+                               29B97315FDCFA39411CA2CEA /* Other Sources */,
+                               29B97317FDCFA39411CA2CEA /* Resources */,
+                               29B97323FDCFA39411CA2CEA /* Frameworks */,
+                               19C28FACFE9D520D11CA2CBB /* Products */,
+                       );
+                       name = HandBrake;
+                       sourceTree = "<group>";
+               };
+               29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A9B70A010D3570D300385AF2 /* hb.h */,
+                               29B97316FDCFA39411CA2CEA /* main.mm */,
+                       );
+                       name = "Other Sources";
+                       sourceTree = "<group>";
+               };
+               29B97317FDCFA39411CA2CEA /* Resources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A95C08510D50858F00084DA8 /* Devices */,
+                               A952EBCD0D3BB1B100A3DCA7 /* Open.tiff */,
+                               A9ED4EEF0D36226F004341F5 /* Play.tiff */,
+                               A9ED4EF00D36226F004341F5 /* Pause.tiff */,
+                               A9ED4EF10D36226F004341F5 /* Stop.tiff */,
+                               A9595E480D4E2CBC003906A9 /* InfoPlist.strings */,
+                               A9B70A020D3570F100385AF2 /* HandBrake.icns */,
+                               4D1EA2DC0993B01000FDC1A2 /* Express.plist */,
+                               A9ED502C0D36477D004341F5 /* Express.xib */,
+                       );
+                       name = Resources;
+                       sourceTree = "<group>";
+               };
+               29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A9DB3A080D37EC2800F77345 /* libhb.xcodeproj */,
+                               A9B706E50D356BC800385AF2 /* Growl.framework */,
+                               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+                               4DEB2024052B055F00C39CA9 /* IOKit.framework */,
+                               29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+                               29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+                       );
+                       name = Frameworks;
+                       sourceTree = "<group>";
+               };
+               A9DB3A090D37EC2800F77345 /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A9DB3A0F0D37EC2800F77345 /* libhb.a */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+               4D1EA2D90993B01000FDC1A2 /* Instant HandBrake */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 4D1EA2DD0993B01100FDC1A2 /* Build configuration list for PBXNativeTarget "Instant HandBrake" */;
+                       buildPhases = (
+                               4D1EA2D60993B01000FDC1A2 /* Resources */,
+                               4D1EA2D70993B01000FDC1A2 /* Sources */,
+                               4D1EA2D80993B01000FDC1A2 /* Frameworks */,
+                               A95DD6D60D4BAD9D0056F1F2 /* CopyFiles */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               A95DD4FF0D4BA8D50056F1F2 /* PBXTargetDependency */,
+                               A9DB3A150D37EC4200F77345 /* PBXTargetDependency */,
+                       );
+                       name = "Instant HandBrake";
+                       productName = "Instant HandBrake";
+                       productReference = 4D1EA2DA0993B01000FDC1A2 /* Instant HandBrake.app */;
+                       productType = "com.apple.product-type.application";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               29B97313FDCFA39411CA2CEA /* Project object */ = {
+                       isa = PBXProject;
+                       attributes = {
+                               BuildIndependentTargetsInParallel = YES;
+                       };
+                       buildConfigurationList = 4D4E7BC4087804870051572B /* Build configuration list for PBXProject "InstantHandBrake" */;
+                       compatibilityVersion = "Xcode 3.0";
+                       hasScannedForEncodings = 1;
+                       mainGroup = 29B97314FDCFA39411CA2CEA /* HandBrake */;
+                       projectDirPath = "";
+                       projectReferences = (
+                               {
+                                       ProductGroup = A9DB3A090D37EC2800F77345 /* Products */;
+                                       ProjectRef = A9DB3A080D37EC2800F77345 /* libhb.xcodeproj */;
+                               },
+                       );
+                       projectRoot = "";
+                       targets = (
+                               4D1EA2D90993B01000FDC1A2 /* Instant HandBrake */,
+                               A95DD4FA0D4BA8A30056F1F2 /* Plist Macros */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+               A9DB3A0F0D37EC2800F77345 /* libhb.a */ = {
+                       isa = PBXReferenceProxy;
+                       fileType = archive.ar;
+                       path = libhb.a;
+                       remoteRef = A9DB3A0E0D37EC2800F77345 /* PBXContainerItemProxy */;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+               4D1EA2D60993B01000FDC1A2 /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               A9B70A030D3570F100385AF2 /* HandBrake.icns in Resources */,
+                               A9ED4EF20D36226F004341F5 /* Play.tiff in Resources */,
+                               A9ED4EF30D36226F004341F5 /* Pause.tiff in Resources */,
+                               A9ED4EF40D36226F004341F5 /* Stop.tiff in Resources */,
+                               A9ED502E0D36477D004341F5 /* Express.xib in Resources */,
+                               A952EBCE0D3BB1B100A3DCA7 /* Open.tiff in Resources */,
+                               A9595E4A0D4E2CBC003906A9 /* InfoPlist.strings in Resources */,
+                               A95C08560D50858F00084DA8 /* Devices in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+               A95DD4F90D4BA8A30056F1F2 /* ShellScript */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       outputPaths = (
+                               "${CONFIGURATION_TEMP_DIR}/Instant HandBrake.build/PlistMacros.h",
+                               "${CONFIGURATION_TEMP_DIR}/Instant HandBrake.build/DummyFileToForceScriptToRunEveryTimeWithoutBeingCreated",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "PATH=$PATH:/usr/local/bin:/usr/bin:/sw/bin:/opt/local/bin\nbuildid=\"r`svn info | awk '/^Revision:/ {print $2}'`\"\n\necho \"#define BUILDID $buildid\" > $SCRIPT_OUTPUT_FILE_0\necho \"#define BUILDDATE `date`\" >> $SCRIPT_OUTPUT_FILE_0\necho \"#define WHOAMI `whoami`\" >> $SCRIPT_OUTPUT_FILE_0\n\n# Delete the intermediate Info.plist so that Xcode re-preprocesses the Info.plist with our updated macros.\n# Use -f because after a clean build, this file doesn't exist yet, so a plain rm would fail and stop the build.\nrm -f \"${CONFIGURATION_TEMP_DIR}/Instant HandBrake.build/Preprocessed-Info.plist\"\n";
+               };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+               4D1EA2D70993B01000FDC1A2 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               4D1EA2EA0993B09A00FDC1A2 /* main.mm in Sources */,
+                               4D1EA31C0993B24700FDC1A2 /* ExpressController.m in Sources */,
+                               4D3ECC2709A4917000B2E45F /* WhiteBox.m in Sources */,
+                               A2122D820C7EAF6600AB87A4 /* DriveDetector.m in Sources */,
+                               A9B70A0F0D35719900385AF2 /* HBCore.m in Sources */,
+                               A98B18070D3CDF290093A591 /* Preset.m in Sources */,
+                               A98B180A0D3CDF380093A591 /* Device.m in Sources */,
+                               A9C0EDB90D478699005CA5CF /* DeviceController.m in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+               A95DD4FF0D4BA8D50056F1F2 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = A95DD4FA0D4BA8A30056F1F2 /* Plist Macros */;
+                       targetProxy = A95DD4FE0D4BA8D50056F1F2 /* PBXContainerItemProxy */;
+               };
+               A9DB3A150D37EC4200F77345 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       name = libhb;
+                       targetProxy = A9DB3A140D37EC4200F77345 /* PBXContainerItemProxy */;
+               };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+               A9595E480D4E2CBC003906A9 /* InfoPlist.strings */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               A9595E490D4E2CBC003906A9 /* English */,
+                       );
+                       name = InfoPlist.strings;
+                       sourceTree = "<group>";
+               };
+               A9ED502C0D36477D004341F5 /* Express.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               A9ED502D0D36477D004341F5 /* English */,
+                       );
+                       name = Express.xib;
+                       sourceTree = "<group>";
+               };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+               0D88F56D0B6CDCD400F81F26 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = ..;
+                               FRAMEWORK_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "\"$(SRCROOT)/..\"",
+                               );
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+                               HEADER_SEARCH_PATHS = ../libhb;
+                               INFOPLIST_FILE = Express.plist;
+                               INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-C";
+                               INFOPLIST_PREFIX_HEADER = "${CONFIGURATION_TEMP_DIR}/Instant HandBrake.build/PlistMacros.h";
+                               INFOPLIST_PREPROCESS = YES;
+                               INSTALL_PATH = "$(HOME)/Applications";
+                               LIBRARY_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+                                       "\"$(SRCROOT)/../../libhb\"",
+                               );
+                               LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\"";
+                               OTHER_LDFLAGS = (
+                                       ../libhb/libhb.a,
+                                       ../contrib/lib/libmp4v2.a,
+                                       ../contrib/lib/liba52.a,
+                                       ../contrib/lib/libavformat.a,
+                                       ../contrib/lib/libavcodec.a,
+                                       ../contrib/lib/libavutil.a,
+                                       ../contrib/lib/libdvdread.a,
+                                       ../contrib/lib/libdvdcss.a,
+                                       ../contrib/lib/libfaac.a,
+                                       ../contrib/lib/libmp3lame.a,
+                                       ../contrib/lib/libmpeg2.a,
+                                       ../contrib/lib/libvorbis.a,
+                                       ../contrib/lib/libvorbisenc.a,
+                                       ../contrib/lib/libogg.a,
+                                       ../contrib/lib/libsamplerate.a,
+                                       ../contrib/lib/libx264.a,
+                                       ../contrib/lib/libxvidcore.a,
+                                       ../contrib/lib/libdca.a,
+                                       ../contrib/lib/libmkv.a,
+                                       ../contrib/lib/libswscale.a,
+                               );
+                               PREBINDING = NO;
+                               PRODUCT_NAME = "Instant HandBrake";
+                               SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+                               WRAPPER_EXTENSION = app;
+                               ZERO_LINK = NO;
+                       };
+                       name = Release;
+               };
+               0D88F56F0B6CDCD400F81F26 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = (
+                                       ppc,
+                                       i386,
+                               );
+                               EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.framework *.gch (*) CVS .svn *.xcodeproj *.xcode *.pbproj *.pbxproj";
+                               GCC_AUTO_VECTORIZATION = YES;
+                               GCC_ENABLE_SSE3_EXTENSIONS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_PREPROCESSOR_DEFINITIONS = "JOB_GROUPS=1";
+                               GCC_WARN_UNUSED_VALUE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               INFOPLIST_PREPROCESS = NO;
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+                       };
+                       name = Release;
+               };
+               4D1EA2DE0993B01100FDC1A2 /* Development */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               COPY_PHASE_STRIP = NO;
+                               FRAMEWORK_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "\"$(SRCROOT)/..\"",
+                               );
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+                               HEADER_SEARCH_PATHS = ../libhb;
+                               INFOPLIST_FILE = Express.plist;
+                               INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-C";
+                               INFOPLIST_PREFIX_HEADER = "${CONFIGURATION_TEMP_DIR}/Instant HandBrake.build/PlistMacros.h";
+                               INFOPLIST_PREPROCESS = YES;
+                               INSTALL_PATH = "$(HOME)/Applications";
+                               LIBRARY_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+                                       "\"$(SRCROOT)/../../libhb\"",
+                               );
+                               LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\"";
+                               OTHER_LDFLAGS = "";
+                               PREBINDING = NO;
+                               PRODUCT_NAME = "Instant HandBrake";
+                               SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+                               WRAPPER_EXTENSION = app;
+                               ZERO_LINK = NO;
+                       };
+                       name = Development;
+               };
+               4D1EA2DF0993B01100FDC1A2 /* Deployment */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               COPY_PHASE_STRIP = YES;
+                               FRAMEWORK_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "\"$(SRCROOT)/..\"",
+                               );
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+                               GCC_PREPROCESSOR_DEFINITIONS = "";
+                               HEADER_SEARCH_PATHS = ../libhb;
+                               INFOPLIST_FILE = Express.plist;
+                               INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-C";
+                               INFOPLIST_PREFIX_HEADER = "${CONFIGURATION_TEMP_DIR}/Instant HandBrake.build/PlistMacros.h";
+                               INFOPLIST_PREPROCESS = YES;
+                               INSTALL_PATH = "$(HOME)/Applications";
+                               LIBRARY_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+                                       "\"$(SRCROOT)/../../libhb\"",
+                               );
+                               OTHER_LDFLAGS = "";
+                               PREBINDING = NO;
+                               PRODUCT_NAME = "Instant HandBrake";
+                               SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+                               WRAPPER_EXTENSION = app;
+                               ZERO_LINK = NO;
+                       };
+                       name = Deployment;
+               };
+               4D4E7BC5087804870051572B /* Development */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               DEBUG_INFORMATION_FORMAT = dwarf;
+                               EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.framework *.gch (*) CVS .svn *.xcodeproj *.xcode *.pbproj *.pbxproj";
+                               GCC_AUTO_VECTORIZATION = NO;
+                               GCC_DEBUGGING_SYMBOLS = default;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_ENABLE_SSE3_EXTENSIONS = NO;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_PREPROCESSOR_DEFINITIONS = "JOB_GROUPS=1";
+                               GCC_WARN_UNUSED_VALUE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               INFOPLIST_PREPROCESS = NO;
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               PREBINDING = NO;
+                               SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+                               ZERO_LINK = NO;
+                       };
+                       name = Development;
+               };
+               4D4E7BC6087804870051572B /* Deployment */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.framework *.gch (*) CVS .svn *.xcodeproj *.xcode *.pbproj *.pbxproj";
+                               GCC_AUTO_VECTORIZATION = YES;
+                               GCC_ENABLE_SSE3_EXTENSIONS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_PREPROCESSOR_DEFINITIONS = "JOB_GROUPS=1";
+                               GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES;
+                               GCC_WARN_UNUSED_FUNCTION = YES;
+                               GCC_WARN_UNUSED_VALUE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               INFOPLIST_PREPROCESS = NO;
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+                       };
+                       name = Deployment;
+               };
+               A95DD4FB0D4BA8A30056F1F2 /* Development */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               COPY_PHASE_STRIP = NO;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               PRODUCT_NAME = "Plist Macros";
+                       };
+                       name = Development;
+               };
+               A95DD4FC0D4BA8A30056F1F2 /* Deployment */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               COPY_PHASE_STRIP = YES;
+                               DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
+                               PRODUCT_NAME = "Plist Macros";
+                               ZERO_LINK = NO;
+                       };
+                       name = Deployment;
+               };
+               A95DD4FD0D4BA8A30056F1F2 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               COPY_PHASE_STRIP = YES;
+                               DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
+                               PRODUCT_NAME = "Plist Macros";
+                               ZERO_LINK = NO;
+                       };
+                       name = Release;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+               4D1EA2DD0993B01100FDC1A2 /* Build configuration list for PBXNativeTarget "Instant HandBrake" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               4D1EA2DE0993B01100FDC1A2 /* Development */,
+                               4D1EA2DF0993B01100FDC1A2 /* Deployment */,
+                               0D88F56D0B6CDCD400F81F26 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Deployment;
+               };
+               4D4E7BC4087804870051572B /* Build configuration list for PBXProject "InstantHandBrake" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               4D4E7BC5087804870051572B /* Development */,
+                               4D4E7BC6087804870051572B /* Deployment */,
+                               0D88F56F0B6CDCD400F81F26 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Deployment;
+               };
+               A95DD5070D4BA8E90056F1F2 /* Build configuration list for PBXAggregateTarget "Plist Macros" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               A95DD4FB0D4BA8A30056F1F2 /* Development */,
+                               A95DD4FC0D4BA8A30056F1F2 /* Deployment */,
+                               A95DD4FD0D4BA8A30056F1F2 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Deployment;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/macosx/InstantHandBrake/Open.tiff b/macosx/InstantHandBrake/Open.tiff
new file mode 100644 (file)
index 0000000..ec5d0a3
Binary files /dev/null and b/macosx/InstantHandBrake/Open.tiff differ
diff --git a/macosx/InstantHandBrake/Preset.h b/macosx/InstantHandBrake/Preset.h
new file mode 100644 (file)
index 0000000..2d53f0a
--- /dev/null
@@ -0,0 +1,51 @@
+//
+//  Preset.h
+//  InstantHandBrake
+//
+//  Created by Damiano Galassi on 15/01/08.
+//  This file is part of the HandBrake source code.
+//  Homepage: <http://handbrake.fr/>.
+//  It may be used under the terms of the GNU General Public License.
+//
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface Preset : NSObject <NSCoding> {
+    NSString       *presetName;
+    
+    int             fMuxer;
+    int             fVideoCodec;
+    int             fVideoBitRate;
+    NSString       *fVideoCodecOptions;
+
+    int             fAudioCodec;
+    int             fAudioBitRate;
+    int             fAudioSampleRate;
+    
+    int             fMaxWidth;
+    int             fMaxHeight;
+    int             fAnamorphic;
+}
+
+- (id) initWithMuxer: (int) muxer
+          videoCodec: (int) videoCodec
+        videoBitRate: (int) videoBitRate
+   videoCodecOptions: (NSString *) videoCodecOptions
+          audioCodec: (int) audioCodec
+        audioBitrate: (int) audioBitrate
+     audioSampleRate: (int) audioSampleRate
+            maxWidth: (int) maxWidth
+           maxHeight: (int) maxHeight
+          anamorphic: (int) anamorphic;
+
+- (int) muxer;
+- (int) videoCodec;
+- (NSString *) videoCodecOptions;
+- (int) videoBitRate;
+- (int) AudioCodec;
+- (int) maxWidth;
+- (int) maxHeight;
+
+@end
diff --git a/macosx/InstantHandBrake/Preset.m b/macosx/InstantHandBrake/Preset.m
new file mode 100644 (file)
index 0000000..8eba139
--- /dev/null
@@ -0,0 +1,117 @@
+//
+//  Preset.h
+//  InstantHandBrake
+//
+//  Created by Damiano Galassi on 15/01/08.
+//  This file is part of the HandBrake source code.
+//  Homepage: <http://handbrake.fr/>.
+//  It may be used under the terms of the GNU General Public License.
+//
+//
+
+#import "Preset.h"
+
+
+@implementation Preset
+
+- (id) initWithMuxer: (int) muxer
+          videoCodec: (int) videoCodec
+        videoBitRate: (int) videoBitRate
+   videoCodecOptions: (NSString *) videoCodecOptions
+          audioCodec: (int) audioCodec
+        audioBitrate: (int) audioBitrate
+     audioSampleRate: (int) audioSampleRate
+            maxWidth: (int) maxWidth
+           maxHeight: (int) maxHeight
+          anamorphic: (int) anamorphic;
+{
+    if (self = [super init])
+    {
+        fMuxer = muxer;
+        fVideoCodec = videoCodec;
+        fVideoBitRate = videoBitRate;
+        fVideoCodecOptions = videoCodecOptions;
+        fAudioCodec = audioCodec;
+        fAudioBitRate = audioBitrate;
+        fAudioSampleRate = audioSampleRate;
+        fMaxWidth = maxWidth;
+        fMaxHeight = maxHeight;
+        fAnamorphic = anamorphic;
+    }
+    return self;
+}
+
+- (void) dealloc
+{
+    [fVideoCodecOptions release];
+    [super dealloc];
+}
+
+- (id) initWithCoder:(NSCoder *) coder
+{
+    presetName         = [[coder decodeObjectForKey:@"Name"] retain];
+    fMuxer             = [coder decodeIntForKey:@"Muxer"];
+    fVideoCodec        = [coder decodeIntForKey:@"VideoCodec"];
+    fVideoBitRate      = [coder decodeIntForKey:@"VideoBitRate"];
+    fVideoCodecOptions = [[coder decodeObjectForKey:@"VideoCodecOptions"] retain];
+    fAudioCodec        = [coder decodeIntForKey:@"AudioCodec"];
+    fAudioBitRate      = [coder decodeIntForKey:@"AudioBitRate"];
+    fAudioSampleRate   = [coder decodeIntForKey:@"AudioSampleRate"];
+    fMaxWidth          = [coder decodeIntForKey:@"MaxWidth"];
+    fMaxHeight         = [coder decodeIntForKey:@"MaxHeight"];
+    fAnamorphic        = [coder decodeIntForKey:@"Anarmophic"];
+        
+    return self;
+}
+
+- (void) encodeWithCoder:(NSCoder *)encoder
+{
+    [encoder encodeObject:presetName forKey:@"Name"];
+    [encoder encodeInt:fMuxer forKey:@"Muxer"];
+    [encoder encodeInt:fVideoCodec forKey:@"VideoCodec"];
+    [encoder encodeInt:fVideoBitRate forKey:@"VideoBitRate"];
+    [encoder encodeObject:fVideoCodecOptions forKey:@"VideoCodecOptions"];
+    [encoder encodeInt:fAudioCodec forKey:@"AudioCodec"];
+    [encoder encodeInt:fAudioBitRate forKey:@"AudioBitRate"];
+    [encoder encodeInt:fAudioSampleRate forKey:@"AudioSampleRate"];
+    [encoder encodeInt:fMaxWidth forKey:@"MaxWidth"];
+    [encoder encodeInt:fMaxHeight forKey:@"MaxHeight"];
+    [encoder encodeInt:fAnamorphic forKey:@"Anarmophic"];
+}
+
+- (int) muxer
+{
+    return fMuxer;
+}
+
+- (int) videoCodec;
+{
+    return fVideoCodec;
+}
+
+- (NSString *) videoCodecOptions
+{
+    return fVideoCodecOptions;
+}
+
+- (int) videoBitRate
+{
+    return fVideoBitRate;
+}
+
+- (int) AudioCodec;
+{
+    return fAudioCodec;
+}
+
+- (int) maxWidth;
+{
+    return fMaxWidth;
+}
+
+- (int) maxHeight;
+{
+    return fMaxHeight;
+}
+
+@end
diff --git a/macosx/InstantHandBrake/WhiteBox.h b/macosx/InstantHandBrake/WhiteBox.h
new file mode 100644 (file)
index 0000000..973d793
--- /dev/null
@@ -0,0 +1,12 @@
+/* WhiteBox
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#import <Cocoa/Cocoa.h>
+
+@interface WhiteBox : NSBox
+{
+}
+@end
diff --git a/macosx/InstantHandBrake/WhiteBox.m b/macosx/InstantHandBrake/WhiteBox.m
new file mode 100644 (file)
index 0000000..6e5c39d
--- /dev/null
@@ -0,0 +1,18 @@
+/* WhiteBox
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#import "WhiteBox.h"
+
+@implementation WhiteBox
+
+- (void) drawRect: (NSRect) rect
+{
+    [[NSColor whiteColor] set];
+    [[NSBezierPath bezierPathWithRect: rect] fill];
+    [super drawRect: rect];
+}
+    
+@end
diff --git a/macosx/InstantHandBrake/libhb.xcodeproj/project.pbxproj b/macosx/InstantHandBrake/libhb.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..b52e838
--- /dev/null
@@ -0,0 +1,545 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 42;
+       objects = {
+
+/* Begin PBXBuildFile section */
+               A9DB39100D37EA0300F77345 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38E70D37EA0300F77345 /* common.c */; };
+               A9DB39110D37EA0300F77345 /* common.h in Headers */ = {isa = PBXBuildFile; fileRef = A9DB38E80D37EA0300F77345 /* common.h */; };
+               A9DB39120D37EA0300F77345 /* deblock.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38E90D37EA0300F77345 /* deblock.c */; };
+               A9DB39130D37EA0300F77345 /* deca52.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38EA0D37EA0300F77345 /* deca52.c */; };
+               A9DB39140D37EA0300F77345 /* decavcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38EB0D37EA0300F77345 /* decavcodec.c */; };
+               A9DB39150D37EA0300F77345 /* decdca.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38EC0D37EA0300F77345 /* decdca.c */; };
+               A9DB39160D37EA0300F77345 /* declpcm.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38ED0D37EA0300F77345 /* declpcm.c */; };
+               A9DB39170D37EA0300F77345 /* decmpeg2.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38EE0D37EA0300F77345 /* decmpeg2.c */; };
+               A9DB39180D37EA0300F77345 /* decsub.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38EF0D37EA0300F77345 /* decsub.c */; };
+               A9DB39190D37EA0300F77345 /* deinterlace.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38F00D37EA0300F77345 /* deinterlace.c */; };
+               A9DB391A0D37EA0300F77345 /* demuxmpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38F10D37EA0300F77345 /* demuxmpeg.c */; };
+               A9DB391B0D37EA0300F77345 /* denoise.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38F20D37EA0300F77345 /* denoise.c */; };
+               A9DB391C0D37EA0300F77345 /* detelecine.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38F30D37EA0300F77345 /* detelecine.c */; };
+               A9DB391D0D37EA0300F77345 /* dvd.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38F40D37EA0300F77345 /* dvd.c */; };
+               A9DB391E0D37EA0300F77345 /* encavcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38F50D37EA0300F77345 /* encavcodec.c */; };
+               A9DB391F0D37EA0300F77345 /* encfaac.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38F60D37EA0300F77345 /* encfaac.c */; };
+               A9DB39200D37EA0300F77345 /* enclame.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38F70D37EA0300F77345 /* enclame.c */; };
+               A9DB39210D37EA0300F77345 /* encvorbis.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38F80D37EA0300F77345 /* encvorbis.c */; };
+               A9DB39220D37EA0300F77345 /* encx264.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38F90D37EA0300F77345 /* encx264.c */; };
+               A9DB39230D37EA0300F77345 /* encxvid.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38FA0D37EA0300F77345 /* encxvid.c */; };
+               A9DB39240D37EA0300F77345 /* fifo.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38FB0D37EA0300F77345 /* fifo.c */; };
+               A9DB39250D37EA0300F77345 /* hb.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38FC0D37EA0300F77345 /* hb.c */; };
+               A9DB39260D37EA0300F77345 /* hb.h in Headers */ = {isa = PBXBuildFile; fileRef = A9DB38FD0D37EA0300F77345 /* hb.h */; };
+               A9DB39270D37EA0300F77345 /* internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A9DB38FE0D37EA0300F77345 /* internal.h */; };
+               A9DB39280D37EA0300F77345 /* ipodutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38FF0D37EA0300F77345 /* ipodutil.cpp */; };
+               A9DB39290D37EA0300F77345 /* lang.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB39000D37EA0300F77345 /* lang.c */; };
+               A9DB392A0D37EA0300F77345 /* lang.h in Headers */ = {isa = PBXBuildFile; fileRef = A9DB39010D37EA0300F77345 /* lang.h */; };
+               A9DB392B0D37EA0300F77345 /* muxavi.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB39020D37EA0300F77345 /* muxavi.c */; };
+               A9DB392C0D37EA0300F77345 /* muxcommon.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB39030D37EA0300F77345 /* muxcommon.c */; };
+               A9DB392D0D37EA0300F77345 /* muxmkv.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB39040D37EA0300F77345 /* muxmkv.c */; };
+               A9DB392E0D37EA0300F77345 /* muxmp4.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB39050D37EA0300F77345 /* muxmp4.c */; };
+               A9DB392F0D37EA0300F77345 /* muxogm.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB39060D37EA0300F77345 /* muxogm.c */; };
+               A9DB39300D37EA0300F77345 /* ports.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB39070D37EA0300F77345 /* ports.c */; };
+               A9DB39310D37EA0300F77345 /* ports.h in Headers */ = {isa = PBXBuildFile; fileRef = A9DB39080D37EA0300F77345 /* ports.h */; };
+               A9DB39320D37EA0300F77345 /* reader.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB39090D37EA0300F77345 /* reader.c */; };
+               A9DB39330D37EA0300F77345 /* render.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB390A0D37EA0300F77345 /* render.c */; };
+               A9DB39340D37EA0300F77345 /* scan.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB390B0D37EA0300F77345 /* scan.c */; };
+               A9DB39350D37EA0300F77345 /* stream.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB390C0D37EA0300F77345 /* stream.c */; };
+               A9DB39360D37EA0300F77345 /* sync.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB390D0D37EA0300F77345 /* sync.c */; };
+               A9DB39370D37EA0300F77345 /* update.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB390E0D37EA0300F77345 /* update.c */; };
+               A9DB39380D37EA0300F77345 /* work.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB390F0D37EA0300F77345 /* work.c */; };
+               A9DB39B20D37EB4700F77345 /* liba52.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB399D0D37EB4700F77345 /* liba52.a */; };
+               A9DB39B30D37EB4700F77345 /* libavcodec.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB399E0D37EB4700F77345 /* libavcodec.a */; };
+               A9DB39B40D37EB4700F77345 /* libavformat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB399F0D37EB4700F77345 /* libavformat.a */; };
+               A9DB39B50D37EB4700F77345 /* libavutil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39A00D37EB4700F77345 /* libavutil.a */; };
+               A9DB39B60D37EB4700F77345 /* libdca.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39A10D37EB4700F77345 /* libdca.a */; };
+               A9DB39B70D37EB4700F77345 /* libdvdcss.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39A20D37EB4700F77345 /* libdvdcss.a */; };
+               A9DB39B80D37EB4700F77345 /* libdvdread.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39A30D37EB4700F77345 /* libdvdread.a */; };
+               A9DB39B90D37EB4700F77345 /* libfaac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39A40D37EB4700F77345 /* libfaac.a */; };
+               A9DB39BA0D37EB4700F77345 /* libmkv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39A50D37EB4700F77345 /* libmkv.a */; };
+               A9DB39BB0D37EB4700F77345 /* libmp3lame.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39A60D37EB4700F77345 /* libmp3lame.a */; };
+               A9DB39BC0D37EB4700F77345 /* libmp4v2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39A70D37EB4700F77345 /* libmp4v2.a */; };
+               A9DB39BD0D37EB4700F77345 /* libmpeg2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39A80D37EB4700F77345 /* libmpeg2.a */; };
+               A9DB39BE0D37EB4700F77345 /* libmpeg2convert.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39A90D37EB4700F77345 /* libmpeg2convert.a */; };
+               A9DB39BF0D37EB4700F77345 /* libogg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39AA0D37EB4700F77345 /* libogg.a */; };
+               A9DB39C00D37EB4700F77345 /* libsamplerate.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39AB0D37EB4700F77345 /* libsamplerate.a */; };
+               A9DB39C10D37EB4700F77345 /* libswscale.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39AC0D37EB4700F77345 /* libswscale.a */; };
+               A9DB39C20D37EB4700F77345 /* libvorbis.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39AD0D37EB4700F77345 /* libvorbis.a */; };
+               A9DB39C30D37EB4700F77345 /* libvorbisenc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39AE0D37EB4700F77345 /* libvorbisenc.a */; };
+               A9DB39C40D37EB4700F77345 /* libvorbisfile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39AF0D37EB4700F77345 /* libvorbisfile.a */; };
+               A9DB39C50D37EB4700F77345 /* libxvidcore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39B00D37EB4700F77345 /* libxvidcore.a */; };
+               A9DB39C60D37EB4700F77345 /* libx264.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39B10D37EB4700F77345 /* libx264.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+               0DFF0B720B6BC6E600549488 /* libhb.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libhb.a; sourceTree = BUILT_PRODUCTS_DIR; };
+               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+               29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+               29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+               4D1125D709D72FD200E0657B /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; };
+               4DEB2024052B055F00C39CA9 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
+               A9DB38E70D37EA0300F77345 /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = common.c; path = ../../libhb/common.c; sourceTree = SOURCE_ROOT; };
+               A9DB38E80D37EA0300F77345 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../../libhb/common.h; sourceTree = SOURCE_ROOT; };
+               A9DB38E90D37EA0300F77345 /* deblock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = deblock.c; path = ../../libhb/deblock.c; sourceTree = SOURCE_ROOT; };
+               A9DB38EA0D37EA0300F77345 /* deca52.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = deca52.c; path = ../../libhb/deca52.c; sourceTree = SOURCE_ROOT; };
+               A9DB38EB0D37EA0300F77345 /* decavcodec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decavcodec.c; path = ../../libhb/decavcodec.c; sourceTree = SOURCE_ROOT; };
+               A9DB38EC0D37EA0300F77345 /* decdca.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decdca.c; path = ../../libhb/decdca.c; sourceTree = SOURCE_ROOT; };
+               A9DB38ED0D37EA0300F77345 /* declpcm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = declpcm.c; path = ../../libhb/declpcm.c; sourceTree = SOURCE_ROOT; };
+               A9DB38EE0D37EA0300F77345 /* decmpeg2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decmpeg2.c; path = ../../libhb/decmpeg2.c; sourceTree = SOURCE_ROOT; };
+               A9DB38EF0D37EA0300F77345 /* decsub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decsub.c; path = ../../libhb/decsub.c; sourceTree = SOURCE_ROOT; };
+               A9DB38F00D37EA0300F77345 /* deinterlace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = deinterlace.c; path = ../../libhb/deinterlace.c; sourceTree = SOURCE_ROOT; };
+               A9DB38F10D37EA0300F77345 /* demuxmpeg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = demuxmpeg.c; path = ../../libhb/demuxmpeg.c; sourceTree = SOURCE_ROOT; };
+               A9DB38F20D37EA0300F77345 /* denoise.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = denoise.c; path = ../../libhb/denoise.c; sourceTree = SOURCE_ROOT; };
+               A9DB38F30D37EA0300F77345 /* detelecine.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = detelecine.c; path = ../../libhb/detelecine.c; sourceTree = SOURCE_ROOT; };
+               A9DB38F40D37EA0300F77345 /* dvd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dvd.c; path = ../../libhb/dvd.c; sourceTree = SOURCE_ROOT; };
+               A9DB38F50D37EA0300F77345 /* encavcodec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = encavcodec.c; path = ../../libhb/encavcodec.c; sourceTree = SOURCE_ROOT; };
+               A9DB38F60D37EA0300F77345 /* encfaac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = encfaac.c; path = ../../libhb/encfaac.c; sourceTree = SOURCE_ROOT; };
+               A9DB38F70D37EA0300F77345 /* enclame.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = enclame.c; path = ../../libhb/enclame.c; sourceTree = SOURCE_ROOT; };
+               A9DB38F80D37EA0300F77345 /* encvorbis.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = encvorbis.c; path = ../../libhb/encvorbis.c; sourceTree = SOURCE_ROOT; };
+               A9DB38F90D37EA0300F77345 /* encx264.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = encx264.c; path = ../../libhb/encx264.c; sourceTree = SOURCE_ROOT; };
+               A9DB38FA0D37EA0300F77345 /* encxvid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = encxvid.c; path = ../../libhb/encxvid.c; sourceTree = SOURCE_ROOT; };
+               A9DB38FB0D37EA0300F77345 /* fifo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fifo.c; path = ../../libhb/fifo.c; sourceTree = SOURCE_ROOT; };
+               A9DB38FC0D37EA0300F77345 /* hb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hb.c; path = ../../libhb/hb.c; sourceTree = SOURCE_ROOT; };
+               A9DB38FD0D37EA0300F77345 /* hb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hb.h; path = ../../libhb/hb.h; sourceTree = SOURCE_ROOT; };
+               A9DB38FE0D37EA0300F77345 /* internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = internal.h; path = ../../libhb/internal.h; sourceTree = SOURCE_ROOT; };
+               A9DB38FF0D37EA0300F77345 /* ipodutil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ipodutil.cpp; path = ../../libhb/ipodutil.cpp; sourceTree = SOURCE_ROOT; };
+               A9DB39000D37EA0300F77345 /* lang.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lang.c; path = ../../libhb/lang.c; sourceTree = SOURCE_ROOT; };
+               A9DB39010D37EA0300F77345 /* lang.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lang.h; path = ../../libhb/lang.h; sourceTree = SOURCE_ROOT; };
+               A9DB39020D37EA0300F77345 /* muxavi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = muxavi.c; path = ../../libhb/muxavi.c; sourceTree = SOURCE_ROOT; };
+               A9DB39030D37EA0300F77345 /* muxcommon.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = muxcommon.c; path = ../../libhb/muxcommon.c; sourceTree = SOURCE_ROOT; };
+               A9DB39040D37EA0300F77345 /* muxmkv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = muxmkv.c; path = ../../libhb/muxmkv.c; sourceTree = SOURCE_ROOT; };
+               A9DB39050D37EA0300F77345 /* muxmp4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = muxmp4.c; path = ../../libhb/muxmp4.c; sourceTree = SOURCE_ROOT; };
+               A9DB39060D37EA0300F77345 /* muxogm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = muxogm.c; path = ../../libhb/muxogm.c; sourceTree = SOURCE_ROOT; };
+               A9DB39070D37EA0300F77345 /* ports.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ports.c; path = ../../libhb/ports.c; sourceTree = SOURCE_ROOT; };
+               A9DB39080D37EA0300F77345 /* ports.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ports.h; path = ../../libhb/ports.h; sourceTree = SOURCE_ROOT; };
+               A9DB39090D37EA0300F77345 /* reader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = reader.c; path = ../../libhb/reader.c; sourceTree = SOURCE_ROOT; };
+               A9DB390A0D37EA0300F77345 /* render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = render.c; path = ../../libhb/render.c; sourceTree = SOURCE_ROOT; };
+               A9DB390B0D37EA0300F77345 /* scan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = scan.c; path = ../../libhb/scan.c; sourceTree = SOURCE_ROOT; };
+               A9DB390C0D37EA0300F77345 /* stream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stream.c; path = ../../libhb/stream.c; sourceTree = SOURCE_ROOT; };
+               A9DB390D0D37EA0300F77345 /* sync.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sync.c; path = ../../libhb/sync.c; sourceTree = SOURCE_ROOT; };
+               A9DB390E0D37EA0300F77345 /* update.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = update.c; path = ../../libhb/update.c; sourceTree = SOURCE_ROOT; };
+               A9DB390F0D37EA0300F77345 /* work.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = work.c; path = ../../libhb/work.c; sourceTree = SOURCE_ROOT; };
+               A9DB399D0D37EB4700F77345 /* liba52.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liba52.a; path = ../../contrib/lib/liba52.a; sourceTree = SOURCE_ROOT; };
+               A9DB399E0D37EB4700F77345 /* libavcodec.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavcodec.a; path = ../../contrib/lib/libavcodec.a; sourceTree = SOURCE_ROOT; };
+               A9DB399F0D37EB4700F77345 /* libavformat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavformat.a; path = ../../contrib/lib/libavformat.a; sourceTree = SOURCE_ROOT; };
+               A9DB39A00D37EB4700F77345 /* libavutil.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavutil.a; path = ../../contrib/lib/libavutil.a; sourceTree = SOURCE_ROOT; };
+               A9DB39A10D37EB4700F77345 /* libdca.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libdca.a; path = ../../contrib/lib/libdca.a; sourceTree = SOURCE_ROOT; };
+               A9DB39A20D37EB4700F77345 /* libdvdcss.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libdvdcss.a; path = ../../contrib/lib/libdvdcss.a; sourceTree = SOURCE_ROOT; };
+               A9DB39A30D37EB4700F77345 /* libdvdread.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libdvdread.a; path = ../../contrib/lib/libdvdread.a; sourceTree = SOURCE_ROOT; };
+               A9DB39A40D37EB4700F77345 /* libfaac.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfaac.a; path = ../../contrib/lib/libfaac.a; sourceTree = SOURCE_ROOT; };
+               A9DB39A50D37EB4700F77345 /* libmkv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmkv.a; path = ../../contrib/lib/libmkv.a; sourceTree = SOURCE_ROOT; };
+               A9DB39A60D37EB4700F77345 /* libmp3lame.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmp3lame.a; path = ../../contrib/lib/libmp3lame.a; sourceTree = SOURCE_ROOT; };
+               A9DB39A70D37EB4700F77345 /* libmp4v2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmp4v2.a; path = ../../contrib/lib/libmp4v2.a; sourceTree = SOURCE_ROOT; };
+               A9DB39A80D37EB4700F77345 /* libmpeg2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmpeg2.a; path = ../../contrib/lib/libmpeg2.a; sourceTree = SOURCE_ROOT; };
+               A9DB39A90D37EB4700F77345 /* libmpeg2convert.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmpeg2convert.a; path = ../../contrib/lib/libmpeg2convert.a; sourceTree = SOURCE_ROOT; };
+               A9DB39AA0D37EB4700F77345 /* libogg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libogg.a; path = ../../contrib/lib/libogg.a; sourceTree = SOURCE_ROOT; };
+               A9DB39AB0D37EB4700F77345 /* libsamplerate.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsamplerate.a; path = ../../contrib/lib/libsamplerate.a; sourceTree = SOURCE_ROOT; };
+               A9DB39AC0D37EB4700F77345 /* libswscale.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libswscale.a; path = ../../contrib/lib/libswscale.a; sourceTree = SOURCE_ROOT; };
+               A9DB39AD0D37EB4700F77345 /* libvorbis.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvorbis.a; path = ../../contrib/lib/libvorbis.a; sourceTree = SOURCE_ROOT; };
+               A9DB39AE0D37EB4700F77345 /* libvorbisenc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvorbisenc.a; path = ../../contrib/lib/libvorbisenc.a; sourceTree = SOURCE_ROOT; };
+               A9DB39AF0D37EB4700F77345 /* libvorbisfile.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvorbisfile.a; path = ../../contrib/lib/libvorbisfile.a; sourceTree = SOURCE_ROOT; };
+               A9DB39B00D37EB4700F77345 /* libxvidcore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libxvidcore.a; path = ../../contrib/lib/libxvidcore.a; sourceTree = SOURCE_ROOT; };
+               A9DB39B10D37EB4700F77345 /* libx264.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libx264.a; path = ../../contrib/lib/libx264.a; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               0DFF0B700B6BC6E600549488 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               A9DB39B20D37EB4700F77345 /* liba52.a in Frameworks */,
+                               A9DB39B30D37EB4700F77345 /* libavcodec.a in Frameworks */,
+                               A9DB39B40D37EB4700F77345 /* libavformat.a in Frameworks */,
+                               A9DB39B50D37EB4700F77345 /* libavutil.a in Frameworks */,
+                               A9DB39B60D37EB4700F77345 /* libdca.a in Frameworks */,
+                               A9DB39B70D37EB4700F77345 /* libdvdcss.a in Frameworks */,
+                               A9DB39B80D37EB4700F77345 /* libdvdread.a in Frameworks */,
+                               A9DB39B90D37EB4700F77345 /* libfaac.a in Frameworks */,
+                               A9DB39BA0D37EB4700F77345 /* libmkv.a in Frameworks */,
+                               A9DB39BB0D37EB4700F77345 /* libmp3lame.a in Frameworks */,
+                               A9DB39BC0D37EB4700F77345 /* libmp4v2.a in Frameworks */,
+                               A9DB39BD0D37EB4700F77345 /* libmpeg2.a in Frameworks */,
+                               A9DB39BE0D37EB4700F77345 /* libmpeg2convert.a in Frameworks */,
+                               A9DB39BF0D37EB4700F77345 /* libogg.a in Frameworks */,
+                               A9DB39C00D37EB4700F77345 /* libsamplerate.a in Frameworks */,
+                               A9DB39C10D37EB4700F77345 /* libswscale.a in Frameworks */,
+                               A9DB39C20D37EB4700F77345 /* libvorbis.a in Frameworks */,
+                               A9DB39C30D37EB4700F77345 /* libvorbisenc.a in Frameworks */,
+                               A9DB39C40D37EB4700F77345 /* libvorbisfile.a in Frameworks */,
+                               A9DB39C50D37EB4700F77345 /* libxvidcore.a in Frameworks */,
+                               A9DB39C60D37EB4700F77345 /* libx264.a in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               19C28FACFE9D520D11CA2CBB /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               0DFF0B720B6BC6E600549488 /* libhb.a */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+               29B97314FDCFA39411CA2CEA /* HandBrake */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A9DB38E70D37EA0300F77345 /* common.c */,
+                               A9DB38E80D37EA0300F77345 /* common.h */,
+                               A9DB38E90D37EA0300F77345 /* deblock.c */,
+                               A9DB38EA0D37EA0300F77345 /* deca52.c */,
+                               A9DB38EB0D37EA0300F77345 /* decavcodec.c */,
+                               A9DB38EC0D37EA0300F77345 /* decdca.c */,
+                               A9DB38ED0D37EA0300F77345 /* declpcm.c */,
+                               A9DB38EE0D37EA0300F77345 /* decmpeg2.c */,
+                               A9DB38EF0D37EA0300F77345 /* decsub.c */,
+                               A9DB38F00D37EA0300F77345 /* deinterlace.c */,
+                               A9DB38F10D37EA0300F77345 /* demuxmpeg.c */,
+                               A9DB38F20D37EA0300F77345 /* denoise.c */,
+                               A9DB38F30D37EA0300F77345 /* detelecine.c */,
+                               A9DB38F40D37EA0300F77345 /* dvd.c */,
+                               A9DB38F50D37EA0300F77345 /* encavcodec.c */,
+                               A9DB38F60D37EA0300F77345 /* encfaac.c */,
+                               A9DB38F70D37EA0300F77345 /* enclame.c */,
+                               A9DB38F80D37EA0300F77345 /* encvorbis.c */,
+                               A9DB38F90D37EA0300F77345 /* encx264.c */,
+                               A9DB38FA0D37EA0300F77345 /* encxvid.c */,
+                               A9DB38FB0D37EA0300F77345 /* fifo.c */,
+                               A9DB38FC0D37EA0300F77345 /* hb.c */,
+                               A9DB38FD0D37EA0300F77345 /* hb.h */,
+                               A9DB38FE0D37EA0300F77345 /* internal.h */,
+                               A9DB38FF0D37EA0300F77345 /* ipodutil.cpp */,
+                               A9DB39000D37EA0300F77345 /* lang.c */,
+                               A9DB39010D37EA0300F77345 /* lang.h */,
+                               A9DB39020D37EA0300F77345 /* muxavi.c */,
+                               A9DB39030D37EA0300F77345 /* muxcommon.c */,
+                               A9DB39040D37EA0300F77345 /* muxmkv.c */,
+                               A9DB39050D37EA0300F77345 /* muxmp4.c */,
+                               A9DB39060D37EA0300F77345 /* muxogm.c */,
+                               A9DB39070D37EA0300F77345 /* ports.c */,
+                               A9DB39080D37EA0300F77345 /* ports.h */,
+                               A9DB39090D37EA0300F77345 /* reader.c */,
+                               A9DB390A0D37EA0300F77345 /* render.c */,
+                               A9DB390B0D37EA0300F77345 /* scan.c */,
+                               A9DB390C0D37EA0300F77345 /* stream.c */,
+                               A9DB390D0D37EA0300F77345 /* sync.c */,
+                               A9DB390E0D37EA0300F77345 /* update.c */,
+                               A9DB390F0D37EA0300F77345 /* work.c */,
+                               29B97323FDCFA39411CA2CEA /* Frameworks */,
+                               19C28FACFE9D520D11CA2CBB /* Products */,
+                       );
+                       name = HandBrake;
+                       sourceTree = "<group>";
+               };
+               29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A9DB399D0D37EB4700F77345 /* liba52.a */,
+                               A9DB399E0D37EB4700F77345 /* libavcodec.a */,
+                               A9DB399F0D37EB4700F77345 /* libavformat.a */,
+                               A9DB39A00D37EB4700F77345 /* libavutil.a */,
+                               A9DB39A10D37EB4700F77345 /* libdca.a */,
+                               A9DB39A20D37EB4700F77345 /* libdvdcss.a */,
+                               A9DB39A30D37EB4700F77345 /* libdvdread.a */,
+                               A9DB39A40D37EB4700F77345 /* libfaac.a */,
+                               A9DB39A50D37EB4700F77345 /* libmkv.a */,
+                               A9DB39A60D37EB4700F77345 /* libmp3lame.a */,
+                               A9DB39A70D37EB4700F77345 /* libmp4v2.a */,
+                               A9DB39A80D37EB4700F77345 /* libmpeg2.a */,
+                               A9DB39A90D37EB4700F77345 /* libmpeg2convert.a */,
+                               A9DB39AA0D37EB4700F77345 /* libogg.a */,
+                               A9DB39AB0D37EB4700F77345 /* libsamplerate.a */,
+                               A9DB39AC0D37EB4700F77345 /* libswscale.a */,
+                               A9DB39AD0D37EB4700F77345 /* libvorbis.a */,
+                               A9DB39AE0D37EB4700F77345 /* libvorbisenc.a */,
+                               A9DB39AF0D37EB4700F77345 /* libvorbisfile.a */,
+                               A9DB39B00D37EB4700F77345 /* libxvidcore.a */,
+                               A9DB39B10D37EB4700F77345 /* libx264.a */,
+                               4D1125D709D72FD200E0657B /* libz.dylib */,
+                               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+                               4DEB2024052B055F00C39CA9 /* IOKit.framework */,
+                               29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+                               29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+                       );
+                       name = Frameworks;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+               0DFF0B6E0B6BC6E600549488 /* Headers */ = {
+                       isa = PBXHeadersBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               A9DB39110D37EA0300F77345 /* common.h in Headers */,
+                               A9DB39260D37EA0300F77345 /* hb.h in Headers */,
+                               A9DB39270D37EA0300F77345 /* internal.h in Headers */,
+                               A9DB392A0D37EA0300F77345 /* lang.h in Headers */,
+                               A9DB39310D37EA0300F77345 /* ports.h in Headers */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+               0DFF0B710B6BC6E600549488 /* libhb */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 0DFF0B730B6BC70400549488 /* Build configuration list for PBXNativeTarget "libhb" */;
+                       buildPhases = (
+                               0DFF0B6E0B6BC6E600549488 /* Headers */,
+                               0DFF0B6F0B6BC6E600549488 /* Sources */,
+                               0DFF0B700B6BC6E600549488 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = libhb;
+                       productName = libmediafork;
+                       productReference = 0DFF0B720B6BC6E600549488 /* libhb.a */;
+                       productType = "com.apple.product-type.library.static";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               29B97313FDCFA39411CA2CEA /* Project object */ = {
+                       isa = PBXProject;
+                       buildConfigurationList = 4D4E7BC4087804870051572B /* Build configuration list for PBXProject "libhb" */;
+                       compatibilityVersion = "Xcode 2.4";
+                       hasScannedForEncodings = 1;
+                       mainGroup = 29B97314FDCFA39411CA2CEA /* HandBrake */;
+                       projectDirPath = "";
+                       projectRoot = "";
+                       targets = (
+                               0DFF0B710B6BC6E600549488 /* libhb */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+               0DFF0B6F0B6BC6E600549488 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               A9DB39100D37EA0300F77345 /* common.c in Sources */,
+                               A9DB39120D37EA0300F77345 /* deblock.c in Sources */,
+                               A9DB39130D37EA0300F77345 /* deca52.c in Sources */,
+                               A9DB39140D37EA0300F77345 /* decavcodec.c in Sources */,
+                               A9DB39150D37EA0300F77345 /* decdca.c in Sources */,
+                               A9DB39160D37EA0300F77345 /* declpcm.c in Sources */,
+                               A9DB39170D37EA0300F77345 /* decmpeg2.c in Sources */,
+                               A9DB39180D37EA0300F77345 /* decsub.c in Sources */,
+                               A9DB39190D37EA0300F77345 /* deinterlace.c in Sources */,
+                               A9DB391A0D37EA0300F77345 /* demuxmpeg.c in Sources */,
+                               A9DB391B0D37EA0300F77345 /* denoise.c in Sources */,
+                               A9DB391C0D37EA0300F77345 /* detelecine.c in Sources */,
+                               A9DB391D0D37EA0300F77345 /* dvd.c in Sources */,
+                               A9DB391E0D37EA0300F77345 /* encavcodec.c in Sources */,
+                               A9DB391F0D37EA0300F77345 /* encfaac.c in Sources */,
+                               A9DB39200D37EA0300F77345 /* enclame.c in Sources */,
+                               A9DB39210D37EA0300F77345 /* encvorbis.c in Sources */,
+                               A9DB39220D37EA0300F77345 /* encx264.c in Sources */,
+                               A9DB39230D37EA0300F77345 /* encxvid.c in Sources */,
+                               A9DB39240D37EA0300F77345 /* fifo.c in Sources */,
+                               A9DB39250D37EA0300F77345 /* hb.c in Sources */,
+                               A9DB39280D37EA0300F77345 /* ipodutil.cpp in Sources */,
+                               A9DB39290D37EA0300F77345 /* lang.c in Sources */,
+                               A9DB392B0D37EA0300F77345 /* muxavi.c in Sources */,
+                               A9DB392C0D37EA0300F77345 /* muxcommon.c in Sources */,
+                               A9DB392D0D37EA0300F77345 /* muxmkv.c in Sources */,
+                               A9DB392E0D37EA0300F77345 /* muxmp4.c in Sources */,
+                               A9DB392F0D37EA0300F77345 /* muxogm.c in Sources */,
+                               A9DB39300D37EA0300F77345 /* ports.c in Sources */,
+                               A9DB39320D37EA0300F77345 /* reader.c in Sources */,
+                               A9DB39330D37EA0300F77345 /* render.c in Sources */,
+                               A9DB39340D37EA0300F77345 /* scan.c in Sources */,
+                               A9DB39350D37EA0300F77345 /* stream.c in Sources */,
+                               A9DB39360D37EA0300F77345 /* sync.c in Sources */,
+                               A9DB39370D37EA0300F77345 /* update.c in Sources */,
+                               A9DB39380D37EA0300F77345 /* work.c in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+               0D88F56B0B6CDCD400F81F26 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/";
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "";
+                               HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../../contrib/include";
+                               INSTALL_PATH = /usr/local/lib;
+                               LIBRARY_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+                               );
+                               LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../contrib/lib\"";
+                               MACOSX_DEPLOYMENT_TARGET = 10.3;
+                               OTHER_CFLAGS = (
+                                       "-D__LIBHB__",
+                                       "-DSYS_DARWIN",
+                                       "$(OTHER_CFLAGS_QUOTED_1)",
+                                       "-DUSE_PTHREAD",
+                               );
+                               OTHER_CFLAGS_QUOTED_1 = "-DHB_VERSION=\\\"0.9.1\\\" -DHB_BUILD=2007100800";
+                               OTHER_LDFLAGS = "";
+                               PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN";
+                               PREBINDING = NO;
+                               PRODUCT_NAME = hb;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               ZERO_LINK = NO;
+                       };
+                       name = Release;
+               };
+               0D88F56F0B6CDCD400F81F26 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = (
+                                       ppc,
+                                       i386,
+                               );
+                               GCC_MODEL_TUNING = G5;
+                               GCC_PREPROCESSOR_DEFINITIONS = "JOB_GROUPS=1";
+                               IBC_NOTICES = NO;
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                       };
+                       name = Release;
+               };
+               0DFF0B740B6BC70400549488 /* Development */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/";
+                               COPY_PHASE_STRIP = NO;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "";
+                               HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../../contrib/include";
+                               INSTALL_PATH = /usr/local/lib;
+                               LIBRARY_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+                               );
+                               LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../contrib/lib\"";
+                               MACOSX_DEPLOYMENT_TARGET = 10.3;
+                               OTHER_CFLAGS = (
+                                       "-D__LIBHB__",
+                                       "-DSYS_DARWIN",
+                                       "$(OTHER_CFLAGS_QUOTED_1)",
+                                       "-DUSE_PTHREAD",
+                               );
+                               OTHER_CFLAGS_QUOTED_1 = "-DHB_VERSION=\\\"0.9.1\\\" -DHB_BUILD=2007100800";
+                               OTHER_LDFLAGS = "";
+                               PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN";
+                               PREBINDING = NO;
+                               PRODUCT_NAME = hb;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               ZERO_LINK = NO;
+                       };
+                       name = Development;
+               };
+               0DFF0B750B6BC70400549488 /* Deployment */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/";
+                               COPY_PHASE_STRIP = YES;
+                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = s;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "";
+                               HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../../contrib/include";
+                               INSTALL_PATH = /usr/local/lib;
+                               LIBRARY_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+                               );
+                               LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../contrib/lib\"";
+                               MACOSX_DEPLOYMENT_TARGET = 10.3;
+                               OTHER_CFLAGS = (
+                                       "-D__LIBHB__",
+                                       "-DSYS_DARWIN",
+                                       "$(OTHER_CFLAGS_QUOTED_1)",
+                                       "-DUSE_PTHREAD",
+                               );
+                               OTHER_CFLAGS_QUOTED_1 = "-DHB_VERSION=\\\"0.9.1\\\" -DHB_BUILD=2007100800";
+                               OTHER_LDFLAGS = "";
+                               PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN";
+                               PREBINDING = NO;
+                               PRODUCT_NAME = hb;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               STRIP_INSTALLED_PRODUCT = YES;
+                               STRIP_STYLE = all;
+                               ZERO_LINK = NO;
+                       };
+                       name = Deployment;
+               };
+               4D4E7BC5087804870051572B /* Development */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               DEBUG_INFORMATION_FORMAT = dwarf;
+                               GCC_DEBUGGING_SYMBOLS = default;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               IBC_NOTICES = NO;
+                               IBC_WARNINGS = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               PREBINDING = NO;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                               ZERO_LINK = NO;
+                       };
+                       name = Development;
+               };
+               4D4E7BC6087804870051572B /* Deployment */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_AUTO_VECTORIZATION = YES;
+                               GCC_ENABLE_SSE3_EXTENSIONS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_PREPROCESSOR_DEFINITIONS = "JOB_GROUPS=1";
+                               IBC_NOTICES = NO;
+                               MACOSX_DEPLOYMENT_TARGET = 10.5;
+                               SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+                       };
+                       name = Deployment;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+               0DFF0B730B6BC70400549488 /* Build configuration list for PBXNativeTarget "libhb" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               0DFF0B740B6BC70400549488 /* Development */,
+                               0DFF0B750B6BC70400549488 /* Deployment */,
+                               0D88F56B0B6CDCD400F81F26 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Deployment;
+               };
+               4D4E7BC4087804870051572B /* Build configuration list for PBXProject "libhb" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               4D4E7BC5087804870051572B /* Development */,
+                               4D4E7BC6087804870051572B /* Deployment */,
+                               0D88F56F0B6CDCD400F81F26 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Deployment;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/macosx/InstantHandBrake/main.mm b/macosx/InstantHandBrake/main.mm
new file mode 100644 (file)
index 0000000..6705c14
--- /dev/null
@@ -0,0 +1,19 @@
+/* $Id: main.mm,v 1.3 2005/11/25 15:04:35 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include <Cocoa/Cocoa.h>
+#import "hb.h"
+
+void SigHandler( int signal )
+{
+    [NSApp terminate: NULL];
+} 
+
+int main( int argc, const char ** argv )
+{
+    signal( SIGINT, SigHandler );
+    return NSApplicationMain( argc, argv );
+}
diff --git a/macosx/PictureController.h b/macosx/PictureController.h
new file mode 100644 (file)
index 0000000..24631c3
--- /dev/null
@@ -0,0 +1,112 @@
+/* $Id: PictureController.h,v 1.6 2005/04/14 20:40:05 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#import <Cocoa/Cocoa.h>
+
+#include "hb.h"
+
+#define HB_NUM_HBLIB_PICTURES      10   // hbilb generates 10 preview pictures
+
+@interface PictureController : NSWindowController
+{
+    hb_handle_t              * fHandle;
+    hb_title_t               * fTitle;
+
+    NSMutableDictionary      * fPicturePreviews;        // NSImages, one for each preview libhb creates, created lazily
+    int                        fPicture;
+
+    IBOutlet NSImageView     * fPictureView;
+    IBOutlet NSBox           * fPictureViewArea;
+    IBOutlet NSTextField     * fWidthField;
+    IBOutlet NSStepper       * fWidthStepper;
+    IBOutlet NSTextField     * fHeightField;
+    IBOutlet NSStepper       * fHeightStepper;
+    IBOutlet NSButton        * fRatioCheck;
+    IBOutlet NSMatrix        * fCropMatrix;
+    IBOutlet NSTextField     * fCropTopField;
+    IBOutlet NSStepper       * fCropTopStepper;
+    IBOutlet NSTextField     * fCropBottomField;
+    IBOutlet NSStepper       * fCropBottomStepper;
+    IBOutlet NSTextField     * fCropLeftField;
+    IBOutlet NSStepper       * fCropLeftStepper;
+    IBOutlet NSTextField     * fCropRightField;
+    IBOutlet NSStepper       * fCropRightStepper;
+    IBOutlet NSPopUpButton   * fDeinterlacePopUp;
+    IBOutlet NSPopUpButton   * fDecombPopUp;
+       IBOutlet NSButton        * fDetelecineCheck;
+    IBOutlet NSButton        * fDeblockCheck;
+    IBOutlet NSTextField     * fDeblockField;
+    IBOutlet NSSlider        * fDeblockSlider;
+       IBOutlet NSPopUpButton   * fDenoisePopUp;
+       IBOutlet NSPopUpButton   * fAnamorphicPopUp;
+    IBOutlet NSButton        * fPrevButton;
+    IBOutlet NSButton        * fNextButton;
+    IBOutlet NSTextField     * fInfoField;
+       
+    int     MaxOutputWidth;
+    int     MaxOutputHeight;
+    BOOL    autoCrop;
+    BOOL    allowLooseAnamorphic;
+    int output_width, output_height, output_par_width, output_par_height;
+    int display_width;
+    /* used to track the previous state of the keep aspect
+    ratio checkbox when turning anamorphic on, so it can be
+    returned to the previous state when anamorphic is turned
+    off */
+    BOOL    keepAspectRatioPreviousState; 
+    
+    struct {
+        int     detelecine;
+        int     deinterlace;
+        int     decomb;
+        int     denoise;
+        int     deblock;
+    } fPictureFilterSettings;
+
+    id delegate;
+}
+- (id)initWithDelegate:(id)del;
+
+- (void) SetHandle: (hb_handle_t *) handle;
+- (void) SetTitle:  (hb_title_t *)  title;
+- (void) setInitialPictureFilters;
+- (void) displayPreview;
+
+- (IBAction) SettingsChanged: (id) sender;
+- (IBAction) PreviousPicture: (id) sender;
+- (IBAction) NextPicture: (id) sender;
+- (IBAction) ClosePanel: (id) sender;
+
+- (BOOL) autoCrop;
+- (void) setAutoCrop: (BOOL) setting;
+
+- (BOOL) allowLooseAnamorphic;
+- (void) setAllowLooseAnamorphic: (BOOL) setting;
+- (IBAction) deblockSliderChanged: (id) sender;
+- (int) detelecine;
+- (void) setDetelecine: (int) setting;
+- (int) deinterlace;
+- (void) setDeinterlace: (int) setting;
+- (int) decomb;
+- (void) setDecomb: (int) setting;
+- (int) denoise;
+- (void) setDenoise: (int) setting;
+- (int) deblock;
+- (void) setDeblock: (int) setting;
+
+- (void)showPanelInWindow: (NSWindow *)fWindow forTitle: (hb_title_t *)title;
+
++ (NSImage *) makeImageForPicture: (int)pictureIndex
+                libhb:(hb_handle_t*)handle
+                title:(hb_title_t*)title
+                removeBorders:(BOOL)removeBorders;
+- (NSImage *) imageForPicture: (int) pictureIndex;
+- (void) purgeImageCache;
+@end
+
+@interface NSObject (PictureControllertDelegateMethod)
+- (void)pictureSettingsDidChange;
+@end
diff --git a/macosx/PictureController.mm b/macosx/PictureController.mm
new file mode 100644 (file)
index 0000000..d631074
--- /dev/null
@@ -0,0 +1,813 @@
+/* $Id: PictureController.mm,v 1.11 2005/08/01 15:10:44 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#import "PictureController.h"
+
+@interface PictureController (Private)
+
+- (NSSize)optimalViewSizeForImageSize: (NSSize)imageSize;
+- (void)resizeSheetForViewSize: (NSSize)viewSize;
+- (void)setViewSize: (NSSize)viewSize;
+- (BOOL)viewNeedsToResizeToSize: (NSSize)newSize;
+
+@end
+
+@implementation PictureController
+
+- (id)initWithDelegate:(id)del
+{
+       if (self = [super initWithWindowNibName:@"PictureSettings"])
+       {
+        // NSWindowController likes to lazily load its window. However since
+        // this controller tries to set all sorts of outlets before the window
+        // is displayed, we need it to load immediately. The correct way to do
+        // this, according to the documentation, is simply to invoke the window
+        // getter once.
+        //
+        // If/when we switch a lot of this stuff to bindings, this can probably
+        // go away.
+        [self window];
+
+               delegate = del;
+        fPicturePreviews = [[NSMutableDictionary dictionaryWithCapacity: HB_NUM_HBLIB_PICTURES] retain];
+       }
+       return self;
+}
+
+- (void) dealloc
+{
+    [fPicturePreviews release];
+    [super dealloc];
+}
+
+- (void) SetHandle: (hb_handle_t *) handle
+{
+    fHandle = handle;
+
+    [fWidthStepper  setValueWraps: NO];
+    [fWidthStepper  setIncrement: 16];
+    [fWidthStepper  setMinValue: 64];
+    [fHeightStepper setValueWraps: NO];
+    [fHeightStepper setIncrement: 16];
+    [fHeightStepper setMinValue: 64];
+
+    [fCropTopStepper    setIncrement: 2];
+    [fCropTopStepper    setMinValue:  0];
+    [fCropBottomStepper setIncrement: 2];
+    [fCropBottomStepper setMinValue:  0];
+    [fCropLeftStepper   setIncrement: 2];
+    [fCropLeftStepper   setMinValue:  0];
+    [fCropRightStepper  setIncrement: 2];
+    [fCropRightStepper  setMinValue:  0];
+}
+
+- (void) SetTitle: (hb_title_t *) title
+{
+    hb_job_t * job = title->job;
+
+    fTitle = title;
+
+    [fWidthStepper      setMaxValue: title->width];
+    [fWidthStepper      setIntValue: job->width];
+    [fWidthField        setIntValue: job->width];
+    [fHeightStepper     setMaxValue: title->height];
+    [fHeightStepper     setIntValue: job->height];
+    [fHeightField       setIntValue: job->height];
+    [fRatioCheck        setState:    job->keep_ratio ? NSOnState : NSOffState];
+    [fCropTopStepper    setMaxValue: title->height/2-2];
+    [fCropBottomStepper setMaxValue: title->height/2-2];
+    [fCropLeftStepper   setMaxValue: title->width/2-2];
+    [fCropRightStepper  setMaxValue: title->width/2-2];
+
+    /* Populate the Anamorphic NSPopUp button here */
+    [fAnamorphicPopUp removeAllItems];
+    [fAnamorphicPopUp addItemWithTitle: @"None"];
+    [fAnamorphicPopUp addItemWithTitle: @"Strict"];
+    if (allowLooseAnamorphic)
+    {
+    [fAnamorphicPopUp addItemWithTitle: @"Loose"];
+    }
+    [fAnamorphicPopUp selectItemAtIndex: job->pixel_ratio];
+    
+    /* We initially set the previous state of keep ar to on */
+    keepAspectRatioPreviousState = 1;
+       if (!autoCrop)
+       {
+        [fCropMatrix  selectCellAtRow: 1 column:0];
+        /* If auto, lets set the crop steppers according to current job->crop values */
+        [fCropTopStepper    setIntValue: job->crop[0]];
+        [fCropTopField      setIntValue: job->crop[0]];
+        [fCropBottomStepper setIntValue: job->crop[1]];
+        [fCropBottomField   setIntValue: job->crop[1]];
+        [fCropLeftStepper   setIntValue: job->crop[2]];
+        [fCropLeftField     setIntValue: job->crop[2]];
+        [fCropRightStepper  setIntValue: job->crop[3]];
+        [fCropRightField    setIntValue: job->crop[3]];
+       }
+       else
+       {
+        [fCropMatrix  selectCellAtRow: 0 column:0];
+       }
+       
+       /* Set filters widgets according to the filters struct */
+       [fDetelecineCheck setState:fPictureFilterSettings.detelecine];
+    [fDeinterlacePopUp selectItemAtIndex: fPictureFilterSettings.deinterlace];
+    [fDenoisePopUp selectItemAtIndex: fPictureFilterSettings.denoise];
+    [fDeblockCheck setState: fPictureFilterSettings.deblock];
+    
+    fPicture = 0;
+    MaxOutputWidth = title->width - job->crop[2] - job->crop[3];
+    MaxOutputHeight = title->height - job->crop[0] - job->crop[1];
+    [self SettingsChanged: nil];
+}
+
+/* we use this to setup the initial picture filters upon first launch, after that their states
+are maintained across different sources */
+- (void) setInitialPictureFilters
+{
+       /* we use a popup to show the deinterlace settings */
+       [fDeinterlacePopUp removeAllItems];
+    [fDeinterlacePopUp addItemWithTitle: @"None"];
+    [fDeinterlacePopUp addItemWithTitle: @"Fast"];
+    [fDeinterlacePopUp addItemWithTitle: @"Slow"];
+       [fDeinterlacePopUp addItemWithTitle: @"Slower"];
+    
+       /* Set deinterlaces level according to the integer in the main window */
+       [fDeinterlacePopUp selectItemAtIndex: fPictureFilterSettings.deinterlace];
+
+       /* we use a popup to show the denoise settings */
+       [fDenoisePopUp removeAllItems];
+    [fDenoisePopUp addItemWithTitle: @"None"];
+    [fDenoisePopUp addItemWithTitle: @"Weak"];
+       [fDenoisePopUp addItemWithTitle: @"Medium"];
+    [fDenoisePopUp addItemWithTitle: @"Strong"];
+       /* Set denoises level according to the integer in the main window */
+       [fDenoisePopUp selectItemAtIndex: fPictureFilterSettings.denoise];
+    
+    /* we use a popup to show the decomb settings */
+       [fDecombPopUp removeAllItems];
+    [fDecombPopUp addItemWithTitle: @"None"];
+    [fDecombPopUp addItemWithTitle: @"Default"];
+    [fDecombPopUp addItemWithTitle: @"Custom"];
+       /* Set denoises level according to the integer in the main window */
+       [fDecombPopUp selectItemAtIndex: fPictureFilterSettings.decomb];
+
+}
+
+// Adjusts the window to draw the current picture (fPicture) adjusting its size as
+// necessary to display as much of the picture as possible.
+- (void) displayPreview
+{
+    [fPictureView setImage: [self imageForPicture: fPicture]];
+       
+       NSSize displaySize = NSMakeSize( ( CGFloat )fTitle->width, ( CGFloat )fTitle->height );
+    /* Set the picture size display fields below the Preview Picture*/
+    if( fTitle->job->pixel_ratio == 1 ) // Original PAR Implementation
+    {
+        output_width = fTitle->width-fTitle->job->crop[2]-fTitle->job->crop[3];
+        output_height = fTitle->height-fTitle->job->crop[0]-fTitle->job->crop[1];
+        display_width = output_width * fTitle->job->pixel_aspect_width / fTitle->job->pixel_aspect_height;
+        [fInfoField setStringValue:[NSString stringWithFormat:
+                                    @"Source: %dx%d, Output: %dx%d, Anamorphic: %dx%d",
+                                    fTitle->width, fTitle->height, output_width, output_height, display_width, output_height]];
+        displaySize.width *= ( ( CGFloat )fTitle->job->pixel_aspect_width ) / ( ( CGFloat )fTitle->job->pixel_aspect_height );   
+    }
+    else if (fTitle->job->pixel_ratio == 2) // Loose Anamorphic
+    {
+        display_width = output_width * output_par_width / output_par_height;
+        [fInfoField setStringValue:[NSString stringWithFormat:
+                                    @"Source: %dx%d, Output: %dx%d, Anamorphic: %dx%d",
+                                    fTitle->width, fTitle->height, output_width, output_height, display_width, output_height]];
+        
+        displaySize.width = display_width;
+    }
+    else // No Anamorphic
+    {
+        [fInfoField setStringValue: [NSString stringWithFormat:
+                                     @"Source: %dx%d, Output: %dx%d", fTitle->width, fTitle->height,
+                                     fTitle->job->width, fTitle->job->height]];
+    }
+
+    NSSize viewSize = [self optimalViewSizeForImageSize:displaySize];
+    if( [self viewNeedsToResizeToSize:viewSize] )
+    {
+        /* In the case of loose anamorphic, do not resize the window when scaling down */
+        if (fTitle->job->pixel_ratio != 2 || [fWidthField intValue] == fTitle->width)
+        {
+            [self resizeSheetForViewSize:viewSize];
+            [self setViewSize:viewSize];
+        }
+    }
+
+    // Show the scaled text (use the height to check since the width can vary
+    // with anamorphic video).
+    if( ( ( int )viewSize.height ) != fTitle->height )
+    {
+        CGFloat scale = viewSize.width / ( ( CGFloat ) fTitle->width );
+        NSString *scaleString = [NSString stringWithFormat:
+                                 NSLocalizedString( @" (Preview scaled to %.0f%% actual size)",
+                                                   @"String shown when a preview is scaled" ),
+                                 scale * 100.0];
+        [fInfoField setStringValue: [[fInfoField stringValue] stringByAppendingString:scaleString]];
+    }
+
+    [fPrevButton setEnabled: ( fPicture > 0 )];
+    [fNextButton setEnabled: ( fPicture < 9 )];
+}
+
+- (IBAction) deblockSliderChanged: (id) sender
+{
+    if ([fDeblockSlider floatValue] == 4.0)
+    {
+    [fDeblockField setStringValue: [NSString stringWithFormat: @"Off"]];
+    }
+    else
+    {
+    [fDeblockField setStringValue: [NSString stringWithFormat: @"%.0f", [fDeblockSlider floatValue]]];
+    }
+       [self SettingsChanged: sender];
+}
+
+- (IBAction) SettingsChanged: (id) sender
+{
+    hb_job_t * job = fTitle->job;
+    
+    autoCrop = ( [fCropMatrix selectedRow] == 0 );
+    [fCropTopStepper    setEnabled: !autoCrop];
+    [fCropBottomStepper setEnabled: !autoCrop];
+    [fCropLeftStepper   setEnabled: !autoCrop];
+    [fCropRightStepper  setEnabled: !autoCrop];
+
+    if( autoCrop )
+    {
+        memcpy( job->crop, fTitle->crop, 4 * sizeof( int ) );
+    }
+    else
+    {
+        job->crop[0] = [fCropTopStepper    intValue];
+        job->crop[1] = [fCropBottomStepper intValue];
+        job->crop[2] = [fCropLeftStepper   intValue];
+        job->crop[3] = [fCropRightStepper  intValue];
+    }
+    
+       if( [fAnamorphicPopUp indexOfSelectedItem] > 0 )
+       {
+        if ([fAnamorphicPopUp indexOfSelectedItem] == 2) // Loose anamorphic
+        {
+            job->pixel_ratio = 2;
+            [fWidthStepper setEnabled: YES];
+            [fWidthField setEnabled: YES];
+            /* We set job->width and call hb_set_anamorphic_size in libhb to do a "dry run" to get
+             * the values to be used by libhb for loose anamorphic
+             */
+            /* if the sender is the anamorphic popup, then we know that loose anamorphic has just
+             * been turned on, so snap the width to full width for the source.
+             */
+            if (sender == fAnamorphicPopUp)
+            {
+                [fWidthStepper      setIntValue: fTitle->width-fTitle->job->crop[2]-fTitle->job->crop[3]];
+                [fWidthField        setIntValue: fTitle->width-fTitle->job->crop[2]-fTitle->job->crop[3]];
+            }
+            job->width       = [fWidthStepper  intValue];
+            hb_set_anamorphic_size(job, &output_width, &output_height, &output_par_width, &output_par_height);
+            [fHeightStepper      setIntValue: output_height];
+            [fHeightField        setIntValue: output_height];
+            job->height      = [fHeightStepper intValue];
+            
+        }
+        else // must be "1" or strict anamorphic
+        {
+            [fWidthStepper      setIntValue: fTitle->width-fTitle->job->crop[2]-fTitle->job->crop[3]];
+            [fWidthField        setIntValue: fTitle->width-fTitle->job->crop[2]-fTitle->job->crop[3]];
+            
+            /* This will show correct anamorphic height values, but
+             show distorted preview picture ratio */
+            [fHeightStepper      setIntValue: fTitle->height-fTitle->job->crop[0]-fTitle->job->crop[1]];
+            [fHeightField        setIntValue: fTitle->height-fTitle->job->crop[0]-fTitle->job->crop[1]];
+            job->width       = [fWidthStepper  intValue];
+            job->height      = [fHeightStepper intValue];
+            
+            job->pixel_ratio = 1;
+            [fWidthStepper setEnabled: NO];
+            [fWidthField setEnabled: NO];
+        }
+        
+        /* if the sender is the Anamorphic checkbox, record the state
+         of KeepAspect Ratio so it can be reset if Anamorphic is unchecked again */
+        if (sender == fAnamorphicPopUp)
+        {
+            keepAspectRatioPreviousState = [fRatioCheck state];
+        }
+        [fRatioCheck setState:NSOffState];
+        [fRatioCheck setEnabled: NO];
+        
+        
+        [fHeightStepper setEnabled: NO];
+        [fHeightField setEnabled: NO];
+        
+    }
+    else
+       {
+        job->width       = [fWidthStepper  intValue];
+        job->height      = [fHeightStepper intValue];
+        job->pixel_ratio = 0;
+        [fWidthStepper setEnabled: YES];
+        [fWidthField setEnabled: YES];
+        [fHeightStepper setEnabled: YES];
+        [fHeightField setEnabled: YES];
+        [fRatioCheck setEnabled: YES];
+        /* if the sender is the Anamorphic checkbox, we return the
+         keep AR checkbox to its previous state */
+        if (sender == fAnamorphicPopUp)
+        {
+            [fRatioCheck setState:keepAspectRatioPreviousState];
+        }
+        
+       }
+       
+    job->keep_ratio  = ( [fRatioCheck state] == NSOnState );
+    
+       fPictureFilterSettings.deinterlace = [fDeinterlacePopUp indexOfSelectedItem];
+    /* if the gui deinterlace settings are fast through slowest, the job->deinterlace
+     value needs to be set to one, for the job as well as the previews showing deinterlacing
+     otherwise set job->deinterlace to 0 or "off" */
+    if (fPictureFilterSettings.deinterlace > 0)
+    {
+        job->deinterlace  = 1;
+    }
+    else
+    {
+        job->deinterlace  = 0;
+    }
+    fPictureFilterSettings.denoise     = [fDenoisePopUp indexOfSelectedItem];
+    
+    fPictureFilterSettings.detelecine  = [fDetelecineCheck state];
+    
+    if ([fDeblockField stringValue] == @"Off")
+    {
+    fPictureFilterSettings.deblock  = 0;
+    }
+    else
+    {
+    fPictureFilterSettings.deblock  = [fDeblockField intValue];
+    }
+    
+    fPictureFilterSettings.decomb = [fDecombPopUp indexOfSelectedItem];
+
+    if( job->keep_ratio )
+    {
+        if( sender == fWidthStepper || sender == fRatioCheck ||
+           sender == fCropTopStepper || sender == fCropBottomStepper )
+        {
+            hb_fix_aspect( job, HB_KEEP_WIDTH );
+            if( job->height > fTitle->height )
+            {
+                job->height = fTitle->height;
+                hb_fix_aspect( job, HB_KEEP_HEIGHT );
+            }
+        }
+        else
+        {
+            hb_fix_aspect( job, HB_KEEP_HEIGHT );
+            if( job->width > fTitle->width )
+            {
+                job->width = fTitle->width;
+                hb_fix_aspect( job, HB_KEEP_WIDTH );
+            }
+        }
+        // hb_get_preview can't handle sizes that are larger than the original title
+        // dimensions
+        if( job->width > fTitle->width )
+            job->width = fTitle->width;
+
+        if( job->height > fTitle->height )
+            job->height = fTitle->height;
+    }
+
+    [fWidthStepper      setIntValue: job->width];
+    [fWidthField        setIntValue: job->width];
+    if( [fAnamorphicPopUp indexOfSelectedItem] < 2 )
+       {
+        [fHeightStepper     setIntValue: job->height];
+        [fHeightField       setIntValue: job->height];
+    }
+    [fCropTopStepper    setIntValue: job->crop[0]];
+    [fCropTopField      setIntValue: job->crop[0]];
+    [fCropBottomStepper setIntValue: job->crop[1]];
+    [fCropBottomField   setIntValue: job->crop[1]];
+    [fCropLeftStepper   setIntValue: job->crop[2]];
+    [fCropLeftField     setIntValue: job->crop[2]];
+    [fCropRightStepper  setIntValue: job->crop[3]];
+    [fCropRightField    setIntValue: job->crop[3]];
+    /* Sanity Check Here for < 16 px preview to avoid
+     crashing hb_get_preview. In fact, just for kicks
+     lets getting previews at a min limit of 32, since
+     no human can see any meaningful detail below that */
+    if (job->width >= 64 && job->height >= 64)
+    {
+        // Purge the existing picture previews so they get recreated the next time
+        // they are needed.
+        [self purgeImageCache];
+        [self displayPreview];
+    }
+}
+
+- (IBAction) PreviousPicture: (id) sender
+{   
+    if( fPicture <= 0 )
+    {
+        return;
+    }
+    fPicture--;
+    [self displayPreview];
+}
+
+- (IBAction) NextPicture: (id) sender
+{
+    if( fPicture >= 9 )
+    {
+        return;
+    }
+    fPicture++;
+    [self displayPreview];
+}
+
+- (IBAction) ClosePanel: (id) sender
+{
+    if ([delegate respondsToSelector:@selector(pictureSettingsDidChange)])
+        [delegate pictureSettingsDidChange];
+
+    [NSApp endSheet:[self window]];
+    [[self window] orderOut:self];
+}
+
+- (BOOL) autoCrop
+{
+    return autoCrop;
+}
+- (void) setAutoCrop: (BOOL) setting
+{
+    autoCrop = setting;
+}
+
+- (BOOL) allowLooseAnamorphic
+{
+    return allowLooseAnamorphic;
+}
+
+- (void) setAllowLooseAnamorphic: (BOOL) setting
+{
+    allowLooseAnamorphic = setting;
+}
+
+- (int) detelecine
+{
+    return fPictureFilterSettings.detelecine;
+}
+
+- (void) setDetelecine: (int) setting
+{
+    fPictureFilterSettings.detelecine = setting;
+}
+
+- (int) deinterlace
+{
+    return fPictureFilterSettings.deinterlace;
+}
+
+- (void) setDeinterlace: (int) setting {
+    fPictureFilterSettings.deinterlace = setting;
+}
+- (int) decomb
+{
+    return fPictureFilterSettings.decomb;
+}
+
+- (void) setDecomb: (int) setting {
+    fPictureFilterSettings.decomb = setting;
+}
+- (int) denoise
+{
+    return fPictureFilterSettings.denoise;
+}
+
+- (void) setDenoise: (int) setting
+{
+    fPictureFilterSettings.denoise = setting;
+}
+
+- (int) deblock
+{
+    return fPictureFilterSettings.deblock;
+}
+
+- (void) setDeblock: (int) setting
+{
+    fPictureFilterSettings.deblock = setting;
+}
+
+- (void)showPanelInWindow: (NSWindow *)fWindow forTitle: (hb_title_t *)title
+{
+    [self SetTitle:title];
+
+    [NSApp beginSheet:[self window]
+       modalForWindow:fWindow
+        modalDelegate:nil
+       didEndSelector:nil
+          contextInfo:NULL];
+}
+
+
+// This function converts an image created by libhb (specified via pictureIndex) into
+// an NSImage suitable for the GUI code to use. If removeBorders is YES,
+// makeImageForPicture crops the image generated by libhb stripping off the gray
+// border around the content. This is the low-level method that generates the image.
+// -imageForPicture calls this function whenever it can't find an image in its cache.
++ (NSImage *) makeImageForPicture: (int)pictureIndex
+                libhb:(hb_handle_t*)handle
+                title:(hb_title_t*)title
+                removeBorders:(BOOL)removeBorders
+{
+    if (removeBorders)
+    {
+        //     |<---------- title->width ----------->|
+        //     |   |<---- title->job->width ---->|   |
+        //     |   |                             |   |
+        //     .......................................
+        //     ....+-----------------------------+....
+        //     ....|                             |....<-- gray border
+        //     ....|                             |....
+        //     ....|                             |....
+        //     ....|                             |<------- image
+        //     ....|                             |....
+        //     ....|                             |....
+        //     ....|                             |....
+        //     ....|                             |....
+        //     ....|                             |....
+        //     ....+-----------------------------+....
+        //     .......................................
+
+        static uint8_t * buffer;
+        static int bufferSize;
+
+        // 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.
+        int srcWidth = title->width + 2;
+        int srcHeight= title->height + 2;
+        int newSize;
+        newSize = srcWidth * srcHeight * 4;
+        if( bufferSize < newSize )
+        {
+            bufferSize = newSize;
+            buffer     = (uint8_t *) realloc( buffer, bufferSize );
+        }
+
+        hb_get_preview( handle, title, pictureIndex, buffer );
+
+        // Create an NSBitmapImageRep and copy the libhb image into it, converting it from
+        // libhb's format to one suitable for NSImage. 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.
+        
+        int dstWidth = title->job->width;
+        int dstHeight = title->job->height;
+        NSBitmapFormat bitmapFormat = (NSBitmapFormat)NSAlphaFirstBitmapFormat;
+        NSBitmapImageRep * imgrep = [[[NSBitmapImageRep alloc]
+                initWithBitmapDataPlanes:nil
+                pixelsWide:dstWidth
+                pixelsHigh:dstHeight
+                bitsPerSample:8
+                samplesPerPixel:3   // ignore alpha
+                hasAlpha:NO
+                isPlanar:NO
+                colorSpaceName:NSCalibratedRGBColorSpace
+                bitmapFormat:bitmapFormat
+                bytesPerRow:dstWidth * 4
+                bitsPerPixel:32] autorelease];
+
+        int borderTop = (srcHeight - dstHeight) / 2;
+        int borderLeft = (srcWidth - dstWidth) / 2;
+        
+        UInt32 * src = (UInt32 *)buffer;
+        UInt32 * dst = (UInt32 *)[imgrep bitmapData];
+        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
+        for (int r = 0; r < dstHeight; r++)
+        {
+            for (int c = 0; c < dstWidth; c++)
+#if TARGET_RT_LITTLE_ENDIAN
+                *dst++ = Endian32_Swap(*src++);
+#else
+                *dst++ = *src++;
+#endif
+            src += (srcWidth - dstWidth);   // skip to next row in src
+        }
+
+        NSImage * img = [[[NSImage alloc] initWithSize: NSMakeSize(dstWidth, dstHeight)] autorelease];
+        [img addRepresentation:imgrep];
+
+        return img;
+    }
+    else
+    {
+        // Make sure we have big enough buffer
+        static uint8_t * buffer;
+        static int bufferSize;
+
+        int newSize;
+        newSize = ( title->width + 2 ) * (title->height + 2 ) * 4;
+        if( bufferSize < newSize )
+        {
+            bufferSize = newSize;
+            buffer     = (uint8_t *) realloc( buffer, bufferSize );
+        }
+
+        hb_get_preview( handle, title, pictureIndex, buffer );
+
+        // The image data returned by hb_get_preview is 4 bytes per pixel, BGRA format.
+        // We'll copy that into an NSImage swapping it to ARGB in the process. Alpha is
+        // ignored.
+        int width = title->width + 2;      // hblib adds a one-pixel border to the image
+        int height = title->height + 2;
+        int numPixels = width * height;
+        NSBitmapFormat bitmapFormat = (NSBitmapFormat)NSAlphaFirstBitmapFormat;
+        NSBitmapImageRep * imgrep = [[[NSBitmapImageRep alloc]
+                initWithBitmapDataPlanes:nil
+                pixelsWide:width
+                pixelsHigh:height
+                bitsPerSample:8
+                samplesPerPixel:3   // ignore alpha
+                hasAlpha:NO
+                isPlanar:NO
+                colorSpaceName:NSCalibratedRGBColorSpace
+                bitmapFormat:bitmapFormat
+                bytesPerRow:width * 4
+                bitsPerPixel:32] autorelease];
+
+        UInt32 * src = (UInt32 *)buffer;
+        UInt32 * dst = (UInt32 *)[imgrep bitmapData];
+        for (int i = 0; i < numPixels; i++)
+#if TARGET_RT_LITTLE_ENDIAN
+            *dst++ = Endian32_Swap(*src++);
+#else
+            *dst++ = *src++;
+#endif
+
+        NSImage * img = [[[NSImage alloc] initWithSize: NSMakeSize(width, height)] autorelease];
+        [img addRepresentation:imgrep];
+
+        return img;
+    }
+}
+
+// Returns the preview image for the specified index, retrieving it from its internal
+// cache or by calling makeImageForPicture if it is not cached. Generally, you should
+// use imageForPicture so that images are cached. Calling makeImageForPicture will
+// always generate a new copy of the image.
+- (NSImage *) imageForPicture: (int) pictureIndex
+{
+    // The preview for the specified index may not currently exist, so this method
+    // generates it if necessary.
+    NSString * key = [NSString stringWithFormat:@"%d", pictureIndex];
+    NSImage * theImage = [fPicturePreviews objectForKey:key];
+    if (!theImage)
+    {
+        theImage = [PictureController makeImageForPicture:pictureIndex libhb:fHandle title:fTitle removeBorders: NO];
+        [fPicturePreviews setObject:theImage forKey:key];
+    }
+    return theImage;
+}
+
+// Purges all images from the cache. The next call to imageForPicture will cause a new
+// image to be generated.
+- (void) purgeImageCache
+{
+    [fPicturePreviews removeAllObjects];
+}
+
+@end
+
+@implementation PictureController (Private)
+
+//
+// -[PictureController(Private) optimalViewSizeForImageSize:]
+//
+// Given the size of the preview image to be shown, returns the best possible
+// size for the view.
+//
+- (NSSize)optimalViewSizeForImageSize: (NSSize)imageSize
+{
+    // The min size is 320x240
+    CGFloat minWidth = 320.0;
+    CGFloat minHeight = 240.0;
+
+    // The max size of the view is when the sheet is taking up 85% of the screen.
+    NSSize screenSize = [[NSScreen mainScreen] frame].size;
+    NSSize sheetSize = [[self window] frame].size;
+    NSSize viewAreaSize = [fPictureViewArea frame].size;
+    CGFloat paddingX = sheetSize.width - viewAreaSize.width;
+    CGFloat paddingY = sheetSize.height - viewAreaSize.height;
+    CGFloat maxWidth = (0.85 * screenSize.width) - paddingX;
+    CGFloat maxHeight = (0.85 * screenSize.height) - paddingY;
+    
+    NSSize resultSize = imageSize;
+    
+    // Its better to have a view that's too small than a view that's too big, so
+    // apply the maximum constraints last.
+    if( resultSize.width < minWidth )
+    {
+        resultSize.height *= (minWidth / resultSize.width);
+        resultSize.width = minWidth;
+    }
+    if( resultSize.height < minHeight )
+    {
+        resultSize.width *= (minHeight / resultSize.height);
+        resultSize.height = minHeight;
+    }
+    if( resultSize.width > maxWidth )
+    {
+        resultSize.height *= (maxWidth / resultSize.width);
+        resultSize.width = maxWidth;
+    }
+    if( resultSize.height > maxHeight )
+    {
+        resultSize.width *= (maxHeight / resultSize.height);
+        resultSize.height = maxHeight;
+    }
+    
+    return resultSize;
+}
+
+//
+// -[PictureController(Private) resizePanelForViewSize:animate:]
+//
+// Resizes the entire sheet to accomodate a view of a particular size.
+//
+- (void)resizeSheetForViewSize: (NSSize)viewSize
+{
+    // Figure out the deltas for the new frame area
+    NSSize currentSize = [fPictureViewArea frame].size;
+    CGFloat deltaX = viewSize.width - currentSize.width;
+    CGFloat deltaY = viewSize.height - currentSize.height;
+
+    // Now resize the whole panel by those same deltas, but don't exceed the min
+    NSRect frame = [[self window] frame];
+    NSSize maxSize = [[self window] maxSize];
+    NSSize minSize = [[self window] minSize];
+    frame.size.width += deltaX;
+    frame.size.height += deltaY;
+    if( frame.size.width < minSize.width )
+    {
+        frame.size.width = minSize.width;
+    }
+    if( frame.size.height < minSize.height )
+    {
+        frame.size.height = minSize.height;
+    }
+
+    // But now the sheet is off-center, so also shift the origin to center it and
+    // keep the top aligned.
+    if( frame.size.width != [[self window] frame].size.width )
+        frame.origin.x -= (deltaX / 2.0);
+
+    if( frame.size.height != [[self window] frame].size.height )
+        frame.origin.y -= deltaY;
+
+    [[self window] setFrame:frame display:YES animate:YES];
+}
+
+//
+// -[PictureController(Private) setViewSize:]
+//
+// Changes the view's size and centers it vertically inside of its area.
+// Assumes resizeSheetForViewSize: has already been called.
+//
+- (void)setViewSize: (NSSize)viewSize
+{
+    [fPictureView setFrameSize:viewSize];
+    
+    // center it vertically
+    NSPoint origin = [fPictureViewArea frame].origin;
+    origin.y += ([fPictureViewArea frame].size.height -
+                 [fPictureView frame].size.height) / 2.0;
+    [fPictureView setFrameOrigin:origin];
+}
+
+//
+// -[PictureController(Private) viewNeedsToResizeToSize:]
+//
+// Returns YES if the view will need to resize to match the given size.
+//
+- (BOOL)viewNeedsToResizeToSize: (NSSize)newSize
+{
+    NSSize viewSize = [fPictureView frame].size;
+    return (newSize.width != viewSize.width || newSize.height != viewSize.height);
+}
+
+@end
diff --git a/macosx/Sparkle.framework/Headers b/macosx/Sparkle.framework/Headers
new file mode 120000 (symlink)
index 0000000..a177d2a
--- /dev/null
@@ -0,0 +1 @@
+Versions/Current/Headers
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Resources b/macosx/Sparkle.framework/Resources
new file mode 120000 (symlink)
index 0000000..953ee36
--- /dev/null
@@ -0,0 +1 @@
+Versions/Current/Resources
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Sparkle b/macosx/Sparkle.framework/Sparkle
new file mode 120000 (symlink)
index 0000000..b2c5273
--- /dev/null
@@ -0,0 +1 @@
+Versions/Current/Sparkle
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h b/macosx/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h
new file mode 100644 (file)
index 0000000..ee901e6
--- /dev/null
@@ -0,0 +1,13 @@
+//
+//  NSApplication+AppCopies.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/16/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface NSApplication (SUAppCopies)
+- (int)copiesRunning;
+@end
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h b/macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h
new file mode 100644 (file)
index 0000000..c995911
--- /dev/null
@@ -0,0 +1,11 @@
+//
+//  NSFileManager+Authentication.m
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/9/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+@interface NSFileManager (SUAuthenticationAdditions)
+- (BOOL)movePathWithAuthentication:(NSString *)src toPath:(NSString *)dst;
+@end
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h b/macosx/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h
new file mode 100644 (file)
index 0000000..f0ce7c2
--- /dev/null
@@ -0,0 +1,15 @@
+//
+//  NSFileManager+Verification.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/16/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+// For the paranoid folks!
+@interface NSFileManager (SUVerification)
+- (BOOL)validatePath:(NSString *)path withMD5Hash:(NSString *)hash;
+- (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature;
+@end
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/NSString+extras.h b/macosx/Sparkle.framework/Versions/A/Headers/NSString+extras.h
new file mode 100755 (executable)
index 0000000..498e4d0
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+
+BSD License
+
+Copyright (c) 2002, Brent Simmons
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+*      Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+*      Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation
+       and/or other materials provided with the distribution.
+*      Neither the name of ranchero.com or Brent Simmons nor the names of its
+       contributors may be used to endorse or promote products derived
+       from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+*/
+
+
+/*
+       NSString+extras.h
+       NetNewsWire
+
+       Created by Brent Simmons on Fri Jun 14 2002.
+       Copyright (c) 2002 Brent Simmons. All rights reserved.
+*/
+
+
+#import <Foundation/Foundation.h>
+#import <CoreFoundation/CoreFoundation.h>
+
+
+@interface NSString (extras)
+
+- (NSString *)stringWithSubstitute:(NSString *)subs forCharactersFromSet:(NSCharacterSet *)set;
+
+- (NSString *) trimWhiteSpace;
+
+- (NSString *) stripHTML;
+
+- (NSString *) ellipsizeAfterNWords: (int) n;
+
++ (BOOL) stringIsEmpty: (NSString *) s;
+
+
+@end
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/RSS.h b/macosx/Sparkle.framework/Versions/A/Headers/RSS.h
new file mode 100755 (executable)
index 0000000..82da04a
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+
+BSD License
+
+Copyright (c) 2002, Brent Simmons
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+*      Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+*      Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation
+       and/or other materials provided with the distribution.
+*      Neither the name of ranchero.com or Brent Simmons nor the names of its
+       contributors may be used to endorse or promote products derived
+       from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+*/
+
+/*
+       RSS.h
+       A class for reading RSS feeds.
+
+       Created by Brent Simmons on Wed Apr 17 2002.
+       Copyright (c) 2002 Brent Simmons. All rights reserved.
+*/
+
+
+#import <Cocoa/Cocoa.h>
+#import <CoreFoundation/CoreFoundation.h>
+#import "NSString+extras.h"
+
+
+@interface RSS : NSObject {
+       
+       NSDictionary *headerItems;
+       NSMutableArray *newsItems;
+       NSString *version;
+       
+       BOOL flRdf;
+       BOOL normalize;
+       }
+
+
+/*Public*/
+
+- (RSS *) initWithTitle: (NSString *) title andDescription: (NSString *) description;
+
+- (RSS *) initWithData: (NSData *) rssData normalize: (BOOL) fl;
+
+- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl;
+- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl userAgent:(NSString *)userAgent;
+
+- (NSDictionary *) headerItems;
+
+- (NSMutableArray *) newsItems;
+
+- (NSString *) version;
+
+// AMM's extensions for Sparkle
+- (NSDictionary *)newestItem;
+
+
+/*Private*/
+
+- (void) createheaderdictionary: (CFXMLTreeRef) tree;
+
+- (void) createitemsarray: (CFXMLTreeRef) tree;
+
+- (void) setversionstring: (CFXMLTreeRef) tree;
+
+- (void) flattenimagechildren: (CFXMLTreeRef) tree into: (NSMutableDictionary *) dictionary;
+
+- (void) flattensourceattributes: (CFXMLNodeRef) node into: (NSMutableDictionary *) dictionary;
+
+- (CFXMLTreeRef) getchanneltree: (CFXMLTreeRef) tree;
+
+- (CFXMLTreeRef) getnamedtree: (CFXMLTreeRef) currentTree name: (NSString *) name;
+
+- (void) normalizeRSSItem: (NSMutableDictionary *) rssItem;
+
+- (NSString *) getelementvalue: (CFXMLTreeRef) tree;
+
+@end
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUAppcast.h b/macosx/Sparkle.framework/Versions/A/Headers/SUAppcast.h
new file mode 100644 (file)
index 0000000..209fe20
--- /dev/null
@@ -0,0 +1,27 @@
+//
+//  SUAppcast.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/12/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@class RSS, SUAppcastItem;
+@interface SUAppcast : NSObject {
+       NSArray *items;
+       id delegate;
+}
+
+- (void)fetchAppcastFromURL:(NSURL *)url;
+- (void)setDelegate:delegate;
+
+- (SUAppcastItem *)newestItem;
+- (NSArray *)items;
+
+@end
+
+@interface NSObject (SUAppcastDelegate)
+- appcastDidFinishLoading:(SUAppcast *)appcast;
+@end
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h b/macosx/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
new file mode 100644 (file)
index 0000000..c0202e3
--- /dev/null
@@ -0,0 +1,57 @@
+//
+//  SUAppcastItem.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/12/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface SUAppcastItem : NSObject {
+       NSString *title;
+       NSDate *date;
+       NSString *description;
+       
+       NSURL *releaseNotesURL;
+       
+       NSString *DSASignature;
+       NSString *MD5Sum;
+       
+       NSURL *fileURL;
+       NSString *fileVersion;
+       NSString *versionString;
+}
+
+// Initializes with data from a dictionary provided by the RSS class.
+- initWithDictionary:(NSDictionary *)dict;
+
+- (NSString *)title;
+- (void)setTitle:(NSString *)aTitle;
+
+- (NSDate *)date;
+- (void)setDate:(NSDate *)aDate;
+
+- (NSString *)description;
+- (void)setDescription:(NSString *)aDescription;
+
+- (NSURL *)releaseNotesURL;
+- (void)setReleaseNotesURL:(NSURL *)aReleaseNotesURL;
+
+- (NSString *)DSASignature;
+- (void)setDSASignature:(NSString *)aDSASignature;
+
+- (NSString *)MD5Sum;
+- (void)setMD5Sum:(NSString *)aMd5Sum;
+
+- (NSURL *)fileURL;
+- (void)setFileURL:(NSURL *)aFileURL;
+
+- (NSString *)fileVersion;
+- (void)setFileVersion:(NSString *)aFileVersion;
+
+- (NSString *)versionString;
+- (void)setVersionString:(NSString *)versionString;
+
+@end
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h b/macosx/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h
new file mode 100644 (file)
index 0000000..fc0ac9f
--- /dev/null
@@ -0,0 +1,21 @@
+//
+//  SUAutomaticUpdateAlert.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/18/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@class SUAppcastItem;
+@interface SUAutomaticUpdateAlert : NSWindowController {
+       SUAppcastItem *updateItem;
+}
+
+- initWithAppcastItem:(SUAppcastItem *)item;
+
+- (IBAction)relaunchNow:sender;
+- (IBAction)relaunchLater:sender;
+
+@end
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUConstants.h b/macosx/Sparkle.framework/Versions/A/Headers/SUConstants.h
new file mode 100644 (file)
index 0000000..bfbe625
--- /dev/null
@@ -0,0 +1,20 @@
+//
+//  SUConstants.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/16/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+extern NSString *SUUpdaterWillRestartNotification;
+
+extern NSString *SUCheckAtStartupKey;
+extern NSString *SUFeedURLKey;
+extern NSString *SUShowReleaseNotesKey;
+extern NSString *SUSkippedVersionKey;
+extern NSString *SUScheduledCheckIntervalKey;
+extern NSString *SULastCheckTimeKey;
+extern NSString *SUExpectsDSASignatureKey;
+extern NSString *SUPublicDSAKeyKey;
+extern NSString *SUAutomaticallyUpdateKey;
+extern NSString *SUAllowsAutomaticUpdatesKey;
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h b/macosx/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h
new file mode 100644 (file)
index 0000000..e83d152
--- /dev/null
@@ -0,0 +1,26 @@
+//
+//  SUStatusChecker.h
+//  Sparkle
+//
+//  Created by Evan Schoenberg on 7/6/06.
+//
+
+#import <Cocoa/Cocoa.h>
+#import <Sparkle/SUUpdater.h>
+
+@class SUStatusChecker;
+
+@protocol SUStatusCheckerDelegate <NSObject>
+//versionString will be nil and isNewVersion will be NO if version checking fails.
+- (void)statusChecker:(SUStatusChecker *)statusChecker foundVersion:(NSString *)versionString isNewVersion:(BOOL)isNewVersion;
+@end
+
+@interface SUStatusChecker : SUUpdater {
+       id<SUStatusCheckerDelegate> scDelegate;
+}
+
+// Create a status checker which will notifiy delegate once the appcast version is determined.
+// Notification occurs via the method defined in the SUStatusCheckerDelegate informal protocol.
++ (SUStatusChecker *)statusCheckerForDelegate:(id<SUStatusCheckerDelegate>)delegate;
+
+@end
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUStatusController.h b/macosx/Sparkle.framework/Versions/A/Headers/SUStatusController.h
new file mode 100644 (file)
index 0000000..19a3f89
--- /dev/null
@@ -0,0 +1,33 @@
+//
+//  SUStatusController.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/14/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface SUStatusController : NSWindowController {
+       double progressValue, maxProgressValue;
+       NSString *title, *statusText, *buttonTitle;
+       IBOutlet NSButton *actionButton;
+}
+
+// Pass 0 for the max progress value to get an indeterminate progress bar.
+// Pass nil for the status text to not show it.
+- (void)beginActionWithTitle:(NSString *)title maxProgressValue:(double)maxProgressValue statusText:(NSString *)statusText;
+
+// If isDefault is YES, the button's key equivalent will be \r.
+- (void)setButtonTitle:(NSString *)buttonTitle target:target action:(SEL)action isDefault:(BOOL)isDefault;
+- (void)setButtonEnabled:(BOOL)enabled;
+
+- (double)progressValue;
+- (void)setProgressValue:(double)value;
+- (double)maxProgressValue;
+- (void)setMaxProgressValue:(double)value;
+
+- (void)setStatusText:(NSString *)statusText;
+
+@end
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h b/macosx/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h
new file mode 100644 (file)
index 0000000..da111c1
--- /dev/null
@@ -0,0 +1,25 @@
+//
+//  SUUnarchiver.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/16/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface SUUnarchiver : NSObject {
+       id delegate;
+}
+
+- (void)unarchivePath:(NSString *)path;
+- (void)setDelegate:delegate;
+
+@end
+
+@interface NSObject (SUUnarchiverDelegate)
+- (void)unarchiver:(SUUnarchiver *)unarchiver extractedLength:(long)length;
+- (void)unarchiverDidFinish:(SUUnarchiver *)unarchiver;
+- (void)unarchiverDidFail:(SUUnarchiver *)unarchiver;
+@end
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h b/macosx/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h
new file mode 100644 (file)
index 0000000..69c2817
--- /dev/null
@@ -0,0 +1,40 @@
+//
+//  SUUpdateAlert.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/12/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+typedef enum
+{
+       SUInstallUpdateChoice,
+       SURemindMeLaterChoice,
+       SUSkipThisVersionChoice
+} SUUpdateAlertChoice;
+
+@class WebView, SUAppcastItem;
+@interface SUUpdateAlert : NSWindowController {
+       SUAppcastItem *updateItem;
+       id delegate;
+       
+       IBOutlet WebView *releaseNotesView;
+       IBOutlet NSTextField *description;
+       NSProgressIndicator *releaseNotesSpinner;
+       BOOL webViewFinishedLoading;
+}
+
+- initWithAppcastItem:(SUAppcastItem *)item;
+- (void)setDelegate:delegate;
+
+- (IBAction)installUpdate:sender;
+- (IBAction)skipThisVersion:sender;
+- (IBAction)remindMeLater:sender;
+
+@end
+
+@interface NSObject (SUUpdateAlertDelegate)
+- (void)updateAlert:(SUUpdateAlert *)updateAlert finishedWithChoice:(SUUpdateAlertChoice)updateChoice;
+@end
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUUpdater.h b/macosx/Sparkle.framework/Versions/A/Headers/SUUpdater.h
new file mode 100644 (file)
index 0000000..5f82914
--- /dev/null
@@ -0,0 +1,55 @@
+//
+//  SUUpdater.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 1/4/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+// Before you use Sparkle in your app, you must set SUFeedURL in Info.plist to the
+// address of the appcast on your webserver. If you don't already have an 
+// appcast, please see the Sparkle documentation to learn about how to set one up.
+
+// .zip, .dmg, .tar, .tbz, .tgz archives are supported at this time.
+
+// By default, Sparkle offers to show the user the release notes of the build they'll be
+// getting, which it assumes are in the description (or body) field of the relevant RSS item.
+// Set SUShowReleaseNotes to <false/> in Info.plist to hide the button.
+
+@class SUAppcastItem, SUUpdateAlert, SUStatusController;
+@interface SUUpdater : NSObject {
+       SUAppcastItem *updateItem;
+       
+       SUStatusController *statusController;
+       SUUpdateAlert *updateAlert;
+       
+       NSURLDownload *downloader;
+       NSString *downloadPath;
+                       
+       NSTimer *checkTimer;
+       NSTimeInterval checkInterval;   
+       
+       BOOL verbose;
+       BOOL updateInProgress;
+}
+
+// This IBAction is meant for a main menu item. Hook up any menu item to this action,
+// and Sparkle will check for updates and report back its findings verbosely.
+- (IBAction)checkForUpdates:sender;
+
+// This method is similar to the above, but it's intended for updates initiated by
+// the computer instead of by the user. It does not alert the user when he is up to date,
+// and it remains silent about network errors in fetching the feed. This is what you
+// want to call to update programmatically; only use checkForUpdates: with buttons and menu items.
+- (void)checkForUpdatesInBackground;
+
+// This method allows you to schedule a check to run every time interval. You can
+// pass 0 to this method to cancel a previously scheduled timer. You probably don't want
+// to call this directly: if you set a SUScheduledCheckInterval key in Info.plist or
+// the user defaults, Sparkle will set this up for you automatically on startup. You might
+// just want to call this every time the user changes the setting in the preferences.
+- (void)scheduleCheckWithInterval:(NSTimeInterval)interval;
+
+@end
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/SUUtilities.h b/macosx/Sparkle.framework/Versions/A/Headers/SUUtilities.h
new file mode 100644 (file)
index 0000000..5af3550
--- /dev/null
@@ -0,0 +1,20 @@
+//
+//  SUUtilities.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/12/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+id SUInfoValueForKey(NSString *key);
+NSString *SUHostAppName();
+NSString *SUHostAppDisplayName();
+NSString *SUHostAppVersion();
+NSString *SUHostAppVersionString();
+
+NSComparisonResult SUStandardVersionComparison(NSString * versionA, NSString * versionB);
+
+// If running make localizable-strings for genstrings, ignore the error on this line.
+NSString *SULocalizedString(NSString *key, NSString *comment);
diff --git a/macosx/Sparkle.framework/Versions/A/Headers/Sparkle.h b/macosx/Sparkle.framework/Versions/A/Headers/Sparkle.h
new file mode 100644 (file)
index 0000000..13e9b21
--- /dev/null
@@ -0,0 +1,22 @@
+//
+//  Sparkle.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/16/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import "SUUpdater.h"
+#import "SUUtilities.h"
+#import "SUConstants.h"
+#import "SUAppcast.h"
+#import "SUAppcastItem.h"
+#import "SUUpdateAlert.h"
+#import "SUAutomaticUpdateAlert.h"
+#import "SUStatusController.h"
+#import "SUUnarchiver.h"
+#import "SUStatusChecker.h"
+
+#import "NSApplication+AppCopies.h"
+#import "NSFileManager+Authentication.h"
+#import "NSFileManager+Verification.h"
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/Info.plist b/macosx/Sparkle.framework/Versions/A/Resources/Info.plist
new file mode 100644 (file)
index 0000000..c154cb6
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>Sparkle</string>
+       <key>CFBundleIdentifier</key>
+       <string>org.andymatuschak.Sparkle</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string>Sparkle</string>
+       <key>CFBundlePackageType</key>
+       <string>FMWK</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleVersion</key>
+       <string>1.1</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib
new file mode 100644 (file)
index 0000000..ff40c9d
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            CLASS = SUStatusController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {actionButton = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib
new file mode 100644 (file)
index 0000000..9918344
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>69 10 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8H14</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..378b22f
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..15daf30
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..17f2f3d
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..329426c
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..0820302
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>136 94 356 240 0 0 1024 746 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..ac43a0c
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..2084963
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..232852c
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..81c59b7
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..08538d3
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..d371ff2
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..d51f9ad
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..f979099
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..0808fc6
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..aeec008
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..92064db
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2f65f2f
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8H14</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..c4201cf
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..be3dbd9
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..6bf42f7
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..236c082
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..08538d3
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..e7f6143
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..ac21bcb
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..c52cf30
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..26ef484
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>439.0</string>
+       <key>IBSystem Version</key>
+       <string>8J133</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..552a5bd
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..b0e7f7b
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 51 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>439.0</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8J133</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..0cd65e6
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..9cca1c3
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..0820302
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>136 94 356 240 0 0 1024 746 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..e4c7ba0
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..af7bfbb
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..60da7d5
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..4fbd2d6
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..08538d3
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..c815112
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..08538d3
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..44b9da5
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..85c1567
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..53fa5b3
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..0e8d6a6
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..7a5a384
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..0820302
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>136 94 356 240 0 0 1024 746 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..d317046
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..f213cf3
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>531 94 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..00b088d
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..6c2e6ea
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..aeb4628
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..08538d3
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..26b2e8a
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..08538d3
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..a28ff7a
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>528 61 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..36947a7
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..2c98929
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..0820302
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>136 94 356 240 0 0 1024 746 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..6da4ab1
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..dc2fbf3
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..32c7567
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b2f8b50
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..7c8b8ea
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..0820302
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>136 94 356 240 0 0 1024 746 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..7a79f4d
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..13cdb31
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..fd3ec52
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..c4116cc
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..9d3a515
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..2b1c6e3
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..08538d3
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..0820302
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>136 94 356 240 0 0 1024 746 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..6e20460
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..4f31fd7
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..c15c890
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..0820302
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>136 94 356 240 0 0 1024 746 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..f165c1a
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0071ac0
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..2b25ad0
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>425 40 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..0d56dd1
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..9f7b390
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e65b1f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..5a75680
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>188 142 356 240 0 0 1280 1002 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..b619eb4
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644 (file)
index 0000000..0ac32ad
--- /dev/null
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {delegate = id; description = id; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644 (file)
index 0000000..83a4377
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>62 61 356 240 0 0 1280 832 </string>
+       <key>IBFramework Version</key>
+       <string>443.0</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I127</string>
+</dict>
+</plist>
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib b/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..9be9428
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings b/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings
new file mode 100644 (file)
index 0000000..a548680
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings differ
diff --git a/macosx/Sparkle.framework/Versions/A/Sparkle b/macosx/Sparkle.framework/Versions/A/Sparkle
new file mode 100755 (executable)
index 0000000..9dbf9e7
Binary files /dev/null and b/macosx/Sparkle.framework/Versions/A/Sparkle differ
diff --git a/macosx/Sparkle.framework/Versions/Current b/macosx/Sparkle.framework/Versions/Current
new file mode 120000 (symlink)
index 0000000..8c7e5a6
--- /dev/null
@@ -0,0 +1 @@
+A
\ No newline at end of file
diff --git a/macosx/genstrings.sh b/macosx/genstrings.sh
new file mode 100755 (executable)
index 0000000..0745d2e
--- /dev/null
@@ -0,0 +1,2 @@
+#! /bin/sh
+genstrings *.m*
diff --git a/macosx/i18n/Localizable.strings b/macosx/i18n/Localizable.strings
new file mode 100644 (file)
index 0000000..ed2dec6
Binary files /dev/null and b/macosx/i18n/Localizable.strings differ
diff --git a/macosx/i18n/de.strings b/macosx/i18n/de.strings
new file mode 100644 (file)
index 0000000..2066572
Binary files /dev/null and b/macosx/i18n/de.strings differ
diff --git a/macosx/i18n/es.strings b/macosx/i18n/es.strings
new file mode 100644 (file)
index 0000000..94c6cbe
Binary files /dev/null and b/macosx/i18n/es.strings differ
diff --git a/macosx/i18n/fr.strings b/macosx/i18n/fr.strings
new file mode 100644 (file)
index 0000000..6c1782b
Binary files /dev/null and b/macosx/i18n/fr.strings differ
diff --git a/macosx/i18n/it.strings b/macosx/i18n/it.strings
new file mode 100644 (file)
index 0000000..de3dbf7
Binary files /dev/null and b/macosx/i18n/it.strings differ
diff --git a/macosx/i18n/ja.strings b/macosx/i18n/ja.strings
new file mode 100644 (file)
index 0000000..e5162f5
Binary files /dev/null and b/macosx/i18n/ja.strings differ
diff --git a/macosx/i18n/nl.strings b/macosx/i18n/nl.strings
new file mode 100644 (file)
index 0000000..7d55755
Binary files /dev/null and b/macosx/i18n/nl.strings differ
diff --git a/macosx/i18n/pl.strings b/macosx/i18n/pl.strings
new file mode 100644 (file)
index 0000000..f022f65
Binary files /dev/null and b/macosx/i18n/pl.strings differ
diff --git a/macosx/i18n/pt.strings b/macosx/i18n/pt.strings
new file mode 100644 (file)
index 0000000..6c9e4ef
--- /dev/null
@@ -0,0 +1,183 @@
+/* No comment provided by engineer. */
+"2-pass encoding" = "Codificar em 2 passagens";
+
+/* No comment provided by engineer. */
+"Audio" = "Audio";
+
+/* No comment provided by engineer. */
+"Autocrop" = "Cortado";
+
+/* No comment provided by engineer. */
+"AVI file / H264 video / MP3 audio" = "AVI file / H264 video / MP3 audio";
+
+/* No comment provided by engineer. */
+"AVI file / MPEG-4 video / MP3 audio" = "AVI file / MPEG-4 video / MP3 audio";
+
+/* No comment provided by engineer. */
+"Bitrate" = "Bitrate";
+
+/* No comment provided by engineer. */
+"Bitrate (kbps)" = "Bitrate (kbps)";
+
+/* No comment provided by engineer. */
+"Bottom cropping" = "Cortado do final";
+
+/* No comment provided by engineer. */
+"Browse" = "Visualizar";
+
+/* No comment provided by engineer. */
+"Cancel" = "Cancelar";
+
+/* No comment provided by engineer. */
+"Cancel - Are you sure?" = "Cancelar - Tem a certeza?";
+
+/* No comment provided by engineer. */
+"Canceled." = "Cancelado.";
+
+/* No comment provided by engineer. */
+"Close" = "Fechar";
+
+/* No comment provided by engineer. */
+"Crop & Scale..." = "Cortar e Redimensionar...";
+
+/* No comment provided by engineer. */
+"Custom (kbps)" = " Normal em (kbps)";
+
+/* No comment provided by engineer. */
+"Deinterlace picture" = "Deinterlace imagem";
+
+/* No comment provided by engineer. */
+"Detected volume" = "Volume detectado";
+
+/* No comment provided by engineer. */
+"Do you want to overwrite %@?" = "Quer reescrever %@?";
+
+/* No comment provided by engineer. */
+"DVD Folder" = "Pasta do DVD";
+
+/* No comment provided by engineer. */
+"DVD title" = "Titulo do DVD";
+
+/* No comment provided by engineer. */
+"Encoding won't be recoverable." = "A codificacao nao pode ser recuperada.";
+
+/* No comment provided by engineer. */
+"Encoding: %.2f %% (pass %d of %d)" = "Codificao em progresso: %.2f %% (passagem %d of %d)";
+
+/* No comment provided by engineer. */
+"File" = "Ficheiro";
+
+/* No comment provided by engineer. */
+"File already exists" = "O ficheiro ja existe";
+
+/* No comment provided by engineer. */
+"Final size: %dx%d" = "Tamanho do ficheiro: %dx%d";
+
+/* No comment provided by engineer. */
+"General" = "Geral";
+
+/* No comment provided by engineer. */
+"Invalid secondary language" = "Secunda lingua invalida";
+
+/* No comment provided by engineer. */
+"Invalid video bitrate" = "Video bitrate invalido";
+
+/* No comment provided by engineer. */
+"Invalid volume, try again" = "volume invalido, tente novamente";
+
+/* No comment provided by engineer. */
+"Language 1" = "Lingua 1";
+
+/* No comment provided by engineer. */
+"Language 2 (optional)" = "Lingua 2 (optional)";
+
+/* No comment provided by engineer. */
+"Left cropping" = "Cortado a esquerda";
+
+/* No comment provided by engineer. */
+"MP4 file / MPEG-4 video / AAC audio" = "MP4 file / MPEG-4 video / AAC audio";
+
+/* No comment provided by engineer. */
+"MPEG-4 encoder" = "MPEG-4 encoder";
+
+/* No comment provided by engineer. */
+"Next" = "Proximo";
+
+/* No comment provided by engineer. */
+"No" = "Nao";
+
+/* No comment provided by engineer. */
+"None" = "Nao existente";
+
+/* No comment provided by engineer. */
+"OGM file / MPEG-4 video / Vorbis audio" = "OGM file / MPEG-4 video / Vorbis audio";
+
+/* No comment provided by engineer. */
+"Ooops" = "Bolas";
+
+/* No comment provided by engineer. */
+"Open" = "Aberto";
+
+/* No comment provided by engineer. */
+"Opening device..." = "Abertura em curso...";
+
+/* No comment provided by engineer. */
+"Output format" = "Formato de Output";
+
+/* No comment provided by engineer. */
+"Pause" = "Pausa";
+
+/* No comment provided by engineer. */
+"Picture width" = "Tamanho da figura";
+
+/* No comment provided by engineer. */
+"Previous" = "Anterior";
+
+/* No comment provided by engineer. */
+"Resume" = "Resumo";
+
+/* No comment provided by engineer. */
+"Right cropping" = "Cortado a direita";
+
+/* No comment provided by engineer. */
+"Rip" = "Rip";
+
+/* No comment provided by engineer. */
+"Rip completed." = "Rip completado.";
+
+/* No comment provided by engineer. */
+"Scanning title %d of %d..." = "Exminar o titulo %d of %d...";
+
+/* No comment provided by engineer. */
+"Select a DVD:" = "Selecione o DVD:";
+
+/* No comment provided by engineer. */
+"Speed: %.2f fps (avg %.2f fps), %02dh%02dm%02ds remaining" = "Velocidade: %.2f fps (avg %.2f fps), %02dh%02dm%02ds restante";
+
+/* No comment provided by engineer. */
+"Target size (MB)" = "Tamanho a atingir (MB)";
+
+/* No comment provided by engineer. */
+"Top cropping" = "Cortado ao topo";
+
+/* No comment provided by engineer. */
+"Useless OpenGL effects" = "Efeitos inuteis do OpenGL";
+
+/* No comment provided by engineer. */
+"Video" = "Video";
+
+/* No comment provided by engineer. */
+"Video bitrate is too high." = "Video bitrate e muito alto";
+
+/* No comment provided by engineer. */
+"Video bitrate is too low." = "Video bitrate e muito baixo.";
+
+/* No comment provided by engineer. */
+"Welcome to MediaFork" = "Bemvindo ao MediaFork";
+
+/* No comment provided by engineer. */
+"Yes" = "Sim";
+
+/* No comment provided by engineer. */
+"You can't encode the same audio track twice." = "Nao se pode codificar a mesma facha de audio duas vezes.";
+
diff --git a/macosx/i18n/ru.strings b/macosx/i18n/ru.strings
new file mode 100644 (file)
index 0000000..1187467
Binary files /dev/null and b/macosx/i18n/ru.strings differ
diff --git a/macosx/icons/ActivityWindow.tiff b/macosx/icons/ActivityWindow.tiff
new file mode 100644 (file)
index 0000000..c4f67c1
Binary files /dev/null and b/macosx/icons/ActivityWindow.tiff differ
diff --git a/macosx/icons/AddToQueue.tiff b/macosx/icons/AddToQueue.tiff
new file mode 100644 (file)
index 0000000..8cc6d5e
Binary files /dev/null and b/macosx/icons/AddToQueue.tiff differ
diff --git a/macosx/icons/Brushed Window.tiff b/macosx/icons/Brushed Window.tiff
new file mode 100644 (file)
index 0000000..30a820b
Binary files /dev/null and b/macosx/icons/Brushed Window.tiff differ
diff --git a/macosx/icons/Delete.png b/macosx/icons/Delete.png
new file mode 100644 (file)
index 0000000..1568f06
Binary files /dev/null and b/macosx/icons/Delete.png differ
diff --git a/macosx/icons/DeleteHighlight.png b/macosx/icons/DeleteHighlight.png
new file mode 100644 (file)
index 0000000..a24df6b
Binary files /dev/null and b/macosx/icons/DeleteHighlight.png differ
diff --git a/macosx/icons/DeleteHighlightPressed.png b/macosx/icons/DeleteHighlightPressed.png
new file mode 100644 (file)
index 0000000..0873028
Binary files /dev/null and b/macosx/icons/DeleteHighlightPressed.png differ
diff --git a/macosx/icons/DeletePressed.png b/macosx/icons/DeletePressed.png
new file mode 100644 (file)
index 0000000..f4995c4
Binary files /dev/null and b/macosx/icons/DeletePressed.png differ
diff --git a/macosx/icons/Drawer.tiff b/macosx/icons/Drawer.tiff
new file mode 100644 (file)
index 0000000..7beb830
Binary files /dev/null and b/macosx/icons/Drawer.tiff differ
diff --git a/macosx/icons/EncodeCanceled.png b/macosx/icons/EncodeCanceled.png
new file mode 100644 (file)
index 0000000..66c5bf7
Binary files /dev/null and b/macosx/icons/EncodeCanceled.png differ
diff --git a/macosx/icons/EncodeComplete.png b/macosx/icons/EncodeComplete.png
new file mode 100644 (file)
index 0000000..503e52c
Binary files /dev/null and b/macosx/icons/EncodeComplete.png differ
diff --git a/macosx/icons/EncodeWorking0.png b/macosx/icons/EncodeWorking0.png
new file mode 100644 (file)
index 0000000..200606b
Binary files /dev/null and b/macosx/icons/EncodeWorking0.png differ
diff --git a/macosx/icons/EncodeWorking1.png b/macosx/icons/EncodeWorking1.png
new file mode 100644 (file)
index 0000000..b3e0749
Binary files /dev/null and b/macosx/icons/EncodeWorking1.png differ
diff --git a/macosx/icons/EncodeWorking2.png b/macosx/icons/EncodeWorking2.png
new file mode 100644 (file)
index 0000000..11fef31
Binary files /dev/null and b/macosx/icons/EncodeWorking2.png differ
diff --git a/macosx/icons/EncodeWorking3.png b/macosx/icons/EncodeWorking3.png
new file mode 100644 (file)
index 0000000..9a2187d
Binary files /dev/null and b/macosx/icons/EncodeWorking3.png differ
diff --git a/macosx/icons/EncodeWorking4.png b/macosx/icons/EncodeWorking4.png
new file mode 100644 (file)
index 0000000..680505b
Binary files /dev/null and b/macosx/icons/EncodeWorking4.png differ
diff --git a/macosx/icons/EncodeWorking5.png b/macosx/icons/EncodeWorking5.png
new file mode 100644 (file)
index 0000000..33fae2c
Binary files /dev/null and b/macosx/icons/EncodeWorking5.png differ
diff --git a/macosx/icons/Info.png b/macosx/icons/Info.png
new file mode 100644 (file)
index 0000000..29e9743
Binary files /dev/null and b/macosx/icons/Info.png differ
diff --git a/macosx/icons/JobLarge.png b/macosx/icons/JobLarge.png
new file mode 100644 (file)
index 0000000..9b8f08d
Binary files /dev/null and b/macosx/icons/JobLarge.png differ
diff --git a/macosx/icons/JobPassFirstSmall.png b/macosx/icons/JobPassFirstSmall.png
new file mode 100644 (file)
index 0000000..951d8a5
Binary files /dev/null and b/macosx/icons/JobPassFirstSmall.png differ
diff --git a/macosx/icons/JobPassLarge.png b/macosx/icons/JobPassLarge.png
new file mode 100644 (file)
index 0000000..73ffdad
Binary files /dev/null and b/macosx/icons/JobPassLarge.png differ
diff --git a/macosx/icons/JobPassSecondSmall.png b/macosx/icons/JobPassSecondSmall.png
new file mode 100644 (file)
index 0000000..b2b5a39
Binary files /dev/null and b/macosx/icons/JobPassSecondSmall.png differ
diff --git a/macosx/icons/JobPassSmall.png b/macosx/icons/JobPassSmall.png
new file mode 100644 (file)
index 0000000..9defc5e
Binary files /dev/null and b/macosx/icons/JobPassSmall.png differ
diff --git a/macosx/icons/JobPassSubtitleSmall.png b/macosx/icons/JobPassSubtitleSmall.png
new file mode 100644 (file)
index 0000000..8395b0d
Binary files /dev/null and b/macosx/icons/JobPassSubtitleSmall.png differ
diff --git a/macosx/icons/JobPassUnknownSmall.png b/macosx/icons/JobPassUnknownSmall.png
new file mode 100644 (file)
index 0000000..0130006
Binary files /dev/null and b/macosx/icons/JobPassUnknownSmall.png differ
diff --git a/macosx/icons/JobSmall.png b/macosx/icons/JobSmall.png
new file mode 100644 (file)
index 0000000..486885c
Binary files /dev/null and b/macosx/icons/JobSmall.png differ
diff --git a/macosx/icons/Pause.tiff b/macosx/icons/Pause.tiff
new file mode 100644 (file)
index 0000000..50b7362
Binary files /dev/null and b/macosx/icons/Pause.tiff differ
diff --git a/macosx/icons/Play.tiff b/macosx/icons/Play.tiff
new file mode 100644 (file)
index 0000000..916ec8d
Binary files /dev/null and b/macosx/icons/Play.tiff differ
diff --git a/macosx/icons/Queue.tiff b/macosx/icons/Queue.tiff
new file mode 100644 (file)
index 0000000..1ce9dad
Binary files /dev/null and b/macosx/icons/Queue.tiff differ
diff --git a/macosx/icons/Reveal.png b/macosx/icons/Reveal.png
new file mode 100644 (file)
index 0000000..fdc1175
Binary files /dev/null and b/macosx/icons/Reveal.png differ
diff --git a/macosx/icons/RevealHighlight.png b/macosx/icons/RevealHighlight.png
new file mode 100644 (file)
index 0000000..003a764
Binary files /dev/null and b/macosx/icons/RevealHighlight.png differ
diff --git a/macosx/icons/RevealHighlightPressed.png b/macosx/icons/RevealHighlightPressed.png
new file mode 100644 (file)
index 0000000..3cd4fd9
Binary files /dev/null and b/macosx/icons/RevealHighlightPressed.png differ
diff --git a/macosx/icons/RevealPressed.png b/macosx/icons/RevealPressed.png
new file mode 100644 (file)
index 0000000..97ef1d8
Binary files /dev/null and b/macosx/icons/RevealPressed.png differ
diff --git a/macosx/icons/Source.tiff b/macosx/icons/Source.tiff
new file mode 100644 (file)
index 0000000..858a4c5
Binary files /dev/null and b/macosx/icons/Source.tiff differ
diff --git a/macosx/icons/Stop.tiff b/macosx/icons/Stop.tiff
new file mode 100644 (file)
index 0000000..5ebae6d
Binary files /dev/null and b/macosx/icons/Stop.tiff differ
diff --git a/macosx/icons/pref-audio.tiff b/macosx/icons/pref-audio.tiff
new file mode 100644 (file)
index 0000000..c8078a5
Binary files /dev/null and b/macosx/icons/pref-audio.tiff differ
diff --git a/macosx/icons/pref-picture.tiff b/macosx/icons/pref-picture.tiff
new file mode 100644 (file)
index 0000000..975ca56
Binary files /dev/null and b/macosx/icons/pref-picture.tiff differ
diff --git a/macosx/main.mm b/macosx/main.mm
new file mode 100644 (file)
index 0000000..9927a44
--- /dev/null
@@ -0,0 +1,33 @@
+/* $Id: main.mm,v 1.3 2005/11/25 15:04:35 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include <Cocoa/Cocoa.h>
+#import "hb.h"
+
+void SigHandler( int signal )
+{
+    [NSApp terminate: NULL];
+} 
+
+/****************************************************************************
+ * hb_error_handler
+ * 
+ * Change this to display a dialog box - and maybe move it somewhere else,
+ * this is the only place I could find that looked like C :)
+****************************************************************************/
+extern "C" {
+void hb_error_handler( const char *errmsg )
+{
+    fprintf(stderr, "GUI ERROR dialog: %s\n", errmsg );
+}
+}
+
+int main( int argc, const char ** argv )
+{
+    signal( SIGINT, SigHandler );
+    hb_register_error_handler(&hb_error_handler);
+    return NSApplicationMain( argc, argv );
+}
diff --git a/qt4/encodewidget.cpp b/qt4/encodewidget.cpp
new file mode 100644 (file)
index 0000000..af22b80
--- /dev/null
@@ -0,0 +1,39 @@
+#include <QtGui>
+
+#include "encodewidget.h"
+
+EncodeWidget::EncodeWidget(QWidget *parent)
+    : QWidget(parent)
+{
+    setupUi(this);
+
+    convertButton->setDisabled( true );
+
+    connect(convertButton, SIGNAL(clicked()), this, SIGNAL(convert()));
+}
+
+void EncodeWidget::setModel( QStandardItemModel *m )
+{
+    titleTree->setModel( m );
+    titleTree->setSelectionMode( QAbstractItemView::NoSelection );
+    titleTree->setRootIsDecorated( false );
+    titleTree->setFocusPolicy( Qt::NoFocus );
+
+    connect(titleTree->model(), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(changed()));
+}
+
+void EncodeWidget::changed()
+{
+    bool enable = false;
+
+    for( int row = 0; row < titleTree->model()->rowCount(); ++row )
+    {
+        QStandardItem *si = qobject_cast<QStandardItemModel *>(titleTree->model())->item( row, 0 );
+        if( si->checkState() == Qt::Checked )
+        {
+            enable = true;
+        }
+    }
+
+    convertButton->setEnabled( enable );
+}
diff --git a/qt4/encodewidget.h b/qt4/encodewidget.h
new file mode 100644 (file)
index 0000000..869dea5
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef ENCODEWIDGET_H
+#define ENCODEWIDGET_H
+
+#include <QtGui>
+
+#include "ui_encodewidget.h"
+
+class EncodeWidget : public QWidget, private Ui::EncodeWidget
+{
+    Q_OBJECT
+public:
+    EncodeWidget( QWidget *parent = 0 );
+
+signals:
+    void convert();
+
+public slots:
+    void setModel( QStandardItemModel *m );
+    void changed();
+};
+
+#endif // ENCODEWIDGET_H
diff --git a/qt4/encodewidget.ui b/qt4/encodewidget.ui
new file mode 100644 (file)
index 0000000..e4a92aa
--- /dev/null
@@ -0,0 +1,215 @@
+<ui version="4.0" >
+ <class>EncodeWidget</class>
+ <widget class="QWidget" name="EncodeWidget" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>320</width>
+    <height>440</height>
+   </rect>
+  </property>
+  <property name="minimumSize" >
+   <size>
+    <width>320</width>
+    <height>440</height>
+   </size>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QLabel" name="mainLabel" >
+     <property name="font" >
+      <font>
+       <family>sans</family>
+       <pointsize>14</pointsize>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text" >
+      <string>Select DVD features</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="Line" name="line" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QTreeView" name="titleTree" />
+   </item>
+   <item>
+    <widget class="QLabel" name="settingsLabel" >
+     <property name="font" >
+      <font>
+       <pointsize>14</pointsize>
+       <weight>75</weight>
+       <italic>false</italic>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text" >
+      <string>Settings</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QGridLayout" >
+     <property name="margin" >
+      <number>12</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item row="0" column="0" >
+      <widget class="QLabel" name="saveLabel" >
+       <property name="text" >
+        <string>Save converted files to:</string>
+       </property>
+       <property name="alignment" >
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0" >
+      <widget class="QLabel" name="formatLabel" >
+       <property name="text" >
+        <string>File format:</string>
+       </property>
+       <property name="alignment" >
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="0" >
+      <widget class="QLabel" name="aspectLabel" >
+       <property name="text" >
+        <string>Picture format:</string>
+       </property>
+       <property name="alignment" >
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="0" >
+      <widget class="QLabel" name="audioLabel" >
+       <property name="text" >
+        <string>Preferred audio:</string>
+       </property>
+       <property name="alignment" >
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="0" >
+      <widget class="QLabel" name="subtitleLabel" >
+       <property name="text" >
+        <string>Preferred subtitles:</string>
+       </property>
+       <property name="alignment" >
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1" >
+      <widget class="QComboBox" name="saveComboBox" />
+     </item>
+     <item row="1" column="1" >
+      <widget class="QComboBox" name="formatComboBox" />
+     </item>
+     <item row="2" column="1" >
+      <widget class="QComboBox" name="aspectComboBox" >
+       <item>
+        <property name="text" >
+         <string>Widescreen</string>
+        </property>
+       </item>
+       <item>
+        <property name="text" >
+         <string>Fullscreen</string>
+        </property>
+       </item>
+      </widget>
+     </item>
+     <item row="3" column="1" >
+      <widget class="QComboBox" name="audioComboBox" />
+     </item>
+     <item row="4" column="1" >
+      <widget class="QComboBox" name="subtitleComboBox" />
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QLabel" name="statusLabel" >
+     <property name="text" >
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QProgressBar" name="titleProgress" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QPushButton" name="openOtherButton" >
+       <property name="text" >
+        <string>Open another DVD...</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="convertButton" >
+       <property name="text" >
+        <string>Convert</string>
+       </property>
+       <property name="autoDefault" >
+        <bool>true</bool>
+       </property>
+       <property name="default" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/qt4/faderwidget.cpp b/qt4/faderwidget.cpp
new file mode 100644 (file)
index 0000000..c8d95e8
--- /dev/null
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2006 Trolltech AS. All rights reserved.
+**
+** This file is part of the documentation of Qt. It was originally
+** published as part of Qt Quarterly.
+**
+** This file may be used under the terms of the GNU General Public License
+** version 2.0 as published by the Free Software Foundation or under the
+** terms of the Qt Commercial License Agreement. The respective license
+** texts for these are provided with the open source and commercial
+** editions of Qt.
+**
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://www.trolltech.com/products/qt/licensing.html or contact the
+** sales department at sales@trolltech.com.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "faderwidget.h"
+
+FaderWidget::FaderWidget(QWidget *parent)
+    : QWidget(parent)
+{
+    if (parent) {
+        startColor = endColor = parent->palette().window().color();
+    } else {
+        startColor = endColor = Qt::white;
+    }
+
+    currentAlpha = 0;
+    duration = 333;
+    fadeOut = false;
+
+    timer = new QTimer(this);
+    connect(timer, SIGNAL(timeout()), this, SLOT(update()));
+
+    setAttribute(Qt::WA_DeleteOnClose);
+    resize(parent->size());
+}
+
+void FaderWidget::start()
+{
+    currentAlpha = 255;
+    fadeOut = false;
+    timer->start(33);
+    show();
+}
+
+void FaderWidget::startFadeOut()
+{
+    currentAlpha = 0;
+    fadeOut = true;
+    timer->start(33);
+    show();
+}
+
+void FaderWidget::paintEvent(QPaintEvent * /* event */)
+{
+    QPainter painter(this);
+    QColor semiTransparentColor = startColor;
+    semiTransparentColor.setAlpha(currentAlpha);
+    painter.fillRect(rect(), semiTransparentColor);
+
+    if (fadeOut) {
+        currentAlpha += 255 * timer->interval() / duration;
+        if (currentAlpha >= 255) {
+            timer->stop();
+            emit done( (QWidget *)parent() );
+            close();
+        }
+    } else {
+        currentAlpha -= 255 * timer->interval() / duration;
+        if (currentAlpha <= 0) {
+            timer->stop();
+            emit done( (QWidget *)parent() );
+            close();
+        }
+    }
+}
diff --git a/qt4/faderwidget.h b/qt4/faderwidget.h
new file mode 100644 (file)
index 0000000..168d81c
--- /dev/null
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2006 Trolltech AS. All rights reserved.
+**
+** This file is part of the documentation of Qt. It was originally
+** published as part of Qt Quarterly.
+**
+** This file may be used under the terms of the GNU General Public License
+** version 2.0 as published by the Free Software Foundation or under the
+** terms of the Qt Commercial License Agreement. The respective license
+** texts for these are provided with the open source and commercial
+** editions of Qt.
+**
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://www.trolltech.com/products/qt/licensing.html or contact the
+** sales department at sales@trolltech.com.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+****************************************************************************/
+
+#ifndef FADERWIDGET_H
+#define FADERWIDGET_H
+
+#include <QWidget>
+
+class QTimer;
+
+class FaderWidget : public QWidget
+{
+    Q_OBJECT
+    Q_PROPERTY(QColor fadeColor READ fadeColor WRITE setFadeColor)
+    Q_PROPERTY(int fadeDuration READ fadeDuration WRITE setFadeDuration)
+
+public:
+    FaderWidget(QWidget *parent);
+
+    QColor fadeColor() const { return startColor; }
+    void setFadeColor(const QColor &newColor) { startColor = newColor; }
+
+    int fadeDuration() const { return duration; }
+    void setFadeDuration(int milliseconds) { duration = milliseconds; }
+
+    void start();
+    void startFadeOut();
+
+signals:
+    void done(QWidget *w);
+
+protected:
+    void paintEvent(QPaintEvent *event);
+
+private:
+    QTimer *timer;
+    QColor startColor, endColor;
+    bool fadeOut;
+    int currentAlpha;
+    int duration;
+};
+
+#endif
diff --git a/qt4/main.cpp b/qt4/main.cpp
new file mode 100644 (file)
index 0000000..9cb0717
--- /dev/null
@@ -0,0 +1,11 @@
+#include <QtGui>
+
+#include "qhandbrakewizard.h"
+
+int main(int argc, char **argv) {
+    QApplication app(argc, argv);
+    QHandBrakeWizard *wizard = new QHandBrakeWizard();
+
+    wizard->show();
+    return app.exec();
+}
diff --git a/qt4/qhandbrake.cpp b/qt4/qhandbrake.cpp
new file mode 100644 (file)
index 0000000..ba08975
--- /dev/null
@@ -0,0 +1,128 @@
+#include "qhandbrake.h"
+
+QHandBrake::QHandBrake( QObject *parent ) : QObject( parent )
+{
+    hbHandle = hb_init_express( HB_DEBUG_NONE, 1 );
+    hbTitle = NULL;
+}
+
+QHandBrake::~QHandBrake()
+{
+    hb_close( &hbHandle );
+}
+
+QString displayDuration( const QTime t )
+{
+    return QString( "%1 %2, %3 %4, %5 %6").arg(t.hour()).arg(t.hour() == 1 ? "hour" : "hours").arg(t.minute()).arg(t.minute() == 1 ? "minute" : "minutes").arg(t.second()).arg(t.second() == 1 ? "second" : "seconds");
+}
+
+QStandardItemModel *QHandBrake::titleListModel()
+{
+    hb_list_t *hbTitles;
+    int i, titleCount;
+
+    hbTitles = hb_get_titles( hbHandle );
+    titleCount = hb_list_count( hbTitles );
+    titleModel = new QStandardItemModel( titleCount, 2, this );
+
+    titleModel->setHorizontalHeaderItem( 0, new QStandardItem("Title") );
+    titleModel->setHorizontalHeaderItem( 1, new QStandardItem("Duration") );
+
+    for( i = 0; i < titleCount; ++i )
+    {
+        hb_title_t *t = ( hb_title_t * )hb_list_item( hbTitles, i );
+
+        QTime d = QTime( t->hours, t->minutes, t->seconds );
+        QString s = QString( "Title %1" ).arg( t->index );
+        QStandardItem *siTitle = new QStandardItem( s );
+        QStandardItem *siDuration = new QStandardItem( displayDuration( d ) );
+        titleModel->setItem( i, 0, siTitle );
+        titleModel->setItem( i, 1, siDuration );
+
+        siTitle->setCheckable( true );
+        siTitle->setEditable( false );
+        siTitle->setData( i, Qt::UserRole );
+
+        siDuration->setEditable( false );
+    }
+
+    return titleModel;
+}
+
+void QHandBrake::startScan( const QString sDevice )
+{
+    hb_state_t s;
+    int titleCurrent = 0;
+    int titleCount = 0;
+
+    if( sDevice.isEmpty() )
+    {
+        qDebug("Passed an empty device/path");
+        return;
+    }
+
+    hb_scan( hbHandle, sDevice.toLocal8Bit(), 0 );
+
+    do {
+        hb_get_state( hbHandle, &s );
+        qApp->processEvents();
+        if( s.state == HB_STATE_SCANNING )
+        {
+            titleCurrent = s.param.scanning.title_cur;
+            titleCount = s.param.scanning.title_count;
+
+            if( titleCurrent > 0 )
+            {
+                emit scanProgress( titleCurrent, titleCount );
+                qApp->processEvents();
+            }
+        }
+    } while( s.state != HB_STATE_SCANDONE );
+
+    if( hb_list_count( hb_get_titles( hbHandle ) ) )
+    {
+        emit scanProgress( titleCount, titleCount );
+    }
+    else
+    {
+        qDebug("Scanning failed");
+        return;
+    }
+}
+
+void QHandBrake::encode()
+{
+    if( hbHandle == NULL )
+    {
+        qDebug("Encode called too early");
+        return;
+    }
+
+    int i;
+    hb_list_t *titles = hb_get_titles( hbHandle );
+
+    for( i = 0; i < titleModel->rowCount(); ++i )
+    {
+        QStandardItem *si = titleModel->item( i, 0 );
+        if( si->checkState() == Qt::Checked )
+        {
+            hbTitle = ( hb_title_t * )hb_list_item( titles, si->data( Qt::UserRole ).toInt() );
+            hb_job_t *job = hbTitle->job;
+            // FIXME hardcoded params here! need to fix
+            job->pixel_ratio = 1;
+            job->vcodec = HB_VCODEC_FFMPEG;
+            job->vquality = -1.0;
+            job->vbitrate = 1600;
+            job->acodec = HB_ACODEC_LAME;
+            job->audios[0] = -1;
+            job->mux = HB_MUX_MP4;
+            job->subtitle = -1;
+            job->pass = 0;
+            job->file = strdup("/tmp/foo.mp4");
+            hb_add( hbHandle, job );
+        }
+    }
+
+    fprintf(stderr, "Calling hb_start...\n");
+    hb_start( hbHandle );
+}
diff --git a/qt4/qhandbrake.h b/qt4/qhandbrake.h
new file mode 100644 (file)
index 0000000..35e4dcb
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef QHANDBRAKE_H
+#define QHANDBRAKE_H
+
+#include <QtGui>
+#include "hb.h"
+
+class QHandBrake : public QObject {
+    Q_OBJECT
+
+public:
+    QHandBrake(QObject *parent = 0);
+    ~QHandBrake();
+
+    QStandardItemModel *titleListModel();
+
+signals:
+    void scanProgress(int cur, int total);
+
+public slots:
+    void startScan(const QString sDevice);
+    void encode();
+
+private:
+    hb_handle_t *hbHandle;
+    hb_title_t *hbTitle;
+
+    QStandardItemModel *titleModel;
+};
+
+#endif // QHANDBRAKE_H
diff --git a/qt4/qhandbrakewizard.cpp b/qt4/qhandbrakewizard.cpp
new file mode 100644 (file)
index 0000000..c6de00c
--- /dev/null
@@ -0,0 +1,81 @@
+#include <QtGui>
+#include <QtDBus>
+
+#include "qhandbrakewizard.h"
+#include "qhandbrake.h"
+#include "faderwidget.h"
+#include "scanwidget.h"
+#include "encodewidget.h"
+
+
+#define HAL_SERVICE "org.freedesktop.Hal"
+#define HAL_PATH_MANAGER "/org/freedesktop/Hal/Manager"
+#define HAL_PATH_DEVICE "/org/freedesktop/Hal/Device"
+#define HAL_OBJECT_MANAGER "org.freedesktop.Hal.Manager"
+#define HAL_OBJECT_DEVICE "org.freedesktop.Hal.Device"
+
+
+Magic::Magic(QWidget *w, QHandBrakeWizard *q, QObject *p)
+    : QObject(p)
+{
+    m = w;
+    qm = q;
+}
+
+bool Magic::eventFilter(QObject *o, QEvent *e)
+{
+    if( e->type() == QEvent::Show ) {
+        qm->fadeInWidget( m );
+        return false;
+    }
+    return QObject::eventFilter(o, e);
+}
+
+void QHandBrakeWizard::fadeInWidget(QWidget *w)
+{
+    if( faderWidget ) { faderWidget->close(); }
+    faderWidget = new FaderWidget( w );
+    faderWidget->start();
+}
+
+QHandBrakeWizard::QHandBrakeWizard(QStackedWidget *parent)
+    : QStackedWidget(parent)
+{
+    qhb = new QHandBrake(this);
+
+    scanWidget = new ScanWidget;
+    encodeWidget = new EncodeWidget;
+
+    scanWidget->setObjectName("scanWidget");
+    encodeWidget->setObjectName("encodeWidget");
+
+    scanWidget->installEventFilter(new Magic(scanWidget, this, this));
+    encodeWidget->installEventFilter(new Magic(encodeWidget, this, this));
+
+    addWidget(scanWidget);
+
+    connect(scanWidget, SIGNAL(scanDVD(const QString)), qhb, SLOT(startScan(const QString)));
+    connect(scanWidget, SIGNAL(scanningDone()), SLOT(activateEncodePage()));
+    connect(qhb, SIGNAL(scanProgress(int, int)), scanWidget, SLOT(setProgress(int, int)));
+    connect(encodeWidget, SIGNAL(convert()), qhb, SLOT(encode()));
+
+    if( QDBusConnection::systemBus().isConnected() )
+    {
+        QDBusConnection::systemBus().connect( HAL_SERVICE, HAL_PATH_MANAGER, HAL_OBJECT_MANAGER, "DeviceAdded", scanWidget, SLOT( updateVolumeList( QString ) ) );
+        QDBusConnection::systemBus().connect( HAL_SERVICE, HAL_PATH_MANAGER, HAL_OBJECT_MANAGER, "DeviceRemoved", scanWidget, SLOT( updateVolumeList( QString ) ) );
+    }
+}
+
+void QHandBrakeWizard::activateScanPage()
+{
+    setCurrentWidget(scanWidget);
+}
+
+void QHandBrakeWizard::activateEncodePage()
+{
+    addWidget(encodeWidget);
+
+    encodeWidget->setModel( qhb->titleListModel() );
+
+    setCurrentWidget(encodeWidget);
+}
diff --git a/qt4/qhandbrakewizard.h b/qt4/qhandbrakewizard.h
new file mode 100644 (file)
index 0000000..ea4de62
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef QHANDBRAKEWIZARD_H
+#define QHANDBRAKEWIZARD_H
+
+#include <QtGui>
+
+typedef class QHandBrake;
+typedef class FaderWidget;
+typedef class ScanWidget;
+typedef class EncodeWidget;
+
+class QHandBrakeWizard : public QStackedWidget
+{
+    Q_OBJECT
+public:
+    QHandBrakeWizard(QStackedWidget *parent = 0);
+
+public slots:
+    void activateScanPage();
+    void activateEncodePage();
+
+    void fadeInWidget(QWidget *);
+
+private:
+    QPointer<QHandBrake> qhb;
+    QPointer<FaderWidget> faderWidget;
+    QPointer<ScanWidget> scanWidget;
+    QPointer<EncodeWidget> encodeWidget;
+};
+
+class Magic : public QObject
+{
+    Q_OBJECT
+public:
+    Magic(QWidget *w, QHandBrakeWizard *q, QObject *p = 0);
+
+protected:
+    bool eventFilter(QObject *o, QEvent *e);
+    QWidget *m;
+
+    friend class QHandBrakeWizard;
+    QHandBrakeWizard *qm;
+};
+
+#endif // QHANDBRAKEWIZARD_H
diff --git a/qt4/qtHB.pro b/qt4/qtHB.pro
new file mode 100644 (file)
index 0000000..1a33678
--- /dev/null
@@ -0,0 +1,23 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Sat Oct 14 04:46:08 2006
+######################################################################
+
+TEMPLATE = app
+TARGET = qtHB
+CONFIG += qdbus release
+DEPENDPATH += .
+INCLUDEPATH += . ../libhb ../contrib/include
+LIBS += -L ../contrib/lib ../libhb/libhb.a ../contrib/lib/libx264.a ../contrib/lib/liba52.a \
+               ../contrib/lib/libavformat.a ../contrib/lib/libavcodec.a ../contrib/lib/libavutil.a \
+               ../contrib/lib/libdca.a ../contrib/lib/libmpeg2.a ../contrib/lib/libmpeg2convert.a \
+               ../contrib/lib/libswscale.a ../contrib/lib/libdvdread.a ../contrib/lib/libfaac.a \
+               ../contrib/lib/libmp3lame.a ../contrib/lib/libmp4v2.a ../contrib/lib/libmkv.a \
+               ../contrib/lib/libvorbis.a ../contrib/lib/libvorbisenc.a ../contrib/lib/libogg.a \
+               ../contrib/lib/libsamplerate.a ../contrib/lib/libxvidcore.a ../contrib/lib/libtheora.a \
+               -lz -lpthread -ldl
+
+
+# Input
+HEADERS += qhandbrake.h scanwidget.h encodewidget.h qhandbrakewizard.h faderwidget.h
+FORMS   += scanwidget.ui encodewidget.ui
+SOURCES += main.cpp qhandbrake.cpp scanwidget.cpp encodewidget.cpp qhandbrakewizard.cpp faderwidget.cpp
diff --git a/qt4/scanwidget.cpp b/qt4/scanwidget.cpp
new file mode 100644 (file)
index 0000000..21cb06c
--- /dev/null
@@ -0,0 +1,151 @@
+#include <QtGui>
+#include <QtDBus>
+
+#include "scanwidget.h"
+
+#define HAL_SERVICE "org.freedesktop.Hal"
+#define HAL_PATH_MANAGER "/org/freedesktop/Hal/Manager"
+#define HAL_PATH_DEVICE "/org/freedesktop/Hal/Device"
+#define HAL_OBJECT_MANAGER "org.freedesktop.Hal.Manager"
+#define HAL_OBJECT_DEVICE "org.freedesktop.Hal.Device"
+
+ClickedField::ClickedField(QRadioButton *b, QObject *parent)
+    : QObject(parent)
+{
+    rb = b;
+}
+
+bool ClickedField::eventFilter(QObject *o, QEvent *e)
+{
+    if (e->type() == QEvent::FocusIn) {
+        rb->setChecked( true );
+        return false;
+    }
+    return QObject::eventFilter(o, e);
+}
+
+ScanWidget::ScanWidget( QWidget *parent )
+    : QWidget( parent )
+{
+    setupUi(this);
+
+    deviceRadioButton->setChecked( true );
+    devices = new QMap<QString, QString>;
+
+    deviceComboBox->installEventFilter( new ClickedField(deviceRadioButton, this) );
+    folderLineEdit->installEventFilter( new ClickedField(folderRadioButton, this) );
+    folderPushButton->installEventFilter( new ClickedField(folderRadioButton, this) );
+
+    progress->setMaximum( 1 );
+
+    updateVolumeList("bar");
+
+    connect( scanButton, SIGNAL( clicked() ), this, SLOT( goScan() ) );
+    connect( folderPushButton, SIGNAL( clicked() ), this, SLOT( setFolder() ) );
+}
+
+QMap<QString, QString> *ScanWidget::volumeList()
+{
+    if( devices->count() > 0 )
+    {
+        return devices;
+    }
+
+    if( !QDBusConnection::systemBus().isConnected() ) {
+        qDebug("Cannot connect to D-BUS session bus.");
+        return devices;
+    }
+
+    QDBusInterface hal( HAL_SERVICE, HAL_PATH_MANAGER , HAL_OBJECT_MANAGER, QDBusConnection::systemBus() );
+    if (!hal.isValid() ) {
+        qDebug( "Couldn't find HAL. Is HAL running?" );
+        return devices;
+    }
+
+    QDBusReply<QStringList> reply = hal.call( "FindDeviceStringMatch", "volume.disc.type", "dvd_rom" );
+    if( !reply.isValid() ) {
+        qDebug( "Couldn't call FindDeviceStringMatch." );
+        return devices;
+    }
+
+    if( reply.value().count() > 0 ) {
+        foreach ( QString udi, reply.value() ) {
+            QDBusInterface halDev( HAL_SERVICE, udi, HAL_OBJECT_DEVICE, QDBusConnection::systemBus() );
+            QDBusReply<bool> isVideo = halDev.call( "GetProperty", "volume.disc.is_videodvd" );
+            if( !isVideo.value() ) {
+                qDebug("This is a DVD, but not video");
+                continue;
+            }
+            QDBusReply<QString> d = halDev.call( "GetProperty", "block.device" );
+            QDBusReply<QString> v = halDev.call( "GetProperty", "volume.label" );
+            QRegExp rx("_S(\\d+)_D(\\d+)");
+            QString label = v.value();
+            rx.indexIn(label);
+            if (rx.numCaptures() > 0) {
+                label = label.replace(rx, QString(" Season %1 Disc %2").arg(rx.cap(1)).arg(rx.cap(2)));
+            } else {
+                label = label.replace("_", " ");
+            }
+            devices->insert( d.value(), label );
+        }
+    }
+    else
+    {
+        devices->insert( "none detected", "Insert a DVD..." );
+    }
+
+    return devices;
+}
+
+void ScanWidget::updateVolumeList(QString)
+{
+    if( devices->count() > 0 )
+    {
+        devices->clear();
+        deviceComboBox->clear();
+    }
+    QStringList d;
+    QMapIterator<QString, QString> i( *volumeList() );
+    while (i.hasNext()) {
+        i.next();
+        d << QString("%1 (%2)").arg(i.value()).arg(i.key());
+    }
+    deviceComboBox->addItems(d);
+}
+
+void ScanWidget::goScan()
+{
+    scanButton->setDisabled( true );
+
+    if( deviceRadioButton->isChecked() )
+    {
+        QRegExp rx(".*\\((.*)\\)");
+        rx.indexIn(deviceComboBox->currentText());
+        emit scanDVD( rx.cap(1) );
+    }
+    else if( folderRadioButton->isChecked() )
+    {
+        emit scanDVD( folderLineEdit->text() );
+    }
+}
+
+void ScanWidget::setProgress( int value, int maximum )
+{
+    if( progress->maximum() == 1 )
+    {
+        progress->setMaximum( maximum );
+    }
+
+    progress->setValue( value );
+
+    if( value == maximum )
+    {
+        emit scanningDone();
+    }
+}
+
+void ScanWidget::setFolder()
+{
+    QString folderPath = QFileDialog::getExistingDirectory();
+    folderLineEdit->setText( folderPath );
+}
diff --git a/qt4/scanwidget.h b/qt4/scanwidget.h
new file mode 100644 (file)
index 0000000..717c3f2
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef CHOOSEDVD_H
+#define CHOOSEDVD_H
+
+#include <QtGui>
+
+#include "ui_scanwidget.h"
+
+class ClickedField : public QObject
+{
+    Q_OBJECT
+public:
+    ClickedField(QRadioButton *b, QObject *parent = 0);
+protected:
+    bool eventFilter(QObject *, QEvent *);
+    QRadioButton *rb;
+};
+
+class ScanWidget : public QWidget, private Ui::ScanWidget
+{
+    Q_OBJECT
+public:
+    ScanWidget(QWidget *parent = 0);
+    QMap<QString, QString> *volumeList();
+
+signals:
+    void scanDVD(const QString path);
+    void scanningDone();
+
+public slots:
+    void goScan();
+    void updateVolumeList(QString);
+    void setProgress(int value, int maximum);
+    void setFolder();
+
+private:
+    QMap<QString, QString> *devices;
+};
+
+#endif // CHOOSEDRIVE_H
diff --git a/qt4/scanwidget.ui b/qt4/scanwidget.ui
new file mode 100644 (file)
index 0000000..0d3e72c
--- /dev/null
@@ -0,0 +1,168 @@
+<ui version="4.0" >
+ <class>ScanWidget</class>
+ <widget class="QWidget" name="ScanWidget" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>320</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy>
+    <hsizetype>4</hsizetype>
+    <vsizetype>4</vsizetype>
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize" >
+   <size>
+    <width>320</width>
+    <height>300</height>
+   </size>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QLabel" name="mainLabel" >
+     <property name="text" >
+      <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:14pt; font-weight:600;">Select DVD source&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="Line" name="line" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QGridLayout" >
+     <property name="margin" >
+      <number>6</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item row="0" column="0" >
+      <widget class="QRadioButton" name="deviceRadioButton" >
+       <property name="text" >
+        <string>DVD device</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1" >
+      <widget class="QLineEdit" name="folderLineEdit" />
+     </item>
+     <item row="1" column="0" >
+      <widget class="QRadioButton" name="folderRadioButton" >
+       <property name="text" >
+        <string>DVD folder / image</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="2" >
+      <widget class="QPushButton" name="folderPushButton" >
+       <property name="sizePolicy" >
+        <sizepolicy>
+         <hsizetype>4</hsizetype>
+         <vsizetype>4</vsizetype>
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="font" >
+        <font>
+         <pointsize>8</pointsize>
+        </font>
+       </property>
+       <property name="text" >
+        <string>Browse...</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1" colspan="2" >
+      <widget class="QComboBox" name="deviceComboBox" />
+     </item>
+    </layout>
+   </item>
+   <item>
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <widget class="QProgressBar" name="progress" >
+     <property name="value" >
+      <number>24</number>
+     </property>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="scanButton" >
+       <property name="sizePolicy" >
+        <sizepolicy>
+         <hsizetype>4</hsizetype>
+         <vsizetype>4</vsizetype>
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text" >
+        <string>Scan</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/scripts/manicure.rb b/scripts/manicure.rb
new file mode 100755 (executable)
index 0000000..ce5c63f
--- /dev/null
@@ -0,0 +1,1631 @@
+#! /usr/bin/ruby
+# manincure.rb version 0.66
+
+# This file is part of the HandBrake source code.
+# Homepage: <http://handbrake.m0k.org/>.
+# It may be used under the terms of the GNU General Public License.
+
+# This script parses HandBrake's Mac presets into hashes, which can
+# be displayed in various formats for use by the CLI and its wrappers.
+
+# For handling command line arguments to the script
+require 'optparse'
+require 'ostruct'
+require 'rubygems'
+require 'plist'
+
+# CLI options: (code based on http://www.ruby-doc.org/stdlib/libdoc/optparse/rdoc/index.html )
+def readOptions
+  
+  # --[no-]cli-raw, -r gives raw CLI for wiki
+  # --cli-parse, -p gives CLI strings for wrappers
+  # --api, -a gives preset code for test.c
+  # --api-list, -A gives CLI strings for --preset-list display
+  # --[no-]header, -h turns off banner display
+  options = OpenStruct.new
+  options.cliraw = false
+  options.cliparse = false
+  options.api = false
+  options.apilist = false
+  options.header = false
+  
+  opts = OptionParser.new do |opts|
+    opts.banner = "Usage: manicure.rb [options]"
+    
+    opts.separator ""
+    opts.separator "Options:"
+    
+    opts.on("-r", "--cli-raw", "Gives example strings for the HB wiki") do |raw|
+      options.cliraw = raw
+      option_set = true
+    end
+    
+    opts.on("-p", "--cli-parse", "Gives presets as wrapper-parseable CLI", " option strings") do |par|
+      options.cliparse = par
+    end
+    
+    opts.on("-a", "--api", "Gives preset code for test.c") do |api|
+      options.api = api
+    end
+    
+    opts.on("-A", "--api-list", "Gives code for test.c's --preset-list", " options") do |alist|
+      options.apilist = alist
+    end
+    
+    opts.on("-H", "--Header", "Display a banner before each preset") do |head|
+      options.header = head
+    end
+    
+    opts.on_tail("-h", "--help", "Show this message") do
+        puts opts
+        exit
+    end
+  end.parse!
+  
+  return options
+  
+end
+
+# These arrays contain all the other presets and hashes that are going to be used.
+# Yeah, they're global variables. In an object-oriented scripting language.
+# Real smooth, huh?
+
+# This class parses the user's presets .plist into an array of hashes
+class Presets
+  
+  attr_reader :hashMasterList
+  
+  # Running initialization runs everything.
+  # Calling it will also call the parser
+  # and display output.
+  def initialize
+    
+   # Grab the user's home path
+   homeLocation = `echo $HOME`.chomp
+   
+   # Use that to build a path to the presets .plist
+   inputFile = homeLocation+'/Library/Application Support/HandBrake/UserPresets.plist'
+   
+    # Parse the presets into hashes
+    @hashMasterList = Plist::parse_xml( inputFile )
+    
+  end
+
+end
+
+# This class displays the presets to stdout in various formats.
+class Display
+  
+  def initialize(hashMasterList, options)
+  
+    @hashMasterList = hashMasterList
+    @options = options
+
+    # A width of 40 gives nice, compact output.
+    @columnWidth=40
+    
+    # Print to screen.
+    displayCommandStrings
+    
+  end
+  
+  def displayCommandStrings # prints everything to screen
+    
+    # Iterate through the hashes.    
+    @hashMasterList.each do |hash|
+    
+      # Check to see whether we've got a preset or afolder
+      if !hash["Folder"]
+        # It's a top-level preset
+       displayIndividualPreset(hash, 0) 
+      else
+        # It's a folder, yay
+        displayFolder( hash, 0 )
+        hash["ChildrenArray"].each do |subhash|
+          # Drill down to see its contents
+          if !subhash["Folder"]
+            # It's a preset
+            displayIndividualPreset(subhash, 1)
+          else
+            # It's a folder
+            displayFolder( subhash, 1 )
+            subhash["ChildrenArray"].each do |subsubhash|
+              # At this point we're far enough down we won't try to drill further
+              if !subsubhash["Folder"]
+                displayIndividualPreset(subsubhash, 2)
+              end
+            end
+            displayFolderCloser( 1 )
+          end
+        end
+        displayFolderCloser( 0 )
+      end
+    end
+  end
+  
+  def displayIndividualPreset(hash, depth)
+    if @options.header == true
+      # First throw up a header to make each preset distinct
+      displayHeader(hash)
+    end
+    
+    if @options.cliraw == true
+      # Show the preset's full CLI string equivalent
+      generateCLIString(hash, depth)
+    end
+    
+    if @options.cliparse == true
+      generateCLIParse(hash, depth)
+    end
+    
+    if @options.api == true
+      # Show the preset as code for test/test.c, HandBrakeCLI
+      generateAPIcalls(hash)
+    end
+    
+    if @options.apilist == true
+      # Show the preset as print statements, for CLI wrappers to parse.
+      generateAPIList(hash, depth) 
+    end
+  end
+  
+  def displayHeader(hash) # A distinct banner to separate each preset
+    
+    # Print a line of asterisks
+    puts "*" * @columnWidth
+    
+    # Print the name, centered
+    puts '* '+hash["PresetName"].to_s.center(@columnWidth-4)+' *'
+    
+    # Print a line of dashes
+    puts '~' * @columnWidth
+    
+    # Print the description, centered and word-wrapped
+    puts hash["PresetDescription"].to_s.center(@columnWidth).gsub(/\n/," ").scan(/\S.{0,#{@columnWidth-2}}\S(?=\s|$)|\S+/)
+    
+    # Print another line of dashes
+    puts '~' * @columnWidth
+    
+    # Print the formats the preset uses
+    puts "#{hash["FileCodecs"]}".center(@columnWidth)
+    
+    # Note if the preset isn't built-in
+    if hash["Type"] == 1
+      puts "Custom Preset".center(@columnWidth)
+    end
+
+    # Note if the preset is marked as default.
+    if hash["Default"] == 1
+      puts "This is your default preset.".center(@columnWidth)
+    end
+    
+    # End with a line of tildes.  
+    puts "~" * @columnWidth
+    
+  end
+  
+  def displayFolder( hash, depth )
+
+    if @options.cliraw == true
+      # Show the folder's full in a format that matches the CLI equivalents
+      generateCLIFolderString(hash, depth)
+    end
+    
+    if @options.cliparse == true
+      # Show the folder in a format that matches the CLI wrapper equivalents
+      generateCLIFolderParse(hash, depth)
+    end
+    
+    if @options.apilist == true
+      # Show the folder as print statements, for CLI wrappers to parse.
+      generateAPIFolderList(hash, depth) 
+    end
+    
+  end
+  
+  def displayFolderCloser( depth )
+    if @options.cliraw == true
+      # Show the folder's full in a format that matches the CLI equivalents
+      generateCLIFolderCloserString( depth )
+    end
+    
+    if @options.cliparse == true
+      # Show the folder in a format that matches the CLI wrapper equivalents
+      generateCLIFolderCloserParse( depth )
+    end
+    
+    if @options.apilist == true
+      # Show the folder as print statements, for CLI wrappers to parse.
+      generateAPIFolderCloserList( depth ) 
+    end
+  end
+  
+  def generateCLIFolderString( hash, depth ) # Shows the folder for the CLI equivalents
+    commandString = ""
+    depth.times do
+      commandString << "   "
+    end
+    (depth+1).times do
+      commandString << "<"
+    end
+    commandString << " " << hash["PresetName"] << "\n\n"
+    puts commandString
+  end
+  
+  def generateCLIFolderCloserString( depth )
+    commandString = ""
+    depth.times do
+      commandString << "   "
+    end
+    (depth+1).times do
+      commandString << ">"
+    end
+    commandString << "\n\n"
+    puts commandString
+  end
+  
+  def generateCLIString(hash, depth) # Makes a full CLI equivalent of a preset
+    commandString = ""
+    depth.times do
+      commandString << "   "
+    end
+    commandString << './HandBrakeCLI -i DVD -o ~/Movies/movie.'
+    
+    #Filename suffix
+    case hash["FileFormat"]
+    when /MP4/
+      commandString << "mp4 "
+    when /AVI/
+      commandString << "avi "
+    when /OGM/
+      commandString << "ogm "
+    when /MKV/
+      commandString << "mkv "
+    end
+    
+    #Video encoder
+    if hash["VideoEncoder"] != "MPEG-4 (FFmpeg)"
+      commandString << " -e "
+      case hash["VideoEncoder"]
+      when /x264/
+        commandString << "x264"
+      when /XviD/
+        commandString << "xvid"
+      end
+    end
+
+    #VideoRateControl
+    case hash["VideoQualityType"]
+    when 0
+      commandString << " -S " << hash["VideoTargetSize"]
+    when 1
+      commandString << " -b " << hash["VideoAvgBitrate"]
+    when 2
+      commandString << " -q " << hash["VideoQualitySlider"].to_s
+    end
+
+    #FPS
+    if hash["VideoFramerate"] != "Same as source"
+      if hash["VideoFramerate"] == "23.976 (NTSC Film)"
+        commandString << " -r " << "23.976"
+      elsif hash["VideoFramerate"] == "29.97 (NTSC Video)"
+        commandString << " -r " << "29.97"
+      elsif hash["VideoFramerate"] == "25 (PAL Film/Video)"
+        commandString << " -r " << "25"
+      else
+        commandString << " -r " << hash["VideoFramerate"]
+      end
+    end
+    
+    #Audio tracks
+    commandString << " -a "
+    commandString << hash["Audio1Track"].to_s
+    if hash["Audio2Track"]
+      commandString << "," << hash["Audio2Track"].to_s
+    end
+    if hash["Audio3Track"]
+      commandString << "," << hash["Audio3Track"].to_s
+    end
+    if hash["Audio4Track"]
+      commandString << "," << hash["Audio4Track"].to_s
+    end
+    
+    #Audio encoders
+    commandString << " -E "
+    case hash["Audio1Encoder"]
+    when /AC3 /
+      commandString << "ac3"
+    when /AAC/
+      commandString << "faac"
+    when /Vorbis/
+      commandString << "vorbis"
+    when /MP3/
+      commandString << "lame"
+    end
+    case hash["Audio2Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+    case hash["Audio3Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+    case hash["Audio4Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+    
+    #Audio bit rate
+    commandString << " -B "
+    commandString << hash["Audio1Bitrate"]
+    if hash["Audio2Bitrate"]
+      if hash["Audio2Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio2Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+    if hash["Audio3Bitrate"]
+      if hash["Audio3Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio3Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+    if hash["Audio4Bitrate"]
+      if hash["Audio4Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio4Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+
+    #Audio sample rate
+    commandString << " -R "
+    commandString << hash["Audio1Samplerate"]
+    if hash["Audio2Samplerate"]
+      commandString << "," << hash["Audio2Samplerate"]
+    end
+    if hash["Audio3Samplerate"]
+      commandString << "," << hash["Audio3Samplerate"]
+    end
+    if hash["Audio4Samplerate"]
+      commandString << "," << hash["Audio4Samplerate"]
+    end
+    
+    #Audio Mixdown
+    commandString << " -6 "
+    case hash["Audio1Mixdown"]
+    when /Mono/
+      commandString << "mono"
+    when /Stereo/
+      commandString << "stereo"
+    when /Dolby Surround/
+      commandString << "dpl1"
+    when /Dolby Pro Logic II/
+      commandString << "dpl2"
+    when /discrete/
+      commandString << "6ch"
+    when /Passthru/
+      commandString << "auto"
+    end
+    
+    if hash["Audio2Mixdown"]
+      case hash["Audio2Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+    
+    if hash["Audio3Mixdown"]
+      case hash["Audio3Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+    
+    if hash["Audio4Mixdown"]
+      case hash["Audio4Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+    
+    #Container
+    commandString << " -f "
+    case hash["FileFormat"]
+    when /MP4/
+      commandString << "mp4"
+    when /AVI/
+      commandString << "avi"
+    when /OGM/
+      commandString << "ogm"
+    when /MKV/
+      commandString << "mkv"
+    end
+    
+    #iPod MP4 atom
+    if hash["Mp4iPodCompatible"].to_i == 1
+      commandString << " -I"
+    end
+    
+    # 64-bit files
+    if hash["Mp4LargeFile"] == 1
+      commandString << " -4"
+    end
+    
+    #Cropping
+    if hash["PictureAutoCrop"] == 0
+      commandString << " --crop "
+      commandString << hash["PictureTopCrop"].to_s
+      commandString << ":"
+      commandString << hash["PictureBottomCrop"].to_s
+      commandString << ":"
+      commandString << hash["PictureLeftCrop"].to_s
+      commandString << ":"
+      commandString << hash["PictureRightCrop"].to_s
+    end
+    
+    #Dimensions
+    if hash["PictureWidth"] != 0
+      commandString << " -X "
+      commandString << hash["PictureWidth"].to_s
+    end
+    if hash["PictureHeight"] != 0
+      commandString << " -Y "
+      commandString << hash["PictureHeight"].to_s
+    end
+    
+    #Subtitles
+    if hash["Subtitles"] != "None"
+      if hash["Subtitles"] == "Autoselect"
+        commandString << " --subtitle-scan"
+      else
+        commandString << " -s "
+        commandString << hash["Subtitles"]
+      end
+    end
+
+    #Video Filters
+    if hash["UsesPictureFilters"] == 1
+      
+      case hash["PictureDeinterlace"]
+      when 1
+        commandString << " --deinterlace=\"fast\""
+      when 2
+        commandString << " --deinterlace=\slow\""
+      when 3
+        commandString << " --deinterlace=\"slower\""
+      when 4
+        commandString << " --deinterlace=\"slowest\""
+      end
+      
+      case hash["PictureDenoise"]
+      when 1
+        commandString << " --denoise=\"weak\""
+      when 2
+        commandString << " --denoise=\"medium\""
+      when 3
+        commandString << " --denoise=\"strong\""
+      end
+      
+      if hash["PictureDetelecine"] == 1 then commandString << " --detelecine" end
+      if hash["PictureDeblock"] == 1 then commandString << " --deblock" end
+      if hash["VFR"].to_i == 1 then commandString << " --vfr" end
+      if hash["PictureDecomb"] == 1 then commandString << " --decomb" end
+      
+    end
+    
+    #Anamorphic
+    if hash["PicturePAR"] == 1
+      commandString << " -p"
+    elsif hash["PicturePAR"] == 2
+      commandString << " -P"
+    end
+
+    #Booleans
+    if hash["ChapterMarkers"] == 1 then commandString << " -m" end
+    if hash["VideoGrayScale"] == 1 then commandString << " -g" end
+    if hash["VideoTwoPass"] == 1 then commandString << " -2" end
+    if hash["VideoTurboTwoPass"] == 1 then commandString << " -T" end
+
+    #x264 Options
+    if hash["x264Option"] != ""
+      commandString << " -x "
+      commandString << hash["x264Option"]
+    end
+    
+    # That's it, print to screen now
+    puts commandString
+    
+    #puts "*" * @columnWidth
+
+    puts  "\n"
+  end
+  
+  def generateCLIFolderParse( hash, depth ) # Shows the folder for wrappers to parse
+    commandString = ""
+    depth.times do
+      commandString << "   "
+    end
+    (depth+1).times do
+      commandString << "<"
+    end
+    commandString << " " << hash["PresetName"] << "\n\n"
+    puts commandString
+  end
+  
+  def generateCLIFolderCloserParse( depth )
+    commandString = ""
+    depth.times do
+      commandString << "   "
+    end
+    (depth+1).times do
+      commandString << ">"
+    end
+    commandString << "\n\n"
+    puts commandString
+  end
+  
+  def generateCLIParse(hash, depth) # Makes a CLI equivalent of all user presets, for wrappers to parse
+    commandString = ""
+    depth.times do
+      commandString << "   "
+    end
+    commandString << '+ ' << hash["PresetName"] << ":"
+        
+    #Video encoder
+    if hash["VideoEncoder"] != "MPEG-4 (FFmpeg)"
+      commandString << " -e "
+      case hash["VideoEncoder"]
+      when /x264/
+        commandString << "x264"
+      when /XviD/
+        commandString << "xvid"
+      end
+    end
+
+    #VideoRateControl
+    case hash["VideoQualityType"]
+    when 0
+      commandString << " -S " << hash["VideoTargetSize"]
+    when 1
+      commandString << " -b " << hash["VideoAvgBitrate"]
+    when 2
+      commandString << " -q " << hash["VideoQualitySlider"].to_s
+    end
+
+    #FPS
+    if hash["VideoFramerate"] != "Same as source"
+      if hash["VideoFramerate"] == "23.976 (NTSC Film)"
+        commandString << " -r " << "23.976"
+      elsif hash["VideoFramerate"] == "29.97 (NTSC Video)"
+        commandString << " -r " << "29.97"
+      elsif hash["VideoFramerate"] == "25 (PAL Film/Video)"
+        commandString << " -r " << "25"
+      else
+        commandString << " -r " << hash["VideoFramerate"]
+      end
+    end
+    
+    #Audio tracks
+    commandString << " -a "
+    commandString << hash["Audio1Track"].to_s
+    if hash["Audio2Track"]
+      commandString << "," << hash["Audio2Track"].to_s
+    end
+    if hash["Audio3Track"]
+      commandString << "," << hash["Audio3Track"].to_s
+    end
+    if hash["Audio4Track"]
+      commandString << "," << hash["Audio4Track"].to_s
+    end
+    
+    #Audio encoders
+    commandString << " -E "
+    case hash["Audio1Encoder"]
+    when /AC3/
+      commandString << "ac3"
+    when /AAC/
+      commandString << "faac"
+    when /Vorbis/
+      commandString << "vorbis"
+    when /MP3/
+      commandString << "lame"
+    end
+    case hash["Audio2Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+    case hash["Audio3Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+    case hash["Audio4Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+
+    #Audio bit rate
+    commandString << " -B "
+    commandString << hash["Audio1Bitrate"]
+    if hash["Audio2Bitrate"]
+      if hash["Audio2Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio2Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+    if hash["Audio3Bitrate"]
+      if hash["Audio3Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio3Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+    if hash["Audio4Bitrate"]
+      if hash["Audio4Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio4Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+
+    #Audio sample rate
+    commandString << " -R "
+    commandString << hash["Audio1Samplerate"]
+    if hash["Audio2Samplerate"]
+      commandString << "," << hash["Audio2Samplerate"]
+    end
+    if hash["Audio3Samplerate"]
+      commandString << "," << hash["Audio3Samplerate"]
+    end
+    if hash["Audio4Samplerate"]
+      commandString << "," << hash["Audio4Samplerate"]
+    end
+    
+    #Audio Mixdown
+    commandString << " -6 "
+    case hash["Audio1Mixdown"]
+    when /Mono/
+      commandString << "mono"
+    when /Stereo/
+      commandString << "stereo"
+    when /Dolby Surround/
+      commandString << "dpl1"
+    when /Dolby Pro Logic II/
+      commandString << "dpl2"
+    when /discrete/
+      commandString << "6ch"
+    when /Passthru/
+      commandString << "auto"
+    end
+    
+    if hash["Audio2Mixdown"]
+      case hash["Audio2Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+    
+    if hash["Audio3Mixdown"]
+      case hash["Audio3Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+    
+    if hash["Audio4Mixdown"]
+      case hash["Audio4Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+
+    
+    #Container
+    commandString << " -f "
+    case hash["FileFormat"]
+    when /MP4/
+      commandString << "mp4"
+    when /AVI/
+      commandString << "avi"
+    when /OGM/
+      commandString << "ogm"
+    when /MKV/
+      commandString << "mkv"
+    end
+    
+    #iPod MP4 atom
+    if hash["Mp4iPodCompatible"].to_i == 1
+      commandString << " -I"
+    end
+    
+    # 64-bit files
+    if hash["Mp4LargeFile"] == 1
+      commandString << " -4"
+    end
+    
+    #Cropping
+    if hash["PictureAutoCrop"] == 0
+      commandString << " --crop "
+      commandString << hash["PictureTopCrop"].to_s
+      commandString << ":"
+      commandString << hash["PictureBottomCrop"].to_s
+      commandString << ":"
+      commandString << hash["PictureLeftCrop"].to_s
+      commandString << ":"
+      commandString << hash["PictureRightCrop"].to_s
+    end
+    
+    #Dimensions
+    if hash["PictureWidth"] != 0
+      commandString << " -X "
+      commandString << hash["PictureWidth"].to_s
+    end
+    if hash["PictureHeight"] != 0
+      commandString << " -Y "
+      commandString << hash["PictureHeight"].to_s
+    end
+    
+    #Subtitles
+    if hash["Subtitles"] != "None"
+      if hash["Subtitles"] == "Autoselect"
+        commandString << " --subtitle-scan"
+      else
+        commandString << " -s "
+        commandString << hash["Subtitles"]
+      end
+    end
+    
+    #Video Filters
+    if hash["UsesPictureFilters"] == 1
+      
+      case hash["PictureDeinterlace"]
+      when 1
+        commandString << " --deinterlace=\"fast\""
+      when 2
+        commandString << " --deinterlace=\slow\""
+      when 3
+        commandString << " --deinterlace=\"slower\""
+      when 4
+        commandString << " --deinterlace=\"slowest\""
+      end
+      
+      case hash["PictureDenoise"]
+      when 1
+        commandString << " --denoise=\"weak\""
+      when 2
+        commandString << " --denoise=\"medium\""
+      when 3
+        commandString << " --denoise=\"strong\""
+      end
+      
+      if hash["PictureDetelecine"] == 1 then commandString << " --detelecine" end
+      if hash["PictureDeblock"] == 1 then commandString << " --deblock" end
+      if hash["VFR"].to_i == 1 then commandString << " --vfr" end
+      if hash["PictureDecomb"] == 1 then commandString << " --decomb" end
+    end
+
+    #Anamorphic
+    if hash["PicturePAR"] == 1
+      commandString << " -p"
+    elsif hash["PicturePAR"] == 2
+      commandString << " -P"
+    end
+    
+    #Booleans
+    if hash["ChapterMarkers"] == 1 then commandString << " -m" end
+    if hash["VideoGrayScale"] == 1 then commandString << " -g" end
+    if hash["VideoTwoPass"] == 1 then commandString << " -2" end
+    if hash["VideoTurboTwoPass"] == 1 then commandString << " -T" end
+
+    #x264 Options
+    if hash["x264Option"] != ""
+      commandString << " -x "
+      commandString << hash["x264Option"]
+    end
+    
+    # That's it, print to screen now
+    puts commandString
+    
+    #puts "*" * @columnWidth
+
+    puts  "\n"
+  end
+
+  def generateAPIcalls(hash) # Makes a C version of the preset ready for coding into the CLI
+    
+    commandString = "if (!strcmp(preset_name, \"" << hash["PresetName"] << "\"))\n{\n    "
+    
+    #Filename suffix
+    case hash["FileFormat"]
+    when /MP4/
+      commandString << "mux = " << "HB_MUX_MP4;\n    "
+    when /AVI/
+      commandString << "mux = " << "HB_MUX_AVI;\n    "
+    when /OGM/
+      commandString << "mux = " << "HB_MUX_OGM;\n    "
+    when /MKV/
+      commandString << "mux = " << "HB_MUX_MKV;\n    "
+    end
+    
+    #iPod MP4 atom
+    if hash["Mp4iPodCompatible"].to_i == 1
+      commandString << "job->ipod_atom = 1;\n   "
+    end
+    
+    # 64-bit files
+    if hash["Mp4LargeFile"] == 1
+      commandString << "job->largeFileSize = 1;\n    "
+    end
+    
+    #Video encoder
+    if hash["VideoEncoder"] != "MPEG-4 (FFmpeg)"
+      commandString << "vcodec = "
+      case hash["VideoEncoder"]
+      when /x264/
+        commandString << "HB_VCODEC_X264;\n    "
+      when /XviD/
+        commandString << "HB_VCODEC_XVID;\n    "        
+      end
+    end
+
+    #VideoRateControl
+    case hash["VideoQualityType"]
+    when 0
+      commandString << "size = " << hash["VideoTargetSize"] << ";\n    "
+    when 1
+      commandString << "job->vbitrate = " << hash["VideoAvgBitrate"] << ";\n    "
+    when 2
+      commandString << "job->vquality = " << hash["VideoQualitySlider"].to_s << ";\n    "
+      commandString << "job->crf = 1;\n    "
+    end
+
+    #FPS
+    if hash["VideoFramerate"] != "Same as source"
+      if hash["VideoFramerate"] == "23.976 (NTSC Film)"
+        commandString << "job->vrate_base = " << "1126125;\n    "
+      elsif hash["VideoFramerate"] == "29.97 (NTSC Video)"
+        commandString << "job->vrate_base = " << "900900;\n    "
+      elsif hash["VideoFramerate"] == "25 (PAL Film/Video)"
+        commandString << "job->vrate_base = " << "1080000\n    "
+      # Gotta add the rest of the framerates for completion's sake.
+      end
+      commandString << "job->cfr = 1;\n    "
+    end
+    
+    #Audio tracks
+    commandString << "if( !atracks )\n    "
+    commandString << "{\n    "
+    commandString << "    atracks = strdup(\""
+    commandString << hash["Audio1Track"].to_s
+    if hash["Audio2Track"]
+      commandString << "," << hash["Audio2Track"].to_s
+    end
+    if hash["Audio3Track"]
+      commandString << "," << hash["Audio3Track"].to_s
+    end
+    if hash["Audio4Track"]
+      commandString << "," << hash["Audio4Track"].to_s
+    end
+    commandString << "\");\n    "
+    commandString << "}\n    "
+    
+    # Audio bitrate
+    commandString << "if( !abitrates )\n    "
+    commandString << "{\n    "
+    commandString << "    abitrates = strdup(\""
+    if hash["Audio1Encoder"] != "AC3 Passthru"
+      commandString << hash["Audio1Bitrate"]
+    else
+      commandString << "auto"
+    end
+    if hash["Audio2Bitrate"]
+      if hash["Audio2Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio2Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+    if hash["Audio3Bitrate"]
+      if hash["Audio3Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio3Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+    if hash["Audio4Bitrate"]
+      if hash["Audio4Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio4Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+    commandString << "\");\n    "
+    commandString << "}\n    "
+        
+    #Audio samplerate
+    commandString << "if( !arates )\n    "
+    commandString << "{\n    "
+    commandString << "    arates = strdup(\""
+    commandString << hash["Audio1Samplerate"]
+    if hash["Audio2Samplerate"]
+      commandString << "," << hash["Audio2Samplerate"]
+    end
+    if hash["Audio3Samplerate"]
+      commandString << "," << hash["Audio3Samplerate"]
+    end
+    if hash["Audio4Samplerate"]
+      commandString << "," << hash["Audio4Samplerate"]
+    end
+    commandString << "\");\n    "
+    commandString << "}\n    "
+      
+    #Audio encoder
+    commandString << "if( !acodecs )\n    "
+    commandString << "{\n    "
+    commandString << "    acodecs = strdup(\""
+    case hash["Audio1Encoder"]
+    when /AC3/
+      commandString << "ac3"
+    when /AAC/
+      commandString << "faac"
+    when /Vorbis/
+      commandString << "vorbis"
+    when /MP3/
+      commandString << "lame"
+    end
+    case hash["Audio2Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+    case hash["Audio3Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+    case hash["Audio4Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+    commandString << "\");\n    "
+    commandString << "}\n    "
+    
+    #Audio mixdowns
+    commandString << "if( !mixdowns )\n    "
+    commandString << "{\n    "
+    commandString << "    mixdowns = strdup(\""
+    case hash["Audio1Mixdown"]
+    when /Mono/
+      commandString << "mono"
+    when /Stereo/
+      commandString << "stereo"
+    when /Dolby Surround/
+      commandString << "dpl1"
+    when /Dolby Pro Logic II/
+      commandString << "dpl2"
+    when /discrete/
+      commandString << "6ch"
+    when /Passthru/
+      commandString << "auto"
+    end
+    if hash["Audio2Mixdown"]
+      case hash["Audio2Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+    if hash["Audio3Mixdown"]
+      case hash["Audio3Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+    if hash["Audio4Mixdown"]
+      case hash["Audio4Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+    commandString << "\");\n    "
+    commandString << "}\n    "
+    
+    #Cropping
+    if hash["PictureAutoCrop"] == 0
+      commandString << "job->crop[0] = " << hash["PictureTopCrop"].to_s << ";\n    "
+      commandString << "job->crop[1] = " << hash["PictureBottomCrop"].to_s << ";\n    "
+      commandString << "job->crop[2] = " << hash["PictureLeftCrop"].to_s << ";\n    "
+      commandString << "job->crop[4] - " << hash["PictureRightCrop"].to_s << ";\n    "
+    end
+    
+    #Dimensions
+    if hash["PictureWidth"] != 0
+      commandString << "maxWidth = "
+      commandString << hash["PictureWidth"].to_s << ";\n    "
+    end
+    if hash["PictureHeight"] != 0
+      commandString << "maxHeight = "
+      commandString << hash["PictureHeight"].to_s << ";\n    "
+    end
+    
+    #Subtitles
+    if hash["Subtitles"] != "None"
+      if hash["Subtitles"] == "Autoselect"
+        commandString << "subtitle_scan = 1;\n    "
+      else
+        commandString << "job->subtitle = "
+        commandString << ( hash["Subtitles"].to_i - 1).to_s << ";\n    "
+      end
+    end
+    
+    #x264 Options
+    if hash["x264Option"] != ""
+      commandString << "if( !x264opts )\n    "
+      commandString << "{\n    "
+      commandString << "    x264opts = strdup(\""
+      commandString << hash["x264Option"] << "\");\n    "
+      commandString << "}\n    "
+    end
+    
+    #Video Filters
+    if hash["UsesPictureFilters"] == 1
+      
+      case hash["PictureDeinterlace"]
+      when 1
+        commandString << "deinterlace = 1;\n    "
+        commandString << "deinterlace_opt = \"-1\";\n    "
+      when 2
+        commandString << "deinterlace = 1;\n    "
+        commandString << "deinterlace_opt = \"2\";\n    "
+      when 3
+        commandString << "deinterlace = 1;\n    "
+        commandString << "deinterlace_opt = \"0\";\n    "
+      when 4
+        commandString << "deinterlace = 1;\n    "
+        commandString << "deinterlace_opt = \"1:-1:1\";\n    "
+      end
+      
+      case hash["PictureDenoise"]
+      when 1
+        commandString << "denoise = 1;\n    "
+        commandString << "denoise_opt = \"2:1:2:3\";\n    "
+      when 2
+        commandString << "denoise = 1;\n    "
+        commandString << "denoise_opt = \"3:2:2:3\";\n    "
+      when 3
+        commandString << "denoise = 1;\n    "
+        commandString << "denoise_opt = \"7:7:5:5\";\n    "
+      end
+      
+      if hash["PictureDetelecine"] == 1 then commandString << "detelecine = 1;\n    " end
+      if hash["PictureDeblock"] == 1 then commandString << "deblock = 1;\n    " end
+      if hash["VFR"].to_i == 1 then commandString << "vfr = 1;\n    " end
+      if hash["PictureDecomb"] == 1 then commandString << "decomb = 1;\n    " end
+      
+    end
+    
+    #Anamorphic
+    if hash["PicturePAR"] == 1
+      commandString << "pixelratio = 1;\n    "
+    elsif hash["PicturePAR"] == 2
+      commandString << "pixelratio = 2;\n    "
+    end
+    
+    #Booleans
+    if hash["ChapterMarkers"] == 1 then commandString << "job->chapter_markers = 1;\n    " end
+    if hash["VideoGrayScale"] == 1 then commandString << "job->grayscale = 1;\n    " end
+    if hash["VideoTwoPass"] == 1 then commandString << "twoPass = 1;\n    " end
+    if hash["VideoTurboTwoPass"] == 1 then commandString << "turbo_opts_enabled = 1;\n" end
+    
+    commandString << "}"
+    
+    # That's it, print to screen now
+    puts commandString
+    #puts "*" * @columnWidth
+    puts  "\n"
+  end
+  
+  def generateAPIFolderList( hash, depth )
+    commandString = ""
+    
+    commandString << "    printf(\"\\n"
+    depth.times do
+      commandString << "   "
+    end
+    (depth+1).times do
+      commandString << "<"
+    end
+    commandString << " " << hash["PresetName"]
+    commandString << "\\n\");\n\n"    
+    puts commandString
+  end
+  
+  def generateAPIFolderCloserList( depth )
+    commandString = ""
+    
+    commandString << "    printf(\"\\n"
+    depth.times do
+      commandString << "   "
+    end
+    (depth+1).times do
+      commandString << ">"
+    end
+    commandString << "\\n\");\n\n"    
+    puts commandString
+  end
+  
+  def generateAPIList(hash, depth) # Makes a list of the CLI options a built-in CLI preset uses, for wrappers to parse
+    commandString = ""
+    commandString << "    printf(\"\\n"
+    depth.times do
+      commandString << "   "
+    end
+           
+    commandString << "+ " << hash["PresetName"] << ": "
+        
+    #Video encoder
+    if hash["VideoEncoder"] != "MPEG-4 (FFmpeg)"
+      commandString << " -e "
+      case hash["VideoEncoder"]
+      when /x264/
+        commandString << "x264 "
+      when /XviD/
+        commandString << "xvid "
+      end
+    end
+
+    #VideoRateControl
+    case hash["VideoQualityType"]
+    when 0
+      commandString << " -S " << hash["VideoTargetSize"]
+    when 1
+      commandString << " -b " << hash["VideoAvgBitrate"]
+    when 2
+      commandString << " -q " << hash["VideoQualitySlider"].to_s
+    end
+
+    #FPS
+    if hash["VideoFramerate"] != "Same as source"
+      if hash["VideoFramerate"] == "23.976 (NTSC Film)"
+        commandString << " -r " << "23.976"
+      elsif hash["VideoFramerate"] == "29.97 (NTSC Video)"
+        commandString << " -r " << "29.97"
+      elsif hash["VideoFramerate"] == "25 (PAL Film/Video)"
+        commandString << " -r " << "25"
+      else
+        commandString << " -r " << hash["VideoFramerate"]
+      end
+    end
+    
+    #Audio tracks
+    commandString << " -a "
+    commandString << hash["Audio1Track"].to_s
+    if hash["Audio2Track"]
+      commandString << "," << hash["Audio2Track"].to_s
+    end
+    if hash["Audio3Track"]
+      commandString << "," << hash["Audio3Track"].to_s
+    end
+    if hash["Audio4Track"]
+      commandString << "," << hash["Audio4Track"].to_s
+    end
+    
+    #Audio encoders
+    commandString << " -E "
+    case hash["Audio1Encoder"]
+    when /AC3/
+      commandString << "ac3"
+    when /AAC/
+      commandString << "faac"
+    when /Vorbis/
+      commandString << "vorbis"
+    when /MP3/
+      commandString << "lame"
+    end
+    case hash["Audio2Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+    case hash["Audio3Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+    case hash["Audio4Encoder"]
+    when /AC3 /
+      commandString << ",ac3"
+    when /AAC/
+      commandString << ",faac"
+    when /Vorbis/
+      commandString << ",vorbis"
+    when /MP3/
+      commandString << ",lame"
+    end
+
+    #Audio bit rate
+    commandString << " -B "
+    commandString << hash["Audio1Bitrate"]
+    if hash["Audio2Bitrate"]
+      if hash["Audio2Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio2Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+    if hash["Audio3Bitrate"]
+      if hash["Audio3Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio3Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+    if hash["Audio4Bitrate"]
+      if hash["Audio4Encoder"] != "AC3 Passthru"
+        commandString << "," << hash["Audio4Bitrate"]
+      else
+        commandString << "," << "auto"
+      end
+    end
+
+    #Audio sample rate
+    commandString << " -R "
+    commandString << hash["Audio1Samplerate"]
+    if hash["Audio2Samplerate"]
+      commandString << "," << hash["Audio2Samplerate"]
+    end
+    if hash["Audio3Samplerate"]
+      commandString << "," << hash["Audio3Samplerate"]
+    end
+    if hash["Audio4Samplerate"]
+      commandString << "," << hash["Audio4Samplerate"]
+    end
+    
+    #Audio Mixdown
+    commandString << " -6 "
+    case hash["Audio1Mixdown"]
+    when /Mono/
+      commandString << "mono"
+    when /Stereo/
+      commandString << "stereo"
+    when /Dolby Surround/
+      commandString << "dpl1"
+    when /Dolby Pro Logic II/
+      commandString << "dpl2"
+    when /discrete/
+      commandString << "6ch"
+    when /Passthru/
+      commandString << "auto"
+    end
+    
+    if hash["Audio2Mixdown"]
+      case hash["Audio2Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+    
+    if hash["Audio3Mixdown"]
+      case hash["Audio3Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+    
+    if hash["Audio4Mixdown"]
+      case hash["Audio4Mixdown"]
+      when /Mono/
+        commandString << ",mono"
+      when /Stereo/
+        commandString << ",stereo"
+      when /Dolby Surround/
+        commandString << ",dpl1"
+      when /Dolby Pro Logic II/
+        commandString << ",dpl2"
+      when /discrete/
+        commandString << ",6ch"
+      when /Passthru/
+        commandString << ",auto"
+      end
+    end
+    
+    #Container
+    commandString << " -f "
+    case hash["FileFormat"]
+    when /MP4/
+      commandString << "mp4"
+    when /AVI/
+      commandString << "avi"
+    when /OGM/
+      commandString << "ogm"
+    when /MKV/
+      commandString << "mkv"
+    end
+    
+    #iPod MP4 atom
+    if hash["Mp4iPodCompatible"].to_i == 1
+      commandString << " -I"
+    end
+    
+    # 64-bit files
+    if hash["Mp4LargeFile"] == 1
+      commandString << " -4"
+    end
+    
+    #Cropping
+    if hash["PictureAutoCrop"] == 0
+      commandString << " --crop "
+      commandString << hash["PictureTopCrop"].to_s
+      commandString << ":"
+      commandString << hash["PictureBottomCrop"].to_s
+      commandString << ":"
+      commandString << hash["PictureLeftCrop"].to_s
+      commandString << ":"
+      commandString << hash["PictureRightCrop"].to_s
+    end
+    
+    #Dimensions
+    if hash["PictureWidth"] != 0
+      commandString << " -X "
+      commandString << hash["PictureWidth"].to_s
+    end
+    if hash["PictureHeight"] != 0
+      commandString << " -Y "
+      commandString << hash["PictureHeight"].to_s
+    end
+    
+    #Subtitles
+    if hash["Subtitles"] != "None"
+      if hash["Subtitles"] == "Autoselect"
+        commandString << " --subtitle-scan"
+      else
+        commandString << " -s "
+        commandString << hash["Subtitles"]
+      end
+    end
+    
+    #Video Filters
+    if hash["UsesPictureFilters"] == 1
+      
+      case hash["PictureDeinterlace"]
+      when 1
+        commandString << " --deinterlace=\\\"fast\\\""
+      when 2
+        commandString << " --deinterlace=\\\slow\\\""
+      when 3
+        commandString << " --deinterlace=\\\"slower\\\""
+      when 4
+        commandString << " --deinterlace=\\\"slowest\\\""
+      end
+      
+      case hash["PictureDenoise"]
+      when 1
+        commandString << " --denoise=\\\"weak\\\""
+      when 2
+        commandString << " --denoise=\\\"medium\\\""
+      when 3
+        commandString << " --denoise=\\\"strong\\\""
+      end
+      
+      if hash["PictureDetelecine"] == 1 then commandString << " --detelecine" end
+      if hash["PictureDeblock"] == 1 then commandString << " --deblock" end
+      if hash["VFR"].to_i == 1 then commandString << " --vfr" end
+      if hash["PictureDecomb"] == 1 then commandString << " --decomb" end
+    end
+    
+    #Anamorphic
+    if hash["PicturePAR"] == 1
+      commandString << " -p"
+    elsif hash["PicturePAR"] == 2
+      commandString << " -P"
+    end
+    
+    #Booleans
+    if hash["ChapterMarkers"] == 1 then commandString << " -m" end
+    if hash["VideoGrayScale"] == 1 then commandString << " -g" end
+    if hash["VideoTwoPass"] == 1 then commandString << " -2" end
+    if hash["VideoTurboTwoPass"] == 1 then commandString << " -T" end
+    
+      #x264 Options
+      if hash["x264Option"] != ""
+        commandString << " -x "
+        commandString << hash["x264Option"]
+      end
+    
+    commandString << "\\n\");"
+    
+    # That's it, print to screen now
+    puts commandString
+    puts  "\n"
+  end
+  
+end
+
+# First grab the specified CLI options
+options = readOptions
+
+# Only run if one of the useful CLI flags have been passed
+if options.cliraw == true || options.cliparse == true || options.api == true || options.apilist == true
+  # This line is the ignition -- generates hashes of
+  # presets and then displays them to the screen
+  # with the options the user selects on the CLI. 
+  Display.new( Presets.new.hashMasterList, options )
+else
+  # Direct the user to the help
+  puts "\n\tUsage: manicure.rb [options]"
+  puts "\tSee help with -h or --help"
+end
\ No newline at end of file
diff --git a/scripts/tst.aspect b/scripts/tst.aspect
new file mode 100755 (executable)
index 0000000..64d58d7
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/tcsh
+#
+# generate aspect ratio & cropping regression test data
+# from a set of HandBrake input files
+#
+# usage: tst.aspect [file ...]
+#
+# if no file names are supplied a default set of inputs is used (see the
+# variable 'inputs' below). Each file is encoded multiple times using
+# different options each time. The options to use are the elements of
+# the 'options' variable below.
+#
+# One line is printed for each HB run. It has the input dimensions,
+# output dimensions, crop, PAR, filename & options for the encode.
+# Since PAR is only output for anamorphic encodes, an omitted PAR
+# is indicated by "1:1" (to distinguish it from the explicit PAR "1/1").
+
+set options=('-w 480' '-l 368' '-p' '-P')
+
+if ($#argv) then
+    set inputs=($argv:q)
+else
+    set inputs=(~/Movies/DVD/* ~/tst/*.{ts,mpg,mkv,avi,vob})
+endif
+
+foreach i ($inputs:q)
+    foreach o ($options:q)
+        (sleep 5; echo q) | ./HandBrakeCLI -v -L -i "$i" -o /dev/null -f mp4 -e x264 $o |& \
+        awk -v fnm="$i" -v opts="$o" '/ storage dimensions: / { dimen = $5 "*" $7 " -> " $9 "*" $11 " " $13 }\
+        $3=="dimensions:" { dimen = $4 "*" $6 " -> " $8 "*" $10 " " $12 }\
+        / pixel aspect ratio: / { par=$6 "/" $8 }\
+        /encx264: opening libx264/ { if(! par) par="1:1";printf "%s %s  %s %s\n", dimen, par, fnm, opts }'
+    end
+end
diff --git a/test/BUILDSHARED b/test/BUILDSHARED
new file mode 100644 (file)
index 0000000..6b33fb9
--- /dev/null
@@ -0,0 +1,36 @@
+To test the HandBrake dylib on MacOs X issue the following commands:
+===================================================================
+
+cp ../libhb/libhb.dylib .
+gcc -I../libhb -L. -lhb test.c -o test -arch i386 -arch ppc
+install_name_tool -change /usr/local/lib/libhb.dylib @executable_path/libhb.dylib test
+
+Validate that the test Binary is really using the shared library
+
+otool -L test
+
+------------------------------------------------------------------------
+
+To test the HandBrake .so on Linux issue the following commands:
+================================================================
+
+cp ../libhb/libhb.so .
+gcc -I../libhb -L. -lhb test.c -o test -lz -lpthread
+
+Validate that the test Binary is really using the shared library
+
+ldd test
+
+------------------------------------------------------------------------
+
+To test the HandBrake .dll on cygwin issue the following commands:
+==================================================================
+
+cp ../libhb/libhb.dll .
+gcc -I../libhb -L. -lhb test.c -o test -lz -lpthread
+
+The resulting binary test should depend on the cygwin dll and the hb dll.
+
+I works like that but wasn't tested yet outside of cygwin.
+
+------------------------------------------------------------------------
diff --git a/test/Makefile b/test/Makefile
new file mode 100644 (file)
index 0000000..219d594
--- /dev/null
@@ -0,0 +1,36 @@
+SYSTEM = $(shell uname -s)
+
+LIBS = a52 mkv avformat avcodec avutil dca dvdread faac mp3lame mpeg2 vorbis \
+          vorbisenc ogg samplerate x264 xvidcore mp4v2 swscale theora faad
+
+CYGLIBS = zlib bzip2
+
+all: ../HandBrakeCLI
+
+CFLAGS += -I../libhb
+CXXFLAGS += -I../libhb
+LIBS2 = ../libhb/libhb.a $(LIBS:%=../contrib/lib/lib%.a)
+
+ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT)
+       LIBS2 += $(CYGLIBS:%=../contrib/lib/libz.a) $(CYGLIBS:%=../contrib/lib/libbz2.a)
+endif
+
+LDFLAGS += $(LIBS2) -lbz2 -ldl
+
+../HandBrakeCLI: test.c parsecsv.c $(LIBS2)
+       @CMD="$(CC) $(CFLAGS) -o test.o -c test.c"; $$CMD || \
+       ( echo "Compile line for $@ was:"; echo $$CMD; false )
+       @CMD="$(CC) $(CFLAGS) -o parsecsv.o -c parsecsv.c"; $$CMD || \
+       ( echo "Compile line for $@ was:"; echo $$CMD; false )
+       @echo "Link HandBrakeCLI"
+       @CMD="g++ $(CXXFLAGS) -o ../HandBrakeCLI test.o parsecsv.o $(LDFLAGS) -lz -lpthread"; $$CMD || \
+       ( echo "Compile line for $@ was:"; echo $$CMD; false )
+        @CMD="rm -rf ../plugins ; mkdir ../plugins ; cp ../contrib/lib/libquicktime/* ../plugins"; $$CMD
+
+
+clean:
+       @echo "Clean HandBrakeCLI"
+       @$(RM) ../HandBrakeCLI 
+       @$(RM) ../HandBrakeCLI.exe
+       @$(RM) *.o
+
diff --git a/test/fakexcode.cpp b/test/fakexcode.cpp
new file mode 100644 (file)
index 0000000..d3782be
--- /dev/null
@@ -0,0 +1,3 @@
+/*
+ * Force Xcode to use g++
+ */
diff --git a/test/parsecsv.c b/test/parsecsv.c
new file mode 100644 (file)
index 0000000..cc3b6aa
--- /dev/null
@@ -0,0 +1,213 @@
+/* $Id: parsecsv.c $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include <fcntl.h>
+#include "hb.h"
+#include "parsecsv.h"
+
+/* Internal declarations */
+#define is_newline(_x)      ( (_x) == 13 || \
+                              (_x) == 11 || \
+                              (_x) == 10 )
+
+#define is_white(_x)        ( (_x) == '\t' || \
+                              (_x) == ' '  || \
+                              is_newline(_x) )
+
+#define is_sep(_x)          ( (_x) == ',' )
+
+#define is_esc(_x)          ( (_x) == '\\' )
+
+#define CSV_CHAR_ERROR      0x8000
+#define CSV_CHAR_EOF        0x4000
+#define CSV_CHAR_ROWSEP     0x2000
+#define CSV_CHAR_COLSEP     0x1000
+
+#define CSV_PARSE_NORMAL    0x0000
+#define CSV_PARSE_SEEK      0x0001
+#define CSV_PARSE_ESC       0x0002
+
+static uint16_t hb_parse_character( hb_csv_file_t * file );
+static void hb_trim_end( char *text );
+
+/* Open a CSV File */
+hb_csv_file_t *hb_open_csv_file( const char *filepath )
+{
+    hb_csv_file_t *file = NULL;
+    FILE * fileref;
+
+    if( filepath == NULL )
+    {
+        return file;
+    }
+
+    fileref = fopen( filepath, "r" );
+    if( fileref == NULL )
+    {
+        return file;
+    }
+
+    file = malloc( sizeof( hb_csv_file_t ) );
+    file->fileref       = fileref;
+    file->eof           = 0;
+    file->parse_state   = CSV_PARSE_SEEK;
+    file->curr_col      = 0;
+    file->curr_row      = 0;
+    return file;
+}
+
+void hb_close_csv_file( hb_csv_file_t *file )
+{
+    if( file == NULL )
+    {
+        return;
+    }
+
+    fclose( file->fileref );
+    free( file );
+}
+
+/* Parse CSV Cells */
+hb_csv_cell_t *hb_read_next_cell( hb_csv_file_t *file )
+{
+    hb_csv_cell_t *cell = NULL;
+    uint16_t c;
+    int index;
+
+    if( file == NULL  )
+    {
+        return cell;
+    }
+
+    if( file->eof )
+    {
+        return cell;
+    }
+
+    cell = malloc( sizeof( hb_csv_cell_t ) );
+    cell->cell_row = file->curr_row;
+    cell->cell_col = file->curr_col;
+    index = 0;
+    while( CSV_CHAR_EOF != (c = hb_parse_character( file ) ) )
+    {
+        if( c == CSV_CHAR_ROWSEP )
+        {
+            file->curr_row++;
+            file->curr_col = 0;
+            break;
+        }
+        else if( c == CSV_CHAR_COLSEP )
+        {
+            file->curr_col++;
+            break;
+        }
+        else
+        {
+            if( index < 1023 )
+            {
+                cell->cell_text[index] = (char)c;
+                index++;
+            }
+        }
+    }
+
+    if( c == CSV_CHAR_EOF )
+    {
+        file->eof = 1;
+    }
+
+    /* Terminate the cell text */
+    cell->cell_text[index] = '\0';
+    hb_trim_end( cell->cell_text );
+    return cell;
+}
+
+void hb_dispose_cell( hb_csv_cell_t *cell )
+{
+    if( cell == NULL )
+    {
+        return;
+    }
+
+    free( cell );
+}
+
+/* Raw parsing */
+static uint16_t hb_parse_character( hb_csv_file_t * file )
+{
+    int byte;
+    uint16_t c;
+    int need_char = 1;
+
+    if( file == NULL )
+    {
+        return CSV_CHAR_ERROR;
+    }
+
+    while( need_char )
+    {
+        byte = fgetc( file->fileref );
+        if( feof( file->fileref ) )
+        {
+            return CSV_CHAR_EOF;
+        }
+        if( ferror( file->fileref ) )
+        {
+            return CSV_CHAR_ERROR;
+        }
+
+        if( file->parse_state == CSV_PARSE_SEEK && is_white(byte) )
+        {
+            continue;
+        }
+        else if( file->parse_state != CSV_PARSE_ESC && is_esc(byte) )
+        {
+            file->parse_state = CSV_PARSE_ESC;
+            continue;
+        }
+        else if( file->parse_state != CSV_PARSE_ESC && is_sep(byte) )
+        {
+            file->parse_state = CSV_PARSE_SEEK;
+            need_char = 0;
+            c = CSV_CHAR_COLSEP;
+        }
+        else if( file->parse_state == CSV_PARSE_ESC )
+        {
+            file->parse_state = CSV_PARSE_NORMAL;
+            need_char = 0;
+            c = (uint16_t)byte;
+        }
+        else if( is_newline(byte) )
+        {
+            file->parse_state = CSV_PARSE_SEEK;
+            need_char = 0;
+            c = CSV_CHAR_ROWSEP;
+        }
+        else
+        {
+            file->parse_state = CSV_PARSE_NORMAL;
+            need_char = 0;
+            c = (uint16_t)byte;
+        }
+    }
+
+    return c;
+}
+
+static void hb_trim_end( char *text )
+{
+    if( text == NULL )
+    {
+        return;
+    }
+
+    int i = strlen(text) - 1;
+
+    for( i = strlen(text) - 1; i >= 0 && is_white(text[i]) ; i-- )
+    {
+        text[i] = '\0';
+    }
+}
diff --git a/test/parsecsv.h b/test/parsecsv.h
new file mode 100644 (file)
index 0000000..ef20792
--- /dev/null
@@ -0,0 +1,36 @@
+/* $Id: parsecsv.h $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+/*
+    A very simple CSV file parser.
+ */
+
+typedef struct hb_csv_file_s hb_csv_file_t;
+typedef struct hb_csv_cell_s hb_csv_cell_t;
+
+struct hb_csv_file_s
+{
+    FILE  * fileref;
+    int     eof;
+    int     parse_state;
+    int     curr_row;
+    int     curr_col;
+};
+
+struct hb_csv_cell_s
+{
+    char    cell_text[1024];
+    int     cell_row;
+    int     cell_col;
+};
+
+/* Open a CSV File */
+hb_csv_file_t *hb_open_csv_file( const char *filepath );
+void hb_close_csv_file( hb_csv_file_t *file );
+
+/* Parse CSV Cells */
+hb_csv_cell_t *hb_read_next_cell( hb_csv_file_t *file );
+void hb_dispose_cell( hb_csv_cell_t *cell );
diff --git a/test/test.c b/test/test.c
new file mode 100644 (file)
index 0000000..59cf0eb
--- /dev/null
@@ -0,0 +1,2786 @@
+/* $Id: test.c,v 1.82 2005/11/19 08:25:54 titer Exp $
+
+   This file is part of the HandBrake source code.
+   Homepage: <http://handbrake.fr/>.
+   It may be used under the terms of the GNU General Public License. */
+
+#include <signal.h>
+#include <getopt.h>
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
+
+#include "hb.h"
+#include "parsecsv.h"
+
+#ifdef __APPLE_CC__
+#import <CoreServices/CoreServices.h>
+#include <IOKit/IOKitLib.h>
+#include <IOKit/storage/IOMedia.h>
+#include <IOKit/storage/IODVDMedia.h>
+#endif
+
+/* Options */
+static int    debug       = HB_DEBUG_NONE;
+static int    update      = 0;
+static char * input       = NULL;
+static char * output      = NULL;
+static char * format      = NULL;
+static int    titleindex  = 1;
+static int    longest_title = 0;
+static int    subtitle_scan = 0;
+static int    subtitle_force = 0;
+static char * native_language = NULL;
+static int    twoPass     = 0;
+static int    deinterlace           = 0;
+static char * deinterlace_opt       = 0;
+static int    deblock               = 0;
+static char * deblock_opt           = 0;
+static int    denoise               = 0;
+static char * denoise_opt           = 0;
+static int    detelecine            = 0;
+static char * detelecine_opt        = 0;
+static int    decomb                = 0;
+static char * decomb_opt            = 0;
+static int    grayscale   = 0;
+static int    vcodec      = HB_VCODEC_FFMPEG;
+static int    h264_13     = 0;
+static int    h264_30     = 0;
+static hb_list_t * audios = NULL;
+static hb_audio_config_t * audio = NULL;
+static int    num_audio_tracks = 0;
+static char * mixdowns    = NULL;
+static char * dynamic_range_compression = NULL;
+static char * atracks     = NULL;
+static char * arates      = NULL;
+static char * abitrates   = NULL;
+static char * acodecs     = NULL;
+static char * anames      = NULL;
+static int    default_acodec = HB_ACODEC_FAAC;
+static int    default_arate = 48000;
+static int    default_abitrate = 160;
+static int    sub         = 0;
+static int    width       = 0;
+static int    height      = 0;
+static int    crop[4]     = { -1,-1,-1,-1 };
+static int    cpu         = 0;
+static int    vrate       = 0;
+static float  vquality    = -1.0;
+static int    vbitrate    = 0;
+static int    size        = 0;
+static int    mux         = 0;
+static int    pixelratio  = 0;
+static int    loosePixelratio = 0;
+static int    modulus       = 0;
+static int    par_height    = 0;
+static int    par_width     = 0;
+static int    chapter_start = 0;
+static int    chapter_end   = 0;
+static int    chapter_markers = 0;
+static char * marker_file   = NULL;
+static int       crf                   = 1;
+static char      *x264opts             = NULL;
+static char      *x264opts2    = NULL;
+static int       maxHeight             = 0;
+static int       maxWidth              = 0;
+static int    turbo_opts_enabled = 0;
+static char * turbo_opts = "ref=1:subme=1:me=dia:analyse=none:trellis=0:no-fast-pskip=0:8x8dct=0:weightb=0";
+static int    largeFileSize = 0;
+static int    preset        = 0;
+static char * preset_name   = 0;
+static int    cfr           = 0;
+static int    mp4_optimize  = 0;
+static int    ipod_atom     = 0;
+static int    color_matrix  = 0;
+
+/* Exit cleanly on Ctrl-C */
+static volatile int die = 0;
+static void SigHandler( int );
+
+/* Utils */
+static void ShowCommands();
+static void ShowHelp();
+static void ShowPresets();
+
+static int  ParseOptions( int argc, char ** argv );
+static int  CheckOptions( int argc, char ** argv );
+static int  HandleEvents( hb_handle_t * h );
+
+static int get_acodec_for_string( char *codec );
+static int is_sample_rate_valid(int rate);
+
+#ifdef __APPLE_CC__
+static char* bsd_name_for_path(char *path);
+static int device_is_dvd(char *device);
+static io_service_t get_iokit_service( char *device );
+static int is_dvd_service( io_service_t service );
+static is_whole_media_service( io_service_t service );
+#endif
+
+/* Only print the "Muxing..." message once */
+static int show_mux_warning = 1;
+
+/****************************************************************************
+ * hb_error_handler
+ *
+ * When using the CLI just display using hb_log as we always did in the past
+ * make sure that we prefix with a nice ERROR message to catch peoples eyes.
+ ****************************************************************************/
+static void hb_cli_error_handler ( const char *errmsg )
+{
+    fprintf( stderr, "ERROR: %s\n", errmsg );
+}
+
+int main( int argc, char ** argv )
+{
+    hb_handle_t * h;
+    int           build;
+    char        * version;
+
+    audios = hb_list_init();
+
+    /* Parse command line */
+    if( ParseOptions( argc, argv ) ||
+        CheckOptions( argc, argv ) )
+    {
+        return 1;
+    }
+
+    /* Register our error handler */
+    hb_register_error_handler(&hb_cli_error_handler);
+
+    /* Init libhb */
+    h = hb_init( debug, update );
+
+    /* Show version */
+    fprintf( stderr, "HandBrake %s (%d) - http://handbrake.fr/\n",
+             hb_get_version( h ), hb_get_build( h ) );
+
+    /* Check for update */
+    if( update )
+    {
+        if( ( build = hb_check_update( h, &version ) ) > -1 )
+        {
+            fprintf( stderr, "You are using an old version of "
+                     "HandBrake.\nLatest is %s (build %d).\n", version,
+                     build );
+        }
+        else
+        {
+            fprintf( stderr, "Your version of HandBrake is up to "
+                     "date.\n" );
+        }
+        hb_close( &h );
+        return 0;
+    }
+
+    /* Geeky */
+    fprintf( stderr, "%d CPU%s detected\n", hb_get_cpu_count(),
+             hb_get_cpu_count( h ) > 1 ? "s" : "" );
+    if( cpu )
+    {
+        fprintf( stderr, "Forcing %d CPU%s\n", cpu,
+                 cpu > 1 ? "s" : "" );
+        hb_set_cpu_count( h, cpu );
+    }
+
+    /* Exit ASAP on Ctrl-C */
+    signal( SIGINT, SigHandler );
+
+    /* Feed libhb with a DVD to scan */
+    fprintf( stderr, "Opening %s...\n", input );
+
+    if (longest_title) {
+        /*
+         * We need to scan for all the titles in order to find the longest
+         */
+        titleindex = 0;
+    }
+    hb_scan( h, input, titleindex );
+
+    /* Wait... */
+    while( !die )
+    {
+#if !defined(SYS_BEOS)
+        fd_set         fds;
+        struct timeval tv;
+        int            ret;
+        char           buf[257];
+
+        tv.tv_sec  = 0;
+        tv.tv_usec = 100000;
+
+        FD_ZERO( &fds );
+        FD_SET( STDIN_FILENO, &fds );
+        ret = select( STDIN_FILENO + 1, &fds, NULL, NULL, &tv );
+
+        if( ret > 0 )
+        {
+            int size = 0;
+
+            while( size < 256 &&
+                   read( STDIN_FILENO, &buf[size], 1 ) > 0 )
+            {
+                if( buf[size] == '\n' )
+                {
+                    break;
+                }
+                size++;
+            }
+
+            if( size >= 256 || buf[size] == '\n' )
+            {
+                switch( buf[0] )
+                {
+                    case 'q':
+                        fprintf( stdout, "\nEncoding Quit by user command\n" );
+                        die = 1;
+                        break;
+                    case 'p':
+                        fprintf( stdout, "\nEncoding Paused by user command, 'r' to resume\n" );
+                        hb_pause( h );
+                        break;
+                    case 'r':
+                        hb_resume( h );
+                        break;
+                    case 'h':
+                        ShowCommands();
+                        break;
+                }
+            }
+        }
+        hb_snooze( 200 );
+#else
+        hb_snooze( 200 );
+#endif
+
+        HandleEvents( h );
+    }
+
+    /* Clean up */
+    hb_close( &h );
+    if( input )  free( input );
+    if( output ) free( output );
+    if( format ) free( format );
+    if( audios )
+    {
+        while( ( audio = hb_list_item( audios, 0 ) ) )
+        {
+            hb_list_rem( audios, audio );
+            if( audio->out.name )
+            {
+                free( audio->out.name );
+            }
+            free( audio );
+        }
+        hb_list_close( &audios );
+    }
+    if( mixdowns ) free( mixdowns );
+    if( dynamic_range_compression ) free( dynamic_range_compression );
+    if( atracks ) free( atracks );
+    if( arates ) free( arates );
+    if( abitrates ) free( abitrates );
+    if( acodecs ) free( acodecs );
+    if( anames ) free( anames );
+    if (native_language ) free (native_language );
+       if( x264opts ) free (x264opts );
+       if( x264opts2 ) free (x264opts2 );
+    if (preset_name) free (preset_name);
+
+    fprintf( stderr, "HandBrake has exited.\n" );
+
+    return 0;
+}
+
+static void ShowCommands()
+{
+    fprintf( stdout, "\nCommands:\n" );
+    fprintf( stdout, " [h]elp    Show this message\n" );
+    fprintf( stdout, " [q]uit    Exit HandBrakeCLI\n" );
+    fprintf( stdout, " [p]ause   Pause encoding\n" );
+    fprintf( stdout, " [r]esume  Resume encoding\n" );
+}
+
+static void PrintTitleInfo( hb_title_t * title )
+{
+    hb_chapter_t  * chapter;
+    hb_audio_config_t    * audio;
+    hb_subtitle_t * subtitle;
+    int i;
+
+    fprintf( stderr, "+ title %d:\n", title->index );
+    fprintf( stderr, "  + vts %d, ttn %d, cells %d->%d (%d blocks)\n",
+             title->vts, title->ttn, title->cell_start, title->cell_end,
+             title->block_count );
+    fprintf( stderr, "  + duration: %02d:%02d:%02d\n",
+             title->hours, title->minutes, title->seconds );
+    fprintf( stderr, "  + size: %dx%d, aspect: %.2f, %.3f fps\n",
+             title->width, title->height,
+             (float) title->aspect,
+             (float) title->rate / title->rate_base );
+    fprintf( stderr, "  + autocrop: %d/%d/%d/%d\n", title->crop[0],
+             title->crop[1], title->crop[2], title->crop[3] );
+    fprintf( stderr, "  + chapters:\n" );
+    for( i = 0; i < hb_list_count( title->list_chapter ); i++ )
+    {
+        chapter = hb_list_item( title->list_chapter, i );
+        fprintf( stderr, "    + %d: cells %d->%d, %d blocks, duration "
+                 "%02d:%02d:%02d\n", chapter->index,
+                 chapter->cell_start, chapter->cell_end,
+                 chapter->block_count, chapter->hours, chapter->minutes,
+                 chapter->seconds );
+    }
+    fprintf( stderr, "  + audio tracks:\n" );
+    for( i = 0; i < hb_list_count( title->list_audio ); i++ )
+    {
+        audio = hb_list_audio_config_item( title->list_audio, i );
+        if( ( audio->in.codec == HB_ACODEC_AC3 ) || ( audio->in.codec == HB_ACODEC_DCA) )
+        {
+            fprintf( stderr, "    + %d, %s, %dHz, %dbps\n", i + 1,
+                     audio->lang.description, audio->in.samplerate, audio->in.bitrate );
+        }
+        else
+        {
+            fprintf( stderr, "    + %d, %s\n", i + 1, audio->lang.description );
+        }
+    }
+    fprintf( stderr, "  + subtitle tracks:\n" );
+    for( i = 0; i < hb_list_count( title->list_subtitle ); i++ )
+    {
+        subtitle = hb_list_item( title->list_subtitle, i );
+        fprintf( stderr, "    + %d, %s (iso639-2: %s)\n", i + 1, subtitle->lang,
+            subtitle->iso639_2);
+    }
+
+    if(title->detected_interlacing)
+    {
+        /* Interlacing was found in half or more of the preview frames */
+        fprintf( stderr, "  + combing detected, may be interlaced or telecined\n");
+    }
+
+}
+
+static int HandleEvents( hb_handle_t * h )
+{
+    hb_state_t s;
+    int tmp_num_audio_tracks;
+
+    hb_get_state( h, &s );
+    switch( s.state )
+    {
+        case HB_STATE_IDLE:
+            /* Nothing to do */
+            break;
+
+#define p s.param.scanning
+        case HB_STATE_SCANNING:
+            /* Show what title is currently being scanned */
+            fprintf( stderr, "Scanning title %d", p.title_cur );
+            if( !titleindex )
+                fprintf( stderr, " of %d", p.title_count );
+            fprintf( stderr, "...\n" );
+            break;
+#undef p
+
+        case HB_STATE_SCANDONE:
+        {
+            hb_list_t  * list;
+            hb_title_t * title;
+            hb_job_t   * job;
+            int i;
+
+            /* Audio argument string parsing variables */
+            int acodec = 0;
+            int abitrate = 0;
+            int arate = 0;
+            int mixdown = HB_AMIXDOWN_DOLBYPLII;
+            double d_r_c = 0;
+            /* Audio argument string parsing variables */
+
+            list = hb_get_titles( h );
+
+            if( !hb_list_count( list ) )
+            {
+                /* No valid title, stop right there */
+                fprintf( stderr, "No title found.\n" );
+                die = 1;
+                break;
+            }
+           if( longest_title )
+           {
+                int i;
+                int longest_title_idx=0;
+                int longest_title_pos=-1;
+                int longest_title_time=0;
+                int title_time;
+
+                fprintf( stderr, "Searching for longest title...\n" );
+
+                for( i = 0; i < hb_list_count( list ); i++ )
+                {
+                    title = hb_list_item( list, i );
+                    title_time = (title->hours*60*60 ) + (title->minutes *60) + (title->seconds);
+                    fprintf( stderr, " + Title (%d) index %d has length %dsec\n",
+                             i, title->index, title_time );
+                    if( longest_title_time < title_time )
+                    {
+                        longest_title_time = title_time;
+                        longest_title_pos = i;
+                        longest_title_idx = title->index;
+                    }
+                }
+                if( longest_title_pos == -1 )
+                {
+                    fprintf( stderr, "No longest title found.\n" );
+                    die = 1;
+                    break;
+                }
+                titleindex = longest_title_idx;
+                fprintf( stderr, "Found longest title, setting title to %d\n",
+                         longest_title_idx);
+
+                title = hb_list_item( list, longest_title_pos);
+            } else {
+                title = hb_list_item( list, 0 );
+            }
+
+            if( !titleindex )
+            {
+                /* Scan-only mode, print infos and exit */
+                int i;
+                for( i = 0; i < hb_list_count( list ); i++ )
+                {
+                    title = hb_list_item( list, i );
+                    PrintTitleInfo( title );
+                }
+                die = 1;
+                break;
+            }
+
+            /* Set job settings */
+            job   = title->job;
+
+            PrintTitleInfo( title );
+
+            if( chapter_start && chapter_end )
+            {
+                job->chapter_start = MAX( job->chapter_start,
+                                          chapter_start );
+                job->chapter_end   = MIN( job->chapter_end,
+                                          chapter_end );
+                job->chapter_end   = MAX( job->chapter_start,
+                                          job->chapter_end );
+            }
+
+            if (preset)
+            {
+                fprintf( stderr, "+ Using preset: %s", preset_name);
+
+                if (!strcmp(preset_name, "Universal"))
+                {
+                    mux = HB_MUX_MP4;
+                    vcodec = HB_VCODEC_X264;
+                    job->vquality = 0.589999973773956;
+                    job->crf = 1;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1,1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160,auto");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("48,Auto");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac,ac3");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2,auto");
+                    }
+                    maxWidth = 720;
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1");
+                    }
+                    pixelratio = 2;
+                    job->chapter_markers = 1;
+                }
+
+                if (!strcmp(preset_name, "iPod"))
+                {
+                    mux = HB_MUX_MP4;
+                    job->ipod_atom = 1;
+                    vcodec = HB_VCODEC_X264;
+                    job->vbitrate = 700;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("48");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                    maxWidth = 320;
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1");
+                    }
+                    job->chapter_markers = 1;
+                }
+
+                if (!strcmp(preset_name, "iPhone & iPod Touch"))
+                {
+                    mux = HB_MUX_MP4;
+                    vcodec = HB_VCODEC_X264;
+                    job->vquality = 0.589999973773956;
+                    job->crf = 1;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("128");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("48");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                    maxWidth = 480;
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("level=30:cabac=0:ref=2:mixed-refs:analyse=all:me=umh:no-fast-pskip=1");
+                    }
+                    job->chapter_markers = 1;
+                }
+
+                if (!strcmp(preset_name, "AppleTV"))
+                {
+                    mux = HB_MUX_MP4;
+                    job->largeFileSize = 1;
+                    vcodec = HB_VCODEC_X264;
+                    job->vquality = 0.589999973773956;
+                    job->crf = 1;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1,1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160,auto");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("48,Auto");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac,ac3");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2,auto");
+                    }
+                    maxWidth = 960;
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all");
+                    }
+                    pixelratio = 2;
+                    job->chapter_markers = 1;
+                }
+
+                if (!strcmp(preset_name, "QuickTime"))
+                {
+                    mux = HB_MUX_MP4;
+                    vcodec = HB_VCODEC_X264;
+                    job->vbitrate = 1800;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("Auto");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1");
+                    }
+                    pixelratio = 1;
+                    job->chapter_markers = 1;
+                    twoPass = 1;
+                    turbo_opts_enabled = 1;
+                }
+
+                if (!strcmp(preset_name, "AppleTV Legacy"))
+                {
+                    mux = HB_MUX_MP4;
+                    job->largeFileSize = 1;
+                    vcodec = HB_VCODEC_X264;
+                    job->vbitrate = 2500;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1,1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160,auto");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("48,Auto");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac,ac3");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2,auto");
+                    }
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:trellis=1:cabac=0");
+                    }
+                    pixelratio = 1;
+                    job->chapter_markers = 1;
+                }
+
+                if (!strcmp(preset_name, "iPhone Legacy"))
+                {
+                    mux = HB_MUX_MP4;
+                    job->ipod_atom = 1;
+                    vcodec = HB_VCODEC_X264;
+                    job->vbitrate = 960;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("128");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("48");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                    maxWidth = 480;
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1");
+                    }
+                    job->chapter_markers = 1;
+                }
+
+                if (!strcmp(preset_name, "iPod Legacy"))
+                {
+                    mux = HB_MUX_MP4;
+                    job->ipod_atom = 1;
+                    vcodec = HB_VCODEC_X264;
+                    job->vbitrate = 1500;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("48");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                    maxWidth = 640;
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1");
+                    }
+                    job->chapter_markers = 1;
+                }
+
+                if (!strcmp(preset_name, "Normal"))
+                {
+                    mux = HB_MUX_MP4;
+                    vcodec = HB_VCODEC_X264;
+                    job->vbitrate = 1500;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("Auto");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("ref=2:bframes=2:me=umh");
+                    }
+                    pixelratio = 1;
+                    job->chapter_markers = 1;
+                    twoPass = 1;
+                    turbo_opts_enabled = 1;
+                }
+
+                if (!strcmp(preset_name, "Classic"))
+                {
+                    mux = HB_MUX_MP4;
+                    job->vbitrate = 1000;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("Auto");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                }
+
+                if (!strcmp(preset_name, "Animation"))
+                {
+                    mux = HB_MUX_MKV;
+                    vcodec = HB_VCODEC_X264;
+                    job->vbitrate = 1000;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("Auto");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-rd=1,1:subme=9");
+                    }
+                    detelecine = 1;
+                    decomb = 1;
+                    pixelratio = 1;
+                    job->chapter_markers = 1;
+                    twoPass = 1;
+                    turbo_opts_enabled = 1;
+                }
+
+                if (!strcmp(preset_name, "Constant Quality Rate"))
+                {
+                    mux = HB_MUX_MKV;
+                    vcodec = HB_VCODEC_X264;
+                    job->vquality = 0.600000023841858;
+                    job->crf = 1;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("auto");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("Auto");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("ac3");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("auto");
+                    }
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1");
+                    }
+                    pixelratio = 1;
+                    job->chapter_markers = 1;
+                }
+
+                if (!strcmp(preset_name, "Film"))
+                {
+                    mux = HB_MUX_MKV;
+                    vcodec = HB_VCODEC_X264;
+                    job->vbitrate = 1800;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("auto");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("Auto");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("ac3");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("auto");
+                    }
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1");
+                    }
+                    pixelratio = 1;
+                    job->chapter_markers = 1;
+                    twoPass = 1;
+                    turbo_opts_enabled = 1;
+                }
+
+                if (!strcmp(preset_name, "Television"))
+                {
+                    mux = HB_MUX_MKV;
+                    vcodec = HB_VCODEC_X264;
+                    job->vbitrate = 1300;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("Auto");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-rd=1,1");
+                    }
+                    detelecine = 1;
+                    decomb = 1;
+                    pixelratio = 1;
+                    job->chapter_markers = 1;
+                    twoPass = 1;
+                    turbo_opts_enabled = 1;
+                }
+
+                if (!strcmp(preset_name, "PSP"))
+                {
+                    mux = HB_MUX_MP4;
+                    job->vbitrate = 1024;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("128");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("48");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                    maxWidth = 368;
+                    maxHeight = 208;
+                    job->chapter_markers = 1;
+                }
+
+                if (!strcmp(preset_name, "PS3"))
+                {
+                    mux = HB_MUX_MP4;
+                    vcodec = HB_VCODEC_X264;
+                    job->vbitrate = 2500;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("48");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                    job->crop[0] = 0;
+                    job->crop[1] = 0;
+                    job->crop[2] = 0;
+                    job->crop[4] - 0;
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("level=41:me=umh");
+                    }
+                    pixelratio = 1;
+                }
+
+                if (!strcmp(preset_name, "Xbox 360"))
+                {
+                    mux = HB_MUX_MP4;
+                    vcodec = HB_VCODEC_X264;
+                    job->vbitrate = 2000;
+                    if( !atracks )
+                    {
+                        atracks = strdup("1");
+                    }
+                    if( !abitrates )
+                    {
+                        abitrates = strdup("160");
+                    }
+                    if( !arates )
+                    {
+                        arates = strdup("48");
+                    }
+                    if( !acodecs )
+                    {
+                        acodecs = strdup("faac");
+                    }
+                    if( !mixdowns )
+                    {
+                        mixdowns = strdup("dpl2");
+                    }
+                    if( !x264opts )
+                    {
+                        x264opts = strdup("level=40:ref=2:mixed-refs:bframes=3:weightb:subme=9:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1");
+                    }
+                    pixelratio = 1;
+                    }
+            }
+
+                       if ( chapter_markers )
+                       {
+                               job->chapter_markers = chapter_markers;
+
+                if( marker_file != NULL )
+                {
+                    hb_csv_file_t * file = hb_open_csv_file( marker_file );
+                    hb_csv_cell_t * cell;
+                    int row = 0;
+                    int chapter = 0;
+
+                    fprintf( stderr, "Reading chapter markers from file %s\n", marker_file );
+
+                    if( file == NULL )
+                    {
+                         fprintf( stderr, "Cannot open chapter marker file, using defaults\n" );
+                    }
+                    else
+                    {
+                        /* Parse the cells */
+                        while( NULL != ( cell = hb_read_next_cell( file ) ) )
+                        {
+                            /* We have a chapter number */
+                            if( cell->cell_col == 0 )
+                            {
+                                row = cell->cell_row;
+                                chapter = atoi( cell->cell_text );
+                            }
+
+                            /* We have a chapter name */
+                            if( cell->cell_col == 1 && row == cell->cell_row )
+                            {
+                                /* If we have a valid chapter, copy the string an terminate it */
+                                if( chapter >= job->chapter_start && chapter <= job->chapter_end )
+                                {
+                                    hb_chapter_t * chapter_s;
+
+                                    chapter_s = hb_list_item( job->title->list_chapter, chapter - 1);
+                                    strncpy(chapter_s->title, cell->cell_text, 1023);
+                                    chapter_s->title[1023] = '\0';
+                                }
+                            }
+
+
+                            hb_dispose_cell( cell );
+                        }
+
+                        hb_close_csv_file( file );
+                    }
+                }
+                else
+                {
+                    /* No marker file */
+
+                    int number_of_chapters = hb_list_count(job->title->list_chapter);
+                    int chapter;
+
+                    for(chapter = 0; chapter <= number_of_chapters - 1 ; chapter++)
+                    {
+                        hb_chapter_t * chapter_s;
+                        chapter_s = hb_list_item( job->title->list_chapter, chapter);
+                        snprintf( chapter_s->title, 1023, "Chapter %i", chapter + 1 );
+                        chapter_s->title[1023] = '\0';
+                    }
+                }
+                       }
+
+            if( crop[0] >= 0 && crop[1] >= 0 &&
+                crop[2] >= 0 && crop[3] >= 0 )
+            {
+                memcpy( job->crop, crop, 4 * sizeof( int ) );
+            }
+
+            job->deinterlace = deinterlace;
+            job->grayscale   = grayscale;
+            if (loosePixelratio)
+            {
+                job->pixel_ratio = 2;
+                if (modulus)
+                {
+                    job->modulus = modulus;
+                }
+                if( par_width && par_height )
+                {
+                    job->pixel_ratio = 3;
+                    job->pixel_aspect_width = par_width;
+                    job->pixel_aspect_height = par_height;
+                }
+            }
+            else
+            {
+                job->pixel_ratio = pixelratio;
+            }
+
+            /* Add selected filters */
+            job->filters = hb_list_init();
+            if( detelecine )
+            {
+                hb_filter_detelecine.settings = detelecine_opt;
+                hb_list_add( job->filters, &hb_filter_detelecine );
+                
+                if( !vrate )
+                {
+                    /* No framerate specified, so using same as source.
+                       That means VFR, so set detelecine up to drop frames. */
+                           job->vfr = 1;
+                }
+            }
+            if( decomb )
+            {
+                hb_filter_decomb.settings = decomb_opt;
+                hb_list_add( job->filters, &hb_filter_decomb );
+            }
+            if( deinterlace )
+            {
+                hb_filter_deinterlace.settings = deinterlace_opt;
+                hb_list_add( job->filters, &hb_filter_deinterlace );
+            }
+            if( deblock )
+            {
+                hb_filter_deblock.settings = deblock_opt;
+                hb_list_add( job->filters, &hb_filter_deblock );
+            }
+            if( denoise )
+            {
+                hb_filter_denoise.settings = denoise_opt;
+                hb_list_add( job->filters, &hb_filter_denoise );
+            }
+
+            if( width && height )
+            {
+                job->width  = width;
+                job->height = height;
+            }
+            else if( width )
+            {
+                job->width = width;
+                hb_fix_aspect( job, HB_KEEP_WIDTH );
+            }
+            else if( height && !loosePixelratio)
+            {
+                job->height = height;
+                hb_fix_aspect( job, HB_KEEP_HEIGHT );
+            }
+            else if( !width && !height && !pixelratio && !loosePixelratio )
+            {
+                hb_fix_aspect( job, HB_KEEP_WIDTH );
+            }
+            else if (!width && loosePixelratio)
+            {
+                /* Default to full width when one isn't specified for loose anamorphic */
+                job->width = title->width - job->crop[2] - job->crop[3];
+                /* The height will be thrown away in hb.c but calculate it anyway */
+                hb_fix_aspect( job, HB_KEEP_WIDTH );
+            }
+
+            if( vquality >= 0.0 && ( ( vquality <= 1.0 ) || ( vcodec == HB_VCODEC_X264 ) || (vcodec == HB_VCODEC_FFMPEG) ) )
+            {
+                job->vquality = vquality;
+                job->vbitrate = 0;
+            }
+            else if( vbitrate )
+            {
+                job->vquality = -1.0;
+                job->vbitrate = vbitrate;
+            }
+            if( vcodec )
+            {
+                job->vcodec = vcodec;
+            }
+            if( h264_13 )
+            {
+                job->h264_level = 13;
+            }
+               if( h264_30 )
+               {
+                   job->h264_level = 30;
+            }
+            if( vrate )
+            {
+                job->cfr = 1;
+                job->vrate = 27000000;
+                job->vrate_base = vrate;
+            }
+
+            /* Grab audio tracks */
+            if( atracks )
+            {
+                char * token = strtok(atracks, ",");
+                if (token == NULL)
+                    token = optarg;
+                int track_start, track_end;
+                while( token != NULL )
+                {
+                    audio = calloc(1, sizeof(*audio));
+                    hb_audio_config_init(audio);
+                    if (strlen(token) >= 3)
+                    {
+                        if (sscanf(token, "%d-%d", &track_start, &track_end) == 2)
+                        {
+                            int i;
+                            for (i = track_start - 1; i < track_end; i++)
+                            {
+                                if (i != track_start - 1)
+                                {
+                                    audio = calloc(1, sizeof(*audio));
+                                    hb_audio_config_init(audio);
+                                }
+                                audio->in.track = i;
+                                audio->out.track = num_audio_tracks++;
+                                hb_list_add(audios, audio);
+                            }
+                        }
+                        else if( !strcasecmp(token, "none" ) )
+                        {
+                            audio->in.track = audio->out.track = -1;
+                            audio->out.codec = 0;
+                            hb_list_add(audios, audio);
+                            break;
+                        }
+                        else
+                        {
+                            fprintf(stderr, "ERROR: Unable to parse audio input \"%s\", skipping.",
+                                    token);
+                            free(audio);
+                        }
+                    }
+                    else
+                    {
+                        audio->in.track = atoi(token) - 1;
+                        audio->out.track = num_audio_tracks++;
+                        hb_list_add(audios, audio);
+                    }
+                    token = strtok(NULL, ",");
+                }
+            }
+
+            /* Parse audio tracks */
+            if( hb_list_count(audios) == 0 )
+            {
+                /* Create a new audio track with default settings */
+                audio = calloc(1, sizeof(*audio));
+                hb_audio_config_init(audio);
+                /* Add it to our audios */
+                hb_list_add(audios, audio);
+            }
+
+            tmp_num_audio_tracks = num_audio_tracks = hb_list_count(audios);
+            for (i = 0; i < tmp_num_audio_tracks; i++)
+            {
+                audio = hb_list_item(audios, 0);
+                if( (audio == NULL) || (audio->in.track == -1) ||
+                    (audio->out.track == -1) || (audio->out.codec == 0) )
+                {
+                    num_audio_tracks--;
+                }
+                else
+                {
+                    if( hb_audio_add( job, audio ) == 0 )
+                    {
+                        fprintf(stderr, "ERROR: Invalid audio input track '%u', exiting.\n", 
+                                audio->in.track + 1 );
+                        num_audio_tracks--;
+                        exit(3);
+                    }
+                }
+                hb_list_rem(audios, audio);
+                if( audio != NULL)
+                    if( audio->out.name )
+                    {
+                        free( audio->out.name);
+                    }
+                    free( audio );
+            }
+
+            /* Audio Codecs */
+            i = 0;
+            if( acodecs )
+            {
+                char * token = strtok(acodecs, ",");
+                if( token == NULL )
+                    token = acodecs;
+                while ( token != NULL )
+                {
+                    if ((acodec = get_acodec_for_string(token)) == -1)
+                    {
+                        fprintf(stderr, "Invalid codec %s, using default for container.\n", token);
+                        acodec = default_acodec;
+                    }
+                    if( i < num_audio_tracks )
+                    {
+                        audio = hb_list_audio_config_item(job->list_audio, i);
+                        audio->out.codec = acodec;
+                    }
+                    else
+                    {
+                        hb_audio_config_t * last_audio = hb_list_audio_config_item( job->list_audio, i - 1 );
+                        hb_audio_config_t audio;
+
+                        if( last_audio )
+                        {
+                            fprintf(stderr, "More audio codecs than audio tracks, copying track %i and using encoder %s\n",
+                                    i, token);
+                            hb_audio_config_init(&audio);
+                            audio.in.track = last_audio->in.track;
+                            audio.out.track = num_audio_tracks++;
+                            audio.out.codec = acodec;
+                            hb_audio_add(job, &audio);
+                        }
+                        else
+                        {
+                            fprintf(stderr, "Audio codecs and no valid audio tracks, skipping codec %s\n", token);
+                        }
+                    }
+                    token = strtok(NULL, ",");
+                    i++;
+                }
+            }
+            if( i < num_audio_tracks )
+            {
+                /* We have fewer inputs than audio tracks, use the default codec for
+                 * this container for the remaining tracks. Unless we only have one input
+                 * then use that codec instead.
+                 */
+                if (i != 1)
+                    acodec = default_acodec;
+                for ( ; i < num_audio_tracks; i++)
+                {
+                    audio = hb_list_audio_config_item(job->list_audio, i);
+                    audio->out.codec = acodec;
+                }
+            }
+            /* Audio Codecs */
+
+            /* Sample Rate */
+            i = 0;
+            if( arates )
+            {
+                char * token = strtok(arates, ",");
+                if (token == NULL)
+                    token = arates;
+                while ( token != NULL )
+                {
+                    arate = atoi(token);
+                    audio = hb_list_audio_config_item(job->list_audio, i);
+                    int j;
+
+                    for( j = 0; j < hb_audio_rates_count; j++ )
+                    {
+                        if( !strcmp( token, hb_audio_rates[j].string ) )
+                        {
+                            arate = hb_audio_rates[j].rate;
+                            break;
+                        }
+                    }
+
+                    if( audio != NULL )
+                    {
+                        if (!is_sample_rate_valid(arate))
+                        {
+                            fprintf(stderr, "Invalid sample rate %d, using input rate %d\n", arate, audio->in.samplerate);
+                            arate = audio->in.samplerate;
+                        }
+                        
+                        audio->out.samplerate = arate;
+                        if( (++i) >= num_audio_tracks )
+                            break;  /* We have more inputs than audio tracks, oops */
+                    }
+                    else 
+                    {
+                        fprintf(stderr, "Ignoring sample rate %d, no audio tracks\n", arate);
+                    }
+                    token = strtok(NULL, ",");
+                }
+            }
+            if (i < num_audio_tracks)
+            {
+                /* We have fewer inputs than audio tracks, use default sample rate.
+                 * Unless we only have one input, then use that for all tracks.
+                 */
+                if (i != 1)
+                    arate = audio->in.samplerate;
+                for ( ; i < num_audio_tracks; i++)
+                {
+                    audio = hb_list_audio_config_item(job->list_audio, i);
+                    audio->out.samplerate = arate;
+                }
+            }
+            /* Sample Rate */
+
+            /* Audio Bitrate */
+            i = 0;
+            if( abitrates )
+            {
+                char * token = strtok(abitrates, ",");
+                if (token == NULL)
+                    token = abitrates;
+                while ( token != NULL )
+                {
+                    abitrate = atoi(token);
+                    audio = hb_list_audio_config_item(job->list_audio, i);
+
+                    if( audio != NULL )
+                    {
+                        audio->out.bitrate = abitrate;
+                        if( (++i) >= num_audio_tracks )
+                            break;  /* We have more inputs than audio tracks, oops */
+                    }
+                    else 
+                    {
+                        fprintf(stderr, "Ignoring bitrate %d, no audio tracks\n", abitrate);
+                    }
+                    token = strtok(NULL, ",");
+                }
+            }
+            if (i < num_audio_tracks)
+            {
+                /* We have fewer inputs than audio tracks, use the default bitrate
+                 * for the remaining tracks. Unless we only have one input, then use
+                 * that for all tracks.
+                 */
+                if (i != 1)
+                    abitrate = default_abitrate;
+                for (; i < num_audio_tracks; i++)
+                {
+                    audio = hb_list_audio_config_item(job->list_audio, i);
+                    audio->out.bitrate = abitrate;
+                }
+            }
+            /* Audio Bitrate */
+
+            /* Audio DRC */
+            i = 0;
+            if ( dynamic_range_compression )
+            {
+                char * token = strtok(dynamic_range_compression, ",");
+                if (token == NULL)
+                    token = dynamic_range_compression;
+                while ( token != NULL )
+                {
+                    d_r_c = atof(token);
+                    audio = hb_list_audio_config_item(job->list_audio, i);
+                    if( audio != NULL )
+                    {
+                        audio->out.dynamic_range_compression = d_r_c;
+                        if( (++i) >= num_audio_tracks )
+                            break;  /* We have more inputs than audio tracks, oops */
+                    } 
+                    else
+                    {
+                        fprintf(stderr, "Ignoring drc, no audio tracks\n");
+                    }
+                    token = strtok(NULL, ",");
+                }
+            }
+            if (i < num_audio_tracks)
+            {
+                /* We have fewer inputs than audio tracks, use no DRC for the remaining
+                 * tracks. Unless we only have one input, then use the same DRC for all
+                 * tracks.
+                 */
+                if (i != 1)
+                    d_r_c = 0;
+                for (; i < num_audio_tracks; i++)
+                {
+                    audio = hb_list_audio_config_item(job->list_audio, i);
+                    audio->out.dynamic_range_compression = d_r_c;
+                }
+            }
+            /* Audio DRC */
+
+            /* Audio Mixdown */
+            i = 0;
+            if ( mixdowns )
+            {
+                char * token = strtok(mixdowns, ",");
+                if (token == NULL)
+                    token = mixdowns;
+                while ( token != NULL )
+                {
+                    mixdown = hb_mixdown_get_mixdown_from_short_name(token);
+                    audio = hb_list_audio_config_item(job->list_audio, i);
+                    if( audio != NULL )
+                    {
+                        audio->out.mixdown = mixdown;
+                        if( (++i) >= num_audio_tracks )
+                            break;  /* We have more inputs than audio tracks, oops */
+                    }
+                    else
+                    {
+                        fprintf(stderr, "Ignoring mixdown, no audio tracks\n");
+                    }
+                    token = strtok(NULL, ",");
+                }
+            }
+            if (i < num_audio_tracks)
+            {
+                /* We have fewer inputs than audio tracks, use DPLII for the rest. Unless
+                 * we only have one input, then use that.
+                 */
+                if (i != 1)
+                    mixdown = HB_AMIXDOWN_DOLBYPLII;
+                for (; i < num_audio_tracks; i++)
+                {
+                   audio = hb_list_audio_config_item(job->list_audio, i);
+                   audio->out.mixdown = mixdown;
+                }
+            }
+            /* Audio Mixdown */
+
+            /* Audio Track Names */
+            i = 0;
+            if ( anames )
+            {
+                char * token = strtok(anames, ",");
+                if (token == NULL)
+                    token = anames;
+                while ( token != NULL )
+                {
+                    audio = hb_list_audio_config_item(job->list_audio, i);
+                    if( audio != NULL )
+                    {
+                        audio->out.name = strdup(token);
+                        if( (++i) >= num_audio_tracks )
+                            break;  /* We have more names than audio tracks, oops */
+                    }
+                    else
+                    {
+                        fprintf(stderr, "Ignoring aname '%s', no audio track\n",
+                                token);
+                    }
+                    token = strtok(NULL, ",");
+                }
+            }
+            if( i < num_audio_tracks && i == 1 )
+            {
+                /* We have exactly one name and more than one audio track. Use the same
+                 * name for all tracks. */
+                for ( ; i < num_audio_tracks; i++)
+                {
+                    audio = hb_list_audio_config_item(job->list_audio, i);
+                    audio->out.name = strdup(anames);
+                }
+            }
+            /* Audio Track Names */
+
+            if( size )
+            {
+                job->vbitrate = hb_calc_bitrate( job, size );
+                fprintf( stderr, "Calculated bitrate: %d kbps\n",
+                         job->vbitrate );
+            }
+
+            if( sub )
+            {
+                job->subtitle = sub - 1;
+            }
+
+            if( native_language )
+            {
+                job->native_language = strdup( native_language );
+            }
+
+            if( job->mux )
+            {
+                job->mux = mux;
+            }
+
+            if ( largeFileSize )
+            {
+                job->largeFileSize = 1;
+            }
+            if ( mp4_optimize )
+            {
+                job->mp4_optimize = 1;
+            }
+            if ( ipod_atom )
+            {
+                job->ipod_atom = 1;
+            }
+
+            job->file = strdup( output );
+
+            if( crf )
+            {
+                job->crf = 1;
+            }
+            
+            if( color_matrix )
+            {
+                job->color_matrix = color_matrix;
+            }
+
+            if( x264opts != NULL && *x264opts != '\0' )
+            {
+                job->x264opts = x264opts;
+            }
+            else /*avoids a bus error crash when options aren't specified*/
+            {
+                job->x264opts =  NULL;
+            }
+            if (maxWidth)
+                job->maxWidth = maxWidth;
+            if (maxHeight)
+                job->maxHeight = maxHeight;
+
+            if( subtitle_force )
+            {
+                job->subtitle_force = subtitle_force;
+            }
+
+            if( subtitle_scan )
+            {
+                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;
+
+                x264opts_tmp = job->x264opts;
+
+                job->x264opts = NULL;
+
+                job->indepth_scan = subtitle_scan;
+                fprintf( stderr, "Subtitle Scan Enabled - enabling "
+                         "subtitles if found for foreign language segments\n");
+                job->select_subtitle = malloc(sizeof(hb_subtitle_t*));
+                *(job->select_subtitle) = NULL;
+
+                /*
+                 * Add the pre-scan job
+                 */
+                hb_add( h, job );
+
+                job->x264opts = x264opts_tmp;
+            }
+
+            if( twoPass )
+            {
+                /*
+                 * If subtitle_scan is enabled then only turn it on
+                 * for the first 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;
+
+                if (x264opts)
+                {
+                    x264opts2 = strdup(x264opts);
+                }
+
+                /*
+                 * If turbo options have been selected then append them
+                 * to the x264opts now (size includes one ':' and the '\0')
+                 */
+                if( turbo_opts_enabled )
+                {
+                    int size = (x264opts ? strlen(x264opts) : 0) + strlen(turbo_opts) + 2;
+                    char *tmp_x264opts;
+
+                    tmp_x264opts = malloc(size * sizeof(char));
+                    if( x264opts )
+                    {
+                        snprintf( tmp_x264opts, size, "%s:%s",
+                                  x264opts, turbo_opts );
+                        free( x264opts );
+                    } else {
+                        /*
+                         * No x264opts to modify, but apply the turbo options
+                         * anyway as they may be modifying defaults
+                         */
+                        snprintf( tmp_x264opts, size, "%s",
+                                  turbo_opts );
+                    }
+                    x264opts = tmp_x264opts;
+
+                    fprintf( stderr, "Modified x264 options for pass 1 to append turbo options: %s\n",
+                             x264opts );
+
+                    job->x264opts = x264opts;
+                }
+                hb_add( h, job );
+
+                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;
+
+                hb_add( h, job );
+            }
+            else
+            {
+                /*
+                 * Turn on subtitle scan if requested, note that this option
+                 * precludes encoding of any actual subtitles.
+                 */
+
+                job->indepth_scan = 0;
+                job->pass = 0;
+                hb_add( h, job );
+            }
+            hb_start( h );
+            break;
+        }
+
+#define p s.param.working
+        case HB_STATE_WORKING:
+            fprintf( stdout, "\rEncoding: task %d of %d, %.2f %%",
+                     p.job_cur, p.job_count, 100.0 * p.progress );
+            if( p.seconds > -1 )
+            {
+                fprintf( stdout, " (%.2f fps, avg %.2f fps, ETA "
+                         "%02dh%02dm%02ds)", p.rate_cur, p.rate_avg,
+                         p.hours, p.minutes, p.seconds );
+            }
+            fflush(stdout);
+            break;
+#undef p
+
+#define p s.param.muxing
+        case HB_STATE_MUXING:
+        {
+            if (show_mux_warning)
+            {
+                fprintf( stdout, "\rMuxing: this may take awhile..." );
+                fflush(stdout);
+                show_mux_warning = 0;
+            }
+            break;
+        }
+#undef p
+
+#define p s.param.workdone
+        case HB_STATE_WORKDONE:
+            /* Print error if any, then exit */
+            switch( p.error )
+            {
+                case HB_ERROR_NONE:
+                    fprintf( stderr, "\nRip done!\n" );
+                    break;
+                case HB_ERROR_CANCELED:
+                    fprintf( stderr, "\nRip canceled.\n" );
+                    break;
+                default:
+                    fprintf( stderr, "\nRip failed (error %x).\n",
+                             p.error );
+            }
+            die = 1;
+            break;
+#undef p
+    }
+    return 0;
+}
+
+/****************************************************************************
+ * SigHandler:
+ ****************************************************************************/
+static volatile int64_t i_die_date = 0;
+void SigHandler( int i_signal )
+{
+    if( die == 0 )
+    {
+        die = 1;
+        i_die_date = hb_get_date();
+        fprintf( stderr, "Signal %d received, terminating - do it "
+                 "again in case it gets stuck\n", i_signal );
+    }
+    else if( i_die_date + 500 < hb_get_date() )
+    {
+        fprintf( stderr, "Dying badly, files might remain in your /tmp\n" );
+        exit( 1 );
+    }
+}
+
+/****************************************************************************
+ * ShowHelp:
+ ****************************************************************************/
+static void ShowHelp()
+{
+    int i;
+
+    fprintf( stderr,
+    "Syntax: HandBrakeCLI [options] -i <device> -o <file>\n"
+    "\n"
+    "### General Handbrake Options------------------------------------------------\n\n"
+    "    -h, --help              Print help\n"
+    "    -u, --update            Check for updates and exit\n"
+    "    -v, --verbose <#>       Be verbose (optional argument: logging level)\n"
+    "    -C, --cpu               Set CPU count (default: autodetected)\n"
+    "    -Z. --preset <string>   Use a built-in preset. Capitalization matters, and\n"
+    "                            if the preset name has spaces, surround it with\n"
+    "                            double quotation marks\n"
+    "    -z, --preset-list       See a list of available built-in presets\n"
+    "\n"
+
+    "### Source Options-----------------------------------------------------------\n\n"
+    "    -i, --input <string>    Set input device\n"
+    "    -t, --title <number>    Select a title to encode (0 to scan only,\n"
+    "                            default: 1)\n"
+    "    -L, --longest           Select the longest title\n"
+    "    -c, --chapters <string> Select chapters (e.g. \"1-3\" for chapters\n"
+    "                            1 to 3, or \"3\" for chapter 3 only,\n"
+    "                            default: all chapters)\n"
+    "\n"
+
+    "### Destination Options------------------------------------------------------\n\n"
+    "    -o, --output <string>   Set output file name\n"
+    "    -f, --format <string>   Set output format (avi/mp4/ogm/mkv, default:\n"
+    "                            autodetected from file name)\n"
+    "    -m, --markers           Add chapter markers (mp4 and mkv output formats only)\n"
+    "    -4, --large-file        Use 64-bit mp4 files that can hold more than\n"
+    "                            4 GB. Note: Breaks iPod, PS3 compatibility.\n"""
+    "    -O, --optimize          Optimize mp4 files for HTTP streaming\n"
+    "    -I, --ipod-atom         Mark mp4 files so 5.5G iPods will accept them\n"
+    "\n"
+
+
+    "### Video Options------------------------------------------------------------\n\n"
+    "    -e, --encoder <string>  Set video library encoder (ffmpeg,xvid,\n"
+    "                            x264,theora default: ffmpeg)\n"
+    "    -x, --x264opts <string> Specify advanced x264 options in the\n"
+    "                            same style as mencoder:\n"
+    "                            option1=value1:option2=value2\n"
+    "    -q, --quality <float>   Set video quality (0.0..1.0)\n"
+    "    -Q, --cqp               Use with -q for CQP instead of CRF\n"
+    "    -S, --size <MB>         Set target size\n"
+    "    -b, --vb <kb/s>         Set video bitrate (default: 1000)\n"
+    "    -2, --two-pass          Use two-pass mode\n"
+    "    -T, --turbo             When using 2-pass use the turbo options\n"
+    "                            on the first pass to improve speed\n"
+    "                            (only works with x264, affects PSNR by about 0.05dB,\n"
+    "                            and increases first pass speed two to four times)\n"
+    "    -r, --rate              Set video framerate (" );
+    for( i = 0; i < hb_video_rates_count; i++ )
+    {
+        fprintf( stderr, hb_video_rates[i].string );
+        if( i != hb_video_rates_count - 1 )
+            fprintf( stderr, "/" );
+    }
+    fprintf( stderr, ")\n"
+    "                            Be aware that not specifying a framerate lets\n"
+    "                            HandBrake preserve a source's time stamps,\n"
+    "                            potentially creating variable framerate video\n"
+
+    "\n"
+    "### Audio Options-----------------------------------------------------------\n\n"
+    "    -a, --audio <string>    Select audio track(s), separated by commas\n"
+    "                            More than one output track can be used for one\n"
+    "                            input.\n"
+    "                            (\"none\" for no audio, \"1,2,3\" for multiple\n"
+    "                             tracks, default: first one)\n"
+    "    -E, --aencoder <string> Audio encoder(s) (faac/lame/vorbis/ac3) \n"
+    "                            ac3 meaning passthrough\n"
+    "                            Separated by commas for more than one audio track.\n"
+    "                            (default: guessed)\n"
+    "    -B, --ab <kb/s>         Set audio bitrate(s)  (default: 160)\n"
+    "                            Separated by commas for more than one audio track.\n"
+    "    -6, --mixdown <string>  Format(s) for surround sound downmixing\n"
+    "                            Separated by commas for more than one audio track.\n"
+    "                            (mono/stereo/dpl1/dpl2/6ch, default: dpl2)\n"
+    "    -R, --arate             Set audio samplerate(s) (" );
+    for( i = 0; i < hb_audio_rates_count; i++ )
+    {
+        fprintf( stderr, hb_audio_rates[i].string );
+        if( i != hb_audio_rates_count - 1 )
+            fprintf( stderr, "/" );
+    }
+    fprintf( stderr, " kHz)\n"
+    "                            Separated by commas for more than one audio track.\n"
+    "    -D, --drc <float>       Apply extra dynamic range compression to the audio,\n"
+    "                            making soft sounds louder. Range is 1.0 to 4.0\n"
+    "                            (too loud), with 1.5 - 2.5 being a useful range.\n"
+    "                            Separated by commas for more than one audio track.\n"
+    "    -A, --aname <string>    Audio track name(s),\n"
+    "                            Separated by commas for more than one audio track.\n"
+    "\n"
+
+    "### Picture Settings---------------------------------------------------------\n\n"
+    "    -w, --width <number>    Set picture width\n"
+    "    -l, --height <number>   Set picture height\n"
+    "        --crop <T:B:L:R>    Set cropping values (default: autocrop)\n"
+    "    -Y, --maxHeight <#>     Set maximum height\n"
+    "    -X, --maxWidth <#>      Set maximum width\n"
+    "    -p, --pixelratio        Store pixel aspect ratio in video stream\n"
+    "    -P, --loosePixelratio   Store pixel aspect ratio with specified width\n"
+    "          <MOD:PARX:PARY>   Takes as optional arguments what number you want\n"
+    "                            the dimensions to divide cleanly by (default 16)\n"
+    "                            and the pixel ratio to use (default autodetected)\n"
+    "    -M  --color-matrix      Set the color space signaled by the output\n"
+    "          <601 or 709>      (Bt.601 is mostly for SD content, Bt.709 for HD,\n"
+    "                             default: set by resolution)\n"
+    "\n"
+
+    "### Filters---------------------------------------------------------\n\n"
+
+     "    -d, --deinterlace       Deinterlace video with yadif/mcdeint filter\n"
+     "          <YM:FD:MM:QP>     (default 0:-1:-1:1)\n"
+     "           or\n"
+     "          <fast/slow/slower>\n"
+     "    -5, --decomb            Selectively deinterlaces when it detects combing\n"
+     "          <MO:ME:MT:ST:BT:BX:BY>     (default: 1:2:6:9:80:16:16)\n"
+     "    -9, --detelecine        Detelecine (ivtc) video with pullup filter\n"
+     "                            Note: this filter drops duplicate frames to\n"
+     "                            restore the pre-telecine framerate, unless you\n"
+     "                            specify a constant framerate (--rate 29.97)\n"
+     "          <L:R:T:B:SB:MP>   (default 1:1:4:4:0:0)\n"
+     "    -8, --denoise           Denoise video with hqdn3d filter\n"
+     "          <SL:SC:TL:TC>     (default 4:3:6:4.5)\n"
+     "           or\n"
+     "          <weak/medium/strong>\n"
+     "    -7, --deblock           Deblock video with pp7 filter\n"
+     "          <QP:M>            (default 5:2)\n"
+    "    -g, --grayscale         Grayscale encoding\n"
+    "\n"
+
+    "### Subtitle Options------------------------------------------------------------\n\n"
+    "    -s, --subtitle <number> Select subtitle (default: none)\n"
+    "    -U, --subtitle-scan     Scan for subtitles in an extra 1st pass, and choose\n"
+    "                            the one that's only used 10 percent of the time\n"
+    "                            or less. This should locate subtitles for short\n"
+    "                            foreign language segments. Best used in conjunction\n"
+    "                            with --subtitle-forced.\n"
+    "    -F, --subtitle-forced   Only display subtitles from the selected stream if\n"
+    "                            the subtitle has the forced flag set. May be used in\n"
+    "                            conjunction with --subtitle-scan to auto-select\n"
+    "                            a stream if it contains forced subtitles.\n"
+    "    -N, --native-language   Select subtitles with this language if it does not\n"
+    "          <string>          match the Audio language. Provide the language's\n"
+    "                            iso639-2 code (fre, eng, spa, dut, et cetera)\n"
+
+
+    "\n"
+
+
+    );
+}
+
+/****************************************************************************
+ * ShowPresets:
+ ****************************************************************************/
+static void ShowPresets()
+{
+    printf("\n< Apple\n");
+
+    printf("\n   + Universal:  -e x264  -q 0.589999973773956 -a 1,1 -E faac,ac3 -B 160,auto -R 48,Auto -6 dpl2,auto -f mp4 -X 720 -P -m -x level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1\n");
+
+    printf("\n   + iPod:  -e x264  -b 700 -a 1 -E faac -B 160 -R 48 -6 dpl2 -f mp4 -I -X 320 -m -x level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1\n");
+
+    printf("\n   + iPhone & iPod Touch:  -e x264  -q 0.589999973773956 -a 1 -E faac -B 128 -R 48 -6 dpl2 -f mp4 -X 480 -m -x level=30:cabac=0:ref=2:mixed-refs:analyse=all:me=umh:no-fast-pskip=1\n");
+
+    printf("\n   + AppleTV:  -e x264  -q 0.589999973773956 -a 1,1 -E faac,ac3 -B 160,auto -R 48,Auto -6 dpl2,auto -f mp4 -4 -X 960 -P -m -x level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all\n");
+
+    printf("\n   + QuickTime:  -e x264  -b 1800 -a 1 -E faac -B 160 -R Auto -6 dpl2 -f mp4 -p -m -2 -T -x ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1\n");
+
+    printf("\n   << Legacy\n");
+
+    printf("\n      + AppleTV Legacy:  -e x264  -b 2500 -a 1,1 -E faac,ac3 -B 160,auto -R 48,Auto -6 dpl2,auto -f mp4 -4 -p -m -x bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:trellis=1:cabac=0\n");
+
+    printf("\n      + iPhone Legacy:  -e x264  -b 960 -a 1 -E faac -B 128 -R 48 -6 dpl2 -f mp4 -I -X 480 -m -x level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1\n");
+
+    printf("\n      + iPod Legacy:  -e x264  -b 1500 -a 1 -E faac -B 160 -R 48 -6 dpl2 -f mp4 -I -X 640 -m -x level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1\n");
+
+    printf("\n   >>\n");
+
+    printf("\n>\n");
+
+    printf("\n< Basic\n");
+
+    printf("\n   + Normal:  -e x264  -b 1500 -a 1 -E faac -B 160 -R Auto -6 dpl2 -f mp4 -p -m -2 -T -x ref=2:bframes=2:me=umh\n");
+
+    printf("\n   + Classic:  -b 1000 -a 1 -E faac -B 160 -R Auto -6 dpl2 -f mp4\n");
+
+    printf("\n>\n");
+
+    printf("\n< High Profile\n");
+
+    printf("\n   + Animation:  -e x264  -b 1000 -a 1 -E faac -B 160 -R Auto -6 dpl2 -f mkv --detelecine --decomb -p -m -2 -T -x ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-rd=1,1:subme=9\n");
+
+    printf("\n   + Constant Quality Rate:  -e x264  -q 0.600000023841858 -a 1 -E ac3 -B 160 -R Auto -6 auto -f mkv -p -m -x ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1\n");
+
+    printf("\n   + Film:  -e x264  -b 1800 -a 1 -E ac3 -B 160 -R Auto -6 auto -f mkv -p -m -2 -T -x ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1\n");
+
+    printf("\n   + Television:  -e x264  -b 1300 -a 1 -E faac -B 160 -R Auto -6 dpl2 -f mkv --detelecine --decomb -p -m -2 -T -x ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-rd=1,1\n");
+
+    printf("\n>\n");
+
+    printf("\n< Gaming Consoles\n");
+
+    printf("\n   + PSP:  -b 1024 -a 1 -E faac -B 128 -R 48 -6 dpl2 -f mp4 -X 368 -Y 208 -m\n");
+
+    printf("\n   + PS3:  -e x264  -b 2500 -a 1 -E faac -B 160 -R 48 -6 dpl2 -f mp4 --crop 0:0:0:0 -p -x level=41:me=umh\n");
+
+    printf("\n   + Xbox 360:  -e x264  -b 2000 -a 1 -E faac -B 160 -R 48 -6 dpl2 -f mp4 -p -x level=40:ref=2:mixed-refs:bframes=3:weightb:subme=9:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1\n");
+
+    printf("\n>\n");
+
+}
+
+/****************************************************************************
+ * ParseOptions:
+ ****************************************************************************/
+static int ParseOptions( int argc, char ** argv )
+{
+    for( ;; )
+    {
+        static struct option long_options[] =
+          {
+            { "help",        no_argument,       NULL,    'h' },
+            { "update",      no_argument,       NULL,    'u' },
+            { "verbose",     optional_argument, NULL,    'v' },
+            { "cpu",         required_argument, NULL,    'C' },
+
+            { "format",      required_argument, NULL,    'f' },
+            { "input",       required_argument, NULL,    'i' },
+            { "output",      required_argument, NULL,    'o' },
+            { "large-file",  no_argument,       NULL,    '4' },
+            { "optimize",    no_argument,       NULL,    'O' },
+            { "ipod-atom",   no_argument,       NULL,    'I' },
+
+            { "title",       required_argument, NULL,    't' },
+            { "longest",     no_argument,       NULL,    'L' },
+            { "chapters",    required_argument, NULL,    'c' },
+            { "markers",     optional_argument, NULL,    'm' },
+            { "audio",       required_argument, NULL,    'a' },
+            { "mixdown",     required_argument, NULL,    '6' },
+            { "drc",         required_argument, NULL,    'D' },
+            { "subtitle",    required_argument, NULL,    's' },
+            { "subtitle-scan", no_argument,     NULL,    'U' },
+            { "subtitle-forced", no_argument,   NULL,    'F' },
+            { "native-language", required_argument, NULL,'N' },
+
+            { "encoder",     required_argument, NULL,    'e' },
+            { "aencoder",    required_argument, NULL,    'E' },
+            { "two-pass",    no_argument,       NULL,    '2' },
+            { "deinterlace", optional_argument, NULL,    'd' },
+            { "deblock",     optional_argument, NULL,    '7' },
+            { "denoise",     optional_argument, NULL,    '8' },
+            { "detelecine",  optional_argument, NULL,    '9' },
+            { "decomb",      optional_argument, NULL,    '5' },
+            { "grayscale",   no_argument,       NULL,    'g' },
+            { "pixelratio",  no_argument,       NULL,    'p' },
+            { "loosePixelratio", optional_argument,   NULL,    'P' },
+            { "width",       required_argument, NULL,    'w' },
+            { "height",      required_argument, NULL,    'l' },
+            { "crop",        required_argument, NULL,    'n' },
+
+            { "vb",          required_argument, NULL,    'b' },
+            { "quality",     required_argument, NULL,    'q' },
+            { "size",        required_argument, NULL,    'S' },
+            { "ab",          required_argument, NULL,    'B' },
+            { "rate",        required_argument, NULL,    'r' },
+            { "arate",       required_argument, NULL,    'R' },
+            { "cqp",         no_argument,       NULL,    'Q' },
+            { "x264opts",    required_argument, NULL,    'x' },
+            { "turbo",       no_argument,       NULL,    'T' },
+            { "maxHeight",   required_argument, NULL,    'Y' },
+            { "maxWidth",    required_argument, NULL,    'X' },
+            { "preset",      required_argument, NULL,    'Z' },
+            { "preset-list", no_argument,       NULL,    'z' },
+
+            { "aname",       required_argument, NULL,    'A' },
+            { "color-matrix",required_argument, NULL,    'M' },
+
+            { 0, 0, 0, 0 }
+          };
+
+        int option_index = 0;
+        int c;
+
+               c = getopt_long( argc, argv,
+                                                "hv::uC:f:4i:Io:t:Lc:m::M:a:A:6:s:UFN:e:E:2dD:7895gpOP::w:l:n:b:q:S:B:r:R:Qx:TY:X:Z:z",
+                         long_options, &option_index );
+        if( c < 0 )
+        {
+            break;
+        }
+
+        switch( c )
+        {
+            case 'h':
+                ShowHelp();
+                exit( 0 );
+            case 'u':
+                update = 1;
+                break;
+            case 'v':
+                if( optarg != NULL )
+                {
+                    debug = atoi( optarg );
+                }
+                else
+                {
+                    debug = 1;
+                }
+                break;
+            case 'C':
+                cpu = atoi( optarg );
+                break;
+
+            case 'Z':
+                preset = 1;
+                preset_name = strdup(optarg);
+                break;
+            case 'z':
+                ShowPresets();
+                exit ( 0 );
+
+            case 'f':
+                format = strdup( optarg );
+                break;
+            case 'i':
+                input = strdup( optarg );
+                #ifdef __APPLE_CC__
+                char *devName = bsd_name_for_path( input );
+                if( devName == NULL )
+                {
+                    break;
+                }
+                if( device_is_dvd( devName ) )
+                {
+                    char *newInput = malloc( strlen("/dev/") + strlen( devName ) + 1);
+                    sprintf( newInput, "/dev/%s", devName );
+                    free(input);
+                    input = newInput;
+                }
+                #endif
+                break;
+            case 'o':
+                output = strdup( optarg );
+                break;
+            case '4':
+                largeFileSize = 1;
+                break;
+            case 'O':
+                mp4_optimize = 1;
+                break;
+            case 'I':
+                ipod_atom = 1;
+                break;
+
+            case 't':
+                titleindex = atoi( optarg );
+                break;
+            case 'L':
+                longest_title = 1;
+                break;
+            case 'c':
+            {
+                int start, end;
+                if( sscanf( optarg, "%d-%d", &start, &end ) == 2 )
+                {
+                    chapter_start = start;
+                    chapter_end   = end;
+                }
+                else if( sscanf( optarg, "%d", &start ) == 1 )
+                {
+                    chapter_start = start;
+                    chapter_end   = chapter_start;
+                }
+                else
+                {
+                    fprintf( stderr, "chapters: invalid syntax (%s)\n",
+                             optarg );
+                    return -1;
+                }
+                break;
+            }
+            case 'm':
+                if( optarg != NULL )
+                {
+                    marker_file = strdup( optarg );
+                }
+                chapter_markers = 1;
+                break;
+            case 'a':
+                if( optarg != NULL )
+                {
+                    atracks = strdup( optarg );
+                }
+                else
+                {
+                    atracks = "1" ;
+                }
+                break;
+            case '6':
+                if( optarg != NULL )
+                {
+                    mixdowns = strdup( optarg );
+                }
+                break;
+            case 'D':
+                if( optarg != NULL )
+                {
+                    dynamic_range_compression = strdup( optarg );
+                }
+                break;
+            case 's':
+                sub = atoi( optarg );
+                break;
+            case 'U':
+                subtitle_scan = 1;
+                break;
+            case 'F':
+                subtitle_force = 1;
+                break;
+            case 'N':
+                native_language = strdup( optarg );
+                break;
+            case '2':
+                twoPass = 1;
+                break;
+            case 'd':
+                if( optarg != NULL )
+                {
+                    if (!( strcmp( optarg, "fast" ) ))
+                    {
+                        deinterlace_opt = "-1";
+                    }
+                    else if (!( strcmp( optarg, "slow" ) ))
+                    {
+                        deinterlace_opt = "2";
+                    }
+                    else if (!( strcmp( optarg, "slower" ) ))
+                    {
+                        deinterlace_opt = "0";
+                    }
+                    else
+                    {
+                        deinterlace_opt = strdup( optarg );
+                    }
+                }
+                deinterlace = 1;
+                break;
+            case '7':
+                if( optarg != NULL )
+                {
+                    deblock_opt = strdup( optarg );
+                }
+                deblock = 1;
+                break;
+            case '8':
+                if( optarg != NULL )
+                {
+                    if (!( strcmp( optarg, "weak" ) ))
+                    {
+                        denoise_opt = "2:1:2:3";
+                    }
+                    else if (!( strcmp( optarg, "medium" ) ))
+                    {
+                        denoise_opt = "3:2:2:3";
+                    }
+                    else if (!( strcmp( optarg, "strong" ) ))
+                    {
+                        denoise_opt = "7:7:5:5";
+                    }
+                    else
+                    {
+                        denoise_opt = strdup( optarg );
+                    }
+                }
+                denoise = 1;
+                break;
+            case '9':
+                if( optarg != NULL )
+                {
+                    detelecine_opt = strdup( optarg );
+                }
+                detelecine = 1;
+                break;
+            case '5':
+                if( optarg != NULL )
+                {
+                    decomb_opt = strdup( optarg );
+                }
+                decomb = 1;
+                break;
+            case 'g':
+                grayscale = 1;
+                break;
+            case 'p':
+                pixelratio = 1;
+                break;
+            case 'P':
+                loosePixelratio = 1;
+                if( optarg != NULL )
+                {
+                    sscanf( optarg, "%i:%i:%i", &modulus, &par_width, &par_height );
+                }
+                break;
+            case 'e':
+                if( !strcasecmp( optarg, "ffmpeg" ) )
+                {
+                    vcodec = HB_VCODEC_FFMPEG;
+                }
+                else if( !strcasecmp( optarg, "xvid" ) )
+                {
+                    vcodec = HB_VCODEC_XVID;
+                }
+                else if( !strcasecmp( optarg, "x264" ) )
+                {
+                    vcodec = HB_VCODEC_X264;
+                }
+                else if( !strcasecmp( optarg, "x264b13" ) )
+                {
+                    vcodec = HB_VCODEC_X264;
+                    h264_13 = 1;
+                }
+                else if( !strcasecmp( optarg, "x264b30" ) )
+                {
+                    vcodec = HB_VCODEC_X264;
+                    h264_30 = 1;
+                }
+                else if( !strcasecmp( optarg, "theora" ) )
+                {
+                    vcodec = HB_VCODEC_THEORA;
+                }
+                else
+                {
+                    fprintf( stderr, "invalid codec (%s)\n", optarg );
+                    return -1;
+                }
+                break;
+            case 'E':
+                if( optarg != NULL )
+                {
+                    acodecs = strdup( optarg );
+                }
+                break;
+            case 'w':
+                width = atoi( optarg );
+                break;
+            case 'l':
+                height = atoi( optarg );
+                break;
+            case 'n':
+            {
+                int    i;
+                char * tmp = optarg;
+                for( i = 0; i < 4; i++ )
+                {
+                    if( !*tmp )
+                        break;
+                    crop[i] = strtol( tmp, &tmp, 0 );
+                    tmp++;
+                }
+                break;
+            }
+            case 'r':
+            {
+                int i;
+                vrate = 0;
+                for( i = 0; i < hb_video_rates_count; i++ )
+                {
+                    if( !strcmp( optarg, hb_video_rates[i].string ) )
+                    {
+                        vrate = hb_video_rates[i].rate;
+                        break;
+                    }
+                }
+                if( !vrate )
+                {
+                    fprintf( stderr, "invalid framerate %s\n", optarg );
+                }
+                break;
+            }
+            case 'R':
+                if( optarg != NULL )
+                {
+                    arates = strdup( optarg );
+                }
+                break;
+            case 'b':
+                vbitrate = atoi( optarg );
+                break;
+            case 'q':
+                vquality = atof( optarg );
+                break;
+            case 'S':
+                size = atoi( optarg );
+                break;
+            case 'B':
+                if( optarg != NULL )
+                {
+                    abitrates = strdup( optarg );
+                }
+                break;
+            case 'Q':
+                crf = 0;
+                break;
+            case 'x':
+                x264opts = strdup( optarg );
+                break;
+            case 'T':
+                turbo_opts_enabled = 1;
+                break;
+            case 'Y':
+                maxHeight = atoi( optarg );
+                break;
+            case 'X':
+                maxWidth = atoi (optarg );
+                break;
+            case 'A':
+                if( optarg != NULL )
+                {
+                    anames = strdup( optarg );
+                }
+                break;
+            case 'M':
+                if( atoi( optarg ) == 601 )
+                    color_matrix = 1;
+                else if( atoi( optarg ) == 709 )
+                    color_matrix = 2;
+                break;
+            default:
+                fprintf( stderr, "unknown option (%s)\n", argv[optind] );
+                return -1;
+        }
+    }
+
+    return 0;
+}
+
+static int CheckOptions( int argc, char ** argv )
+{
+    if( update )
+    {
+        return 0;
+    }
+
+    if( input == NULL || *input == '\0' )
+    {
+        fprintf( stderr, "Missing input device. Run %s --help for "
+                 "syntax.\n", argv[0] );
+        return 1;
+    }
+
+    /* Parse format */
+    if( titleindex > 0 )
+    {
+        if( output == NULL || *output == '\0' )
+        {
+            fprintf( stderr, "Missing output file name. Run %s --help "
+                     "for syntax.\n", argv[0] );
+            return 1;
+        }
+
+        if( !format )
+        {
+            char * p = strrchr( output, '.' );
+
+            /* autodetect */
+            if( p && !strcasecmp( p, ".avi" ) )
+            {
+                mux = HB_MUX_AVI;
+                default_acodec = HB_ACODEC_LAME;
+            }
+            else if( p && ( !strcasecmp( p, ".mp4" )  ||
+                            !strcasecmp( p, ".m4v" ) ) )
+            {
+                if ( h264_30 == 1 )
+                    mux = HB_MUX_IPOD;
+                else
+                    mux = HB_MUX_MP4;
+                default_acodec = HB_ACODEC_FAAC;
+            }
+            else if( p && ( !strcasecmp( p, ".ogm" ) ||
+                            !strcasecmp( p, ".ogg" ) ) )
+            {
+                mux = HB_MUX_OGM;
+                default_acodec = HB_ACODEC_VORBIS;
+            }
+            else if( p && !strcasecmp(p, ".mkv" ) )
+            {
+                mux = HB_MUX_MKV;
+                default_acodec = HB_ACODEC_AC3;
+            }
+            else
+            {
+                fprintf( stderr, "Output format couldn't be guessed "
+                         "from file name, using default.\n" );
+                return 0;
+            }
+        }
+        else if( !strcasecmp( format, "avi" ) )
+        {
+            mux = HB_MUX_AVI;
+            default_acodec = HB_ACODEC_LAME;
+        }
+        else if( !strcasecmp( format, "mp4" ) ||
+                 !strcasecmp( format, "m4v" ) )
+        {
+            if ( h264_30 == 1)
+                mux = HB_MUX_IPOD;
+            else
+                mux = HB_MUX_MP4;
+            default_acodec = HB_ACODEC_FAAC;
+        }
+        else if( !strcasecmp( format, "ogm" ) ||
+                 !strcasecmp( format, "ogg" ) )
+        {
+            mux = HB_MUX_OGM;
+            default_acodec = HB_ACODEC_VORBIS;
+        }
+        else if( !strcasecmp( format, "mkv" ) )
+        {
+            mux = HB_MUX_MKV;
+            default_acodec = HB_ACODEC_AC3;
+        }
+        else
+        {
+            fprintf( stderr, "Invalid output format (%s). Possible "
+                     "choices are avi, mp4, m4v, ogm, ogg and mkv\n.", format );
+            return 1;
+        }
+    }
+
+    return 0;
+}
+
+static int get_acodec_for_string( char *codec )
+{
+    if( !strcasecmp( codec, "ac3" ) )
+    {
+        return HB_ACODEC_AC3;
+    }
+    else if( !strcasecmp( codec, "dts" ) || !strcasecmp( codec, "dca" ) )
+    {
+        return HB_ACODEC_DCA;
+    }
+    else if( !strcasecmp( codec, "lame" ) )
+    {
+        return HB_ACODEC_LAME;
+    }
+    else if( !strcasecmp( codec, "faac" ) )
+    {
+        return HB_ACODEC_FAAC;
+    }
+    else if( !strcasecmp( codec, "vorbis") )
+    {
+        return HB_ACODEC_VORBIS;
+    }
+    else
+    {
+        return -1;
+    }
+}
+
+static int is_sample_rate_valid(int rate)
+{
+    int i;
+    for( i = 0; i < hb_audio_rates_count; i++ )
+    {
+            if (rate == hb_audio_rates[i].rate)
+                return 1;
+    }
+    return 0;
+}
+
+#ifdef __APPLE_CC__
+/****************************************************************************
+ * bsd_name_for_path
+ *
+ * Returns the BSD device name for the block device that contains the
+ * passed-in path. Returns NULL on failure.
+ ****************************************************************************/
+static char* bsd_name_for_path(char *path)
+{
+    OSStatus err;
+    FSRef ref;
+    err = FSPathMakeRef( (const UInt8 *) input, &ref, NULL );
+    if( err != noErr )
+    {
+        return NULL;
+    }
+
+    // Get the volume reference number.
+    FSCatalogInfo catalogInfo;
+    err = FSGetCatalogInfo( &ref, kFSCatInfoVolume, &catalogInfo, NULL, NULL,
+                            NULL);
+    if( err != noErr )
+    {
+        return NULL;
+    }
+    FSVolumeRefNum volRefNum = catalogInfo.volume;
+
+    // Now let's get the device name
+    GetVolParmsInfoBuffer volumeParms;
+    err = FSGetVolumeParms( volRefNum, &volumeParms, sizeof( volumeParms ) );
+    if( err != noErr )
+    {
+        return NULL;
+    }
+
+    // A version 4 GetVolParmsInfoBuffer contains the BSD node name in the
+    // vMDeviceID field. It is actually a char * value. This is mentioned in the
+    // header CoreServices/CarbonCore/Files.h.
+    return volumeParms.vMDeviceID;
+}
+
+/****************************************************************************
+ * device_is_dvd
+ *
+ * Returns whether or not the passed in BSD device represents a DVD, or other
+ * optical media.
+ ****************************************************************************/
+static int device_is_dvd(char *device)
+{
+    io_service_t service = get_iokit_service(device);
+    if( service == IO_OBJECT_NULL )
+    {
+        return 0;
+    }
+    int result = is_dvd_service(service);
+    IOObjectRelease(service);
+    return result;
+}
+
+/****************************************************************************
+ * get_iokit_service
+ *
+ * Returns the IOKit service object for the passed in BSD device name.
+ ****************************************************************************/
+static io_service_t get_iokit_service( char *device )
+{
+    CFMutableDictionaryRef matchingDict;
+    matchingDict = IOBSDNameMatching( kIOMasterPortDefault, 0, device );
+    if( matchingDict == NULL )
+    {
+        return IO_OBJECT_NULL;
+    }
+    // Fetch the object with the matching BSD node name. There should only be
+    // one match, so IOServiceGetMatchingService is used instead of
+    // IOServiceGetMatchingServices to simplify the code.
+    return IOServiceGetMatchingService( kIOMasterPortDefault, matchingDict );
+}
+
+/****************************************************************************
+ * is_dvd_service
+ *
+ * Returns whether or not the service passed in is a DVD.
+ *
+ * Searches for an IOMedia object that represents the entire (whole) media that
+ * the volume is on. If the volume is on partitioned media, the whole media
+ * object will be a parent of the volume's media object. If the media is not
+ * partitioned, the volume's media object will be the whole media object.
+ ****************************************************************************/
+static int is_dvd_service( io_service_t service )
+{
+    kern_return_t  kernResult;
+    io_iterator_t  iter;
+
+    // Create an iterator across all parents of the service object passed in.
+    kernResult = IORegistryEntryCreateIterator( service,
+                                                kIOServicePlane,
+                                                kIORegistryIterateRecursively | kIORegistryIterateParents,
+                                                &iter );
+    if( kernResult != KERN_SUCCESS )
+    {
+        return 0;
+    }
+    if( iter == IO_OBJECT_NULL )
+    {
+        return 0;
+    }
+
+    // A reference on the initial service object is released in the do-while
+    // loop below, so add a reference to balance.
+    IOObjectRetain( service );
+
+    int result = 0;
+    do
+    {
+        if( is_whole_media_service( service ) &&
+            IOObjectConformsTo( service, kIODVDMediaClass) )
+        {
+            result = 1;
+        }
+        IOObjectRelease( service );
+    } while( !result && (service = IOIteratorNext( iter )) );
+    IOObjectRelease( iter );
+
+    return result;
+}
+
+/****************************************************************************
+ * is_whole_media_service
+ *
+ * Returns whether or not the service passed in is an IOMedia service and
+ * represents the "whole" media instead of just a partition.
+ *
+ * The whole media object is indicated in the IORegistry by the presence of a
+ * property with the key "Whole" and value "Yes".
+ ****************************************************************************/
+static is_whole_media_service( io_service_t service )
+{
+    int result = 0;
+
+    if( IOObjectConformsTo( service, kIOMediaClass ) )
+    {
+        CFTypeRef wholeMedia = IORegistryEntryCreateCFProperty( service,
+                                                                CFSTR( kIOMediaWholeKey ),
+                                                                kCFAllocatorDefault,
+                                                                0 );
+        if ( !wholeMedia )
+        {
+            return 0;
+        }
+        result = CFBooleanGetValue( (CFBooleanRef)wholeMedia );
+        CFRelease( wholeMedia );
+    }
+
+    return result;
+}
+#endif // __APPLE_CC__
diff --git a/win/C#/Functions/AppcastReader.cs b/win/C#/Functions/AppcastReader.cs
new file mode 100644 (file)
index 0000000..dfe96eb
--- /dev/null
@@ -0,0 +1,143 @@
+/*  RssReader.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.IO;\r
+using System.Xml;\r
+using System.Text.RegularExpressions;\r
+\r
+namespace Handbrake.Functions\r
+{\r
+    public class AppcastReader\r
+    {\r
+        XmlDocument rssDoc;\r
+        XmlNode nodeRss;\r
+        XmlNode nodeChannel;\r
+        XmlNode nodeItem;\r
+        private string hb_description;\r
+        private string hb_version;\r
+        private string hb_build;\r
+        private string hb_file;\r
+\r
+        /// <summary>\r
+        /// Get the build information from the required appcasts.\r
+        /// This must be run before calling any of the public return functions.\r
+        /// </summary>\r
+        public void getInfo()\r
+        {\r
+            Match ver;\r
+            int stable_build, unstable_build = 0;\r
+            string input, unstable_description = "", stable_description, unstable_version = "", stable_version;\r
+            string stable_file, unstable_file = "";\r
+\r
+            // Check the stable appcast and get the stable build number\r
+            readRss(new XmlTextReader(Properties.Settings.Default.appcast));\r
+            input = nodeItem.InnerXml;\r
+            ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\""");\r
+            stable_build = int.Parse(ver.ToString().Replace("sparkle:version=", "").Replace("\"", ""));\r
+            ver = Regex.Match(input, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");\r
+            stable_version = ver.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
+            stable_description = nodeItem["description"].InnerText;\r
+            stable_file = nodeItem["windows"].InnerText;\r
+\r
+            // If this is a snapshot release, or the user wants to check for snapshot releases\r
+            if (Properties.Settings.Default.checkSnapshot == "Checked" || Properties.Settings.Default.hb_build.ToString().EndsWith("1"))\r
+            {\r
+                // Get the stable build\r
+                readRss(new XmlTextReader(Properties.Settings.Default.appcast_unstable));\r
+                input = nodeItem.InnerXml;\r
+                ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\""");\r
+                unstable_build = int.Parse(ver.ToString().Replace("sparkle:version=", "").Replace("\"", ""));\r
+                ver = Regex.Match(input, @"sparkle:shortVersionString=""([0-9a-zA-Z.]*)\""");\r
+                unstable_version = ver.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
+                unstable_description = nodeItem["description"].InnerText;\r
+                unstable_file = nodeItem["windows"].InnerText;\r
+            }\r
+\r
+\r
+            // Set the global version information\r
+            if (stable_build >= unstable_build)\r
+            {\r
+                hb_description = stable_description;\r
+                hb_version = stable_version;\r
+                hb_build = stable_build.ToString();\r
+                hb_file = stable_file;\r
+            }\r
+            else\r
+            {\r
+                hb_description = unstable_description;\r
+                hb_version = unstable_version;\r
+                hb_build = unstable_build.ToString();\r
+                hb_file = unstable_file;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Read the RSS file.\r
+        /// </summary>\r
+        /// <param name="rssReader"></param>\r
+        private void readRss(XmlTextReader rssReader)\r
+        {\r
+            rssDoc = new XmlDocument();\r
+            rssDoc.Load(rssReader);\r
+\r
+            for (int i = 0; i < rssDoc.ChildNodes.Count; i++)\r
+            {\r
+                if (rssDoc.ChildNodes[i].Name == "rss")\r
+                    nodeRss = rssDoc.ChildNodes[i];\r
+            }\r
+\r
+            for (int i = 0; i < nodeRss.ChildNodes.Count; i++)\r
+            {\r
+                if (nodeRss.ChildNodes[i].Name == "channel")\r
+                    nodeChannel = nodeRss.ChildNodes[i];\r
+            }\r
+\r
+            for (int i = 0; i < nodeChannel.ChildNodes.Count; i++)\r
+            {\r
+                if (nodeChannel.ChildNodes[i].Name == "item")\r
+                    nodeItem = nodeChannel.ChildNodes[i];\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get Information about an update to HandBrake\r
+        /// </summary>\r
+        /// <returns></returns>\r
+        public string versionInfo()\r
+        {\r
+            return hb_description;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get HandBrake's version from the appcast.xml file.\r
+        /// </summary>\r
+        /// <returns></returns>\r
+        public string version()\r
+        {\r
+            return hb_version;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get HandBrake's Build from the appcast.xml file.\r
+        /// </summary>\r
+        /// <returns></returns>\r
+        public string build()\r
+        {\r
+            return hb_build;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get's the URL for update file.\r
+        /// </summary>\r
+        /// <returns></returns>\r
+        public string downloadFile()\r
+        {\r
+            return hb_file;\r
+        }\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/Functions/Encode.cs b/win/C#/Functions/Encode.cs
new file mode 100644 (file)
index 0000000..0445392
--- /dev/null
@@ -0,0 +1,169 @@
+/*  CLI.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Threading;\r
+using System.Diagnostics;\r
+using System.Windows.Forms;\r
+using System.Globalization;\r
+using System.IO;\r
+using System.Runtime.InteropServices;\r
+\r
+namespace Handbrake.Functions\r
+{\r
+    public class Encode\r
+    {\r
+        /// <summary>\r
+        /// CLI output is based on en-US locale,\r
+        /// we use this CultureInfo as IFormatProvider to *.Parse() calls\r
+        /// </summary>\r
+        static readonly public CultureInfo Culture = new CultureInfo("en-US", false);\r
+\r
+        Process hbProc = new Process();\r
+\r
+        /// <summary>\r
+        /// Execute a HandBrakeCLI process.\r
+        /// </summary>\r
+        /// <param name="s"></param>\r
+        /// <param name="query">The CLI Query</param>\r
+        public Process runCli(object s, string query)\r
+        {\r
+            try\r
+            {\r
+                string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");\r
+                string logPath = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");\r
+\r
+                string strCmdLine = String.Format(@" CMD /c """"{0}"" {1} 2>""{2}"" """, handbrakeCLIPath, query, logPath);\r
+\r
+                ProcessStartInfo cliStart = new ProcessStartInfo("CMD.exe", strCmdLine);\r
+                if (Properties.Settings.Default.cli_minimized == "Checked")\r
+                    cliStart.WindowStyle = ProcessWindowStyle.Minimized;\r
+                hbProc = Process.Start(cliStart);\r
+\r
+                // Set the process Priority \r
+                switch (Properties.Settings.Default.processPriority)\r
+                {\r
+                    case "Realtime":\r
+                        hbProc.PriorityClass = ProcessPriorityClass.RealTime;\r
+                        break;\r
+                    case "High":\r
+                        hbProc.PriorityClass = ProcessPriorityClass.High;\r
+                        break;\r
+                    case "Above Normal":\r
+                        hbProc.PriorityClass = ProcessPriorityClass.AboveNormal;\r
+                        break;\r
+                    case "Normal":\r
+                        hbProc.PriorityClass = ProcessPriorityClass.Normal;\r
+                        break;\r
+                    case "Low":\r
+                        hbProc.PriorityClass = ProcessPriorityClass.Idle;\r
+                        break;\r
+                    default:\r
+                        hbProc.PriorityClass = ProcessPriorityClass.BelowNormal;\r
+                        break;\r
+                }\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("An error occured in runCli()\n Error Information: \n\n" + exc.ToString());\r
+            }\r
+            return hbProc;\r
+        }\r
+\r
+        [DllImport("user32.dll")]\r
+        public static extern void LockWorkStation();\r
+        [DllImport("user32.dll")]\r
+        public static extern int ExitWindowsEx(int uFlags, int dwReason);\r
+\r
+        public void afterEncodeAction()\r
+        {\r
+            // Do something whent he encode ends.\r
+            switch (Properties.Settings.Default.CompletionOption)\r
+            {\r
+                case "Shutdown":\r
+                    System.Diagnostics.Process.Start("Shutdown", "-s -t 60");\r
+                    break;\r
+                case "Log Off":\r
+                    ExitWindowsEx(0, 0);\r
+                    break;\r
+                case "Suspend":\r
+                    Application.SetSuspendState(PowerState.Suspend, true, true);\r
+                    break;\r
+                case "Hibernate":\r
+                    Application.SetSuspendState(PowerState.Hibernate, true, true);\r
+                    break;\r
+                case "Lock System":\r
+                    LockWorkStation();\r
+                    break;\r
+                case "Quit HandBrake":\r
+                    Application.Exit();\r
+                    break;\r
+                default:\r
+                    break;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Append the CLI query to the start of the log file.\r
+        /// </summary>\r
+        /// <param name="query"></param>\r
+        public void addCLIQueryToLog(string query)\r
+        {\r
+            string logPath = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");\r
+\r
+            StreamReader reader = new StreamReader(File.Open(logPath, FileMode.Open, FileAccess.Read));\r
+            String log = reader.ReadToEnd();\r
+            reader.Close();\r
+\r
+            StreamWriter writer = new StreamWriter(File.Create(logPath));\r
+\r
+            writer.Write("### CLI Query: " + query + "\n\n");\r
+            writer.Write("#########################################\n\n");\r
+            writer.WriteLine(log);\r
+            writer.Flush();\r
+            writer.Close();\r
+        }\r
+\r
+        /// <summary>\r
+        /// Save a copy of the log to the users desired location or a default location\r
+        /// if this feature is enabled in options.\r
+        /// </summary>\r
+        /// <param name="query"></param>\r
+        public void copyLog(string query)\r
+        {\r
+            // The user may wish to do something with the log.\r
+            if (Properties.Settings.Default.saveLog == "Checked")\r
+            {\r
+                string logPath = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");\r
+                Functions.QueryParser parsed = Functions.QueryParser.Parse(query);\r
+\r
+                if (Properties.Settings.Default.saveLogWithVideo == "Checked")\r
+                {\r
+                    string[] destName = parsed.Destination.Split('\\');\r
+                    string destinationFile = "";\r
+                    for (int i = 0; i < destName.Length - 1; i++)\r
+                    {\r
+                        destinationFile += destName[i] + "\\";\r
+                    }\r
+\r
+                    destinationFile += DateTime.Now.ToString().Replace("/", "-").Replace(":", "-") + " " + destName[destName.Length - 1] + ".txt"; \r
+\r
+                    File.Copy(logPath, destinationFile);\r
+                }\r
+                else if (Properties.Settings.Default.saveLogPath != String.Empty)\r
+                {\r
+                    string[] destName = parsed.Destination.Split('\\');\r
+                    string dest = destName[destName.Length - 1];\r
+                    string filename = DateTime.Now.ToString().Replace("/", "-").Replace(":", "-") + " " + dest + ".txt";\r
+                    string useDefinedLogPath = Path.Combine(Properties.Settings.Default.saveLogPath, filename);\r
+\r
+                    File.Copy(logPath, useDefinedLogPath);\r
+                }\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
new file mode 100644 (file)
index 0000000..f8600d3
--- /dev/null
@@ -0,0 +1,390 @@
+/*  Common.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.Globalization;\r
+using System.IO;\r
+using System.Drawing;\r
+using System.Diagnostics;\r
+using System.Text.RegularExpressions;\r
+\r
+namespace Handbrake.Functions\r
+{\r
+    class Main\r
+    {\r
+        /// <summary>\r
+        /// Calculate the duration of the selected title and chapters\r
+        /// </summary>\r
+        public TimeSpan calculateDuration(string chapter_start, string chapter_end, Parsing.Title selectedTitle)\r
+        {\r
+            TimeSpan Duration = TimeSpan.FromSeconds(0.0);\r
+\r
+            // Get the durations between the 2 chapter points and add them together.\r
+            if (chapter_start != "Auto" && chapter_end != "Auto")\r
+            {\r
+                int start_chapter, end_chapter = 0;\r
+                int.TryParse(chapter_start, out start_chapter);\r
+                int.TryParse(chapter_end, out end_chapter);\r
+\r
+                int position = start_chapter - 1;\r
+\r
+                if (start_chapter <= end_chapter)\r
+                {\r
+                    if (end_chapter > selectedTitle.Chapters.Count)\r
+                        end_chapter = selectedTitle.Chapters.Count;\r
+\r
+                    while (position != end_chapter)\r
+                    {\r
+                        TimeSpan dur = selectedTitle.Chapters[position].Duration;\r
+                        Duration = Duration + dur;\r
+                        position++;\r
+                    }\r
+                }\r
+            }\r
+            return Duration;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Calculate the non-anamorphic resoltuion of the source\r
+        /// </summary>\r
+        /// <param name="width"></param>\r
+        /// <returns></returns>\r
+        public int cacluateNonAnamorphicHeight(int width, decimal top, decimal bottom, decimal left, decimal right, Parsing.Title selectedTitle)\r
+        {\r
+            float aspect = selectedTitle.AspectRatio;\r
+            int aw;\r
+            int ah;\r
+            if (aspect.ToString() == "1.78")\r
+            {\r
+                aw = 16;\r
+                ah = 9;\r
+            }\r
+            else\r
+            {\r
+                aw = 4;\r
+                ah = 3;\r
+            }\r
+\r
+            double a = width * selectedTitle.Resolution.Width * ah * (selectedTitle.Resolution.Height - (double)top - (double)bottom);\r
+            double b = selectedTitle.Resolution.Height * aw * (selectedTitle.Resolution.Width - (double)left - (double)right);\r
+\r
+            double y = a / b;\r
+\r
+            // If it's not Mod 16, make it mod 16\r
+            if ((y % 16) != 0)\r
+            {\r
+                double mod16 = y % 16;\r
+                if (mod16 >= 8)\r
+                {\r
+                    mod16 = 16 - mod16;\r
+                    y = y + mod16;\r
+                }\r
+                else\r
+                {\r
+                    y = y - mod16;\r
+                }\r
+            }\r
+\r
+            //16 * (421 / 16)\r
+            //double z = ( 16 * (( y + 8 ) / 16 ) );\r
+            int x = int.Parse(y.ToString());\r
+            return x;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Select the longest title in the DVD title dropdown menu on frmMain\r
+        /// </summary>\r
+        public Handbrake.Parsing.Title selectLongestTitle(ComboBox drp_dvdtitle)\r
+        {\r
+            int current_largest = 0;\r
+            Handbrake.Parsing.Title title2Select;\r
+\r
+            // Check if there are titles in the DVD title dropdown menu and make sure, it's not just "Automatic"\r
+            if (drp_dvdtitle.Items[0].ToString() != "Automatic")\r
+                title2Select = (Handbrake.Parsing.Title)drp_dvdtitle.Items[0];\r
+            else\r
+                title2Select = null;\r
+\r
+            // So, If there are titles in the DVD Title dropdown menu, lets select the longest.\r
+            if (title2Select != null)\r
+            {\r
+                foreach (Handbrake.Parsing.Title x in drp_dvdtitle.Items)\r
+                {\r
+                    string title = x.ToString();\r
+                    if (title != "Automatic")\r
+                    {\r
+                        string[] y = title.Split(' ');\r
+                        string time = y[1].Replace("(", "").Replace(")", "");\r
+                        string[] z = time.Split(':');\r
+\r
+                        int hours = int.Parse(z[0]) * 60 * 60;\r
+                        int minutes = int.Parse(z[1]) * 60;\r
+                        int seconds = int.Parse(z[2]);\r
+                        int total_sec = hours + minutes + seconds;\r
+\r
+                        if (current_largest == 0)\r
+                        {\r
+                            current_largest = hours + minutes + seconds;\r
+                            title2Select = x;\r
+                        }\r
+                        else\r
+                        {\r
+                            if (total_sec > current_largest)\r
+                            {\r
+                                current_largest = total_sec;\r
+                                title2Select = x;\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            return title2Select;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Set's up the DataGridView on the Chapters tab (frmMain)\r
+        /// </summary>\r
+        /// <param name="mainWindow"></param>\r
+        public DataGridView chapterNaming(DataGridView data_chpt, string chapter_start, string chapter_end)\r
+        {\r
+            try\r
+            {\r
+                int i = 0;\r
+                int rowCount = 0;\r
+                int start = 0;\r
+                int finish = 0;\r
+                if (chapter_end != "Auto")\r
+                    finish = int.Parse(chapter_end);\r
+\r
+                if (chapter_start != "Auto")\r
+                    start = int.Parse(chapter_start);\r
+\r
+                rowCount = finish - (start - 1);\r
+\r
+                while (i < rowCount)\r
+                {\r
+                    DataGridViewRow row = new DataGridViewRow();\r
+\r
+                    data_chpt.Rows.Insert(i, row);\r
+                    data_chpt.Rows[i].Cells[0].Value = (i + 1);\r
+                    data_chpt.Rows[i].Cells[1].Value = "Chapter " + (i + 1);\r
+                    i++;\r
+                }\r
+                return data_chpt;\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("chapterNaming() Error has occured: \n" + exc.ToString());\r
+                return null;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Function which generates the filename and path automatically based on \r
+        /// the Source Name, DVD title and DVD Chapters\r
+        /// </summary>\r
+        /// <param name="mainWindow"></param>\r
+        public string autoName(ComboBox drp_dvdtitle, string chapter_start, string chatper_end, string source, string dest, int format)\r
+        {\r
+\r
+            string AutoNamePath = string.Empty;\r
+\r
+            if (drp_dvdtitle.Text != "Automatic")\r
+            {\r
+                // Todo: This code is a tad messy. Clean it up at some point.\r
+                // Get the Source Name\r
+                string[] sourceName = source.Split('\\');\r
+                source = sourceName[sourceName.Length - 1].Replace(".iso", "").Replace(".mpg", "").Replace(".ts", "").Replace(".ps", "");\r
+\r
+                // Get the Selected Title Number\r
+                string title = drp_dvdtitle.Text;\r
+                string[] titlesplit = title.Split(' ');\r
+                title = titlesplit[0];\r
+\r
+                // Get the Chapter Start and Chapter End Numbers\r
+                string cs = chapter_start;\r
+                string cf = chatper_end;\r
+\r
+                // Just incase the above are set to their default Automatic values, set the varible to ""\r
+                if (title == "Automatic")\r
+                    title = "";\r
+                if (cs == "Auto")\r
+                    cs = "";\r
+                if (cf == "Auto")\r
+                    cf = "";\r
+\r
+                // If both CS and CF are populated, set the dash varible\r
+                string dash = "";\r
+                if (cf != "Auto")\r
+                    dash = "-";\r
+\r
+                // Get the destination filename.\r
+                string destination_filename = "";\r
+                if (Properties.Settings.Default.autoNameFormat != "")\r
+                {\r
+                    destination_filename = Properties.Settings.Default.autoNameFormat;\r
+                    destination_filename = destination_filename.Replace("{source}", source).Replace("{title}", title).Replace("{chapters}", cs + dash + cf);\r
+                }\r
+                else\r
+                    destination_filename = source + "_T" + title + "_C" + cs + dash + cf;\r
+\r
+                // If the text box is blank\r
+                if (!dest.Contains("\\"))\r
+                {\r
+                    string filePath = "";\r
+                    if (Properties.Settings.Default.autoNamePath.Trim() != "")\r
+                    {\r
+                        if (Properties.Settings.Default.autoNamePath.Trim() != "Click 'Browse' to set the default location")\r
+                            filePath = Properties.Settings.Default.autoNamePath + "\\";\r
+                    }\r
+\r
+                    if (format == 0)\r
+                        AutoNamePath = filePath + destination_filename + ".mp4";\r
+                    else if (format == 1)\r
+                        AutoNamePath = filePath + destination_filename + ".m4v";\r
+                    else if (format == 2)\r
+                        AutoNamePath = filePath + destination_filename + ".mkv";\r
+                    else if (format == 3)\r
+                        AutoNamePath = filePath + destination_filename + ".avi";\r
+                    else if (format == 4)\r
+                        AutoNamePath = filePath + destination_filename + ".ogm";\r
+                }\r
+                else // If the text box already has a path and file\r
+                {\r
+                    string destination = AutoNamePath;\r
+                    string[] destName = dest.Split('\\');\r
+                    string[] extension = dest.Split('.');\r
+                    string ext = extension[extension.Length - 1];\r
+\r
+                    destName[destName.Length - 1] = destination_filename + "." + ext;\r
+\r
+                    string fullDest = "";\r
+                    foreach (string part in destName)\r
+                    {\r
+                        if (fullDest != "")\r
+                            fullDest = fullDest + "\\" + part;\r
+                        else\r
+                            fullDest = fullDest + part;\r
+                    }\r
+                    return fullDest;\r
+                }\r
+            }\r
+            return AutoNamePath;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Checks for updates and returns true if an update is available.\r
+        /// </summary>\r
+        /// <param name="debug">Turns on debug mode. Don't use on program startup</param>\r
+        /// <returns>Boolean True = Update available</returns>\r
+        public Boolean updateCheck(Boolean debug)\r
+        {\r
+            try\r
+            {\r
+                Functions.AppcastReader rssRead = new Functions.AppcastReader();\r
+                rssRead.getInfo(); // Initializes the class.\r
+                string build = rssRead.build();\r
+\r
+                int latest = int.Parse(build);\r
+                int current = Properties.Settings.Default.hb_build;\r
+                int skip = Properties.Settings.Default.skipversion;\r
+\r
+                if (latest == skip)\r
+                    return false;\r
+                else\r
+                {\r
+                    Boolean update = (latest > current);\r
+                    return update;\r
+                }\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                if (debug == true)\r
+                    MessageBox.Show("Unable to check for updates, Please try again later. \n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                return false;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get's HandBrakes version data from the CLI.\r
+        /// </summary>\r
+        /// <returns>Arraylist of Version Data. 0 = hb_version 1 = hb_build</returns>\r
+        public ArrayList getCliVersionData()\r
+        {\r
+            ArrayList cliVersionData = new ArrayList();\r
+            // 0 = SVN Build / Version\r
+            // 1 = Build Date\r
+\r
+            Process cliProcess = new Process();\r
+            ProcessStartInfo handBrakeCLI = new ProcessStartInfo("HandBrakeCLI.exe", " -u");\r
+            handBrakeCLI.UseShellExecute = false;\r
+            handBrakeCLI.RedirectStandardError = true;\r
+            handBrakeCLI.RedirectStandardOutput = true;\r
+            handBrakeCLI.CreateNoWindow = true;\r
+            cliProcess.StartInfo = handBrakeCLI;\r
+            cliProcess.Start();\r
+\r
+            // Retrieve standard output and report back to parent thread until the process is complete\r
+            String line;\r
+            TextReader stdOutput = cliProcess.StandardError;\r
+\r
+            while (!cliProcess.HasExited)\r
+            {\r
+                line = stdOutput.ReadLine();\r
+                if (line == null) line = "";\r
+                Match m = Regex.Match(line, @"HandBrake ([0-9\.]*)*(svn[0-9]*[M]*)* \([0-9]*\)");\r
+\r
+                if (m.Success != false)\r
+                {\r
+                    string data = line.Replace("(", "").Replace(")", "").Replace("HandBrake ", "");\r
+                    string[] arr = data.Split(' ');\r
+                    cliVersionData.Add(arr[0]);\r
+                    cliVersionData.Add(arr[1]);\r
+                    return cliVersionData;\r
+                }\r
+            }\r
+            return null;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Check if the queue recovery file contains records.\r
+        /// If it does, it means the last queue did not complete before HandBrake closed.\r
+        /// So, return a boolean if true. \r
+        /// </summary>\r
+        public Boolean check_queue_recovery()\r
+        {\r
+            try\r
+            {\r
+                string tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");\r
+                using (StreamReader reader = new StreamReader(tempPath))\r
+                {\r
+                    string queue_item = reader.ReadLine();\r
+                    if (queue_item == null)\r
+                    {\r
+                        reader.Close();\r
+                        reader.Dispose();\r
+                        return false;\r
+                    }\r
+                    else // There exists an item in the recovery queue file, so try and recovr it.\r
+                    {\r
+                        reader.Close();\r
+                        reader.Dispose();\r
+                        return true;\r
+                    }\r
+                }\r
+            }\r
+            catch (Exception)\r
+            {\r
+                // Keep quiet about the error.\r
+                return false;\r
+            }\r
+        }\r
+\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
new file mode 100644 (file)
index 0000000..3e8b18e
--- /dev/null
@@ -0,0 +1,1339 @@
+/*  QueryParser.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using System.Text.RegularExpressions;\r
+using System.Windows.Forms;\r
+\r
+namespace Handbrake.Functions\r
+{\r
+    class QueryParser\r
+    {\r
+\r
+        // All the Main Window GUI options\r
+        #region Varibles\r
+\r
+        #region Source\r
+\r
+        private string q_source;\r
+        /// <summary>\r
+        /// Returns a String \r
+        /// Full path of the source.\r
+        /// </summary>\r
+        public string Source\r
+        {\r
+            get\r
+            {\r
+                return this.q_source;\r
+            }\r
+        }\r
+\r
+        private int q_dvdTitle;\r
+        /// <summary>\r
+        /// Returns an Integer\r
+        /// DVD Title number.\r
+        /// </summary>\r
+        public int DVDTitle\r
+        {\r
+            get\r
+            {\r
+                return this.q_dvdTitle;\r
+            }\r
+        }\r
+\r
+        private int q_chaptersStart;\r
+        /// <summary>\r
+        /// Returns an Int\r
+        /// DVD Chapter number or chapter range.\r
+        /// </summary>\r
+        public int DVDChapterStart\r
+        {\r
+            get\r
+            {\r
+                return this.q_chaptersStart;\r
+            }\r
+        }\r
+\r
+        private int q_chaptersFinish;\r
+        /// <summary>\r
+        /// Returns an Int\r
+        /// DVD Chapter number or chapter range.\r
+        /// </summary>\r
+        public int DVDChapterFinish\r
+        {\r
+            get\r
+            {\r
+                return this.q_chaptersFinish;\r
+            }\r
+        }\r
+#endregion\r
+\r
+        #region Destination\r
+\r
+        private string q_destination;\r
+        /// <summary>\r
+        /// Returns a String \r
+        /// Full path of the destination.\r
+        /// </summary>\r
+        public string Destination\r
+        {\r
+            get\r
+            {\r
+                return this.q_destination;\r
+            }\r
+        }\r
+\r
+        private string q_format;\r
+        /// <summary>\r
+        /// Returns a String \r
+        /// Full path of the destination.\r
+        /// </summary>\r
+        public string Format\r
+        {\r
+            get\r
+            {\r
+                return this.q_format;\r
+            }\r
+        }\r
+\r
+        private string q_videoEncoder;\r
+        /// <summary>\r
+        /// Returns an String\r
+        /// The Video Encoder used.\r
+        /// </summary>\r
+        public string VideoEncoder\r
+        {\r
+            get\r
+            {\r
+                return this.q_videoEncoder;\r
+            }\r
+        }\r
+        #endregion\r
+\r
+        #region Picture Settings\r
+        private int q_videoWidth;\r
+        /// <summary>\r
+        /// Returns an Int\r
+        /// The selected Width for the encoding.\r
+        /// </summary>\r
+        public int Width\r
+        {\r
+            get\r
+            {\r
+                return this.q_videoWidth;\r
+            }\r
+        }\r
+\r
+        private int q_videoHeight;\r
+        /// <summary>\r
+        /// Returns an Int\r
+        /// The selected Height for the encoding.\r
+        /// </summary>\r
+        public int Height\r
+        {\r
+            get\r
+            {\r
+                return this.q_videoHeight;\r
+            }\r
+        }\r
+\r
+        private int q_maxWidth;\r
+        /// <summary>\r
+        /// Returns an Int\r
+        /// The selected Width for the encoding.\r
+        /// </summary>\r
+        public int MaxWidth\r
+        {\r
+            get\r
+            {\r
+                return this.q_maxWidth;\r
+            }\r
+        }\r
+\r
+        private int q_maxHeight;\r
+        /// <summary>\r
+        /// Returns an Int\r
+        /// The selected Height for the encoding.\r
+        /// </summary>\r
+        public int MaxHeight\r
+        {\r
+            get\r
+            {\r
+                return this.q_maxHeight;\r
+            }\r
+        }\r
+\r
+        private string q_cropValues;\r
+        /// <summary>\r
+        /// Returns an String\r
+        /// Cropping values.\r
+        /// </summary>\r
+        public string CropValues\r
+        {\r
+            get\r
+            {\r
+                return this.q_cropValues;\r
+            }\r
+        }\r
+\r
+        private string q_croptop;\r
+        /// <summary>\r
+        /// Returns an String\r
+        /// Cropping values.\r
+        /// </summary>\r
+        public string CropTop\r
+        {\r
+            get\r
+            {\r
+                return this.q_croptop;\r
+            }\r
+        }\r
+\r
+        private string q_cropbottom;\r
+        /// <summary>\r
+        /// Returns an String\r
+        /// Cropping values.\r
+        /// </summary>\r
+        public string CropBottom\r
+        {\r
+            get\r
+            {\r
+                return this.q_cropbottom;\r
+            }\r
+        }\r
+\r
+        private string q_cropLeft;\r
+        /// <summary>\r
+        /// Returns an String\r
+        /// Cropping values.\r
+        /// </summary>\r
+        public string CropLeft\r
+        {\r
+            get\r
+            {\r
+                return this.q_cropLeft;\r
+            }\r
+        }\r
+\r
+        private string q_cropRight;\r
+        /// <summary>\r
+        /// Returns an String\r
+        /// Cropping values.\r
+        /// </summary>\r
+        public string CropRight\r
+        {\r
+            get\r
+            {\r
+                return this.q_cropRight;\r
+            }\r
+        }\r
+\r
+        private Boolean q_detelecine;\r
+        /// <summary>\r
+        /// Returns a boolean to indicate wither DeTelecine is on or off\r
+        /// </summary>\r
+        public Boolean DeTelecine\r
+        {\r
+            get\r
+            {\r
+                return this.q_detelecine;\r
+            }\r
+        }\r
+\r
+        private int q_deBlock;\r
+        /// <summary>\r
+        /// Returns a boolean to indicate wither DeBlock is on or off.\r
+        /// </summary>\r
+        public int DeBlock\r
+        {\r
+            get\r
+            {\r
+                return this.q_deBlock;\r
+            }\r
+        }\r
+\r
+        private string q_deinterlace;\r
+        /// <summary>\r
+        /// Returns a string with the De-Interlace option used.\r
+        /// </summary>\r
+        public string DeInterlace\r
+        {\r
+            get\r
+            {\r
+                return this.q_deinterlace;\r
+            }\r
+        }\r
+\r
+        private string q_denoise;\r
+        /// <summary>\r
+        /// Returns a string with the DeNoise option used.\r
+        /// </summary>\r
+        public string DeNoise\r
+        {\r
+            get\r
+            {\r
+                return this.q_denoise;\r
+            }\r
+        }\r
+\r
+        private Boolean q_decomb;\r
+        /// <summary>\r
+        /// Returns a string with the DeNoise option used.\r
+        /// </summary>\r
+        public Boolean Decomb\r
+        {\r
+            get\r
+            {\r
+                return this.q_decomb;\r
+            }\r
+        }\r
+\r
+        private Boolean q_anamorphic;\r
+        /// <summary>\r
+        /// Returns a boolean to indicate wither Anamorphic is on or off.\r
+        /// </summary>\r
+        public Boolean Anamorphic\r
+        {\r
+            get\r
+            {\r
+                return this.q_anamorphic;\r
+            }\r
+        }\r
+\r
+        private Boolean q_looseAnamorphic;\r
+        /// <summary>\r
+        /// Returns a boolean to indicate wither Anamorphic is on or off.\r
+        /// </summary>\r
+        public Boolean LooseAnamorphic\r
+        {\r
+            get\r
+            {\r
+                return this.q_looseAnamorphic;\r
+            }\r
+        }\r
+\r
+        private Boolean q_chapterMarkers;\r
+        /// <summary>\r
+        /// Returns a boolean to indicate wither Chapter Markers is on or off.\r
+        /// </summary>\r
+        public Boolean ChapterMarkers\r
+        {\r
+            get\r
+            {\r
+                return this.q_chapterMarkers;\r
+            }\r
+        }\r
+        #endregion\r
+\r
+        #region Video Settings\r
+        private Boolean q_grayscale;\r
+        /// <summary>\r
+        /// Returns a boolean to indicate wither Grayscale is on or off.\r
+        /// </summary>\r
+        public Boolean Grayscale\r
+        {\r
+            get\r
+            {\r
+                return this.q_grayscale;\r
+            }\r
+        }\r
+\r
+        private Boolean q_twoPass;\r
+        /// <summary>\r
+        /// Returns a boolean to indicate wither Two Pass Encoding is on or off.\r
+        /// </summary>\r
+        public Boolean TwoPass\r
+        {\r
+            get\r
+            {\r
+                return this.q_twoPass;\r
+            }\r
+        }\r
+\r
+        private Boolean q_turboFirst;\r
+        /// <summary>\r
+        /// Returns a boolean to indicate wither Chapter Markers is on or off.\r
+        /// </summary>\r
+        public Boolean TurboFirstPass\r
+        {\r
+            get\r
+            {\r
+                return this.q_turboFirst;\r
+            }\r
+        }\r
+\r
+        private Boolean q_largeMp4;\r
+        /// <summary>\r
+        /// Returns a boolean to indicate wither Larger MP4 files is on or off.\r
+        /// </summary>\r
+        public Boolean LargeMP4\r
+        {\r
+            get\r
+            {\r
+                return this.q_largeMp4;\r
+            }\r
+        }\r
+\r
+        private Boolean q_ipodAtom;\r
+        /// <summary>\r
+        /// Returns a boolean to indicate wither Larger MP4 files is on or off.\r
+        /// </summary>\r
+        public Boolean IpodAtom\r
+        {\r
+            get\r
+            {\r
+                return this.q_ipodAtom;\r
+            }\r
+        }\r
+\r
+        private Boolean q_optimizeMp4;\r
+        /// <summary>\r
+        /// Returns a boolean to indicate wither Larger MP4 files is on or off.\r
+        /// </summary>\r
+        public Boolean OptimizeMP4\r
+        {\r
+            get\r
+            {\r
+                return this.q_optimizeMp4;\r
+            }\r
+        }\r
+\r
+        private string q_videoFramerate;\r
+        /// <summary>\r
+        /// Returns a string with the video Framerate\r
+        /// </summary>\r
+        public string VideoFramerate\r
+        {\r
+            get\r
+            {\r
+                return this.q_videoFramerate;\r
+            }\r
+        }\r
+\r
+        private string q_avgBitrate;\r
+        /// <summary>\r
+        /// Returns a string with the average video bitrate\r
+        /// </summary>\r
+        public string AverageVideoBitrate\r
+        {\r
+            get\r
+            {\r
+                return this.q_avgBitrate;\r
+            }\r
+        }\r
+\r
+        private string q_videoTargetSize;\r
+        /// <summary>\r
+        /// Returns a string with the video target size\r
+        /// </summary>\r
+        public string VideoTargetSize\r
+        {\r
+            get\r
+            {\r
+                return this.q_videoTargetSize;\r
+            }\r
+        }\r
+\r
+        private int q_videoQuality;\r
+        /// <summary>\r
+        /// Returns a int with the video quality value\r
+        /// </summary>\r
+        public int VideoQuality\r
+        {\r
+            get\r
+            {\r
+                return this.q_videoQuality;\r
+            }\r
+        }\r
+\r
+        #endregion\r
+\r
+        #region Audio Settings\r
+        private string q_audioTrack1;\r
+        /// <summary>\r
+        /// Returns a string with the selected Audio track\r
+        /// </summary>\r
+        public string AudioTrack1\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioTrack1;\r
+            }\r
+        }\r
+\r
+        private string q_audioTrack2;\r
+        /// <summary>\r
+        /// Returns a string with the selected Audio track\r
+        /// </summary>\r
+        public string AudioTrack2\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioTrack2;\r
+            }\r
+        }\r
+\r
+        private string q_audioTrack3;\r
+        /// <summary>\r
+        /// Returns a string with the selected Audio track\r
+        /// </summary>\r
+        public string AudioTrack3\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioTrack3;\r
+            }\r
+        }\r
+\r
+        private string q_audioTrack4;\r
+        /// <summary>\r
+        /// Returns a string with the selected Audio track\r
+        /// </summary>\r
+        public string AudioTrack4\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioTrack4;\r
+            }\r
+        }\r
+\r
+        private string q_audioTrackMix1;\r
+        /// <summary>\r
+        /// Returns a string with the First selected Audio track Mix\r
+        /// </summary>\r
+        public string AudioTrackMix1\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioTrackMix1;\r
+            }\r
+        }\r
+\r
+        private string q_audioTrackMix2;\r
+        /// <summary>\r
+        /// Returns a string with the First selected Audio track Mix\r
+        /// </summary>\r
+        public string AudioTrackMix2\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioTrackMix2;\r
+            }\r
+        }\r
+\r
+        private string q_audioTrackMix3;\r
+        /// <summary>\r
+        /// Returns a string with the First selected Audio track Mix\r
+        /// </summary>\r
+        public string AudioTrackMix3\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioTrackMix3;\r
+            }\r
+        }\r
+\r
+        private string q_audioTrackMix4;\r
+        /// <summary>\r
+        /// Returns a string with the First selected Audio track Mix\r
+        /// </summary>\r
+        public string AudioTrackMix4\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioTrackMix4;\r
+            }\r
+        }\r
+\r
+        private string q_audioEncoder1;\r
+        /// <summary>\r
+        /// Returns an String\r
+        /// The Audio Encoder used.\r
+        /// </summary>\r
+        public string AudioEncoder1\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioEncoder1;\r
+            }\r
+        }\r
+\r
+        private string q_audioEncoder2;\r
+        /// <summary>\r
+        /// Returns an String\r
+        /// The Audio Encoder used.\r
+        /// </summary>\r
+        public string AudioEncoder2\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioEncoder2;\r
+            }\r
+        }\r
+\r
+        private string q_audioEncoder3;\r
+        /// <summary>\r
+        /// Returns an String\r
+        /// The Audio Encoder used.\r
+        /// </summary>\r
+        public string AudioEncoder3\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioEncoder3;\r
+            }\r
+        }\r
+\r
+        private string q_audioEncoder4;\r
+        /// <summary>\r
+        /// Returns an String\r
+        /// The Audio Encoder used.\r
+        /// </summary>\r
+        public string AudioEncoder4\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioEncoder4;\r
+            }\r
+        }\r
+\r
+        private string q_audioBitrate1;\r
+        /// <summary>\r
+        /// Returns a string with the audio bitrate\r
+        /// </summary>\r
+        public string AudioBitrate1\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioBitrate1;\r
+            }\r
+        }\r
+\r
+        private string q_audioBitrate2;\r
+        /// <summary>\r
+        /// Returns a string with the audio bitrate\r
+        /// </summary>\r
+        public string AudioBitrate2\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioBitrate2;\r
+            }\r
+        }\r
+\r
+        private string q_audioBitrate3;\r
+        /// <summary>\r
+        /// Returns a string with the audio bitrate\r
+        /// </summary>\r
+        public string AudioBitrate3\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioBitrate3;\r
+            }\r
+        }\r
+\r
+        private string q_audioBitrate4;\r
+        /// <summary>\r
+        /// Returns a string with the audio bitrate\r
+        /// </summary>\r
+        public string AudioBitrate4\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioBitrate4;\r
+            }\r
+        }\r
+\r
+        private string q_audioSamplerate1;\r
+        /// <summary>\r
+        /// Returns a string with the audio sample rate\r
+        /// </summary>\r
+        public string AudioSamplerate1\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioSamplerate1;\r
+            }\r
+        }\r
+\r
+        private string q_audioSamplerate2;\r
+        /// <summary>\r
+        /// Returns a string with the audio sample rate\r
+        /// </summary>\r
+        public string AudioSamplerate2\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioSamplerate2;\r
+            }\r
+        }\r
+\r
+        private string q_audioSamplerate3;\r
+        /// <summary>\r
+        /// Returns a string with the audio sample rate\r
+        /// </summary>\r
+        public string AudioSamplerate3\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioSamplerate3;\r
+            }\r
+        }\r
+\r
+        private string q_audioSamplerate4;\r
+        /// <summary>\r
+        /// Returns a string with the audio sample rate\r
+        /// </summary>\r
+        public string AudioSamplerate4\r
+        {\r
+            get\r
+            {\r
+                return this.q_audioSamplerate4;\r
+            }\r
+        }\r
+\r
+        private double q_drc1;\r
+        /// <summary>\r
+        /// Returns a string with the selected subtitle track\r
+        /// </summary>\r
+        public double DRC1\r
+        {\r
+            get\r
+            {\r
+                return this.q_drc1;\r
+            }\r
+        }\r
+\r
+        private double q_drc2;\r
+        /// <summary>\r
+        /// Returns a string with the selected subtitle track\r
+        /// </summary>\r
+        public double DRC2\r
+        {\r
+            get\r
+            {\r
+                return this.q_drc2;\r
+            }\r
+        }\r
+\r
+        private double q_drc3;\r
+        /// <summary>\r
+        /// Returns a string with the selected subtitle track\r
+        /// </summary>\r
+        public double DRC3\r
+        {\r
+            get\r
+            {\r
+                return this.q_drc3;\r
+            }\r
+        }\r
+\r
+        private double q_drc4;\r
+        /// <summary>\r
+        /// Returns a string with the selected subtitle track\r
+        /// </summary>\r
+        public double DRC4\r
+        {\r
+            get\r
+            {\r
+                return this.q_drc4;\r
+            }\r
+        }\r
+\r
+        private string q_subtitles;\r
+        /// <summary>\r
+        /// Returns a string with the selected subtitle track\r
+        /// </summary>\r
+        public string Subtitles\r
+        {\r
+            get\r
+            {\r
+                return this.q_subtitles;\r
+            }\r
+        }\r
+\r
+        private Boolean q_forcedSubs;\r
+        /// <summary>\r
+        /// Returns a string with the selected subtitle track\r
+        /// </summary>\r
+        public Boolean ForcedSubtitles\r
+        {\r
+            get\r
+            {\r
+                return this.q_forcedSubs;\r
+            }\r
+        }\r
+\r
+        #endregion\r
+\r
+        #region Other\r
+        private string q_h264;\r
+        /// <summary>\r
+        /// Returns a string with the Advanced H264 query string\r
+        /// </summary>\r
+        public string H264Query\r
+        {\r
+            get\r
+            {\r
+                return this.q_h264;\r
+            }\r
+        }\r
+        private Boolean q_verbose;\r
+        /// <summary>\r
+        /// Returns a string with the Advanced H264 query string\r
+        /// </summary>\r
+        public Boolean Verbose\r
+        {\r
+            get\r
+            {\r
+                return this.q_verbose;\r
+            }\r
+        }\r
+        #endregion\r
+\r
+        #endregion\r
+\r
+        /// <summary>\r
+        /// Takes in a query which can be in any order and parses it. \r
+        /// All varibles are then set so they can be used elsewhere.\r
+        /// </summary>\r
+        /// <param name="input">A ClI Query</param>\r
+        /// <returns>A Parsed Query</returns>\r
\r
+        public static QueryParser Parse(String input)\r
+        {\r
+            QueryParser thisQuery = new QueryParser();\r
+\r
+            #region Regular Expressions\r
+            //Source\r
+            Regex r1 = new Regex(@"(-i)(?:\s\"")([a-zA-Z0-9_\-:\\\s\.]+)(?:\"")");\r
+            Match source = r1.Match(input.Replace('"', '\"'));\r
+            Match title = Regex.Match(input, @"-t ([0-9]*)");\r
+            Match chapters = Regex.Match(input, @"-c ([0-9-]*)");\r
+            Match format = Regex.Match(input, @"-f ([a-z0-9a-z0-9a-z0-9]*)");\r
+\r
+            //Destination\r
+            Regex r2 = new Regex(@"(-o)(?:\s\"")([a-zA-Z0-9_\-:\\\s\.]+)(?:\"")");\r
+            Match destination = r2.Match(input.Replace('"', '\"'));\r
+            Match videoEncoder = Regex.Match(input, @"-e ([a-zA-Z0-9]*)");\r
+\r
+            //Picture Settings Tab\r
+            Match width = Regex.Match(input, @"-w ([0-9]*)");\r
+            Match height = Regex.Match(input, @"-l ([0-9]*)");\r
+            Match maxWidth = Regex.Match(input, @"-X ([0-9]*)");\r
+            Match maxHeight = Regex.Match(input, @"-Y ([0-9]*)");\r
+            Match deinterlace = Regex.Match(input, @"--deinterlace=\""([a-zA-Z]*)\""");\r
+            Match denoise = Regex.Match(input, @"--denoise=\""([a-zA-Z]*)\""");\r
+            Match deblock = Regex.Match(input, @"--deblock=([0-9]*)");\r
+            Match detelecine = Regex.Match(input, @"--detelecine");\r
+            Match anamorphic = Regex.Match(input, @" -p ");\r
+            Match chapterMarkers = Regex.Match(input, @" -m");\r
+            Match chapterMarkersFileMode = Regex.Match(input, @"--markers");\r
+            Match crop = Regex.Match(input, @"--crop ([0-9]*):([0-9]*):([0-9]*):([0-9]*)");\r
+            Match lanamorphic = Regex.Match(input, @" -P");\r
+            Match decomb = Regex.Match(input, @" --decomb");\r
+\r
+            //Video Settings Tab\r
+            Match videoFramerate = Regex.Match(input, @"-r ([0-9]*)");\r
+            Match videoBitrate = Regex.Match(input, @"-b ([0-9]*)");\r
+            Match videoQuality = Regex.Match(input, @"-q ([0-9.]*)");\r
+            Match videoFilesize = Regex.Match(input, @"-S ([0-9.]*)");\r
+            Match twoPass = Regex.Match(input, @" -2");\r
+            Match turboFirstPass = Regex.Match(input, @" -T");\r
+            Match grayscale = Regex.Match(input, @" -g");\r
+            Match largerMp4 = Regex.Match(input, @" -4");\r
+            Match ipodAtom = Regex.Match(input, @" -I");\r
+            Match optimizeMP4 = Regex.Match(input, @" -O");\r
+\r
+            //Audio Settings Tab\r
+            Match audioTrack1 = Regex.Match(input, @"-a ([0-9]*)");\r
+            Match audioTrack2 = Regex.Match(input, @"-a ([0-9]*),([0-9]*)");\r
+            Match audioTrack3 = Regex.Match(input, @"-a ([0-9]*),([0-9]*),([0-9]*)");\r
+            Match audioTrack4 = Regex.Match(input, @"-a ([0-9]*),([0-9]*),([0-9]*),([0-9]*)");\r
+\r
+            Match audioTrack1Mix = Regex.Match(input, @"-6 ([0-9a-z0-9]*)");  \r
+            Match audioTrack2Mix = Regex.Match(input, @"-6 ([0-9a-z0-9]*),([0-9a-z0-9]*)");\r
+            Match audioTrack3Mix = Regex.Match(input, @"-6 ([0-9a-z0-9]*),([0-9a-z0-9]*),([0-9a-z0-9]*)");\r
+            Match audioTrack4Mix = Regex.Match(input, @"-6 ([0-9a-z0-9]*),([0-9a-z0-9]*),([0-9a-z0-9]*),([0-9a-z0-9]*)"); \r
+\r
+            Match audioEncoder1 = Regex.Match(input, @"-E ([a-zA-Z0-9+]*)");\r
+            Match audioEncoder2 = Regex.Match(input, @"-E ([a-zA-Z0-9+]*),([a-zA-Z0-9+]*)");\r
+            Match audioEncoder3 = Regex.Match(input, @"-E ([a-zA-Z0-9+]*),([a-zA-Z0-9+]*),([a-zA-Z0-9+]*)");\r
+            Match audioEncoder4 = Regex.Match(input, @"-E ([a-zA-Z0-9+]*),([a-zA-Z0-9+]*),([a-zA-Z0-9+]*),([a-zA-Z0-9+]*)");\r
+\r
+            Match audioBitrate1 = Regex.Match(input, @"-B ([0-9]*)");\r
+            Match audioBitrate2 = Regex.Match(input, @"-B ([0-9]*),([0-9]*)");\r
+            Match audioBitrate3 = Regex.Match(input, @"-B ([0-9]*),([0-9]*),([0-9]*)");\r
+            Match audioBitrate4 = Regex.Match(input, @"-B ([0-9]*),([0-9]*),([0-9]*),([0-9]*)");\r
+\r
+            Match audioSampleRate1 = Regex.Match(input, @"-R ([0-9.]*)");\r
+            Match audioSampleRate2 = Regex.Match(input, @"-R ([0-9.]*),([0-9.]*)");\r
+            Match audioSampleRate3 = Regex.Match(input, @"-R ([0-9.]*),([0-9.]*),([0-9.]*)");\r
+            Match audioSampleRate4 = Regex.Match(input, @"-R ([0-9.]*),([0-9.]*),([0-9.]*),([0-9.]*)");\r
+\r
+            Match drc1 = Regex.Match(input, @"-D ([0-9.]*)");\r
+            Match drc2 = Regex.Match(input, @"-D ([0-9.]*),([0-9.]*)");\r
+            Match drc3 = Regex.Match(input, @"-D ([0-9.]*),([0-9.]*),([0-9.]*)");\r
+            Match drc4 = Regex.Match(input, @"-D ([0-9.]*),([0-9.]*),([0-9.]*),([0-9.]*)");\r
+\r
+            Match subtitles = Regex.Match(input, @"-s ([0-9a-zA-Z]*)");\r
+            Match subScan = Regex.Match(input, @" -U");\r
+            Match forcedSubtitles = Regex.Match(input, @" -F");\r
+\r
+            //H264 Tab\r
+            Match x264 = Regex.Match(input, @"-x ([.,/a-zA-Z0-9=:-]*)");\r
+\r
+            //Program Options\r
+            Match verbose = Regex.Match(input, @" -v");\r
+            #endregion\r
+\r
+            #region Set Varibles\r
+            try\r
+            {\r
+      \r
+                #region Source Tab\r
+\r
+                thisQuery.q_source = source.ToString().Replace("-i ", "").Replace("\"", "");\r
+                if (title.Success != false)\r
+                    thisQuery.q_dvdTitle = int.Parse(title.ToString().Replace("-t ", ""));\r
+\r
+                if (chapters.Success != false)\r
+                {\r
+                    string[] actTitles = new string[2];\r
+                    actTitles = chapters.ToString().Replace("-c ", "").Split('-');\r
+                    thisQuery.q_chaptersStart = int.Parse(actTitles[0]);\r
+                    if (actTitles.Length > 1)\r
+                    {\r
+                        thisQuery.q_chaptersFinish = int.Parse(actTitles[1]);\r
+                    }\r
+\r
+                    if ((thisQuery.q_chaptersStart == 1) && (thisQuery.q_chaptersFinish == 0))\r
+                        thisQuery.q_chaptersFinish = thisQuery.q_chaptersStart;\r
+                }\r
+\r
+                if (format.Success != false)\r
+                    thisQuery.q_format = format.ToString().Replace("-f ", "");\r
+\r
+                #endregion\r
+\r
+                #region Destination\r
+                thisQuery.q_destination = destination.ToString().Replace("-o ", "").Replace("\"", "");\r
+\r
+                string videoEncoderConvertion;\r
+\r
+                videoEncoderConvertion = videoEncoder.ToString().Replace("-e ", "");\r
+                switch (videoEncoderConvertion)\r
+                {\r
+                    case "ffmpeg":\r
+                        videoEncoderConvertion = "MPEG-4 (FFmpeg)";\r
+                        break;\r
+                    case "xvid":\r
+                        videoEncoderConvertion = "MPEG-4 (XviD)";\r
+                        break;\r
+                    case "x264":\r
+                        videoEncoderConvertion = "H.264 (x264)";\r
+                        break;\r
+                    case "theora":\r
+                        videoEncoderConvertion = "VP3 (Theora)";\r
+                        break;\r
+                    default:\r
+                        videoEncoderConvertion = "MPEG-4 (FFmpeg)";\r
+                        break;\r
+                }\r
+                thisQuery.q_videoEncoder = videoEncoderConvertion;\r
+\r
+                #endregion\r
+\r
+                #region Picture Tab\r
+\r
+                if (width.Success != false)\r
+                    thisQuery.q_videoWidth = int.Parse(width.ToString().Replace("-w ", ""));\r
+\r
+                if (height.Success != false)\r
+                    thisQuery.q_videoHeight = int.Parse(height.ToString().Replace("-l ", ""));\r
+\r
+                if (maxWidth.Success != false)\r
+                    thisQuery.q_maxWidth = int.Parse(maxWidth.ToString().Replace("-X ", ""));\r
+\r
+                if (maxHeight.Success != false)\r
+                    thisQuery.q_maxHeight = int.Parse(maxHeight.ToString().Replace("-Y ", ""));\r
+\r
+                if (crop.Success != false)\r
+                {\r
+                    thisQuery.q_cropValues = crop.ToString().Replace("--crop ", "");\r
+                    string[] actCropValues = new string[3];\r
+                    actCropValues = thisQuery.q_cropValues.Split(':');\r
+                    thisQuery.q_croptop = actCropValues[0];\r
+                    thisQuery.q_cropbottom = actCropValues[1];\r
+                    thisQuery.q_cropLeft = actCropValues[2];\r
+                    thisQuery.q_cropRight = actCropValues[3];\r
+                }\r
+\r
+                // Deblock Slider\r
+                string deblockValue = "";\r
+                thisQuery.q_deBlock = 0;\r
+                if (deblock.Success != false)\r
+                    deblockValue = deblock.ToString().Replace("--deblock=", "");\r
+\r
+                if (deblockValue != "")\r
+                    int.TryParse(deblockValue, out thisQuery.q_deBlock);\r
+\r
+                thisQuery.q_detelecine = detelecine.Success;\r
+                thisQuery.q_decomb = decomb.Success;\r
+\r
+                thisQuery.q_deinterlace = "None";\r
+                if (deinterlace.Success != false)\r
+                {\r
+                    switch (deinterlace.ToString().Replace("--deinterlace=", "").Replace("\"",""))\r
+                    {\r
+                        case "fast":\r
+                            thisQuery.q_deinterlace = "Fast";\r
+                            break;\r
+                        case "slow":\r
+                            thisQuery.q_deinterlace = "Slow";\r
+                            break;\r
+                        case "slower":\r
+                            thisQuery.q_deinterlace = "Slower";\r
+                            break;\r
+                        case "slowest":\r
+                            thisQuery.q_deinterlace = "Slowest";\r
+                            break;\r
+                        default:\r
+                            thisQuery.q_deinterlace = "None";\r
+                            break;\r
+                    }\r
+                }\r
+\r
+                thisQuery.q_denoise = "None";\r
+                if (denoise.Success != false)\r
+                {\r
+                    switch (denoise.ToString().Replace("--denoise=", "").Replace("\"", ""))\r
+                    {\r
+                        case "weak":\r
+                            thisQuery.q_denoise = "Weak";\r
+                            break;\r
+                        case "medium":\r
+                            thisQuery.q_denoise = "Medium";\r
+                            break;\r
+                        case "strong":\r
+                            thisQuery.q_denoise = "Strong";\r
+                            break;\r
+                        default:\r
+                            thisQuery.q_denoise = "None";\r
+                            break;\r
+                    }\r
+\r
+                }\r
+                thisQuery.q_anamorphic = anamorphic.Success;\r
+                if (chapterMarkersFileMode.Success == true || chapterMarkers.Success == true)\r
+                    thisQuery.q_chapterMarkers = true;\r
+                \r
+                thisQuery.q_looseAnamorphic = lanamorphic.Success;\r
+\r
+                #endregion\r
+     \r
+                #region Video Settings Tab\r
+                thisQuery.q_grayscale = grayscale.Success;\r
+                thisQuery.q_twoPass = twoPass.Success;\r
+                thisQuery.q_turboFirst = turboFirstPass.Success;\r
+                thisQuery.q_largeMp4 = largerMp4.Success;\r
+                if (videoFramerate.Success != false)\r
+                    thisQuery.q_videoFramerate = videoFramerate.ToString().Replace("-r ", "");\r
+                else\r
+                    thisQuery.q_videoFramerate = "Same as source";\r
+\r
+                if (videoBitrate.Success != false)\r
+                    thisQuery.q_avgBitrate = videoBitrate.ToString().Replace("-b ", "");\r
+                if (videoFilesize.Success != false)\r
+                    thisQuery.q_videoTargetSize = videoFilesize.ToString().Replace("-S ", "");\r
+\r
+                double qConvert = 0;\r
+                if (videoQuality.Success != false)\r
+                {\r
+                    qConvert = double.Parse(videoQuality.ToString().Replace("-q ", ""), Functions.Encode.Culture) * 100;\r
+                    qConvert = System.Math.Ceiling(qConvert);\r
+                    thisQuery.q_videoQuality = int.Parse(qConvert.ToString());\r
+                }\r
+                thisQuery.q_ipodAtom = ipodAtom.Success;\r
+                thisQuery.q_optimizeMp4 = optimizeMP4.Success;\r
+\r
+                #endregion\r
+\r
+                #region Audio Tab\r
+\r
+                // Tracks\r
+                if (audioTrack1.Success != false)\r
+                    thisQuery.q_audioTrack1 = audioTrack1.ToString().Replace("-a ", "");\r
+                else\r
+                    thisQuery.q_audioTrack1 = "Automatic";\r
+\r
+                if (audioTrack2.Success != false)\r
+                {\r
+                    string[] audioChan = audioTrack2.ToString().Split(',');\r
+                    thisQuery.q_audioTrack2 = audioChan[1];\r
+                }\r
+                else\r
+                    thisQuery.q_audioTrack2 = "None";\r
+\r
+                if (audioTrack3.Success != false)\r
+                {\r
+                    string[] audioChan = audioTrack3.ToString().Split(',');\r
+                    thisQuery.q_audioTrack3 = audioChan[2];\r
+                }\r
+                else\r
+                    thisQuery.q_audioTrack3 = "None";\r
+\r
+                if (audioTrack4.Success != false)\r
+                {\r
+                    string[] audioChan = audioTrack4.ToString().Split(',');\r
+                    thisQuery.q_audioTrack4 = audioChan[3];\r
+                }\r
+                else\r
+                    thisQuery.q_audioTrack4 = "None";\r
+\r
+    \r
+                // Mixdowns\r
+                thisQuery.q_audioTrackMix1 = "Automatic";\r
+                if (audioTrack1Mix.Success != false)\r
+                {\r
+                    thisQuery.q_audioTrackMix1 = getMixDown(audioTrack1Mix.ToString().Replace("-6 ", "").Replace(" ", ""));\r
+                }\r
+\r
+                thisQuery.q_audioTrackMix2 = "Automatic";\r
+                if (audioTrack2Mix.Success != false)\r
+                {\r
+                    string[] audio2mix = audioTrack2Mix.ToString().Split(',');\r
+                    audio2mix[1] = audio2mix[1].Trim();\r
+                    thisQuery.q_audioTrackMix2 = getMixDown(audio2mix[1]);\r
+                }\r
+\r
+                thisQuery.q_audioTrackMix3 = "Automatic";\r
+                if (audioTrack3Mix.Success != false)\r
+                {\r
+                    string[] audio3mix = audioTrack3Mix.ToString().Split(',');\r
+                    audio3mix[1] = audio3mix[2].Trim();\r
+                    thisQuery.q_audioTrackMix3 = getMixDown(audio3mix[1]);\r
+                }\r
+\r
+                thisQuery.q_audioTrackMix4 = "Automatic";\r
+                if (audioTrack4Mix.Success != false)\r
+                {\r
+                    string[] audio4mix = audioTrack4Mix.ToString().Split(',');\r
+                    audio4mix[1] = audio4mix[3].Trim();\r
+                    thisQuery.q_audioTrackMix4 = getMixDown(audio4mix[1]);\r
+                }\r
+                \r
+\r
+                // Audio Encoders\r
+                if (audioEncoder1.Success != false)\r
+                    thisQuery.q_audioEncoder1 = getAudioEncoder(audioEncoder1.ToString().Replace("-E ", ""));\r
+\r
+                if (audioEncoder2.Success != false)\r
+                {\r
+                    string[] audio2enc = audioEncoder2.ToString().Split(',');\r
+                    thisQuery.q_audioEncoder2 = getAudioEncoder(audio2enc[1].Trim());\r
+                }\r
+\r
+                if (audioEncoder3.Success != false)\r
+                {\r
+                    string[] audio3enc = audioEncoder3.ToString().Split(',');\r
+                    thisQuery.q_audioEncoder3 = getAudioEncoder(audio3enc[2].Trim());\r
+                }\r
+\r
+                if (audioEncoder4.Success != false)\r
+                {\r
+                    string[] audio4enc = audioEncoder4.ToString().Split(',');\r
+                    thisQuery.q_audioEncoder4 = getAudioEncoder(audio4enc[3].Trim());\r
+                }\r
+\r
+\r
+                // Audio Bitrate\r
+                if (audioBitrate1.Success != false)\r
+                    thisQuery.q_audioBitrate1 = audioBitrate1.ToString().Replace("-B ", "").Trim();\r
+                else\r
+                    thisQuery.q_audioBitrate1 = "";\r
+\r
+                if (audioBitrate2.Success != false)\r
+                {\r
+                    string[] audioBitrateSelect = audioBitrate2.ToString().Split(',');\r
+                    thisQuery.q_audioBitrate2 = audioBitrateSelect[1].Trim();\r
+                }\r
+                else\r
+                    thisQuery.q_audioBitrate2 = "";\r
+\r
+                if (audioBitrate3.Success != false)\r
+                {\r
+                    string[] audioBitrateSelect = audioBitrate3.ToString().Split(',');\r
+                    thisQuery.q_audioBitrate3 = audioBitrateSelect[2].Trim();\r
+                }\r
+                else\r
+                    thisQuery.q_audioBitrate3 = "";\r
+\r
+                if (audioBitrate4.Success != false)\r
+                {\r
+                    string[] audioBitrateSelect = audioBitrate4.ToString().Split(',');\r
+                    thisQuery.q_audioBitrate4 = audioBitrateSelect[3].Trim();\r
+                }\r
+                else\r
+                    thisQuery.q_audioBitrate4 = "";\r
+\r
+\r
+                // Audio Sample Rate\r
+                // Make sure to change 0 to Auto\r
+                if (audioSampleRate1.Success != false)\r
+                {\r
+                    thisQuery.q_audioSamplerate1 = audioSampleRate1.ToString().Replace("-R ", "").Trim();\r
+                    if (thisQuery.q_audioSamplerate1 == "0")\r
+                        thisQuery.q_audioSamplerate1 = "Auto";\r
+                }\r
+                else\r
+                    thisQuery.q_audioSamplerate1 = "Auto";\r
+\r
+                if (audioSampleRate2.Success != false)\r
+                {\r
+                    string[] audioSRSelect = audioSampleRate2.ToString().Split(',');\r
+                    if (audioSRSelect[1] == "0")\r
+                        audioSRSelect[1] = "Auto";\r
+                    thisQuery.q_audioSamplerate2 = audioSRSelect[1].Trim();\r
+                }\r
+\r
+                if (audioSampleRate3.Success != false)\r
+                {\r
+                    string[] audioSRSelect = audioSampleRate3.ToString().Split(',');\r
+                    if (audioSRSelect[1] == "0")\r
+                        audioSRSelect[1] = "Auto";\r
+                    thisQuery.q_audioSamplerate3 = audioSRSelect[2].Trim();\r
+                }\r
+\r
+                if (audioSampleRate4.Success != false)\r
+                {\r
+                    string[] audioSRSelect = audioSampleRate4.ToString().Split(',');\r
+                    if (audioSRSelect[1] == "0")\r
+                        audioSRSelect[1] = "Auto";\r
+                    thisQuery.q_audioSamplerate4 = audioSRSelect[3].Trim();\r
+                }\r
+\r
+                // DRC\r
+                if (drc1.Success != false)\r
+                {\r
+                    string value = drc1.ToString().Replace("-D ", "");\r
+                    float drcValue = float.Parse(value);\r
+                    drcValue = drcValue * 10;\r
+                    thisQuery.q_drc1 = drcValue;\r
+                }\r
+                else\r
+                    thisQuery.q_drc1 = 10;\r
+\r
+                if (drc2.Success != false)\r
+                {\r
+                    string[] drcPoint = drc2.ToString().Split(',');\r
+                    string value = drcPoint[1];\r
+                    float drcValue = float.Parse(value);\r
+                    drcValue = drcValue * 10;\r
+                    thisQuery.q_drc2 = drcValue;\r
+                }\r
+                else\r
+                    thisQuery.q_drc2 = 10;\r
+\r
+                if (drc3.Success != false)\r
+                {\r
+                    string[] drcPoint = drc3.ToString().Split(',');\r
+                    string value = drcPoint[2];\r
+                    float drcValue = float.Parse(value);\r
+                    drcValue = drcValue * 10;\r
+                    thisQuery.q_drc3 = drcValue;\r
+                }\r
+                else\r
+                    thisQuery.q_drc3 = 10;\r
+\r
+                if (drc4.Success != false)\r
+                {\r
+                    string[] drcPoint = drc4.ToString().Split(',');\r
+                    string value = drcPoint[3];\r
+                    float drcValue = float.Parse(value);\r
+                    drcValue = drcValue * 10;\r
+                    thisQuery.q_drc4 = drcValue;\r
+                }\r
+                else\r
+                    thisQuery.q_drc4 = 10;\r
+\r
+\r
+                // Subtitle Stuff\r
+                if (subtitles.Success != false)\r
+                    thisQuery.q_subtitles = subtitles.ToString().Replace("-s ", "");\r
+                else\r
+                {\r
+                    if (subScan.Success)\r
+                        thisQuery.q_subtitles = "Autoselect";\r
+                    else\r
+                        thisQuery.q_subtitles = "None";\r
+                }\r
+\r
+                thisQuery.q_forcedSubs = forcedSubtitles.Success;\r
+\r
+                #endregion\r
+\r
+                #region H.264 and other\r
+                //\r
+                //H264 Tab\r
+                //\r
+                if (x264.Success != false)\r
+                    thisQuery.q_h264 = x264.ToString().Replace("-x ", "");\r
+\r
+                //\r
+                //Progam Options\r
+                //\r
+                thisQuery.q_verbose = verbose.Success;\r
+                #endregion\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("An error has occured in the Query Parser. Please report this error on the forum in the 'Windows' support section. \n\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+            }\r
+            #endregion\r
+\r
+            return thisQuery;\r
+        }\r
+\r
+        private static string getMixDown(string mixdown)\r
+        {\r
+            switch (mixdown)\r
+            {\r
+                case "mono":\r
+                    return "Mono";\r
+                case "stereo":\r
+                    return "Stereo";\r
+                case "dpl1":\r
+                    return "Dolby Surround";\r
+                case "dpl2":\r
+                    return "Dolby Pro Logic II";\r
+                case "6ch":\r
+                    return "6 Channel Discrete";\r
+                default:\r
+                    return "Automatic";\r
+            }\r
+        }\r
+        private static string getAudioEncoder(string audioEnc)\r
+        {\r
+            switch (audioEnc)\r
+            {\r
+                case "faac":\r
+                    return "AAC";\r
+                case "lame":\r
+                    return "MP3";\r
+                case "vorbis":\r
+                    return "Vorbis";\r
+                case "ac3":\r
+                    return "AC3";\r
+                default:\r
+                    return "AAC";\r
+            }\r
+        }\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/Functions/Queue.cs b/win/C#/Functions/Queue.cs
new file mode 100644 (file)
index 0000000..3afca7d
--- /dev/null
@@ -0,0 +1,206 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using System.Collections;\r
+using System.IO;\r
+using System.Windows.Forms;\r
+\r
+namespace Handbrake.Functions\r
+{\r
+    public class Queue\r
+    {\r
+        ArrayList queue = new ArrayList();\r
+        ArrayList lastQuery;\r
+        int id = 0; // Unique identifer number for each job\r
+\r
+        public ArrayList getQueue()\r
+        {\r
+             return queue;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get's the next CLI query for encoding\r
+        /// </summary>\r
+        /// <returns>String</returns>\r
+        public String getNextItemForEncoding()\r
+        {\r
+            Object query = queue[0];\r
+            lastQuery = (ArrayList)query;\r
+            remove(0);    // Remove the item which we are about to pass out.\r
+            return lastQuery[1].ToString();\r
+        }\r
+\r
+        /// <summary>\r
+        /// Add's a new item to the queue\r
+        /// </summary>\r
+        /// <param name="query">String</param>\r
+        public void add(string query)\r
+        {\r
+            // Creates a new job with a unique identifer and cli query\r
+            ArrayList newJob = new ArrayList();\r
+            newJob.Add(id);\r
+            newJob.Add(query);\r
+            id++;\r
+\r
+            // Adds the job to the queue\r
+            queue.Add(newJob);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Removes an item from the queue.\r
+        /// </summary>\r
+        /// <param name="index">Index</param>\r
+        /// <returns>Bolean true if successful</returns>\r
+        public Boolean remove(int index)\r
+        {\r
+            queue.RemoveAt(index);\r
+            return true;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Returns how many items are in the queue\r
+        /// </summary>\r
+        /// <returns>Int</returns>\r
+        public int count()\r
+        {\r
+            return queue.Count;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get's the last query to be selected for encoding by getNextItemForEncoding()\r
+        /// </summary>\r
+        /// <returns>String</returns>\r
+        public string getLastQuery()\r
+        {\r
+            return lastQuery[1].ToString();\r
+        }\r
+\r
+        /// <summary>\r
+        /// Move an item with an index x, up in the queue\r
+        /// </summary>\r
+        /// <param name="index">Int</param>\r
+        public void moveUp(int index)\r
+        {\r
+            if (index != 0)\r
+            {\r
+                ArrayList item = (ArrayList)queue[index];\r
+\r
+                queue.Insert((index - 1), item);\r
+                queue.RemoveAt((index + 1));\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Move an item with an index x, down in the queue\r
+        /// </summary>\r
+        /// <param name="index">Int</param>\r
+        public void moveDown(int index)\r
+        {\r
+            if (index != queue.Count - 1)\r
+            {\r
+                ArrayList item = (ArrayList)queue[index];\r
+\r
+                queue.Insert((index + 2), item);\r
+                queue.RemoveAt((index));\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Writes the current queue to disk. hb_queue_recovery.dat\r
+        /// This function is called after getNextItemForEncoding()\r
+        /// </summary>\r
+        public void write2disk(string file)\r
+        {\r
+            try\r
+            {\r
+                string tempPath = "";\r
+                if (file == "hb_queue_recovery.dat")\r
+                    tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");\r
+                else\r
+                    tempPath = file;\r
+                using (StreamWriter writer = new StreamWriter(tempPath))\r
+                {\r
+                    foreach (ArrayList item in queue)\r
+                    {\r
+                        writer.WriteLine(item[1].ToString());\r
+                    }\r
+                    writer.Close();\r
+                    writer.Dispose();\r
+                }\r
+            }\r
+            catch (Exception)\r
+            {\r
+                // Any Errors will be out of diskspace/permissions problems. Don't report them as they'll annoy the user.\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Writes the current queue to disk to the location specified in file\r
+        /// </summary>\r
+        /// <param name="file"></param>\r
+        public void writeBatchScript(string file)\r
+        {\r
+            string queries = "";\r
+            foreach (ArrayList queue_item in queue)\r
+            {\r
+                string q_item = queue_item[1].ToString();\r
+                string fullQuery = '"' + Application.StartupPath.ToString() + "\\HandBrakeCLI.exe" + '"' + q_item;\r
+\r
+                if (queries == string.Empty)\r
+                    queries = queries + fullQuery;\r
+                else\r
+                    queries = queries + " && " + fullQuery;\r
+            }\r
+            string strCmdLine = queries;\r
+\r
+            if (file != "")\r
+            {\r
+                try\r
+                {\r
+                    // Create a StreamWriter and open the file, Write the batch file query to the file and \r
+                    // Close the stream\r
+                    StreamWriter line = new StreamWriter(file);\r
+                    line.WriteLine(strCmdLine);\r
+                    line.Close();\r
+\r
+                    MessageBox.Show("Your batch script has been sucessfully saved.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);\r
+                }\r
+                catch (Exception)\r
+                {\r
+                    MessageBox.Show("Unable to write to the file. Please make sure that the location has the correct permissions for file writing.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
+                }\r
+\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Recover the queue from hb_queue_recovery.dat\r
+        /// </summary>\r
+        public void recoverQueue(string file)\r
+        {\r
+            try\r
+            {\r
+                string tempPath = "";\r
+                if (file == "hb_queue_recovery.dat")\r
+                    tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");\r
+                else\r
+                    tempPath = file;\r
+                using (StreamReader reader = new StreamReader(tempPath))\r
+                {\r
+                    string queue_item = reader.ReadLine();\r
+\r
+                    while (queue_item != null)\r
+                    {\r
+                        this.add(queue_item);\r
+                        queue_item = reader.ReadLine();\r
+                    }\r
+                }\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("HandBrake was unable to recover the queue. \nError Information:" + exc.ToString(), "Queue Recovery Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+            }\r
+        }\r
+\r
+    }\r
+}\r
diff --git a/win/C#/Functions/SystemInfo.cs b/win/C#/Functions/SystemInfo.cs
new file mode 100644 (file)
index 0000000..535bda6
--- /dev/null
@@ -0,0 +1,57 @@
+using System;\r
+using System.Runtime.InteropServices;\r
+using Microsoft.Win32;\r
+\r
+namespace Handbrake.Functions\r
+{\r
+    class SystemInfo\r
+    {\r
+        #region CheckRam\r
+        private struct MEMORYSTATUS\r
+        {\r
+            public UInt32 dwLength;\r
+            public UInt32 dwMemoryLoad;\r
+            public UInt32 dwTotalPhys; // Used\r
+            public UInt32 dwAvailPhys;\r
+            public UInt32 dwTotalPageFile;\r
+            public UInt32 dwAvailPageFile;\r
+            public UInt32 dwTotalVirtual;\r
+            public UInt32 dwAvailVirtual;\r
+        }\r
+\r
+        [DllImport("kernel32.dll")]\r
+        private static extern void GlobalMemoryStatus\r
+        (\r
+            ref MEMORYSTATUS lpBuffer\r
+        );\r
+\r
+\r
+        /// <summary>\r
+        /// Returns the total physical ram in a system\r
+        /// </summary>\r
+        /// <returns></returns>\r
+        public uint TotalPhysicalMemory()\r
+        {\r
+            MEMORYSTATUS memStatus = new MEMORYSTATUS();\r
+            GlobalMemoryStatus(ref memStatus);\r
+\r
+            uint MemoryInfo = memStatus.dwTotalPhys;\r
+            MemoryInfo = MemoryInfo / 1024 / 1024; \r
+\r
+            return MemoryInfo;\r
+        }\r
+        #endregion\r
+\r
+        public Object getCpuCount()\r
+        {\r
+            RegistryKey RegKey = Registry.LocalMachine;\r
+            RegKey = RegKey.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");\r
+            return RegKey.GetValue("ProcessorNameString");\r
+        }\r
+\r
+        public System.Windows.Forms.Screen screenBounds()\r
+        {\r
+            return System.Windows.Forms.Screen.PrimaryScreen;\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj
new file mode 100644 (file)
index 0000000..df5258c
--- /dev/null
@@ -0,0 +1,320 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+    <ProductVersion>9.0.30729</ProductVersion>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectGuid>{A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}</ProjectGuid>\r
+    <OutputType>WinExe</OutputType>\r
+    <AppDesignerFolder>Properties</AppDesignerFolder>\r
+    <RootNamespace>Handbrake</RootNamespace>\r
+    <AssemblyName>Handbrake</AssemblyName>\r
+    <ApplicationIcon>handbrakepineapple.ico</ApplicationIcon>\r
+    <StartupObject>Handbrake.Program</StartupObject>\r
+    <TargetZone>LocalIntranet</TargetZone>\r
+    <GenerateManifests>false</GenerateManifests>\r
+    <FileUpgradeFlags>\r
+    </FileUpgradeFlags>\r
+    <UpgradeBackupLocation>\r
+    </UpgradeBackupLocation>\r
+    <OldToolsVersion>2.0</OldToolsVersion>\r
+    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>\r
+    <IsWebBootstrapper>false</IsWebBootstrapper>\r
+    <SignManifests>false</SignManifests>\r
+    <PublishUrl>publish\</PublishUrl>\r
+    <Install>true</Install>\r
+    <InstallFrom>Disk</InstallFrom>\r
+    <UpdateEnabled>false</UpdateEnabled>\r
+    <UpdateMode>Foreground</UpdateMode>\r
+    <UpdateInterval>7</UpdateInterval>\r
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>\r
+    <UpdatePeriodically>false</UpdatePeriodically>\r
+    <UpdateRequired>false</UpdateRequired>\r
+    <MapFileExtensions>true</MapFileExtensions>\r
+    <ApplicationRevision>0</ApplicationRevision>\r
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>\r
+    <UseApplicationTrust>false</UseApplicationTrust>\r
+    <BootstrapperEnabled>true</BootstrapperEnabled>\r
+    <TargetFrameworkSubset>\r
+    </TargetFrameworkSubset>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>full</DebugType>\r
+    <Optimize>true</Optimize>\r
+    <OutputPath>bin\Debug\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+    <LangVersion>default</LangVersion>\r
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>\r
+    <NoStdLib>false</NoStdLib>\r
+    <DocumentationFile>\r
+    </DocumentationFile>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+    <DebugType>full</DebugType>\r
+    <Optimize>true</Optimize>\r
+    <OutputPath>bin\Release\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>\r
+    <UseVSHostingProcess>false</UseVSHostingProcess>\r
+    <DocumentationFile>\r
+    </DocumentationFile>\r
+    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>\r
+    <NoStdLib>false</NoStdLib>\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <FileAlignment>512</FileAlignment>\r
+    <PlatformTarget>AnyCPU</PlatformTarget>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">\r
+    <PlatformTarget>x86</PlatformTarget>\r
+    <OutputPath>bin\x86\Debug\</OutputPath>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">\r
+    <PlatformTarget>x86</PlatformTarget>\r
+    <OutputPath>bin\x86\Release\</OutputPath>\r
+    <UseVSHostingProcess>false</UseVSHostingProcess>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Build|AnyCPU' ">\r
+    <OutputPath>bin\Build\</OutputPath>\r
+    <DefineConstants>TRACE</DefineConstants>\r
+    <DebugType>pdbonly</DebugType>\r
+    <PlatformTarget>AnyCPU</PlatformTarget>\r
+    <ErrorReport>prompt</ErrorReport>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Build|x86' ">\r
+    <OutputPath>bin\x86\Build\</OutputPath>\r
+    <PlatformTarget>x86</PlatformTarget>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Reference Include="PresentationCore">\r
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="PresentationFramework">\r
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="System" />\r
+    <Reference Include="System.Data" />\r
+    <Reference Include="System.Deployment" />\r
+    <Reference Include="System.Design" />\r
+    <Reference Include="System.Drawing" />\r
+    <Reference Include="System.Messaging" />\r
+    <Reference Include="System.Windows.Forms" />\r
+    <Reference Include="System.Xml" />\r
+    <Reference Include="UIAutomationProvider">\r
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="WindowsBase">\r
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>\r
+    </Reference>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="frmActivityWindow.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="frmActivityWindow.Designer.cs">\r
+      <DependentUpon>frmActivityWindow.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="frmAbout.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="frmAbout.Designer.cs">\r
+      <DependentUpon>frmAbout.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="frmAddPreset.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="frmAddPreset.Designer.cs">\r
+      <DependentUpon>frmAddPreset.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="frmDownload.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="frmDownload.Designer.cs">\r
+      <DependentUpon>frmDownload.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="frmMain.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="frmMain.Designer.cs">\r
+      <DependentUpon>frmMain.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="frmOptions.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="frmOptions.Designer.cs">\r
+      <DependentUpon>frmOptions.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="frmQueue.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="frmQueue.Designer.cs">\r
+      <DependentUpon>frmQueue.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="frmUpdater.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="frmUpdater.designer.cs">\r
+      <DependentUpon>frmUpdater.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="frmMain\PresetLoader.cs" />\r
+    <Compile Include="frmMain\QueryGenerator.cs" />\r
+    <Compile Include="Functions\SystemInfo.cs" />\r
+    <Compile Include="Functions\Main.cs" />\r
+    <Compile Include="Presets\preset.cs" />\r
+    <Compile Include="Presets\PresetsHandler.cs" />\r
+    <Compile Include="Functions\Queue.cs" />\r
+    <Compile Include="Functions\AppcastReader.cs" />\r
+    <Compile Include="Functions\Encode.cs" />\r
+    <Compile Include="Functions\QueryParser.cs" />\r
+    <Compile Include="frmMain\x264Panel.cs" />\r
+    <Compile Include="Parsing\AudioTrack.cs" />\r
+    <Compile Include="Parsing\Chapter.cs" />\r
+    <Compile Include="Parsing\DVD.cs" />\r
+    <Compile Include="Parsing\Parser.cs" />\r
+    <Compile Include="Parsing\Subtitle.cs" />\r
+    <Compile Include="Parsing\Title.cs" />\r
+    <Compile Include="Program.cs" />\r
+    <Compile Include="Properties\AssemblyInfo.cs" />\r
+    <EmbeddedResource Include="frmActivityWindow.resx">\r
+      <DependentUpon>frmActivityWindow.cs</DependentUpon>\r
+      <SubType>Designer</SubType>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="frmAbout.resx">\r
+      <SubType>Designer</SubType>\r
+      <DependentUpon>frmAbout.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="frmAddPreset.resx">\r
+      <DependentUpon>frmAddPreset.cs</DependentUpon>\r
+      <SubType>Designer</SubType>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="frmDownload.resx">\r
+      <SubType>Designer</SubType>\r
+      <DependentUpon>frmDownload.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="frmMain.resx">\r
+      <SubType>Designer</SubType>\r
+      <DependentUpon>frmMain.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="frmOptions.resx">\r
+      <SubType>Designer</SubType>\r
+      <DependentUpon>frmOptions.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="frmQueue.resx">\r
+      <SubType>Designer</SubType>\r
+      <DependentUpon>frmQueue.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="frmUpdater.resx">\r
+      <DependentUpon>frmUpdater.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="Properties\Resources.resx">\r
+      <Generator>ResXFileCodeGenerator</Generator>\r
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>\r
+      <SubType>Designer</SubType>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="frmReadDVD.resx">\r
+      <SubType>Designer</SubType>\r
+      <DependentUpon>frmReadDVD.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="frmSplashScreen.resx">\r
+      <SubType>Designer</SubType>\r
+      <DependentUpon>frmSplashScreen.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <Compile Include="Properties\Resources.Designer.cs">\r
+      <AutoGen>True</AutoGen>\r
+      <DependentUpon>Resources.resx</DependentUpon>\r
+      <DesignTime>True</DesignTime>\r
+    </Compile>\r
+    <None Include="app.config" />\r
+    <None Include="Properties\Settings.settings">\r
+      <Generator>SettingsSingleFileGenerator</Generator>\r
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>\r
+    </None>\r
+    <Compile Include="Properties\Settings.Designer.cs">\r
+      <AutoGen>True</AutoGen>\r
+      <DependentUpon>Settings.settings</DependentUpon>\r
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>\r
+    </Compile>\r
+    <Compile Include="frmReadDVD.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="frmReadDVD.Designer.cs">\r
+      <DependentUpon>frmReadDVD.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="frmSplashScreen.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="frmSplashScreen.Designer.cs">\r
+      <DependentUpon>frmSplashScreen.cs</DependentUpon>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Content Include="handbrakepineapple.ico" />\r
+    <None Include="Resources\logo64.png" />\r
+    <None Include="Resources\logo128.png" />\r
+    <None Include="Resources\ActivityWindow.png" />\r
+    <None Include="Resources\AddToQueue.png" />\r
+    <Content Include="Resources\ActivityWindow_small.png" />\r
+    <Content Include="Resources\copy.png" />\r
+    <Content Include="Resources\disc_small.png" />\r
+    <None Include="Resources\hb32.png" />\r
+    <None Include="Resources\hb16.png" />\r
+    <None Include="Resources\Help16.png" />\r
+    <None Include="Resources\info16.png" />\r
+    <None Include="Resources\folder.png" />\r
+    <Content Include="Resources\Output_Small.png" />\r
+    <None Include="Resources\Pause.png" />\r
+    <None Include="Resources\Play.png" />\r
+    <Content Include="Resources\Pref_Small.png" />\r
+    <Content Include="Resources\Queue.png" />\r
+    <Content Include="Resources\Queue_Small.png" />\r
+    <None Include="Resources\save.png" />\r
+    <None Include="Resources\stop.png" />\r
+    <None Include="Resources\SplashScreen.jpg" />\r
+    <None Include="Resources\Movies.png" />\r
+    <None Include="Resources\General Preferences.png" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">\r
+      <Visible>False</Visible>\r
+      <ProductName>.NET Framework Client Profile</ProductName>\r
+      <Install>false</Install>\r
+    </BootstrapperPackage>\r
+    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">\r
+      <Visible>False</Visible>\r
+      <ProductName>.NET Framework 2.0 %28x86%29</ProductName>\r
+      <Install>false</Install>\r
+    </BootstrapperPackage>\r
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">\r
+      <Visible>False</Visible>\r
+      <ProductName>.NET Framework 3.0 %28x86%29</ProductName>\r
+      <Install>false</Install>\r
+    </BootstrapperPackage>\r
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">\r
+      <Visible>False</Visible>\r
+      <ProductName>.NET Framework 3.5</ProductName>\r
+      <Install>true</Install>\r
+    </BootstrapperPackage>\r
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">\r
+      <Visible>False</Visible>\r
+      <ProductName>.NET Framework 3.5 SP1</ProductName>\r
+      <Install>false</Install>\r
+    </BootstrapperPackage>\r
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">\r
+      <Visible>False</Visible>\r
+      <ProductName>Windows Installer 3.1</ProductName>\r
+      <Install>true</Install>\r
+    </BootstrapperPackage>\r
+  </ItemGroup>\r
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />\r
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+       Other similar extension points exist, see Microsoft.Common.targets.\r
+  <Target Name="BeforeBuild">\r
+  </Target>\r
+  <Target Name="AfterBuild">\r
+  </Target>\r
+  -->\r
+</Project>
\ No newline at end of file
diff --git a/win/C#/HandBrakeCS.sln b/win/C#/HandBrakeCS.sln
new file mode 100644 (file)
index 0000000..81ce84c
--- /dev/null
@@ -0,0 +1,26 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 10.00\r
+# Visual Studio 2008\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrakeCS", "HandBrakeCS.csproj", "{A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Debug|x86 = Debug|x86\r
+               Release|Any CPU = Release|Any CPU\r
+               Release|x86 = Release|x86\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|x86.ActiveCfg = Release|x86\r
+               {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|x86.Build.0 = Release|x86\r
+               {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|x86.ActiveCfg = Release|x86\r
+               {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|x86.Build.0 = Release|x86\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/win/C#/Installer/Installer.nsi b/win/C#/Installer/Installer.nsi
new file mode 100644 (file)
index 0000000..bb24dd5
--- /dev/null
@@ -0,0 +1,160 @@
+/*  Resources.Designer.cs $\r
+\r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr/>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+; Script generated by the HM NIS Edit Script Wizard.\r
+\r
+; HM NIS Edit Wizard helper defines\r
+!define PRODUCT_NAME "Handbrake"\r
+!define PRODUCT_VERSION "0.9.1"\r
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Handbrake.exe"\r
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"\r
+!define PRODUCT_UNINST_ROOT_KEY "HKLM"\r
+\r
+; MUI 1.67 compatible ------\r
+!include "MUI.nsh"\r
+\r
+; MUI Settings\r
+!define MUI_ABORTWARNING\r
+!define MUI_ICON "handbrakepineapple.ico"\r
+!define MUI_UNICON "handbrakepineapple.ico"\r
+\r
+; Welcome page\r
+!insertmacro MUI_PAGE_WELCOME\r
+; License page\r
+!insertmacro MUI_PAGE_LICENSE "doc\COPYING"\r
+; Directory page\r
+!insertmacro MUI_PAGE_DIRECTORY\r
+; Instfiles page\r
+!insertmacro MUI_PAGE_INSTFILES\r
+; Finish page\r
+!define MUI_FINISHPAGE_RUN "$INSTDIR\Handbrake.exe"\r
+!insertmacro MUI_PAGE_FINISH\r
+\r
+; Uninstaller pages\r
+!insertmacro MUI_UNPAGE_INSTFILES\r
+\r
+; Language files\r
+!insertmacro MUI_LANGUAGE "English"\r
+\r
+; MUI end ------\r
+\r
+Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"\r
+OutFile "Handbrake-Setup.exe"\r
+\r
+!include WordFunc.nsh\r
+!insertmacro VersionCompare\r
+!include LogicLib.nsh\r
+\r
+; Check to see if .NET Framework 2.0 or above is Installed.\r
+Function .onInit\r
+  Call GetDotNETVersion\r
+  Pop $0\r
+  ${If} $0 == "not found"\r
+    MessageBox MB_OK|MB_ICONSTOP ".NET runtime library is not installed. $\r$\n You can download .Net Framework 2 from the microsoft website. $\r$\n Alternatively you can use google for a direct download URL"\r
+    Abort\r
+  ${EndIf}\r
+\r
+  StrCpy $0 $0 "" 1 # skip "v"\r
+\r
+  ${VersionCompare} $0 "2.0" $1\r
+  ${If} $1 == 2\r
+    MessageBox MB_OK|MB_ICONSTOP ".NET runtime library v2.0 or newer is required. You have $0. $\r$\n You can download .Net Framework 2 from the microsoft website. $\r$\n Alternatively you can use google for a direct download URL"\r
+    Abort\r
+  ${EndIf}\r
+FunctionEnd\r
+\r
+Function GetDotNETVersion\r
+  Push $0\r
+  Push $1\r
+\r
+  System::Call "mscoree::GetCORVersion(w .r0, i ${NSIS_MAX_STRLEN}, *i) i .r1 ?u"\r
+  StrCmp $1 "error" 0 +2\r
+    StrCpy $0 "not found"\r
+\r
+  Pop $1\r
+  Exch $0\r
+FunctionEnd\r
+\r
+\r
+InstallDir "$PROGRAMFILES\Handbrake"\r
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""\r
+ShowInstDetails show\r
+ShowUnInstDetails show\r
+\r
+Section "Handbrake" SEC01\r
+  SetOutPath "$INSTDIR"\r
+  SetOverwrite ifnewer\r
+  File "Handbrake.exe"\r
+  CreateDirectory "$SMPROGRAMS\Handbrake"\r
+  CreateShortCut "$SMPROGRAMS\Handbrake\Handbrake.lnk" "$INSTDIR\Handbrake.exe"\r
+  CreateShortCut "$DESKTOP\Handbrake.lnk" "$INSTDIR\Handbrake.exe"\r
+  File "dvdinfo.dat"\r
+  File "cygwin1.dll"\r
+  File "hbcli.exe"\r
+  File "Handbrake.exe.config"\r
+  File "handbrakepineapple.ico"\r
+  \r
+  SetOutPath "$INSTDIR\doc"\r
+  SetOverwrite ifnewer\r
+  File "doc\AUTHORS"\r
+  File "doc\BUILD"\r
+  File "doc\COPYING"\r
+  File "doc\CREDITS"\r
+  File "doc\NEWS"\r
+  File "doc\THANKS"\r
+  File "doc\TRANSLATIONS"\r
+SectionEnd\r
+\r
+Section -AdditionalIcons\r
+  CreateShortCut "$SMPROGRAMS\Handbrake\Uninstall.lnk" "$INSTDIR\uninst.exe"\r
+SectionEnd\r
+\r
+Section -Post\r
+  WriteUninstaller "$INSTDIR\uninst.exe"\r
+  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\Handbrake.exe"\r
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"\r
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"\r
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Handbrake.exe"\r
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"\r
+SectionEnd\r
+\r
+\r
+Function un.onUninstSuccess\r
+  HideWindow\r
+  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."\r
+FunctionEnd\r
+\r
+Function un.onInit\r
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2\r
+  Abort\r
+FunctionEnd\r
+\r
+Section Uninstall\r
+  Delete "$INSTDIR\uninst.exe"\r
+  Delete "$INSTDIR\handbrakepineapple.ico"\r
+  Delete "$INSTDIR\hbcli.exe"\r
+  Delete "$INSTDIR\cygwin1.dll"\r
+  Delete "$INSTDIR\dvdinfo.dat"\r
+  Delete "$INSTDIR\Handbrake.exe"\r
+  Delete "$INSTDIR\Handbrake.exe.config"\r
+  Delete "$INSTDIR\doc\AUTHORS"\r
+  Delete "$INSTDIR\doc\BUILD"\r
+  Delete "$INSTDIR\doc\COPYING"\r
+  Delete "$INSTDIR\doc\CREDITS"\r
+  Delete "$INSTDIR\doc\NEWS"\r
+  Delete "$INSTDIR\doc\THANKS"\r
+  Delete "$INSTDIR\doc\TRANSLATIONS"\r
+\r
+  Delete "$SMPROGRAMS\Handbrake\Uninstall.lnk"\r
+  Delete "$DESKTOP\Handbrake.lnk"\r
+  Delete "$SMPROGRAMS\Handbrake\Handbrake.lnk"\r
+  RMDir "$SMPROGRAMS\Handbrake"\r
+  RMDir "$INSTDIR"\r
+\r
+  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"\r
+  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"\r
+  SetAutoClose true\r
+SectionEnd
\ No newline at end of file
diff --git a/win/C#/Parsing/AudioTrack.cs b/win/C#/Parsing/AudioTrack.cs
new file mode 100644 (file)
index 0000000..129ae78
--- /dev/null
@@ -0,0 +1,142 @@
+/*  AudioTrack.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.IO;\r
+using System.Text.RegularExpressions;\r
+\r
+namespace Handbrake.Parsing\r
+{\r
+    /// <summary>\r
+    /// An object represending an AudioTrack associated with a Title, in a DVD\r
+    /// </summary>\r
+    public class AudioTrack\r
+    {\r
+        private int m_trackNumber;\r
+        /// <summary>\r
+        /// The track number of this Audio Track\r
+        /// </summary>\r
+        public int TrackNumber\r
+        {\r
+            get\r
+            {\r
+                return this.m_trackNumber;\r
+            }\r
+        }\r
+\r
+        private string m_language;\r
+        /// <summary>\r
+        /// The language (if detected) of this Audio Track\r
+        /// </summary>\r
+        public string Language\r
+        {\r
+            get\r
+            {\r
+                return this.m_language;\r
+            }\r
+        }\r
+\r
+        private string m_format;\r
+        /// <summary>\r
+        /// The primary format of this Audio Track\r
+        /// </summary>\r
+        public string Format\r
+        {\r
+            get\r
+            {\r
+                return this.m_format;\r
+            }\r
+        }\r
+\r
+        private string m_subFormat;\r
+        /// <summary>\r
+        /// Additional format info for this Audio Track\r
+        /// </summary>\r
+        public string SubFormat\r
+        {\r
+            get\r
+            {\r
+                return this.m_subFormat;\r
+            }\r
+        }\r
+\r
+        private int m_frequency;\r
+        /// <summary>\r
+        /// The frequency (in MHz) of this Audio Track\r
+        /// </summary>\r
+        public int Frequency\r
+        {\r
+            get\r
+            {\r
+                return this.m_frequency;\r
+            }\r
+        }\r
+\r
+        private int m_bitrate;\r
+        /// <summary>\r
+        /// The bitrate (in kbps) of this Audio Track\r
+        /// </summary>\r
+        public int Bitrate\r
+        {\r
+            get\r
+            {\r
+                return this.m_bitrate;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Override of the ToString method to make this object easier to use in the UI\r
+        /// </summary>\r
+        /// <returns>A string formatted as: {track #} {language} ({format}) ({sub-format})</returns>\r
+        public override string ToString()\r
+        {\r
+            return string.Format("{0} {1} ({2}) ({3})", this.m_trackNumber, this.m_language, this.m_format, this.m_subFormat);\r
+        }\r
+\r
+        public static AudioTrack Parse(StringReader output)\r
+        {\r
+            String audio_track= output.ReadLine();\r
+            Match m = Regex.Match(audio_track, @"^    \+ ([0-9]*), ([A-Za-z0-9]*) \((.*)\) \((.*)\), ([0-9]*)Hz, ([0-9]*)bps");\r
+            Match y = Regex.Match(audio_track, @"^    \+ ([0-9]*), ([A-Za-z0-9]*) \((.*)\)");\r
+            if (m.Success)\r
+            {\r
+                AudioTrack thisTrack = new AudioTrack();\r
+                thisTrack.m_trackNumber = int.Parse(m.Groups[1].Value.Trim().ToString());\r
+                thisTrack.m_language = m.Groups[2].Value;\r
+                thisTrack.m_format = m.Groups[3].Value;\r
+                thisTrack.m_subFormat = m.Groups[4].Value;\r
+                thisTrack.m_frequency = int.Parse(m.Groups[5].Value.Trim().ToString());\r
+                thisTrack.m_bitrate = int.Parse(m.Groups[6].Value.Trim().ToString());\r
+                return thisTrack;\r
+            }\r
+            else if (y.Success)\r
+            {\r
+                AudioTrack thisTrack = new AudioTrack();\r
+                thisTrack.m_trackNumber = int.Parse(y.Groups[1].Value.Trim().ToString());\r
+                thisTrack.m_language = y.Groups[2].Value;\r
+                thisTrack.m_format = y.Groups[3].Value;\r
+                return thisTrack;\r
+            }\r
+            else\r
+                return null;\r
+        }\r
+\r
+        public static AudioTrack[] ParseList(StringReader output)\r
+        {\r
+            List<AudioTrack> tracks = new List<AudioTrack>();\r
+            while (true)\r
+            {\r
+                AudioTrack thisTrack = AudioTrack.Parse(output);\r
+                if (thisTrack != null)\r
+                    tracks.Add(thisTrack);\r
+                else\r
+                    break;\r
+            }\r
+            return tracks.ToArray();\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/Parsing/Chapter.cs b/win/C#/Parsing/Chapter.cs
new file mode 100644 (file)
index 0000000..5269675
--- /dev/null
@@ -0,0 +1,87 @@
+/*  Chapter.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.IO;\r
+using System.Text.RegularExpressions;\r
+\r
+namespace Handbrake.Parsing\r
+{\r
+    /// <summary>\r
+    /// An object representing a Chapter aosciated with a Title, in a DVD\r
+    /// </summary>\r
+    public class Chapter\r
+    {\r
+        private int m_chapterNumber;\r
+        /// <summary>\r
+        /// The number of this Chapter, in regards to it's parent Title\r
+        /// </summary>\r
+        public int ChapterNumber\r
+        {\r
+            get\r
+            {\r
+                return this.m_chapterNumber;\r
+            }\r
+        }\r
+\r
+        private TimeSpan m_duration;\r
+        /// <summary>\r
+        /// The length in time this Chapter spans\r
+        /// </summary>\r
+        public TimeSpan Duration\r
+        {\r
+            get\r
+            {\r
+                return this.m_duration;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Override of the ToString method to make this object easier to use in the UI\r
+        /// </summary>\r
+        /// <returns>A string formatted as: {chapter #}</returns>\r
+        public override string ToString()\r
+        {\r
+            return this.m_chapterNumber.ToString();\r
+        }\r
+\r
+        public static Chapter Parse(StringReader output)\r
+        {\r
+            Match m = Regex.Match(output.ReadLine(), @"^    \+ ([0-9]*): cells ([0-9]*)->([0-9]*), ([0-9]*) blocks, duration ([0-9]{2}:[0-9]{2}:[0-9]{2})");\r
+            if (m.Success)\r
+            {\r
+                Chapter thisChapter = new Chapter();\r
+                thisChapter.m_chapterNumber = int.Parse(m.Groups[1].Value.Trim().ToString());\r
+                thisChapter.m_duration = TimeSpan.Parse(m.Groups[5].Value);\r
+                return thisChapter;\r
+            }\r
+            else\r
+                return null;\r
+        }\r
+\r
+        public static Chapter[] ParseList(StringReader output)\r
+        {\r
+            List<Chapter> chapters = new List<Chapter>();\r
+\r
+            // this is to read the "  + chapters:" line from the buffer\r
+            // so we can start reading the chapters themselvs\r
+            output.ReadLine();\r
+\r
+            while (true)\r
+            {\r
+                // Start of the chapter list for this Title\r
+                Chapter thisChapter = Chapter.Parse(output);\r
+\r
+                if (thisChapter != null)\r
+                    chapters.Add(thisChapter);\r
+                else\r
+                    break;\r
+            }\r
+            return chapters.ToArray();\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/Parsing/DVD.cs b/win/C#/Parsing/DVD.cs
new file mode 100644 (file)
index 0000000..d0802e4
--- /dev/null
@@ -0,0 +1,56 @@
+/*  DVD.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Windows.Forms;\r
+using System.IO;\r
+\r
+namespace Handbrake.Parsing\r
+{\r
+\r
+    /// <summary>\r
+    /// An object representing a scanned DVD\r
+    /// </summary>\r
+    public class DVD\r
+    {\r
+\r
+        private List<Title> m_titles;\r
+        /// <summary>\r
+        /// Collection of Titles associated with this DVD\r
+        /// </summary>\r
+        public List<Title> Titles\r
+        {\r
+            get\r
+            {\r
+                return this.m_titles;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Default constructor for this object\r
+        /// </summary>\r
+        public DVD()\r
+        {\r
+            this.m_titles = new List<Title>();\r
+        }\r
+\r
+        public static DVD Parse(StreamReader output)\r
+        {\r
+            DVD thisDVD = new DVD();\r
+\r
+            while (!output.EndOfStream)\r
+            {\r
+                if ((char)output.Peek() == '+')\r
+                    thisDVD.m_titles.AddRange(Title.ParseList(output.ReadToEnd()));\r
+                else\r
+                    output.ReadLine();\r
+            }\r
+\r
+            return thisDVD;\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/Parsing/Parser.cs b/win/C#/Parsing/Parser.cs
new file mode 100644 (file)
index 0000000..bbafc92
--- /dev/null
@@ -0,0 +1,99 @@
+/*  Parser.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.IO;\r
+using System.Text.RegularExpressions;\r
+using System.Windows.Forms;\r
+\r
+namespace Handbrake.Parsing\r
+{\r
+    /// <summary>\r
+    /// A delegate to handle custom events regarding data being parsed from the buffer\r
+    /// </summary>\r
+    /// <param name="Sender">The object which raised this delegate</param>\r
+    /// <param name="Data">The data parsed from the stream</param>\r
+    public delegate void DataReadEventHandler(object Sender, string Data);\r
+\r
+    /// <summary>\r
+    /// A delegate to handle events regarding progress during DVD scanning\r
+    /// </summary>\r
+    /// <param name="Sender">The object who's raising the event</param>\r
+    /// <param name="CurrentTitle">The title number currently being processed</param>\r
+    /// <param name="TitleCount">The total number of titiles to be processed</param>\r
+    public delegate void ScanProgressEventHandler(object Sender, int CurrentTitle, int TitleCount);\r
+\r
+    /// <summary>\r
+    /// A simple wrapper around a StreamReader to keep track of the entire output from a cli process\r
+    /// </summary>\r
+    internal class Parser : StreamReader\r
+    {\r
+        private string m_buffer;\r
+        /// <summary>\r
+        /// The output from the CLI process\r
+        /// </summary>\r
+        public string Buffer\r
+        {\r
+            get\r
+            {\r
+                return this.m_buffer;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Raised upon a new line being read from stdout/stderr\r
+        /// </summary>\r
+        public event DataReadEventHandler OnReadLine;\r
+\r
+        /// <summary>\r
+        /// Raised upon the entire stdout/stderr stream being read in a single call\r
+        /// </summary>\r
+        public event DataReadEventHandler OnReadToEnd;\r
+\r
+        /// <summary>\r
+        /// Raised upon the catching of a "Scanning title # of #..." in the stream\r
+        /// </summary>\r
+        public event ScanProgressEventHandler OnScanProgress;\r
+\r
+\r
+        /// <summary>\r
+        /// Default constructor for this object\r
+        /// </summary>\r
+        /// <param name="baseStream">The stream to parse from</param>\r
+        public Parser(Stream baseStream)\r
+            : base(baseStream)\r
+        {\r
+            this.m_buffer = string.Empty;\r
+        }\r
+\r
+        public override string ReadLine()\r
+        {\r
+            string tmp = base.ReadLine();\r
+\r
+            this.m_buffer += tmp;\r
+            Match m = Regex.Match(tmp, "^Scanning title ([0-9]*) of ([0-9]*)");\r
+            if (OnReadLine != null)\r
+                OnReadLine(this, tmp);\r
+\r
+            if (m.Success && OnScanProgress != null)\r
+                OnScanProgress(this, int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));\r
+\r
+            return tmp;\r
+        }\r
+\r
+        public override string ReadToEnd()\r
+        {\r
+            string tmp = base.ReadToEnd();\r
+\r
+            this.m_buffer += tmp;\r
+            if (OnReadToEnd != null)\r
+                OnReadToEnd(this, tmp);\r
+\r
+            return tmp;\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/Parsing/Subtitle.cs b/win/C#/Parsing/Subtitle.cs
new file mode 100644 (file)
index 0000000..c5a722b
--- /dev/null
@@ -0,0 +1,83 @@
+/*  Subtitle.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.IO;\r
+using System.Text.RegularExpressions;\r
+\r
+namespace Handbrake.Parsing\r
+{\r
+    /// <summary>\r
+    /// An object that represents a subtitle associated with a Title, in a DVD\r
+    /// </summary>\r
+    public class Subtitle\r
+    {\r
+        private int m_trackNumber;\r
+        /// <summary>\r
+        /// The track number of this Subtitle\r
+        /// </summary>\r
+        public int TrackNumber\r
+        {\r
+            get\r
+            {\r
+                return this.m_trackNumber;\r
+            }\r
+        }\r
+\r
+        private string m_language;\r
+        /// <summary>\r
+        /// The language (if detected) of this Subtitle\r
+        /// </summary>\r
+        public string Language\r
+        {\r
+            get\r
+            {\r
+                return this.m_language;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Override of the ToString method to make this object easier to use in the UI\r
+        /// </summary>\r
+        /// <returns>A string formatted as: {track #} {language}</returns>\r
+        public override string ToString()\r
+        {\r
+            return string.Format("{0} {1}", this.m_trackNumber, this.m_language);\r
+        }\r
+\r
+        public static Subtitle Parse(StringReader output)\r
+        {\r
+            string curLine = output.ReadLine();\r
+\r
+            Match m = Regex.Match(curLine, @"^    \+ ([0-9]*), ([A-Za-z, ]*) \((.*)\)");\r
+            if (m.Success && !curLine.Contains("HandBrake has exited."))\r
+            {\r
+                Subtitle thisSubtitle = new Subtitle();\r
+                thisSubtitle.m_trackNumber = int.Parse(m.Groups[1].Value.Trim().ToString());\r
+                thisSubtitle.m_language = m.Groups[2].Value;\r
+                return thisSubtitle;\r
+            }\r
+            else\r
+                return null;\r
+        }\r
+\r
+        public static Subtitle[] ParseList(StringReader output)\r
+        {\r
+            List<Subtitle> subtitles = new List<Subtitle>();\r
+            while ((char)output.Peek() != '+')\r
+            {\r
+                Subtitle thisSubtitle = Subtitle.Parse(output);\r
+\r
+                if (thisSubtitle != null)\r
+                    subtitles.Add(thisSubtitle);\r
+                else\r
+                    break;\r
+            }\r
+            return subtitles.ToArray();\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/Parsing/Title.cs b/win/C#/Parsing/Title.cs
new file mode 100644 (file)
index 0000000..05521c0
--- /dev/null
@@ -0,0 +1,198 @@
+/*  Title.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Drawing;\r
+using System.IO;\r
+using System.Windows.Forms;\r
+using System.Text.RegularExpressions;\r
+\r
+namespace Handbrake.Parsing\r
+{\r
+    /// <summary>\r
+    /// An object that represents a single Title of a DVD\r
+    /// </summary>\r
+    public class Title\r
+    {\r
+        private List<Chapter> m_chapters;\r
+        /// <summary>\r
+        /// Collection of chapters in this Title\r
+        /// </summary>\r
+        public List<Chapter> Chapters\r
+        {\r
+            get\r
+            {\r
+                return this.m_chapters;\r
+            }\r
+        }\r
+\r
+        private List<AudioTrack> m_audioTracks;\r
+        /// <summary>\r
+        /// Collection of audio tracks associated with this Title\r
+        /// </summary>\r
+        public List<AudioTrack> AudioTracks\r
+        {\r
+            get\r
+            {\r
+                return this.m_audioTracks;\r
+            }\r
+        }\r
+\r
+        private List<Subtitle> m_subtitles;\r
+        /// <summary>\r
+        /// Collection of subtitles associated with this Title\r
+        /// </summary>\r
+        public List<Subtitle> Subtitles\r
+        {\r
+            get\r
+            {\r
+                return this.m_subtitles;\r
+            }\r
+        }\r
+\r
+        private int m_titleNumber;\r
+        /// <summary>\r
+        /// The track number of this Title\r
+        /// </summary>\r
+        public int TitleNumber\r
+        {\r
+            get\r
+            {\r
+                return this.m_titleNumber;\r
+            }\r
+        }\r
+\r
+        private TimeSpan m_duration;\r
+        /// <summary>\r
+        /// The length in time of this Title\r
+        /// </summary>\r
+        public TimeSpan Duration\r
+        {\r
+            get\r
+            {\r
+                return this.m_duration;\r
+            }\r
+        }\r
+\r
+        private Size m_resolution;\r
+        /// <summary>\r
+        /// The resolution (width/height) of this Title\r
+        /// </summary>\r
+        public Size Resolution\r
+        {\r
+            get\r
+            {\r
+                return this.m_resolution;\r
+            }\r
+        }\r
+\r
+        private float m_aspectRatio;\r
+        /// <summary>\r
+        /// The aspect ratio of this Title\r
+        /// </summary>\r
+        public float AspectRatio\r
+        {\r
+            get\r
+            {\r
+                return this.m_aspectRatio;\r
+            }\r
+        }\r
+\r
+        private int[] m_autoCrop;\r
+        /// <summary>\r
+        /// The automatically detected crop region for this Title.\r
+        /// This is an int array with 4 items in it as so:\r
+        /// 0: \r
+        /// 1: \r
+        /// 2: \r
+        /// 3: \r
+        /// </summary>\r
+        public int[] AutoCropDimensions\r
+        {\r
+            get\r
+            {\r
+                return this.m_autoCrop;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// The constructor for this object\r
+        /// </summary>\r
+        public Title()\r
+        {\r
+            this.m_audioTracks = new List<AudioTrack>();\r
+            this.m_chapters = new List<Chapter>();\r
+            this.m_subtitles = new List<Subtitle>();\r
+        }\r
+\r
+        /// <summary>\r
+        /// Override of the ToString method to provide an easy way to use this object in the UI\r
+        /// </summary>\r
+        /// <returns>A string representing this track in the format: {title #} (00:00:00)</returns>\r
+        public override string ToString()\r
+        {\r
+            return string.Format("{0} ({1:00}:{2:00}:{3:00})", this.m_titleNumber, this.m_duration.Hours,\r
+             this.m_duration.Minutes, this.m_duration.Seconds);\r
+        }\r
+\r
+        public static Title Parse(StringReader output)\r
+        {\r
+            Title thisTitle = new Title();\r
+\r
+            Match m = Regex.Match(output.ReadLine(), @"^\+ title ([0-9]*):");\r
+            // Match track number for this title\r
+            if (m.Success)\r
+                thisTitle.m_titleNumber = int.Parse(m.Groups[1].Value.Trim().ToString());\r
+\r
+            String testData = output.ReadLine();\r
+\r
+            // Get duration for this title\r
+\r
+            m = Regex.Match(output.ReadLine(), @"^  \+ duration: ([0-9]{2}:[0-9]{2}:[0-9]{2})");\r
+            if (m.Success)\r
+                thisTitle.m_duration = TimeSpan.Parse(m.Groups[1].Value);\r
+\r
+            // Get resolution, aspect ratio and FPS for this title\r
+            m = Regex.Match(output.ReadLine(), @"^  \+ size: ([0-9]*)x([0-9]*), aspect: ([0-9]*\.[0-9]*), ([0-9]*\.[0-9]*) fps");\r
+            if (m.Success)\r
+            {\r
+                thisTitle.m_resolution = new Size(int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));\r
+                thisTitle.m_aspectRatio = float.Parse(m.Groups[3].Value, Functions.Encode.Culture);\r
+            }\r
+\r
+            // Get autocrop region for this title\r
+            m = Regex.Match(output.ReadLine(), @"^  \+ autocrop: ([0-9]*)/([0-9]*)/([0-9]*)/([0-9]*)");\r
+            if (m.Success)\r
+                thisTitle.m_autoCrop = new int[4] { int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value), int.Parse(m.Groups[3].Value), int.Parse(m.Groups[4].Value) };\r
+\r
+            thisTitle.m_chapters.AddRange(Chapter.ParseList(output));\r
+\r
+            thisTitle.m_audioTracks.AddRange(AudioTrack.ParseList(output));\r
+\r
+            thisTitle.m_subtitles.AddRange(Subtitle.ParseList(output));\r
+\r
+            return thisTitle;\r
+        }\r
+\r
+        public static Title[] ParseList(string output)\r
+        {\r
+            List<Title> titles = new List<Title>();\r
+            StringReader sr = new StringReader(output);\r
+\r
+            while (sr.Peek() == '+' || sr.Peek() == ' ')\r
+            {\r
+                // If the the character is a space, then chances are the line\r
+                if (sr.Peek() == ' ') // If the character is a space, then chances are it's the combing detected line.\r
+                    sr.ReadLine(); // Skip over it\r
+                else\r
+                    titles.Add(Title.Parse(sr));              \r
+            }\r
+\r
+            return titles.ToArray();\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/Presets/PresetsHandler.cs b/win/C#/Presets/PresetsHandler.cs
new file mode 100644 (file)
index 0000000..172125a
--- /dev/null
@@ -0,0 +1,317 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.IO;\r
+using System.Text.RegularExpressions;\r
+using System.Diagnostics;\r
+using System.Xml.Serialization;\r
+\r
+namespace Handbrake.Presets\r
+{\r
+    public class PresetsHandler\r
+    {\r
+        List<Preset> presets = new List<Preset>();  // Category+Level+Preset Name: Query\r
+        List<Preset> user_presets = new List<Preset>(); // Preset Name: Query\r
+        private static XmlSerializer ser = new XmlSerializer(typeof(List<Preset>));\r
+\r
+        /// <summary>\r
+        /// Add a new preset to the system\r
+        /// </summary>\r
+        /// <param name="presetName">String, The name of the new preset</param>\r
+        /// <param name="query">String, the CLI query for the new preset</param>\r
+        public Boolean addPreset(string presetName, string query)\r
+        {\r
+            if (checkIfPresetExists(presetName) == false)\r
+            {\r
+                Preset newPreset = new Preset();\r
+                newPreset.Name = presetName;\r
+                newPreset.Query = query;\r
+                user_presets.Add(newPreset);\r
+                updateUserPresetsFile();\r
+                return true;\r
+            }\r
+            else\r
+            {\r
+                MessageBox.Show("Sorry, that preset name already exists. Please choose another!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+                return false;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Remove a preset with a given name from either the built in or user preset list.\r
+        /// </summary>\r
+        /// <param name="name">String, the preset name</param>\r
+        public void remove(string name)\r
+        {\r
+            List<Preset> newPresets = new List<Preset>();\r
+            List<Preset> newUserPresets = new List<Preset>();\r
+\r
+            // Built In Presets\r
+            foreach (Preset item in presets)\r
+            {\r
+                if (item.Name != name)\r
+                {\r
+                    newPresets.Add(item);\r
+                }\r
+            }\r
+            presets = newPresets;\r
+\r
+            // User Presets\r
+            foreach (Preset item in user_presets)\r
+            {\r
+                if (item.Name != name)\r
+                {\r
+                    newUserPresets.Add(item);\r
+                }\r
+            }\r
+            user_presets = newUserPresets;\r
+\r
+            // Now, Update the presets.xml and user_presets.xml file with the new items.\r
+            string userPresets = Application.StartupPath.ToString() + "\\user_presets.xml";\r
+            string presetsFile = Application.StartupPath.ToString() + "\\presets.xml";\r
+\r
+            // Rebuild the user_presets.xml file\r
+            updateUserPresetsFile();\r
+            updatePresetsFile();\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get a List of all the built in preset names.\r
+        /// </summary>\r
+        /// <returns>List<String> of preset names</returns>\r
+        public List<Preset> getBuildInPresets()\r
+        {\r
+            return presets;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get a List of all the User preset names.\r
+        /// </summary>\r
+        /// <returns>List<String> of preset names</returns>\r
+        public List<string> getUserPresetNames()\r
+        {\r
+            List<string> names = new List<string>();\r
+\r
+            // User Presets\r
+            foreach (Preset item in user_presets)\r
+            {\r
+                names.Add(item.Name);\r
+            }\r
+\r
+            return names;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Return the CLI query for a preset name given in name\r
+        /// </summary>\r
+        /// <param name="name">String, The preset's name</param>\r
+        /// <returns>String, the CLI query for the given preset name</returns>\r
+        public string getCliForPreset(string name)\r
+        {\r
+            // Built In Presets\r
+            foreach (Preset item in presets)\r
+            {\r
+                if (item.Name == name)\r
+                    return item.Query;\r
+            }\r
+\r
+            // User Presets\r
+            foreach (Preset item in user_presets)\r
+            {\r
+                if (item.Name == name)\r
+                    return item.Query;\r
+            }\r
+\r
+            return null;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Reads the CLI's CLI output format and load's them into the preset List<Preset>\r
+        /// </summary>\r
+        public void updateBuiltInPresets()\r
+        {\r
+            // Create a new tempory file and execute the CLI to get the built in presets.\r
+            string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");\r
+            string presetsPath = Path.Combine(Path.GetTempPath(), "temp_presets.dat");\r
+\r
+            string strCmdLine = String.Format(@"cmd /c """"{0}"" --preset-list >""{1}"" 2>&1""", handbrakeCLIPath, presetsPath);\r
+\r
+            ProcessStartInfo hbGetPresets = new ProcessStartInfo("CMD.exe", strCmdLine);\r
+            hbGetPresets.WindowStyle = ProcessWindowStyle.Hidden;\r
+\r
+            Process hbproc = Process.Start(hbGetPresets);\r
+            hbproc.WaitForExit();\r
+            hbproc.Dispose();\r
+            hbproc.Close();\r
+\r
+            // Clear the current built in presets and now parse the tempory presets file.\r
+            presets.Clear();\r
+            string filePath = Path.Combine(Path.GetTempPath(), "temp_presets.dat");\r
+            if (File.Exists(filePath))\r
+            {\r
+                StreamReader presetInput = new StreamReader(filePath);\r
+                int level = 1;\r
+                string category = String.Empty;\r
+                string level_1_category = String.Empty;\r
+\r
+                while (!presetInput.EndOfStream)\r
+                {\r
+                    string line = presetInput.ReadLine();\r
+                    if (line.Contains("<") && !line.Contains("<<"))\r
+                    {\r
+                        level = 1;\r
+                        category = line.Replace("<", "").Trim();\r
+                        level_1_category = category;\r
+                    }\r
+\r
+                    if (line.Contains("<<"))\r
+                    {\r
+                        level = 2;\r
+                        category = line.Replace("<<", "").Trim();\r
+                    }\r
+\r
+                    if (line.Trim().Contains(">>"))\r
+                    {\r
+                        level = 1;\r
+                        category = level_1_category;\r
+                    }\r
+\r
+                    if (line.Contains("+"))\r
+                    {\r
+                        Regex r = new Regex("(:  )"); // Split on hyphens. \r
+                        string[] presetName = r.Split(line);\r
+\r
+                        Preset newPreset = new Preset();\r
+                        newPreset.Level = level;\r
+                        newPreset.Category = category;\r
+                        newPreset.Name = presetName[0].Replace("+", "").Trim();\r
+                        newPreset.Query = presetName[2];\r
+                        presets.Add(newPreset);\r
+                    }\r
+                }\r
+                presetInput.Close();\r
+                presetInput.Dispose();\r
+            }\r
+\r
+            // Finally, Create a new or update the current presets.xml file\r
+            updatePresetsFile();\r
+        }\r
+\r
+        /// <summary>\r
+        /// Load in the preset data from presets.xml and user_presets.xml\r
+        /// Load it into the 2 arraylist's presets and user_presets\r
+        /// </summary>\r
+        public void loadPresetData()\r
+        {\r
+            // First clear the presets arraylists\r
+            presets.Clear();\r
+            user_presets.Clear();\r
+\r
+            string filePath = string.Empty;\r
+\r
+            // Load in the users presets from user_presets.xml\r
+            filePath = Application.StartupPath.ToString() + "\\presets.xml";\r
+            if (File.Exists(filePath))\r
+            {\r
+                using (FileStream strm = new FileStream(filePath, FileMode.Open, FileAccess.Read))\r
+                {\r
+                    if (strm.Length != 0)\r
+                    {\r
+                        List<Preset> list = ser.Deserialize(strm) as List<Preset>;\r
+\r
+                        foreach (Preset preset in list)\r
+                            presets.Add(preset);\r
+                    }\r
+                }\r
+            }\r
+\r
+            // Load in the users presets from user_presets.xml\r
+            filePath = Application.StartupPath.ToString() + "\\user_presets.xml";\r
+            if (File.Exists(filePath))\r
+            {\r
+                using (FileStream strm = new FileStream(filePath, FileMode.Open, FileAccess.Read))\r
+                {\r
+                    if (strm.Length != 0)\r
+                    {\r
+                        List<Preset> list = ser.Deserialize(strm) as List<Preset>;\r
+\r
+                        foreach (Preset preset in list)\r
+                            user_presets.Add(preset);\r
+                    }\r
+                }\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Updates the presets.xml file which contains the built in presets\r
+        /// It takes the List of Presets and converts them into XML which is stored in presets.xml\r
+        /// </summary>\r
+        private void updatePresetsFile()\r
+        {\r
+            string userPresets = Application.StartupPath.ToString() + "\\presets.xml";\r
+            try\r
+            {\r
+                using (FileStream strm = new FileStream(userPresets, FileMode.Create, FileAccess.Write))\r
+                {\r
+                    ser.Serialize(strm, presets);\r
+                    strm.Close();\r
+                    strm.Dispose();\r
+                }\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Updates the user_presets.xml file which contains the built in presets\r
+        /// It takes the List of Presets and converts them into XML which is stored in user_presets.xml\r
+        /// </summary>\r
+        private void updateUserPresetsFile()\r
+        {\r
+            string userPresets = Application.StartupPath.ToString() + "\\user_presets.xml";\r
+            try\r
+            {\r
+                using (FileStream strm = new FileStream(userPresets, FileMode.Create, FileAccess.Write))\r
+                {\r
+                    ser.Serialize(strm, user_presets);\r
+                    strm.Close();\r
+                    strm.Dispose();\r
+                }\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Check if the preset "name" exists in either presets or user_presets lists.\r
+        /// </summary>\r
+        /// <param name="name"></param>\r
+        /// <returns></returns>\r
+        private Boolean checkIfPresetExists(string name)\r
+        {\r
+            if (name == string.Empty)\r
+                return true;\r
+\r
+            // Built In Presets\r
+            foreach (Preset item in presets)\r
+            {\r
+                if (item.Name == name)\r
+                    return true;\r
+            }\r
+\r
+            // User Presets\r
+            foreach (Preset item in user_presets)\r
+            {\r
+                if (item.Name == name)\r
+                    return true;\r
+            }\r
+\r
+            return false;\r
+        }\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/Presets/preset.cs b/win/C#/Presets/preset.cs
new file mode 100644 (file)
index 0000000..58d3be9
--- /dev/null
@@ -0,0 +1,56 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.IO;\r
+using System.Text.RegularExpressions;\r
+using System.Diagnostics;\r
+\r
+namespace Handbrake.Presets\r
+{\r
+    public class Preset\r
+    {\r
+\r
+        private int level = 0;\r
+        private string category = null;\r
+        private string name;\r
+        private string query;\r
+\r
+        /// <summary>\r
+        /// Get or Set the preset's level. This indicated if it is a root or child node\r
+        /// </summary>\r
+        public int Level\r
+        {\r
+            get { return level; }\r
+            set { this.level = value; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get or Set the category which the preset resides under\r
+        /// </summary>\r
+        public string Category\r
+        {\r
+            get { return category; }\r
+            set { this.category = value; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get or Set the preset name\r
+        /// </summary>\r
+        public string Name\r
+        {\r
+            get { return name; }\r
+            set { this.name = value; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get or set the preset query\r
+        /// </summary>\r
+        public string Query\r
+        {\r
+            get { return query; }\r
+            set { this.query = value; }\r
+        }\r
+\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/Program.cs b/win/C#/Program.cs
new file mode 100644 (file)
index 0000000..ae9edec
--- /dev/null
@@ -0,0 +1,78 @@
+/*  Program.cs \r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Collections.Specialized;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.Net;\r
+using System.IO;\r
+using System.Diagnostics;\r
+using System.Threading;\r
+using System.Runtime.InteropServices;\r
+using System.Globalization;\r
+\r
+\r
+namespace Handbrake\r
+{\r
+    static class Program\r
+    {\r
+        /// <summary>\r
+        /// The main entry point for the application.\r
+        /// </summary>\r
+        [STAThread]\r
+        static void Main()\r
+        {\r
+            // Development Code Expiry.\r
+            // Remember to comment out on public release!!!\r
+            //if (DateTime.Now > DateTime.Parse("2008/02/25", new CultureInfo("en-US"))) { MessageBox.Show("Sorry, This development build of Handbrake has expired."); return; } \r
+\r
+            // Check the system meets the system requirements.\r
+            Boolean launch = true;\r
+            try\r
+            {\r
+                // Make sure the screen resolution is not below 1024x768\r
+                System.Windows.Forms.Screen scr = System.Windows.Forms.Screen.PrimaryScreen;\r
+                if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 720))\r
+                {\r
+                    MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n" + "Your screen is running at: " + scr.Bounds.Width.ToString() + "x" + scr.Bounds.Height.ToString() + " \nScreen resolution is too Low. Must be 1024x720 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                    launch = false;\r
+                }\r
+\r
+                // Make sure the system has enough RAM. 384MB or greater\r
+                Functions.SystemInfo info = new Functions.SystemInfo();\r
+                uint memory = info.TotalPhysicalMemory();\r
+                \r
+                if (memory < 256)\r
+                {\r
+                    MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n Insufficient RAM. 384MB or greater required. You have: " + memory.ToString() + "MB", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                    launch = false;\r
+                }\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("frmMain.cs - systemCheck() " + exc.ToString());\r
+            }\r
+\r
+            // Either Launch or Close the Application\r
+            if (launch == true)\r
+            {\r
+                Application.EnableVisualStyles();\r
+                Application.SetCompatibleTextRenderingDefault(false);\r
+                Application.Run(new frmMain());\r
+            }\r
+            else\r
+            {\r
+                Application.Exit();\r
+            }\r
+        }\r
+    }\r
+\r
+}
\ No newline at end of file
diff --git a/win/C#/Properties/AssemblyInfo.cs b/win/C#/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..f88d1cc
--- /dev/null
@@ -0,0 +1,41 @@
+/*  AssemblyInfo.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System.Reflection;\r
+using System.Runtime.CompilerServices;\r
+using System.Runtime.InteropServices;\r
+using System.Resources;\r
+\r
+// General Information about an assembly is controlled through the following \r
+// set of attributes. Change these attribute values to modify the information\r
+// associated with an assembly.\r
+[assembly: AssemblyTitle("HandBrake")]\r
+[assembly: AssemblyDescription("HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder.")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("HandBrake")]\r
+[assembly: AssemblyProduct("HandBrake")]\r
+[assembly: AssemblyCopyright("Copyright Â©  2008")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// Setting ComVisible to false makes the types in this assembly not visible \r
+// to COM components.  If you need to access a type in this assembly from \r
+// COM, set the ComVisible attribute to true on that type.\r
+[assembly: ComVisible(false)]\r
+\r
+// The following GUID is for the ID of the typelib if this project is exposed to COM\r
+[assembly: Guid("5e4e3f97-5252-41f6-aae9-3846f62cbc66")]\r
+\r
+// Version information for an assembly consists of the following four values:\r
+//\r
+//      Major Version\r
+//      Minor Version \r
+//      Build Number\r
+//      Revision\r
+//\r
+[assembly: AssemblyVersion("0.9.3.0")]\r
+[assembly: AssemblyFileVersion("0.9.3.0")]\r
+[assembly: NeutralResourcesLanguageAttribute("")]\r
diff --git a/win/C#/Properties/Resources.Designer.cs b/win/C#/Properties/Resources.Designer.cs
new file mode 100644 (file)
index 0000000..0a9c4b7
--- /dev/null
@@ -0,0 +1,231 @@
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+//     This code was generated by a tool.\r
+//     Runtime Version:2.0.50727.3053\r
+//\r
+//     Changes to this file may cause incorrect behavior and will be lost if\r
+//     the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace Handbrake.Properties {\r
+    using System;\r
+    \r
+    \r
+    /// <summary>\r
+    ///   A strongly-typed resource class, for looking up localized strings, etc.\r
+    /// </summary>\r
+    // This class was auto-generated by the StronglyTypedResourceBuilder\r
+    // class via a tool like ResGen or Visual Studio.\r
+    // To add or remove a member, edit your .ResX file then rerun ResGen\r
+    // with the /str option, or rebuild your VS project.\r
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]\r
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
+    internal class Resources {\r
+        \r
+        private static global::System.Resources.ResourceManager resourceMan;\r
+        \r
+        private static global::System.Globalization.CultureInfo resourceCulture;\r
+        \r
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]\r
+        internal Resources() {\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Returns the cached ResourceManager instance used by this class.\r
+        /// </summary>\r
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
+        internal static global::System.Resources.ResourceManager ResourceManager {\r
+            get {\r
+                if (object.ReferenceEquals(resourceMan, null)) {\r
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Handbrake.Properties.Resources", typeof(Resources).Assembly);\r
+                    resourceMan = temp;\r
+                }\r
+                return resourceMan;\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Overrides the current thread's CurrentUICulture property for all\r
+        ///   resource lookups using this strongly typed resource class.\r
+        /// </summary>\r
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
+        internal static global::System.Globalization.CultureInfo Culture {\r
+            get {\r
+                return resourceCulture;\r
+            }\r
+            set {\r
+                resourceCulture = value;\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap ActivityWindow {\r
+            get {\r
+                object obj = ResourceManager.GetObject("ActivityWindow", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap ActivityWindow_small {\r
+            get {\r
+                object obj = ResourceManager.GetObject("ActivityWindow_small", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap AddToQueue {\r
+            get {\r
+                object obj = ResourceManager.GetObject("AddToQueue", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap copy {\r
+            get {\r
+                object obj = ResourceManager.GetObject("copy", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap disc_small {\r
+            get {\r
+                object obj = ResourceManager.GetObject("disc_small", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap folder {\r
+            get {\r
+                object obj = ResourceManager.GetObject("folder", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap General_Preferences {\r
+            get {\r
+                object obj = ResourceManager.GetObject("General_Preferences", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap hb16 {\r
+            get {\r
+                object obj = ResourceManager.GetObject("hb16", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap hb32 {\r
+            get {\r
+                object obj = ResourceManager.GetObject("hb32", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap Help16 {\r
+            get {\r
+                object obj = ResourceManager.GetObject("Help16", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap info16 {\r
+            get {\r
+                object obj = ResourceManager.GetObject("info16", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap logo128 {\r
+            get {\r
+                object obj = ResourceManager.GetObject("logo128", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap logo64 {\r
+            get {\r
+                object obj = ResourceManager.GetObject("logo64", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap Movies {\r
+            get {\r
+                object obj = ResourceManager.GetObject("Movies", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap Movies_Small {\r
+            get {\r
+                object obj = ResourceManager.GetObject("Movies_Small", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap Output_Small {\r
+            get {\r
+                object obj = ResourceManager.GetObject("Output_Small", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap Pause {\r
+            get {\r
+                object obj = ResourceManager.GetObject("Pause", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap Play {\r
+            get {\r
+                object obj = ResourceManager.GetObject("Play", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap Pref_Small {\r
+            get {\r
+                object obj = ResourceManager.GetObject("Pref_Small", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap Queue {\r
+            get {\r
+                object obj = ResourceManager.GetObject("Queue", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap Queue_Small {\r
+            get {\r
+                object obj = ResourceManager.GetObject("Queue_Small", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap save {\r
+            get {\r
+                object obj = ResourceManager.GetObject("save", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap SplashScreen {\r
+            get {\r
+                object obj = ResourceManager.GetObject("SplashScreen", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        internal static System.Drawing.Bitmap stop {\r
+            get {\r
+                object obj = ResourceManager.GetObject("stop", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/Properties/Resources.resx b/win/C#/Properties/Resources.resx
new file mode 100644 (file)
index 0000000..7fa9934
--- /dev/null
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />\r
+  <data name="General_Preferences" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\General Preferences.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="Pref_Small" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\Pref_Small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="logo128" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\logo128.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="ActivityWindow" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\ActivityWindow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="Play" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\Play.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="Pause" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\Pause.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="SplashScreen" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\SplashScreen.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="Output_Small" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\Output_Small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="Queue_Small" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\Queue_Small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="Movies" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\Movies.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="Movies_Small" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\Movies_Small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="AddToQueue" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\AddToQueue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="disc_small" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\resources\disc_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="ActivityWindow_small" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\resources\activitywindow_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="hb16" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\hb16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="hb32" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\hb32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="Help16" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\Help16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="info16" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\info16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="logo64" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\logo64.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="stop" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\stop.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="folder" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\folder.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="save" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\save.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="Queue" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\Queue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="copy" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\resources\copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs
new file mode 100644 (file)
index 0000000..c8f9f66
--- /dev/null
@@ -0,0 +1,302 @@
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+//     This code was generated by a tool.\r
+//     Runtime Version:2.0.50727.3053\r
+//\r
+//     Changes to this file may cause incorrect behavior and will be lost if\r
+//     the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace Handbrake.Properties {\r
+    \r
+    \r
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]\r
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\r
+        \r
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\r
+        \r
+        public static Settings Default {\r
+            get {\r
+                return defaultInstance;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("Below Normal")]\r
+        public string processPriority {\r
+            get {\r
+                return ((string)(this["processPriority"]));\r
+            }\r
+            set {\r
+                this["processPriority"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("Automatic")]\r
+        public string Processors {\r
+            get {\r
+                return ((string)(this["Processors"]));\r
+            }\r
+            set {\r
+                this["Processors"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("Checked")]\r
+        public string defaultSettings {\r
+            get {\r
+                return ((string)(this["defaultSettings"]));\r
+            }\r
+            set {\r
+                this["defaultSettings"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("Checked")]\r
+        public string updateStatus {\r
+            get {\r
+                return ((string)(this["updateStatus"]));\r
+            }\r
+            set {\r
+                this["updateStatus"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("{hb_version}")]\r
+        public string hb_version {\r
+            get {\r
+                return ((string)(this["hb_version"]));\r
+            }\r
+            set {\r
+                this["hb_version"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("Checked")]\r
+        public string tooltipEnable {\r
+            get {\r
+                return ((string)(this["tooltipEnable"]));\r
+            }\r
+            set {\r
+                this["tooltipEnable"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("Do Nothing")]\r
+        public string CompletionOption {\r
+            get {\r
+                return ((string)(this["CompletionOption"]));\r
+            }\r
+            set {\r
+                this["CompletionOption"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string defaultUserSettings {\r
+            get {\r
+                return ((string)(this["defaultUserSettings"]));\r
+            }\r
+            set {\r
+                this["defaultUserSettings"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("0")]\r
+        public int hb_build {\r
+            get {\r
+                return ((int)(this["hb_build"]));\r
+            }\r
+            set {\r
+                this["hb_build"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("0")]\r
+        public int skipversion {\r
+            get {\r
+                return ((int)(this["skipversion"]));\r
+            }\r
+            set {\r
+                this["skipversion"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string autoNaming {\r
+            get {\r
+                return ((string)(this["autoNaming"]));\r
+            }\r
+            set {\r
+                this["autoNaming"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string autoNamePath {\r
+            get {\r
+                return ((string)(this["autoNamePath"]));\r
+            }\r
+            set {\r
+                this["autoNamePath"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("http://handbrake.fr/appcast.xml")]\r
+        public string appcast {\r
+            get {\r
+                return ((string)(this["appcast"]));\r
+            }\r
+            set {\r
+                this["appcast"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("http://handbrake.fr/appcast_unstable.xml")]\r
+        public string appcast_unstable {\r
+            get {\r
+                return ((string)(this["appcast_unstable"]));\r
+            }\r
+            set {\r
+                this["appcast_unstable"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("Checked")]\r
+        public string drive_detection {\r
+            get {\r
+                return ((string)(this["drive_detection"]));\r
+            }\r
+            set {\r
+                this["drive_detection"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string cli_minimized {\r
+            get {\r
+                return ((string)(this["cli_minimized"]));\r
+            }\r
+            set {\r
+                this["cli_minimized"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string checkSnapshot {\r
+            get {\r
+                return ((string)(this["checkSnapshot"]));\r
+            }\r
+            set {\r
+                this["checkSnapshot"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("4:10:15:9:10:35:9")]\r
+        public string decomb {\r
+            get {\r
+                return ((string)(this["decomb"]));\r
+            }\r
+            set {\r
+                this["decomb"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("4:10:15:9:10:35:9")]\r
+        public string default_decomb {\r
+            get {\r
+                return ((string)(this["default_decomb"]));\r
+            }\r
+            set {\r
+                this["default_decomb"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("{source}-{title}-{chapters}")]\r
+        public string autoNameFormat {\r
+            get {\r
+                return ((string)(this["autoNameFormat"]));\r
+            }\r
+            set {\r
+                this["autoNameFormat"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string saveLog {\r
+            get {\r
+                return ((string)(this["saveLog"]));\r
+            }\r
+            set {\r
+                this["saveLog"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string saveLogPath {\r
+            get {\r
+                return ((string)(this["saveLogPath"]));\r
+            }\r
+            set {\r
+                this["saveLogPath"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string saveLogWithVideo {\r
+            get {\r
+                return ((string)(this["saveLogWithVideo"]));\r
+            }\r
+            set {\r
+                this["saveLogWithVideo"] = value;\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings
new file mode 100644 (file)
index 0000000..8d4af32
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version='1.0' encoding='utf-8'?>\r
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Handbrake.Properties" GeneratedClassName="Settings">\r
+  <Profiles />\r
+  <Settings>\r
+    <Setting Name="processPriority" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">Below Normal</Value>\r
+    </Setting>\r
+    <Setting Name="Processors" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">Automatic</Value>\r
+    </Setting>\r
+    <Setting Name="defaultSettings" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">Checked</Value>\r
+    </Setting>\r
+    <Setting Name="updateStatus" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">Checked</Value>\r
+    </Setting>\r
+    <Setting Name="hb_version" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">{hb_version}</Value>\r
+    </Setting>\r
+    <Setting Name="tooltipEnable" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">Checked</Value>\r
+    </Setting>\r
+    <Setting Name="CompletionOption" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">Do Nothing</Value>\r
+    </Setting>\r
+    <Setting Name="defaultUserSettings" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
+    <Setting Name="hb_build" Type="System.Int32" Scope="User">\r
+      <Value Profile="(Default)">0</Value>\r
+    </Setting>\r
+    <Setting Name="skipversion" Type="System.Int32" Scope="User">\r
+      <Value Profile="(Default)">0</Value>\r
+    </Setting>\r
+    <Setting Name="autoNaming" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
+    <Setting Name="autoNamePath" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
+    <Setting Name="appcast" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">http://handbrake.fr/appcast.xml</Value>\r
+    </Setting>\r
+    <Setting Name="appcast_unstable" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">http://handbrake.fr/appcast_unstable.xml</Value>\r
+    </Setting>\r
+    <Setting Name="drive_detection" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">Checked</Value>\r
+    </Setting>\r
+    <Setting Name="cli_minimized" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
+    <Setting Name="checkSnapshot" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
+    <Setting Name="decomb" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">4:10:15:9:10:35:9</Value>\r
+    </Setting>\r
+    <Setting Name="default_decomb" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">4:10:15:9:10:35:9</Value>\r
+    </Setting>\r
+    <Setting Name="autoNameFormat" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">{source}-{title}-{chapters}</Value>\r
+    </Setting>\r
+    <Setting Name="saveLog" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
+    <Setting Name="saveLogPath" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
+    <Setting Name="saveLogWithVideo" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
+  </Settings>\r
+</SettingsFile>
\ No newline at end of file
diff --git a/win/C#/Resources/ActivityWindow.png b/win/C#/Resources/ActivityWindow.png
new file mode 100644 (file)
index 0000000..315e0fa
Binary files /dev/null and b/win/C#/Resources/ActivityWindow.png differ
diff --git a/win/C#/Resources/ActivityWindow_small.png b/win/C#/Resources/ActivityWindow_small.png
new file mode 100644 (file)
index 0000000..916b6ef
Binary files /dev/null and b/win/C#/Resources/ActivityWindow_small.png differ
diff --git a/win/C#/Resources/AddToQueue.png b/win/C#/Resources/AddToQueue.png
new file mode 100644 (file)
index 0000000..8eb079b
Binary files /dev/null and b/win/C#/Resources/AddToQueue.png differ
diff --git a/win/C#/Resources/General Preferences.png b/win/C#/Resources/General Preferences.png
new file mode 100644 (file)
index 0000000..9814afc
Binary files /dev/null and b/win/C#/Resources/General Preferences.png differ
diff --git a/win/C#/Resources/Help16.png b/win/C#/Resources/Help16.png
new file mode 100644 (file)
index 0000000..bb5ef99
Binary files /dev/null and b/win/C#/Resources/Help16.png differ
diff --git a/win/C#/Resources/Movies.png b/win/C#/Resources/Movies.png
new file mode 100644 (file)
index 0000000..ec03eb5
Binary files /dev/null and b/win/C#/Resources/Movies.png differ
diff --git a/win/C#/Resources/Movies_Small.png b/win/C#/Resources/Movies_Small.png
new file mode 100644 (file)
index 0000000..80f2403
Binary files /dev/null and b/win/C#/Resources/Movies_Small.png differ
diff --git a/win/C#/Resources/Output_Small.png b/win/C#/Resources/Output_Small.png
new file mode 100644 (file)
index 0000000..a1017d6
Binary files /dev/null and b/win/C#/Resources/Output_Small.png differ
diff --git a/win/C#/Resources/Pause.png b/win/C#/Resources/Pause.png
new file mode 100644 (file)
index 0000000..a208339
Binary files /dev/null and b/win/C#/Resources/Pause.png differ
diff --git a/win/C#/Resources/Play.png b/win/C#/Resources/Play.png
new file mode 100644 (file)
index 0000000..23fce82
Binary files /dev/null and b/win/C#/Resources/Play.png differ
diff --git a/win/C#/Resources/Pref_Small.png b/win/C#/Resources/Pref_Small.png
new file mode 100644 (file)
index 0000000..a28fb5b
Binary files /dev/null and b/win/C#/Resources/Pref_Small.png differ
diff --git a/win/C#/Resources/Queue.png b/win/C#/Resources/Queue.png
new file mode 100644 (file)
index 0000000..51962a1
Binary files /dev/null and b/win/C#/Resources/Queue.png differ
diff --git a/win/C#/Resources/Queue_Small.png b/win/C#/Resources/Queue_Small.png
new file mode 100644 (file)
index 0000000..02c7391
Binary files /dev/null and b/win/C#/Resources/Queue_Small.png differ
diff --git a/win/C#/Resources/SplashScreen.jpg b/win/C#/Resources/SplashScreen.jpg
new file mode 100644 (file)
index 0000000..ca1072d
Binary files /dev/null and b/win/C#/Resources/SplashScreen.jpg differ
diff --git a/win/C#/Resources/copy.png b/win/C#/Resources/copy.png
new file mode 100644 (file)
index 0000000..c11c6a7
Binary files /dev/null and b/win/C#/Resources/copy.png differ
diff --git a/win/C#/Resources/disc_small.png b/win/C#/Resources/disc_small.png
new file mode 100644 (file)
index 0000000..dca0ad2
Binary files /dev/null and b/win/C#/Resources/disc_small.png differ
diff --git a/win/C#/Resources/folder.png b/win/C#/Resources/folder.png
new file mode 100644 (file)
index 0000000..41fa2c6
Binary files /dev/null and b/win/C#/Resources/folder.png differ
diff --git a/win/C#/Resources/hb16.png b/win/C#/Resources/hb16.png
new file mode 100644 (file)
index 0000000..a9f7207
Binary files /dev/null and b/win/C#/Resources/hb16.png differ
diff --git a/win/C#/Resources/hb32.png b/win/C#/Resources/hb32.png
new file mode 100644 (file)
index 0000000..5054264
Binary files /dev/null and b/win/C#/Resources/hb32.png differ
diff --git a/win/C#/Resources/info16.png b/win/C#/Resources/info16.png
new file mode 100644 (file)
index 0000000..6b6b9f0
Binary files /dev/null and b/win/C#/Resources/info16.png differ
diff --git a/win/C#/Resources/logo128.png b/win/C#/Resources/logo128.png
new file mode 100644 (file)
index 0000000..69d7645
Binary files /dev/null and b/win/C#/Resources/logo128.png differ
diff --git a/win/C#/Resources/logo64.png b/win/C#/Resources/logo64.png
new file mode 100644 (file)
index 0000000..12808f6
Binary files /dev/null and b/win/C#/Resources/logo64.png differ
diff --git a/win/C#/Resources/save.png b/win/C#/Resources/save.png
new file mode 100644 (file)
index 0000000..40885d2
Binary files /dev/null and b/win/C#/Resources/save.png differ
diff --git a/win/C#/Resources/stop.png b/win/C#/Resources/stop.png
new file mode 100644 (file)
index 0000000..c544b5e
Binary files /dev/null and b/win/C#/Resources/stop.png differ
diff --git a/win/C#/app.config b/win/C#/app.config
new file mode 100644 (file)
index 0000000..522578b
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>\r
+<configuration>\r
+    <configSections>\r
+        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+            <section name="Handbrake.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>\r
+        </sectionGroup>\r
+    </configSections>\r
+    <userSettings>\r
+        <Handbrake.Properties.Settings>\r
+            <setting name="processPriority" serializeAs="String">\r
+                <value>Below Normal</value>\r
+            </setting>\r
+            <setting name="Processors" serializeAs="String">\r
+                <value>Automatic</value>\r
+            </setting>\r
+            <setting name="defaultSettings" serializeAs="String">\r
+                <value>Checked</value>\r
+            </setting>\r
+            <setting name="updateStatus" serializeAs="String">\r
+                <value>Checked</value>\r
+            </setting>\r
+            <setting name="hb_version" serializeAs="String">\r
+                <value>{hb_version}</value>\r
+            </setting>\r
+            <setting name="tooltipEnable" serializeAs="String">\r
+                <value>Checked</value>\r
+            </setting>\r
+            <setting name="CompletionOption" serializeAs="String">\r
+                <value>Do Nothing</value>\r
+            </setting>\r
+            <setting name="defaultUserSettings" serializeAs="String">\r
+                <value />\r
+            </setting>\r
+            <setting name="hb_build" serializeAs="String">\r
+                <value>0</value>\r
+            </setting>\r
+            <setting name="skipversion" serializeAs="String">\r
+                <value>0</value>\r
+            </setting>\r
+            <setting name="autoNaming" serializeAs="String">\r
+                <value />\r
+            </setting>\r
+            <setting name="autoNamePath" serializeAs="String">\r
+                <value />\r
+            </setting>\r
+            <setting name="appcast" serializeAs="String">\r
+                <value>http://handbrake.fr/appcast.xml</value>\r
+            </setting>\r
+            <setting name="appcast_unstable" serializeAs="String">\r
+                <value>http://handbrake.fr/appcast_unstable.xml</value>\r
+            </setting>\r
+            <setting name="drive_detection" serializeAs="String">\r
+                <value>Checked</value>\r
+            </setting>\r
+            <setting name="cli_minimized" serializeAs="String">\r
+                <value />\r
+            </setting>\r
+            <setting name="checkSnapshot" serializeAs="String">\r
+                <value />\r
+            </setting>\r
+            <setting name="decomb" serializeAs="String">\r
+                <value>4:10:15:9:10:35:9</value>\r
+            </setting>\r
+            <setting name="default_decomb" serializeAs="String">\r
+                <value>4:10:15:9:10:35:9</value>\r
+            </setting>\r
+            <setting name="autoNameFormat" serializeAs="String">\r
+                <value>{source}-{title}-{chapters}</value>\r
+            </setting>\r
+            <setting name="saveLog" serializeAs="String">\r
+                <value />\r
+            </setting>\r
+            <setting name="saveLogPath" serializeAs="String">\r
+                <value />\r
+            </setting>\r
+            <setting name="saveLogWithVideo" serializeAs="String">\r
+                <value />\r
+            </setting>\r
+        </Handbrake.Properties.Settings>\r
+    </userSettings>\r
+<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>\r
diff --git a/win/C#/frmAbout.Designer.cs b/win/C#/frmAbout.Designer.cs
new file mode 100644 (file)
index 0000000..ab56957
--- /dev/null
@@ -0,0 +1,169 @@
+/*  frmAbout.Designer.cs \r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace Handbrake\r
+{\r
+    partial class frmAbout\r
+    {\r
+        /// <summary>\r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows Form Designer generated code\r
+\r
+        /// <summary>\r
+        /// Required method for Designer support - do not modify\r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAbout));\r
+            this.Label4 = new System.Windows.Forms.Label();\r
+            this.btn_close = new System.Windows.Forms.Button();\r
+            this.Version = new System.Windows.Forms.Label();\r
+            this.Label3 = new System.Windows.Forms.Label();\r
+            this.PictureBox1 = new System.Windows.Forms.PictureBox();\r
+            this.label5 = new System.Windows.Forms.Label();\r
+            this.lbl_build = new System.Windows.Forms.Label();\r
+            this.groupBox1 = new System.Windows.Forms.GroupBox();\r
+            ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();\r
+            this.SuspendLayout();\r
+            // \r
+            // Label4\r
+            // \r
+            this.Label4.AutoSize = true;\r
+            this.Label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label4.Location = new System.Drawing.Point(168, 58);\r
+            this.Label4.Name = "Label4";\r
+            this.Label4.Size = new System.Drawing.Size(346, 26);\r
+            this.Label4.TabIndex = 28;\r
+            this.Label4.Text = "HandBrake is a GPL-licensed, multiplatform, multithreaded \r\nvideo transcoder. ";\r
+            // \r
+            // btn_close\r
+            // \r
+            this.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_close.Location = new System.Drawing.Point(402, 114);\r
+            this.btn_close.Name = "btn_close";\r
+            this.btn_close.Size = new System.Drawing.Size(115, 22);\r
+            this.btn_close.TabIndex = 27;\r
+            this.btn_close.Text = "Close";\r
+            this.btn_close.UseVisualStyleBackColor = true;\r
+            this.btn_close.Click += new System.EventHandler(this.btn_close_Click);\r
+            // \r
+            // Version\r
+            // \r
+            this.Version.AutoSize = true;\r
+            this.Version.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Version.Location = new System.Drawing.Point(266, 13);\r
+            this.Version.Name = "Version";\r
+            this.Version.Size = new System.Drawing.Size(72, 13);\r
+            this.Version.TabIndex = 26;\r
+            this.Version.Text = "{Version}";\r
+            // \r
+            // Label3\r
+            // \r
+            this.Label3.AutoSize = true;\r
+            this.Label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label3.Location = new System.Drawing.Point(168, 13);\r
+            this.Label3.Name = "Label3";\r
+            this.Label3.Size = new System.Drawing.Size(78, 13);\r
+            this.Label3.TabIndex = 25;\r
+            this.Label3.Text = "HandBrake";\r
+            // \r
+            // PictureBox1\r
+            // \r
+            this.PictureBox1.Image = global::Handbrake.Properties.Resources.logo128;\r
+            this.PictureBox1.InitialImage = null;\r
+            this.PictureBox1.Location = new System.Drawing.Point(8, 8);\r
+            this.PictureBox1.Name = "PictureBox1";\r
+            this.PictureBox1.Size = new System.Drawing.Size(153, 132);\r
+            this.PictureBox1.TabIndex = 23;\r
+            this.PictureBox1.TabStop = false;\r
+            // \r
+            // label5\r
+            // \r
+            this.label5.AutoSize = true;\r
+            this.label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label5.Location = new System.Drawing.Point(168, 30);\r
+            this.label5.Name = "label5";\r
+            this.label5.Size = new System.Drawing.Size(40, 13);\r
+            this.label5.TabIndex = 29;\r
+            this.label5.Text = "Build:";\r
+            // \r
+            // lbl_build\r
+            // \r
+            this.lbl_build.AutoSize = true;\r
+            this.lbl_build.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_build.Location = new System.Drawing.Point(266, 30);\r
+            this.lbl_build.Name = "lbl_build";\r
+            this.lbl_build.Size = new System.Drawing.Size(64, 13);\r
+            this.lbl_build.TabIndex = 30;\r
+            this.lbl_build.Text = "{Version}";\r
+            // \r
+            // groupBox1\r
+            // \r
+            this.groupBox1.Location = new System.Drawing.Point(171, 45);\r
+            this.groupBox1.Name = "groupBox1";\r
+            this.groupBox1.Size = new System.Drawing.Size(346, 10);\r
+            this.groupBox1.TabIndex = 31;\r
+            this.groupBox1.TabStop = false;\r
+            // \r
+            // frmAbout\r
+            // \r
+            this.AcceptButton = this.btn_close;\r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.ClientSize = new System.Drawing.Size(530, 148);\r
+            this.Controls.Add(this.groupBox1);\r
+            this.Controls.Add(this.lbl_build);\r
+            this.Controls.Add(this.label5);\r
+            this.Controls.Add(this.Label4);\r
+            this.Controls.Add(this.btn_close);\r
+            this.Controls.Add(this.Version);\r
+            this.Controls.Add(this.Label3);\r
+            this.Controls.Add(this.PictureBox1);\r
+            this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MaximizeBox = false;\r
+            this.MinimizeBox = false;\r
+            this.Name = "frmAbout";\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\r
+            this.Text = "About HandBrake";\r
+            ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        internal System.Windows.Forms.Label Label4;\r
+        internal System.Windows.Forms.Button btn_close;\r
+        internal System.Windows.Forms.Label Version;\r
+        internal System.Windows.Forms.Label Label3;\r
+        internal System.Windows.Forms.PictureBox PictureBox1;\r
+        internal System.Windows.Forms.Label label5;\r
+        internal System.Windows.Forms.Label lbl_build;\r
+        private System.Windows.Forms.GroupBox groupBox1;\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmAbout.cs b/win/C#/frmAbout.cs
new file mode 100644 (file)
index 0000000..1657cad
--- /dev/null
@@ -0,0 +1,37 @@
+/*  frmAbout.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.Diagnostics;\r
+\r
+namespace Handbrake\r
+{\r
+    public partial class frmAbout : Form\r
+    {\r
+        public frmAbout()\r
+        {\r
+            InitializeComponent();\r
+            Version.Text = Properties.Settings.Default.hb_version;\r
+            lbl_build.Text = Properties.Settings.Default.hb_build.ToString();\r
+        }\r
+\r
+        private void btn_close_Click(object sender, EventArgs e)\r
+        {\r
+            this.Close();\r
+        }\r
+\r
+        private void label_credits_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\r
+        {\r
+            Process.Start("http://handbrake.frtrac/wiki/x264Options");\r
+        }\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmAbout.resx b/win/C#/frmAbout.resx
new file mode 100644 (file)
index 0000000..37f9290
--- /dev/null
@@ -0,0 +1,500 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
+        IACoJQAAHh0AACAgAAABACAAqBAAAMZCAAAQEAAAAQAgAGgEAABuUwAAKAAAADAAAABgAAAAAQAIAAAA\r
+        AACACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAD///8A/wAAAAD/AAAAAIAAgICAAICAAAAAgAAAAICAAIAA\r
+        AACAAIAAgP//ACAgIADg4OAAIAAAAAAgAABg4CAAQOBAAGBgYAAgYAAAQKDgAAAAIABAwCAAIEAAAECg\r
+        AABg4AAAIGCAAECAoABgoMAAYECgAGDAAABgICAAoKCgAOAAAAAgIAAAAGAAAEDgAABgAAAAIAAgAEAg\r
+        IAAgQGAAIIDAAADg4ABgAGAAgOD/ACCA/wCgAAAAQGAAACCAAAAAoAAAYCAAAAAgIAAgIEAAYGBAAEBg\r
+        YAAAIIAAAGCAAGCAgABAAKAAAICgAACgoACAoKAAIKDAAECgwAAAAOAAQADgAADA4ABgwOAAIODgAADg\r
+        AADA4AAAAEAgAKDgIAAA4EAAYABAAABAYACAAGAAgCBgAGAggABA4KAAAECgAGBAwADgIOAAIEDgAACA\r
+        4ADgoOAAYAD/ACBg/wAAoP8A4KD/AGD//wAICAgACAAAAAgIAAAAAJgACAAIAAAACAAACAAACBAQACA4\r
+        SAAgYIgAOHCIADhw+AAIGAAAEBAIACg4QAAwYHgAAACIACA4QAAoQFAAKFh4AHh4eAAwaIAAIGiQADh4\r
+        mAAACAgAEAgIABAYGAAgGBgASEhIABhIYAAoUGAAIFBoAChQaAAoWGgAMFhoAChoiAAweJgAKHioACiA\r
+        sAAIEAAACAgQAAgQGAAQGCAAGCAoABhAUAAoSFgAaGhoABhQcAAgWHAAKFhwADhgcAAYWIAAOGiAAIiI\r
+        iAAoaJAAKHCYACh4oAA4gKAAMICoAKioqAAwmNAAEDgAAChYAAAweAAAMIgQAAgYGAAYGBgACBggABAg\r
+        KAAgKCgAKCgoACAwOAA4ODgAKDhIADBQWABYWFgAGEhoADBYcAAYUHgAGFh4ACBYeAAoYHgAKGCAABhY\r
+        iAAgaJgAKICoACiIuAC4uLgAMJDIADiw6AAQCAAAABgAAAggAAAAOAAAMGgAABgQCAAwgAgAEAgQABgQ\r
+        EAAwmBgAGBggAAgYKAAAICgACCAoABgoMAAgKDAAGDBAABg4QAAYOFAAEEBYACBIWAAwSFgAOEhYACBI\r
+        YAAQSGgAOFhoABhIcAAoUHAAQFhwACBgeABAaIAAIGiIADBwiABAcIgAGGCQADhwkABYeJAACBCgAChw\r
+        oAAweKAAKIC4ACiQwAAwmMgAOKjgADBg6ABAsOgAELD4AAgoAAAIMAAAGDAAABhIAAAYUAAAKHgAAACY\r
+        AAAwmAAAAMgAABAACAAIEAgAEBgIABA4CAAYOAgAMHgIABAYEAAYGBAAIBgQACh4EAAwmBAAEBAYABgg\r
+        GAAoIBgAGCAgAAgIKAAgICgAGAgwAAggMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAn2KfdXV1XAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoo2+QIJCJb28Sd3em\r
+        nQAAAFuKqW0aqsd6Y5/DXAAAAAAAAAAAAAAAAAAAAAAAAAB3kAWQkG8SpqaJb28gsncAbIeSroyii21x\r
+        kczIwwAAAAAAAAAAAAAAAAAAAAAAAABoo4mJkLKylm9vb5BvdwwAcZO/fox7z2NjqsOss2MAWwAAAAAA\r
+        AAAAAAAAAAAAAAAAvaGmo5ANlgUFEiBvo1xjq3p6qMTJroBkxXt9cGzFnAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAL2ylgV3vQAAAGOvxMXXq41uh6yVjxqp1YhknwAAAAAAAAAAAAAAAAAAAAAAAAAAAABvsolbAAAA\r
+        +5KneouS2Kx4pZF9ndywsXuvkocAAAAAAAAAAAAAAAAAAAAAAAAAAAB3sncAAAAAdayHca95bH9+cKmv\r
+        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\r
+        eAAoaIgAMICoAChggAAACAgAEAgIABgYGAAoUGgAKFhwAChwkAAIGAgACBAQABAgKAAQKDgAIEhgACBQ\r
+        aAAAAHgAIFh4AChgeAAAeHgAeHh4AChogAAwaIAAIGCIADBoiAA4cIgAIGiQADhwkAAoeKgAKICwAAgQ\r
+        AAAIIAAACAAIABhICAAICBAAMIgQABAYGAAYICgAGCgwAEhISAAwSFgAGFBoAChYaAAICHgAOGiAACh4\r
+        oAAweKAAGAAAAAAIAAAAGAAACBgAABAoAAAYUAAAKGAAAChoAAAAeAAAAAAIAAgQCAAQEAgAGP8IACAY\r
+        EAAIEBgAMJAYABggIAAAACgACBAoACgwMAAAKDgAEDA4ADg4OAAoOEAAGDhIACA4SAAAQEgAMEBIAEhQ\r
+        UAAISFgAIEhYAChIWAAwUFgAIEhoAEhYaAAYUHAAMFhwABhYeAAoWHgAIFiAAEhwgACIiIgAGGCQAAAA\r
+        mAAgcJgAKHCYADB4mACYmJgAACjIAEBw+ACo//8ASAAAAFgAAABoAAAAeAAAABAIAABICAAAGCgAAAA4\r
+        AAAYOAAACEAAAAhIAAAoUAAAAFgAACBYAAAAaAAAIGgAADB4AAAAiAAAMIgAAGiIAACAmAAAGAAIADAI\r
+        CABgCAgAEBgIAAggCAAQIAgAECgIAAgwCAAQMAgAODAIABA4CAAYOAgAEEAIABhACAAgQAgAIFAIAChg\r
+        CAAwgAgAMJAIADCoCAAACBAAGBAQABggEAAoIBAAKGAQAChoEAAgeBAAKHgQAEh4EAAY+BAACAAYAAAI\r
+        GAAICBgAEAgYAAAQGAAQEBgAABgYAAgYGAAYMBgAKHgYADCYGAAwoBgAMKgYAGj/GABgCCAACBAgAAgY\r
+        IAAQGCAAGBggACggIABIcCAACAAoABAAKAAAECgAEBAoAAggKAAACDAASAgwAAgQMAAIKDAAECgwAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAARxBSUlJHAAAAAABYWFlY8kYAAAAAAAAAAAAAAAAAAJFgqqRLSzAwBXMAkKJbW1pdSVmE\r
+        AAAAAAAAAAAAAAAAEJdLqhpgYKQFkf9NmVRanHVJVZRQAAAAAAAAAAAAAAAAUY6RO6qXMHNYW5MxdFpm\r
+        TVtPSpAAAAAAAAAAAAAAAAAAAAAFpIYAAFSeW09PU15KU05MaEkAAAAAAAAAAAAAAAAAAEtgAAAAk55j\r
+        ml5Mp2haXUqpW3IAAAAAAAAAAAAAAAAAS0sAAEpJoE5PpZpMZVWnMZyZVQAAAAAAAAAAAAAAAABLMAAA\r
+        cqCeSnppZGZKWzFNaV2ecAAAAAAAAAAAAAAAAEtLAACLVF6iZHROp2eiW1paeWnxAAAAAAAAAAAAAABI\r
+        GmAAAElJSmh6SWNVSk5hZqJ1VXUAAAAAAAAAAAAAlpmjeJAAk12eZXZ5p3WndnZpaUlbZgAAAAAAAAAA\r
+        m2lFRTw8PDZeWV1OlE0xeWlNeVVdZmmZUAAAAAAAjzYKRaysRUVFRa02SXSnYaFNTUxpTFSoTmKTAAAA\r
+        AI8KOkSrrKysrKxErDullF6fVWhiVakLaVWbVZoAAAAAqK2sRKZEqyCsRKummKBZT0xPTHppZVMLqVN4\r
+        cQAAAAA6O6sYGKYYGKsYphgELjejY09KTTZNaWdMNpkAAAAA+zc6XFxcd3d3XASmXEw6PZZiZ6g2ZUw2\r
+        T2QLnwAAAAAdoTtcLcV3pndfLi2jraMtcmNkT05np0xnaXhUAAAAAAD5NKL87xgYd1+eLZ06+1wAVE6o\r
+        p2cKZ2WjjgAAAAAAAAAQo67EcuZuj5jkACue9gAAkTEKeJfbioptRgAAAAAAAACIr0dLVwBXmEeL5Qg4\r
+        AAAAAOnqwNbVb9O5AAAAAAAAAP38RmDae3tfkDqIX0UAAABq3W9v6+2BtssAAAAAAAD9q6v7AFl1dV9f\r
+        mpgIXwAAAABrtG9v7O2BagAAAACSF52fL/AAAAAAAHUAAAAAAAAAAACC1NS+3s/ZzAAAAJ03MjqjdJ0A\r
+        AAC3FIMUtwAAAAAAzr27goK5awAAAAAAWaNgGho3dAAAyr+/v4ODtQAAAMmAAM+2zxMTawAAAAAAAK6z\r
+        kZ1xAAC1un3HVwAAAAAAAAAAawB/ftAAAAAAAABCNUIAAAAAAAAAAF8AAAAAAAAAAEcAAGpGAAAAAAAA\r
+        AEKsEQAAAAAAAAAAlZUAAAAAAAAAAAAAAEgAAAAAAAAAAC3hAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAA\r
+        AAD///////////4BwH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAA\r
+        AAHgAAAB4AAAAeAAAAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9\r
+        /s/j/P/v8///7ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AFEl\r
+        swBJDW0ABEMwAAJHSQAFDwIAXl9ZAHJtagBwfYQAQVNqAAFtAAAAZgAAAz0CABQ/AQAXQwAAGkAAAA8g\r
+        AQAhSJQAM1SRABw6fgAFVk0ADE48AAplaQAgWgIAMYcMACl7CwAOJwMAAAMtABwPNwAhIQAABxACAA9S\r
+        UAAnQUgAAISfACRoDAAxmwQAK4MHABMpAAA8P1kATBMbACQSVwAKL1EADS5CADFMVQABIF4AJ3CGADB2\r
+        kAAzdlEAMnY1ABMnEwBARooAVVq5ABgATwAWBn0ABh56AAULaQBOeKYAT3WSACpNZwAucpgAMHifADFx\r
+        nwA1b5YAMF93AEBalgBvjecADCLAAAkPpQAbJr4AFiLGAAAJjgAzbIEANGh8AClhgAAzfKEAMHWWADJz\r
+        kwAsW3MAQ4mvADyY9AAtgf8AIpr/ACuk/wBdk9UAG0tkACladQAqbI4AK3GUAC5vjwArbpEALWJ7ACdl\r
+        aAAOaoQAJJ20ABx0gQAeTF8AJ116ACViggAgZosAJmeJAChvlAAhZIgAH1ZyAHVmYwAaPVMAJ19+ACto\r
+        hgAmaIwAKGB9ACFdfAAgY4YAGU5qAFtgYQAYQVgAIVx7ACtrjgAtZYIAJmKAACNhgQAmX3wAIUpdAHp6\r
+        ewARN0wAH1R0ACdXcgApXnoAJ2B+ACligQAdSmAAKiopAGZlZQCRkZEAbm9vAFFSUwAWO08AJFRuACFP\r
+        agAhUm0AHD9RAAMKDgA3NjUAWlpaADk5OQA3NzcAPDk3AAYSGQAVNUgAFjFAAA8jLwABAgQAVQAAAP//\r
+        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\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/win/C#/frmActivityWindow.Designer.cs b/win/C#/frmActivityWindow.Designer.cs
new file mode 100644 (file)
index 0000000..837bf37
--- /dev/null
@@ -0,0 +1,218 @@
+/*  frmDvdInfo.Designer.cs \r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace Handbrake\r
+{\r
+    partial class frmActivityWindow\r
+    {\r
+        /// <summary>\r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows Form Designer generated code\r
+\r
+        /// <summary>\r
+        /// Required method for Designer support - do not modify\r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            this.components = new System.ComponentModel.Container();\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmActivityWindow));\r
+            this.rtf_actLog = new System.Windows.Forms.RichTextBox();\r
+            this.ToolTip = new System.Windows.Forms.ToolTip(this.components);\r
+            this.toolStrip1 = new System.Windows.Forms.ToolStrip();\r
+            this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();\r
+            this.btn_encode_log = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.btn_scan_log = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.btn_copy = new System.Windows.Forms.ToolStripButton();\r
+            this.panel1 = new System.Windows.Forms.Panel();\r
+            this.statusStrip1 = new System.Windows.Forms.StatusStrip();\r
+            this.lbl_slb = new System.Windows.Forms.ToolStripStatusLabel();\r
+            this.txt_log = new System.Windows.Forms.ToolStripStatusLabel();\r
+            this.rightClickMenu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
+            this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStrip1.SuspendLayout();\r
+            this.statusStrip1.SuspendLayout();\r
+            this.rightClickMenu.SuspendLayout();\r
+            this.SuspendLayout();\r
+            // \r
+            // rtf_actLog\r
+            // \r
+            this.rtf_actLog.ContextMenuStrip = this.rightClickMenu;\r
+            this.rtf_actLog.Cursor = System.Windows.Forms.Cursors.IBeam;\r
+            this.rtf_actLog.DetectUrls = false;\r
+            this.rtf_actLog.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.rtf_actLog.Location = new System.Drawing.Point(0, 25);\r
+            this.rtf_actLog.Name = "rtf_actLog";\r
+            this.rtf_actLog.ReadOnly = true;\r
+            this.rtf_actLog.Size = new System.Drawing.Size(471, 530);\r
+            this.rtf_actLog.TabIndex = 29;\r
+            this.rtf_actLog.Text = "";\r
+            // \r
+            // ToolTip\r
+            // \r
+            this.ToolTip.Active = false;\r
+            // \r
+            // toolStrip1\r
+            // \r
+            this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;\r
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.toolStripDropDownButton1,\r
+            this.btn_copy});\r
+            this.toolStrip1.Location = new System.Drawing.Point(0, 0);\r
+            this.toolStrip1.Name = "toolStrip1";\r
+            this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;\r
+            this.toolStrip1.Size = new System.Drawing.Size(471, 25);\r
+            this.toolStrip1.TabIndex = 96;\r
+            this.toolStrip1.Text = "toolStrip1";\r
+            // \r
+            // toolStripDropDownButton1\r
+            // \r
+            this.toolStripDropDownButton1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;\r
+            this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.btn_encode_log,\r
+            this.btn_scan_log});\r
+            this.toolStripDropDownButton1.Image = global::Handbrake.Properties.Resources.Output_Small;\r
+            this.toolStripDropDownButton1.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";\r
+            this.toolStripDropDownButton1.Size = new System.Drawing.Size(94, 22);\r
+            this.toolStripDropDownButton1.Text = "Select Log";\r
+            // \r
+            // btn_encode_log\r
+            // \r
+            this.btn_encode_log.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;\r
+            this.btn_encode_log.Name = "btn_encode_log";\r
+            this.btn_encode_log.Size = new System.Drawing.Size(151, 22);\r
+            this.btn_encode_log.Text = "Encode Log";\r
+            this.btn_encode_log.Click += new System.EventHandler(this.btn_encode_log_Click);\r
+            // \r
+            // btn_scan_log\r
+            // \r
+            this.btn_scan_log.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;\r
+            this.btn_scan_log.Name = "btn_scan_log";\r
+            this.btn_scan_log.Size = new System.Drawing.Size(151, 22);\r
+            this.btn_scan_log.Text = "Scan Log";\r
+            this.btn_scan_log.Click += new System.EventHandler(this.btn_scan_log_Click);\r
+            // \r
+            // btn_copy\r
+            // \r
+            this.btn_copy.Image = ((System.Drawing.Image)(resources.GetObject("btn_copy.Image")));\r
+            this.btn_copy.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.btn_copy.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_copy.Name = "btn_copy";\r
+            this.btn_copy.Size = new System.Drawing.Size(122, 22);\r
+            this.btn_copy.Text = "Copy to clipboard";\r
+            this.btn_copy.Click += new System.EventHandler(this.btn_copy_Click);\r
+            // \r
+            // panel1\r
+            // \r
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.panel1.Location = new System.Drawing.Point(0, 25);\r
+            this.panel1.Name = "panel1";\r
+            this.panel1.Size = new System.Drawing.Size(471, 552);\r
+            this.panel1.TabIndex = 97;\r
+            // \r
+            // statusStrip1\r
+            // \r
+            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.lbl_slb,\r
+            this.txt_log});\r
+            this.statusStrip1.Location = new System.Drawing.Point(0, 555);\r
+            this.statusStrip1.Name = "statusStrip1";\r
+            this.statusStrip1.Size = new System.Drawing.Size(471, 22);\r
+            this.statusStrip1.TabIndex = 98;\r
+            this.statusStrip1.Text = "statusStrip1";\r
+            // \r
+            // lbl_slb\r
+            // \r
+            this.lbl_slb.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_slb.Name = "lbl_slb";\r
+            this.lbl_slb.Size = new System.Drawing.Size(94, 17);\r
+            this.lbl_slb.Text = "Selected Log: ";\r
+            // \r
+            // txt_log\r
+            // \r
+            this.txt_log.BackColor = System.Drawing.Color.Transparent;\r
+            this.txt_log.Name = "txt_log";\r
+            this.txt_log.Size = new System.Drawing.Size(85, 17);\r
+            this.txt_log.Text = "{selected log}";\r
+            // \r
+            // rightClickMenu\r
+            // \r
+            this.rightClickMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.copyToolStripMenuItem});\r
+            this.rightClickMenu.Name = "rightClickMenu";\r
+            this.rightClickMenu.Size = new System.Drawing.Size(153, 48);\r
+            // \r
+            // copyToolStripMenuItem\r
+            // \r
+            this.copyToolStripMenuItem.Image = global::Handbrake.Properties.Resources.copy;\r
+            this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";\r
+            this.copyToolStripMenuItem.Size = new System.Drawing.Size(152, 22);\r
+            this.copyToolStripMenuItem.Text = "Copy";\r
+            this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);\r
+            // \r
+            // frmActivityWindow\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.BackColor = System.Drawing.SystemColors.ControlLight;\r
+            this.ClientSize = new System.Drawing.Size(471, 577);\r
+            this.Controls.Add(this.rtf_actLog);\r
+            this.Controls.Add(this.statusStrip1);\r
+            this.Controls.Add(this.panel1);\r
+            this.Controls.Add(this.toolStrip1);\r
+            this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MaximizeBox = false;\r
+            this.MinimizeBox = false;\r
+            this.Name = "frmActivityWindow";\r
+            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
+            this.Text = "Activity Window";\r
+            this.toolStrip1.ResumeLayout(false);\r
+            this.toolStrip1.PerformLayout();\r
+            this.statusStrip1.ResumeLayout(false);\r
+            this.statusStrip1.PerformLayout();\r
+            this.rightClickMenu.ResumeLayout(false);\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        internal System.Windows.Forms.RichTextBox rtf_actLog;\r
+        internal System.Windows.Forms.ToolTip ToolTip;\r
+        private System.Windows.Forms.ToolStrip toolStrip1;\r
+        private System.Windows.Forms.Panel panel1;\r
+        private System.Windows.Forms.StatusStrip statusStrip1;\r
+        private System.Windows.Forms.ToolStripStatusLabel txt_log;\r
+        private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1;\r
+        private System.Windows.Forms.ToolStripMenuItem btn_encode_log;\r
+        private System.Windows.Forms.ToolStripMenuItem btn_scan_log;\r
+        private System.Windows.Forms.ToolStripButton btn_copy;\r
+        private System.Windows.Forms.ToolStripStatusLabel lbl_slb;\r
+        private System.Windows.Forms.ContextMenuStrip rightClickMenu;\r
+        private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs
new file mode 100644 (file)
index 0000000..5508d0b
--- /dev/null
@@ -0,0 +1,317 @@
+/*  frmActivityWindow.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.IO;\r
+using System.Threading;\r
+using System.Diagnostics;\r
+using System.Runtime.InteropServices;\r
+\r
+\r
+namespace Handbrake\r
+{\r
+    public partial class frmActivityWindow : Form\r
+    {\r
+        delegate void SetTextCallback(string text);\r
+        String read_file;\r
+        Thread monitor;\r
+        frmMain mainWindow;\r
+        frmQueue queueWindow;\r
+        int position = 0;  // Position in the arraylist reached by the current log output in the rtf box.\r
+\r
+        /// <summary>\r
+        /// This window should be used to display the RAW output of the handbrake CLI which is produced during an encode.\r
+        /// </summary>\r
+        public frmActivityWindow(string file, frmMain fm, frmQueue fq)\r
+        {\r
+            InitializeComponent();\r
+            this.rtf_actLog.Text = string.Empty;\r
+\r
+            // When the window closes, we want to abort the monitor thread.\r
+            this.Disposed += new EventHandler(forceQuit);\r
+\r
+            mainWindow = fm;\r
+            queueWindow = fq;\r
+            read_file = file;\r
+            position = 0;\r
+\r
+            // Print the Log header in the Rich text box.\r
+            displayLogHeader();\r
+\r
+            if (file == "dvdinfo.dat")\r
+                txt_log.Text = "Scan Log";\r
+            else if (file == "hb_encode_log.dat")\r
+                txt_log.Text = "Encode Log";\r
+\r
+            // Start a new thread which will montior and keep the log window up to date if required/\r
+            startLogThread(read_file);            \r
+        }\r
+\r
+        /// <summary>\r
+        /// Displays the Log header\r
+        /// </summary>\r
+        private void displayLogHeader()\r
+        {\r
+            // System Information\r
+            Functions.SystemInfo info = new Functions.SystemInfo();\r
+\r
+            // Add a header to the log file indicating that it's from the Windows GUI and display the windows version\r
+            rtf_actLog.AppendText(String.Format("### Windows GUI {1} {0} \n", Properties.Settings.Default.hb_build, Properties.Settings.Default.hb_version));\r
+            rtf_actLog.AppendText(String.Format("### Running: {0} \n###\n", Environment.OSVersion.ToString()));\r
+            rtf_actLog.AppendText(String.Format("### CPU: {0} \n", info.getCpuCount()));\r
+            rtf_actLog.AppendText(String.Format("### Ram: {0} MB \n", info.TotalPhysicalMemory()));\r
+            rtf_actLog.AppendText(String.Format("### Screen: {0}x{1} \n", info.screenBounds().Bounds.Width, info.screenBounds().Bounds.Height));\r
+            rtf_actLog.AppendText(String.Format("### Temp Dir: {0} \n", Path.GetTempPath()));\r
+            rtf_actLog.AppendText(String.Format("### Install Dir: {0} \n", Application.StartupPath));\r
+            rtf_actLog.AppendText(String.Format("### Data Dir: {0} \n", Application.UserAppDataPath));\r
+            rtf_actLog.AppendText("#########################################\n\n");\r
+        }\r
+\r
+        /// <summary>\r
+        /// Starts a new thread which runs the autoUpdate function.\r
+        /// </summary>\r
+        /// <param name="file"> File which will be used to populate the Rich text box.</param>\r
+        private void startLogThread(string file)\r
+        {\r
+            try\r
+            {\r
+                string logFile = Path.Combine(Path.GetTempPath(), file);\r
+                if (File.Exists(logFile))\r
+                {\r
+                    // Start a new thread to run the autoUpdate process\r
+                    monitor = new Thread(autoUpdate);\r
+                    monitor.IsBackground = true;\r
+                    monitor.Start();\r
+                }\r
+                else\r
+                    rtf_actLog.AppendText("\n\n\nERROR: The log file could not be found. \nMaybe you cleared your system's tempory folder or maybe you just havn't run an encode yet. \nTried to find the log file in: " + logFile);\r
+\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("startLogThread(): Exception: \n" + exc);\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Change the log file to be displayed to hb_encode_log.dat\r
+        /// </summary>\r
+        /// <param name="sender"></param>\r
+        /// <param name="e"></param>\r
+        private void btn_scan_log_Click(object sender, EventArgs e)\r
+        {\r
+            if (monitor != null)\r
+                monitor.Abort();\r
+\r
+            rtf_actLog.Clear();\r
+            read_file = "dvdinfo.dat";\r
+            displayLogHeader();\r
+            startLogThread(read_file);\r
+            txt_log.Text = "Scan Log";\r
+        }\r
+\r
+        /// <summary>\r
+        /// Change the log file to be displayed to dvdinfo.dat\r
+        /// </summary>\r
+        /// <param name="sender"></param>\r
+        /// <param name="e"></param>\r
+        private void btn_encode_log_Click(object sender, EventArgs e)\r
+        {\r
+            if (monitor != null)\r
+                monitor.Abort();\r
+\r
+            rtf_actLog.Clear();\r
+            read_file = "hb_encode_log.dat";\r
+            position = 0;\r
+            displayLogHeader();\r
+            startLogThread(read_file);\r
+            txt_log.Text = "Encode Log";\r
+        }\r
+\r
+        /// <summary>\r
+        /// Copy to Clipboard\r
+        /// </summary>\r
+        /// <param name="sender"></param>\r
+        /// <param name="e"></param>\r
+        private void btn_copy_Click(object sender, EventArgs e)\r
+        {\r
+            if (rtf_actLog.SelectedText != "")\r
+                Clipboard.SetDataObject(rtf_actLog.SelectedText, true);\r
+            else\r
+                Clipboard.SetDataObject(rtf_actLog.Text, true);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Updates the log window with any new data which is in the log file.\r
+        /// This is done every 5 seconds.\r
+        /// </summary>\r
+        /// <param name="state"></param>\r
+        private void autoUpdate(object state)\r
+        {\r
+            try\r
+            {\r
+                Boolean lastUpdate = false;\r
+                updateTextFromThread();\r
+                while (true)\r
+                {\r
+                    if ((mainWindow.isEncoding() == true) || (queueWindow.isEncoding() == true))\r
+                        updateTextFromThread();\r
+                    else\r
+                    {\r
+                        // The encode may just have stoped, so, refresh the log one more time before restarting it.\r
+                        if (lastUpdate == false)\r
+                            updateTextFromThread();\r
+\r
+                        lastUpdate = true; // Prevents the log window from being updated when there is no encode going.\r
+                        position = 0; // There is no encoding, so reset the log position counter to 0 so it can be reused\r
+                    }\r
+                    Thread.Sleep(5000);\r
+                }\r
+            }\r
+            catch (ThreadAbortException)\r
+            {\r
+                // Do Nothing. This is needed since we run thread.abort(). \r
+                // Should probably find a better way of making this work at some point.\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("autoUpdate(): Exception: \n" + exc);\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Finds any new text in the log file and calls a funciton to display this new text.\r
+        /// </summary>\r
+        private void updateTextFromThread()\r
+        {\r
+            try\r
+            {\r
+                string text = "";\r
+                List<string> data = readFile();\r
+                int count = data.Count;\r
+\r
+                while (position < count)\r
+                {\r
+                    text = data[position].ToString();\r
+                    if (data[position].ToString().Contains("has exited"))\r
+                        text = "\n ############ End of Log ############## \n";\r
+                    position++;\r
+\r
+                    SetText(text);\r
+                }\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("updateTextFromThread(): Exception: \n" + exc);\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Updates the rich text box with anything in the string text.\r
+        /// </summary>\r
+        /// <param name="text"></param>\r
+        private void SetText(string text)\r
+        {\r
+            try\r
+            {\r
+                // InvokeRequired required compares the thread ID of the\r
+                // calling thread to the thread ID of the creating thread.\r
+                // If these threads are different, it returns true.\r
+                if (this.IsHandleCreated) // Make sure the windows has a handle before doing anything\r
+                {\r
+                    if (this.rtf_actLog.InvokeRequired)\r
+                    {\r
+                        SetTextCallback d = new SetTextCallback(SetText);\r
+                        this.Invoke(d, new object[] { text });\r
+                    }\r
+                    else\r
+                        this.rtf_actLog.AppendText(text);\r
+                }\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("SetText(): Exception: \n" + exc);\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Read the log file, and store the data in a List.\r
+        /// </summary>\r
+        /// <returns></returns>\r
+        private List<string> readFile()\r
+        {\r
+            // Ok, the task here is to, Get an arraylist of log data.\r
+            // And update some global varibles which are pointers to the last displayed log line.\r
+            List<string> logData = new List<string>();\r
+\r
+            try\r
+            {\r
+                // hb_encode_log.dat is the primary log file. Since .NET can't read this file whilst the CLI is outputing to it (Not even in read only mode),\r
+                // we'll need to make a copy of it.\r
+                string logFile = Path.Combine(Path.GetTempPath(), read_file);\r
+                string logFile2 = Path.Combine(Path.GetTempPath(), "hb_encode_log_AppReadable.dat");\r
+\r
+                // Make sure the application readable log file does not already exist. FileCopy fill fail if it does.\r
+                if (File.Exists(logFile2))\r
+                    File.Delete(logFile2);\r
+\r
+                // Copy the log file.\r
+                File.Copy(logFile, logFile2);\r
+\r
+                // Open the copied log file for reading\r
+                StreamReader sr = new StreamReader(logFile2);\r
+                string line = sr.ReadLine();\r
+                while (line != null)\r
+                {\r
+                    if (line.Trim() != "")\r
+                        logData.Add(line + System.Environment.NewLine);\r
+\r
+                    line = sr.ReadLine();\r
+                }\r
+                sr.Close();\r
+                sr.Dispose();\r
+\r
+                return logData;\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("Error in readFile() \n Unable to read the log file.\n You may have to restart HandBrake.\n  Error Information: \n\n" + exc.ToString(), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+            }\r
+            return null;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Kills the montior thead when the window is disposed of.\r
+        /// </summary>\r
+        /// <param name="sender"></param>\r
+        /// <param name="e"></param>\r
+        private void forceQuit(object sender, EventArgs e)\r
+        {\r
+            if (monitor != null)\r
+            {\r
+                while (monitor.IsAlive)\r
+                    monitor.Abort();\r
+            }\r
+\r
+            this.Close();\r
+        }\r
+\r
+        private void copyToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            if (rtf_actLog.SelectedText != "")\r
+                Clipboard.SetDataObject(rtf_actLog.SelectedText, true);\r
+            else\r
+                Clipboard.SetDataObject(rtf_actLog.Text, true);\r
+        }\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmActivityWindow.resx b/win/C#/frmActivityWindow.resx
new file mode 100644 (file)
index 0000000..3d9888b
--- /dev/null
@@ -0,0 +1,527 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <metadata name="rightClickMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>320, 17</value>\r
+  </metadata>\r
+  <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>17, 17</value>\r
+  </metadata>\r
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>105, 17</value>\r
+  </metadata>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="btn_copy.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAeVJREFUOE+lk99P\r
+        kmEYhv1TSsdcdewf0FpZrTbbah7UQVvZOuJAjzpq2WzLNWy0iSHNwtIB9iE0l1KJEIgSYSL2AxfZVrCh\r
+        7vuURPTDruBlSdCGbj7bffbe1/Pc7/O+NTX7Laf3MwVJ7qiQZTRMv3OKqeB79sQumCvL7Ahwrf0ZE17v\r
+        7hD7eLTMn9v+TffAK1z+KBdbu3BPeKpDLGMzAuCKgfQBInGFB+aXSD4Fm1fG6pF5PCajH14Reu2bLwf2\r
+        OwM7E2xu5VDWsiRSaQGorI7BJRpa/DhcoRLEZPOIc33+LXSjCrekn7Q9iTPwZvk/QKsxhXNa4UizA2lk\r
+        sggx5PMWcq9nVJbkDIuJVT7GlzGNJAWgU8oJRRZWuaxLcrj5BYfOD1Hf9LQIKOTdyKo7nbWmGNcN89y3\r
+        LpZNoPxSWfixgX9uDaMUQnP2UQmgpLN8+pZi5kuCQOQ77ndfae8rrvfmYBqtIcmlezHO3Z4VMkpBNKd7\r
+        SoCGU1eoVJt+VgDUfLyUrDIXX2c8rGB/u8LDoQB1jfrq673aMS0A/3b+O0GPbZLa47rqgAs3PGQ2tzEN\r
+        h+m1hzA+D4rOBbPB4uPgsbvVAY1aV/62rUL1TWY0Z3qpO9lN7YmuvLmTA0fv7P7M9/SZ9nvoD8uZ5Oms\r
+        OGJjAAAAAElFTkSuQmCC\r
+</value>\r
+  </data>\r
+  <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>204, 17</value>\r
+  </metadata>\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
+        IACoJQAAHh0AACAgAAABACAAqBAAAMZCAAAQEAAAAQAgAGgEAABuUwAAKAAAADAAAABgAAAAAQAIAAAA\r
+        AACACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAD///8A/wAAAAD/AAAAAIAAgICAAICAAAAAgAAAAICAAIAA\r
+        AACAAIAAgP//ACAgIADg4OAAIAAAAAAgAABg4CAAQOBAAGBgYAAgYAAAQKDgAAAAIABAwCAAIEAAAECg\r
+        AABg4AAAIGCAAECAoABgoMAAYECgAGDAAABgICAAoKCgAOAAAAAgIAAAAGAAAEDgAABgAAAAIAAgAEAg\r
+        IAAgQGAAIIDAAADg4ABgAGAAgOD/ACCA/wCgAAAAQGAAACCAAAAAoAAAYCAAAAAgIAAgIEAAYGBAAEBg\r
+        YAAAIIAAAGCAAGCAgABAAKAAAICgAACgoACAoKAAIKDAAECgwAAAAOAAQADgAADA4ABgwOAAIODgAADg\r
+        AADA4AAAAEAgAKDgIAAA4EAAYABAAABAYACAAGAAgCBgAGAggABA4KAAAECgAGBAwADgIOAAIEDgAACA\r
+        4ADgoOAAYAD/ACBg/wAAoP8A4KD/AGD//wAICAgACAAAAAgIAAAAAJgACAAIAAAACAAACAAACBAQACA4\r
+        SAAgYIgAOHCIADhw+AAIGAAAEBAIACg4QAAwYHgAAACIACA4QAAoQFAAKFh4AHh4eAAwaIAAIGiQADh4\r
+        mAAACAgAEAgIABAYGAAgGBgASEhIABhIYAAoUGAAIFBoAChQaAAoWGgAMFhoAChoiAAweJgAKHioACiA\r
+        sAAIEAAACAgQAAgQGAAQGCAAGCAoABhAUAAoSFgAaGhoABhQcAAgWHAAKFhwADhgcAAYWIAAOGiAAIiI\r
+        iAAoaJAAKHCYACh4oAA4gKAAMICoAKioqAAwmNAAEDgAAChYAAAweAAAMIgQAAgYGAAYGBgACBggABAg\r
+        KAAgKCgAKCgoACAwOAA4ODgAKDhIADBQWABYWFgAGEhoADBYcAAYUHgAGFh4ACBYeAAoYHgAKGCAABhY\r
+        iAAgaJgAKICoACiIuAC4uLgAMJDIADiw6AAQCAAAABgAAAggAAAAOAAAMGgAABgQCAAwgAgAEAgQABgQ\r
+        EAAwmBgAGBggAAgYKAAAICgACCAoABgoMAAgKDAAGDBAABg4QAAYOFAAEEBYACBIWAAwSFgAOEhYACBI\r
+        YAAQSGgAOFhoABhIcAAoUHAAQFhwACBgeABAaIAAIGiIADBwiABAcIgAGGCQADhwkABYeJAACBCgAChw\r
+        oAAweKAAKIC4ACiQwAAwmMgAOKjgADBg6ABAsOgAELD4AAgoAAAIMAAAGDAAABhIAAAYUAAAKHgAAACY\r
+        AAAwmAAAAMgAABAACAAIEAgAEBgIABA4CAAYOAgAMHgIABAYEAAYGBAAIBgQACh4EAAwmBAAEBAYABgg\r
+        GAAoIBgAGCAgAAgIKAAgICgAGAgwAAggMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAn2KfdXV1XAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoo2+QIJCJb28Sd3em\r
+        nQAAAFuKqW0aqsd6Y5/DXAAAAAAAAAAAAAAAAAAAAAAAAAB3kAWQkG8SpqaJb28gsncAbIeSroyii21x\r
+        kczIwwAAAAAAAAAAAAAAAAAAAAAAAABoo4mJkLKylm9vb5BvdwwAcZO/fox7z2NjqsOss2MAWwAAAAAA\r
+        AAAAAAAAAAAAAAAAvaGmo5ANlgUFEiBvo1xjq3p6qMTJroBkxXt9cGzFnAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAL2ylgV3vQAAAGOvxMXXq41uh6yVjxqp1YhknwAAAAAAAAAAAAAAAAAAAAAAAAAAAABvsolbAAAA\r
+        +5KneouS2Kx4pZF9ndywsXuvkocAAAAAAAAAAAAAAAAAAAAAAAAAAAB3sncAAAAAdayHca95bH9+cKmv\r
+        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\r
+        eAAoaIgAMICoAChggAAACAgAEAgIABgYGAAoUGgAKFhwAChwkAAIGAgACBAQABAgKAAQKDgAIEhgACBQ\r
+        aAAAAHgAIFh4AChgeAAAeHgAeHh4AChogAAwaIAAIGCIADBoiAA4cIgAIGiQADhwkAAoeKgAKICwAAgQ\r
+        AAAIIAAACAAIABhICAAICBAAMIgQABAYGAAYICgAGCgwAEhISAAwSFgAGFBoAChYaAAICHgAOGiAACh4\r
+        oAAweKAAGAAAAAAIAAAAGAAACBgAABAoAAAYUAAAKGAAAChoAAAAeAAAAAAIAAgQCAAQEAgAGP8IACAY\r
+        EAAIEBgAMJAYABggIAAAACgACBAoACgwMAAAKDgAEDA4ADg4OAAoOEAAGDhIACA4SAAAQEgAMEBIAEhQ\r
+        UAAISFgAIEhYAChIWAAwUFgAIEhoAEhYaAAYUHAAMFhwABhYeAAoWHgAIFiAAEhwgACIiIgAGGCQAAAA\r
+        mAAgcJgAKHCYADB4mACYmJgAACjIAEBw+ACo//8ASAAAAFgAAABoAAAAeAAAABAIAABICAAAGCgAAAA4\r
+        AAAYOAAACEAAAAhIAAAoUAAAAFgAACBYAAAAaAAAIGgAADB4AAAAiAAAMIgAAGiIAACAmAAAGAAIADAI\r
+        CABgCAgAEBgIAAggCAAQIAgAECgIAAgwCAAQMAgAODAIABA4CAAYOAgAEEAIABhACAAgQAgAIFAIAChg\r
+        CAAwgAgAMJAIADCoCAAACBAAGBAQABggEAAoIBAAKGAQAChoEAAgeBAAKHgQAEh4EAAY+BAACAAYAAAI\r
+        GAAICBgAEAgYAAAQGAAQEBgAABgYAAgYGAAYMBgAKHgYADCYGAAwoBgAMKgYAGj/GABgCCAACBAgAAgY\r
+        IAAQGCAAGBggACggIABIcCAACAAoABAAKAAAECgAEBAoAAggKAAACDAASAgwAAgQMAAIKDAAECgwAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAARxBSUlJHAAAAAABYWFlY8kYAAAAAAAAAAAAAAAAAAJFgqqRLSzAwBXMAkKJbW1pdSVmE\r
+        AAAAAAAAAAAAAAAAEJdLqhpgYKQFkf9NmVRanHVJVZRQAAAAAAAAAAAAAAAAUY6RO6qXMHNYW5MxdFpm\r
+        TVtPSpAAAAAAAAAAAAAAAAAAAAAFpIYAAFSeW09PU15KU05MaEkAAAAAAAAAAAAAAAAAAEtgAAAAk55j\r
+        ml5Mp2haXUqpW3IAAAAAAAAAAAAAAAAAS0sAAEpJoE5PpZpMZVWnMZyZVQAAAAAAAAAAAAAAAABLMAAA\r
+        cqCeSnppZGZKWzFNaV2ecAAAAAAAAAAAAAAAAEtLAACLVF6iZHROp2eiW1paeWnxAAAAAAAAAAAAAABI\r
+        GmAAAElJSmh6SWNVSk5hZqJ1VXUAAAAAAAAAAAAAlpmjeJAAk12eZXZ5p3WndnZpaUlbZgAAAAAAAAAA\r
+        m2lFRTw8PDZeWV1OlE0xeWlNeVVdZmmZUAAAAAAAjzYKRaysRUVFRa02SXSnYaFNTUxpTFSoTmKTAAAA\r
+        AI8KOkSrrKysrKxErDullF6fVWhiVakLaVWbVZoAAAAAqK2sRKZEqyCsRKummKBZT0xPTHppZVMLqVN4\r
+        cQAAAAA6O6sYGKYYGKsYphgELjejY09KTTZNaWdMNpkAAAAA+zc6XFxcd3d3XASmXEw6PZZiZ6g2ZUw2\r
+        T2QLnwAAAAAdoTtcLcV3pndfLi2jraMtcmNkT05np0xnaXhUAAAAAAD5NKL87xgYd1+eLZ06+1wAVE6o\r
+        p2cKZ2WjjgAAAAAAAAAQo67EcuZuj5jkACue9gAAkTEKeJfbioptRgAAAAAAAACIr0dLVwBXmEeL5Qg4\r
+        AAAAAOnqwNbVb9O5AAAAAAAAAP38RmDae3tfkDqIX0UAAABq3W9v6+2BtssAAAAAAAD9q6v7AFl1dV9f\r
+        mpgIXwAAAABrtG9v7O2BagAAAACSF52fL/AAAAAAAHUAAAAAAAAAAACC1NS+3s/ZzAAAAJ03MjqjdJ0A\r
+        AAC3FIMUtwAAAAAAzr27goK5awAAAAAAWaNgGho3dAAAyr+/v4ODtQAAAMmAAM+2zxMTawAAAAAAAK6z\r
+        kZ1xAAC1un3HVwAAAAAAAAAAawB/ftAAAAAAAABCNUIAAAAAAAAAAF8AAAAAAAAAAEcAAGpGAAAAAAAA\r
+        AEKsEQAAAAAAAAAAlZUAAAAAAAAAAAAAAEgAAAAAAAAAAC3hAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAA\r
+        AAD///////////4BwH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAA\r
+        AAHgAAAB4AAAAeAAAAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9\r
+        /s/j/P/v8///7ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AFEl\r
+        swBJDW0ABEMwAAJHSQAFDwIAXl9ZAHJtagBwfYQAQVNqAAFtAAAAZgAAAz0CABQ/AQAXQwAAGkAAAA8g\r
+        AQAhSJQAM1SRABw6fgAFVk0ADE48AAplaQAgWgIAMYcMACl7CwAOJwMAAAMtABwPNwAhIQAABxACAA9S\r
+        UAAnQUgAAISfACRoDAAxmwQAK4MHABMpAAA8P1kATBMbACQSVwAKL1EADS5CADFMVQABIF4AJ3CGADB2\r
+        kAAzdlEAMnY1ABMnEwBARooAVVq5ABgATwAWBn0ABh56AAULaQBOeKYAT3WSACpNZwAucpgAMHifADFx\r
+        nwA1b5YAMF93AEBalgBvjecADCLAAAkPpQAbJr4AFiLGAAAJjgAzbIEANGh8AClhgAAzfKEAMHWWADJz\r
+        kwAsW3MAQ4mvADyY9AAtgf8AIpr/ACuk/wBdk9UAG0tkACladQAqbI4AK3GUAC5vjwArbpEALWJ7ACdl\r
+        aAAOaoQAJJ20ABx0gQAeTF8AJ116ACViggAgZosAJmeJAChvlAAhZIgAH1ZyAHVmYwAaPVMAJ19+ACto\r
+        hgAmaIwAKGB9ACFdfAAgY4YAGU5qAFtgYQAYQVgAIVx7ACtrjgAtZYIAJmKAACNhgQAmX3wAIUpdAHp6\r
+        ewARN0wAH1R0ACdXcgApXnoAJ2B+ACligQAdSmAAKiopAGZlZQCRkZEAbm9vAFFSUwAWO08AJFRuACFP\r
+        agAhUm0AHD9RAAMKDgA3NjUAWlpaADk5OQA3NzcAPDk3AAYSGQAVNUgAFjFAAA8jLwABAgQAVQAAAP//\r
+        /wBWAAAA/f//AFcAAAD8//8AWAAAAPz//wBZAAAA/P//AFoAAAD9//8AWwAAAP7//wBcAAAA////AF4A\r
+        AAABAAAAXwAAAAEAAABgAAAAAQAAAGEAAAABAAAAYgAAAAEAAAB3IFIAbWFuAAAAAAAAAAAAAAAAAAAA\r
+        AAC0VWMAtFVjALwEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAEAAAAAADgDAACfAQAAPwAAAAEA\r
+        AABAAAAAAQAAAEEAAAABAAAAQgAAAAEAAABFAAAA////AEYAAAD+//8ARwAAAP3//wBIAAAA/P//AEkA\r
+        AAD8//8ASgAAAPz//wBLAAAA/f//AEwAAAD///8ATQAAAAMAAABOAAAABwAAAE8AAAALAAAAUAAAABAA\r
+        AABRAAAAFQAAAFIAAAAZAAAAUwAAABwAAABUAAAAHgAAAFUAAAAeAAAAVgAAAB0AAABXAAAAGgAAAFgA\r
+        AAAWAAAAWQAAABIAAABaAAAADQAAAFsAAAAIAAAAXAAAAAQAAABeAAAA/v//AF8AAAD8//8AAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAI2Oj5CRkpOUlZYAAAAAAACCg4SFhoeIiYqLjAAAAAAAAAB6AHt8fX5/gIEAAAAA\r
+        AAAAcQByc3R1dnd4eQAAAAAAAGgAaWprbG1ub3AAAAAAXF1eX2BhYmNkZWZnAAAAT1BRUlNUVVZXWFla\r
+        WwAAQUJDREVGR0hJSktMTU4AADM0NTY3ODk6Ozw9Pj9AAAAAJygpKissLQAuLzAxMgAAABwdHh8gISIA\r
+        ACMkJSYAABITFAAAFRYXAAAYGRobAAAHCAkKAAsMDQAADg8QEQAAAAMAAAAEBQAAAAAABgAAAAACAAAA\r
+        AAAAAAAAAAAAAP//AADgBwAA4AMAAPoDAAD6AQAA+gEAAOABAADAAQAAgAEAAIABAADAQQAAwGEAAIxh\r
+        AACEYQAA3PsAAN//AAAoAAAAMAAAAGAAAAABACAAAAAAAIAlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAAGAAAACAAA\r
+        AAcAAAAHAAAABgAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAxIOAwgFBAEOAQAAEgAA\r
+        ABgAAAAbAAAAHQAAAB0AAAAcAQEAGQAAABYAAAAQAAAADQAAAAwAAAAKAAAACgAAAAsAAAAQAAAAFwMH\r
+        CRwBAgMhAAMEIwEEBSUAAgMmAQICIwEBAR8AAAAYAAAAEQAAAAkAAAADAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQICAAgBAgATAQEBIAcI\r
+        CCwFBgc2BQUGQAYGBkgGBgVOBAQEVQUFBVUEBARTAQICTQcHB0UGBgY+BwcHNgICAi4AAAAoAAAAJAAA\r
+        ACcBAgIsAAABKQAAADAAAAA7AAAARwAAAE0BAABOAAAATAAAAEgAAAJCAQUHOAEAACwAAAAeAAAAEgAA\r
+        AAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGRIMEgAA\r
+        AB8AAAAxAAAAOwAAAFUAAAB2AAAAjQAAAKgAAAC1AAAAsQAAALIAAACrAAAAmQAAAIcAAABuAAAAWgAA\r
+        AEoAAABAAAAAQQABAzwAAAA8AAAAfA4eJZoGDA/AEx8m2A8YHNoSFxjaEBgbxwcAAJgDAACDAAAAagAA\r
+        AFUAAABHAAAAMwAAACAAAAAQAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAIAAAAQBQMCIAAAADMBAABMEA4Nkjc2Ndh9e3r4kI+P/J+fn/+IiIn/b29v/3Jycv9xcnL/Xlxb+0lK\r
+        SvJGRkbaUVBQzBoaGqIAAAB4AAAAUwEAAF4MCwu/G1Fw/xtTdf8iQVD/ImCB/xtXdv8YN0n/HE1s/x46\r
+        S/8QIy35EiUw4QoDAKMAAABwAAAAXAIAAEIAAAArAAAAGAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAQAAAASAAAAIwUFBjIAAABkQ0ND/46Ojv9/gID8hoaG/YmJif1ycnL8YWJh/VVV\r
+        Vf1bW1v+ZGVl/nNzc/94eHj/np+f/7Ozs/9HSEn6AAECmR41QuYaP1L/KW2V+xZbh/spVm38Gi85/B1X\r
+        dPwpQE78H2OO/CZoj/0eSmP+Dz1a/w8oN/0AAACtAAABdgAAAGAAAABEAAAAKwAAABcAAAAGAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAMAAAAGwEBAC4AAAA9Dg0LtDUzMv9nZ2b/bm5u/oWF\r
+        hfu7u7v9v7+//qioqP5xcXH+cnJy/nl5efuQkJD6cXFx/FBQUP8kJCLuAwAAvyJpj/8mdJ77FRsd/ipp\r
+        iv4sW3L+KFNs/hZLbf4kOUb/HDlJ/htae/4XKjX+KF17/DCTxf4jPEj5AQAAyQUEBHEAAABRAAAAOgAA\r
+        ACIAAAAPAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAACgAAABgAAAAlAAAANhMQ\r
+        DoYqKCfbVVNT/zIxMf+Li4v/4uPi/qurq/99fX3+fX19/2FhYf+UlZX/fHt8/zIzNNEFAQCqHjdF8yNZ\r
+        dvwkUGj+Hk1q/y9adP8hKi3/IERa/xhah/8kdKT/IGOG/xEwQP4lUWj/MlVo/zJmfP4hNT3+Ey88/wkV\r
+        G9MAAABZAAIDPAAAACYAAAATAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAIAAAAJAAAAEQAAABAAAAAlAAAAUAAAAH4TExPdtbW1/qysrPx+fn7+QUBA9RUUE48AAABzSFNQRQAA\r
+        AEseOkvoI2iW/yArMf0TM0P/G2SS/h5VeP41XXH/J1d0/h0+UP8rYXz/NISq/zxrf/8hXH/+FFB4/ixt\r
+        jP8oSFn+IWKJ+w0iK/8DBAScAAMFOQAAASEAAAARAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAABMREANaW1oDDQsJAQcICAAEAwNqdHR0/8PDxPhmZmf/DAwMmHt6\r
+        egAiLzUAbImSABsgIZQoc5z/G0hn+iNQaP8fU27+Jm+W/zFwkP8qXXv/GUJc/y9QXv8papD/MFZq/xca\r
+        Gv8zfKD/KH6q/zSMtv4sUmj/G2WX+ydxlf4aPE3MAAAAHAoYHxcAAAAIMSgjAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAQEAAgIBAgAAAAMAAAArSEhI+8TE\r
+        xP1LTEz7AAAAMwAAAAIbLDUHJj9NABAVGK8oYHz+F0BV+xxkkv4kapr/Jkte/yA1Pv8veJv/KWmH/zRo\r
+        g/8TTXb/ImyW/ydVaf8ZMkP/Klx4/zFmfv8nQ07+L4ex/jap4P0WNUP1AAAAUgAAAQAAAAACfmteAAoJ\r
+        CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOrr\r
+        6gD+/v4ELzAw0rS0tP8xMTHkAgECDl5eXgARBwEADwcBLiZRZ/EOGBz+H2KH/RM/W/8eYpH/LU9f/yZk\r
+        jf8kWHf/MlRh/zFmf/8mg7r/K43C/zZviP8VSG//G2KR/x1FV/8mU2z/LWGE/y5LV/0jWXL+K1Rm9ggA\r
+        AEofEA4AJx8aAQoFAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAKSlpQGvsLAAMDExqJubm/4oJya3eHp7AGRsbwUrRVEAHSYpkClqjP8KJzf6GEpk/yeB\r
+        r/8sdZz/OGV6/xVMbv8icKP/I1Zt/x0cHP83YHD/OpC2/zNjef8idaT/IGmP/yJcdf8kWn//FlSA/iM6\r
+        Rv8RKjb8Oqnb/yRCUOMnHBgMIBsYAAgBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAENDQwJFRUUALi4uh42Ojv8cHR6hRkhJAEFVXgWh3uQAHy0zuiZL\r
+        Xv4YVXv7F0Ri/iR6ov80aYH/MYCl/xxijP8hcqb/MXma/y5edv82hK3/MU9b/yUtMv8eZof/M6vj/x9O\r
+        Yv8ufqf/IXOh/y90lf4XP1T+IV+A/C1hef8AAAI7AAECAA4REQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKampgGysrIALS4uopGRkf4VFRWhNTc5ACQm\r
+        JwYsIBcADAQBqh9Sbf8TSGr7H16H/xsyPP8iMjn/MW+L/zCazf81ndH/OV5t/yVwnP8TUnv/MY28/yM5\r
+        Qf8iU23/HlFp/xhIXv8pZoH/Oa/l/zBjev8cXYX+IGaZ+Ro2RP4IBQZgCQYGAAwMCwMbEgwAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgIAAAAAAG5ubgDIyMgIPTw83KWl\r
+        pv80MzPEw8TFAXt7egQBAAAACAQDZx84Rv8tfaj7JFp1/ydef/8reKf/NG2I/y9UZP83TFX/NoGj/yR9\r
+        sv8QOVr/K4Ox/zRVZf8eXIX/JmeR/xgyPf8UO07/Gz5O/yBQZv8hdKH/JHKj+iZ8pv4AAACbAgoOAAYT\r
+        GgIQCgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALCgkAERAPBAAA\r
+        AAAAAABWZ2Zm/7Ozs/46OzvvCwsLFrq9vwEuQT8AGRscdypNX/8kOkT7J0hW/yV5qf8LME//NZ/X/yVE\r
+        Uf8UJzH/KWmG/zCXyf8zmNH/K2B4/ztwiv8ZYI7/J3al/yVOYv8gcp7/IWqT/w4vPv8og67+Nq/o/R1c\r
+        ef4JGyPuCQ4SHQYDBAAIBAIBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAA\r
+        AAQNEBABHSIjACAkJQovLi7YwcDA/bS0tPpeXl7/CQkJZAAAAADA9f8CCR4txhxeif8cOEX7JTpD/zdz\r
+        kP8lhbX/NoCj/yRWbv8bZI7/Hl6D/yJPZP8kUWT/HEda/x9BT/89q+D/NXKN/yNZc/8bXYn/HmKQ/x9l\r
+        if8JGB//H1lz/hlVcPwldpz/AQAAZQEAAAAECgwHAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAA\r
+        AAH/AAEDERgdAAAAAAAKAAABAAAANwAAAKw1ODr/cnR1/F1fYf1OUVP9FRMT6wkAAEA+eaMAFCAnqyFk\r
+        j/8TO1L7H2OP/y1PZ/84eZb/K2V//yBliP8YUHX/Jnyx/xpTbv8ZUnD/JXyn/yVzmP8lQk7/KDY8/xxW\r
+        cv8wnNL/L5LH/yRxlf8XPVH/JlFv/iFadvonf6j+BQECgwYFBQAMFBoIAAAAAAAAAAAAAAAAAAAAAABs\r
+        ogACAAAAAAIDA/8CAgCBAAAAAAAAJBQRFGstTlnBBnOK/wCYtv8ArtX9AKLM/wCkz/8ArNX+CJa6/x5Y\r
+        aPwAJS6sBwICty1gff8VO1D8Fkdn/x1uof8xbIj/HSMm/yRbdf8rkMT/LZPF/xtbd/8ne6v/F0lz/yqH\r
+        t/8XPEz/M57V/zBui/8maIb/NKvi/x9cef8dX4f/GlmE/ytkhPsfYHz/CBslmhVIYQAMICoIAAAAAAAA\r
+        AAAAAAAAJNT/AABilAACAAECAgABAAQAABcADRSWPHWH9Fu00P8dxPT/BNT//RG8//wOvf//B9D//gHX\r
+        //4C0///BNb//SrU//5tzO//L5Kr/wNBU/8XIyr/KElb/yuOv/84eZb/J1Z0/yROZ/8lWXL/GlFq/xtL\r
+        Yf8qjb//K4zE/yd0mf8vb47/GViE/ymDtv81b4r/GUlg/yBEU/8rhrX/IXKh/jiVwvwbKzP/AgwRxxeB\r
+        tgEHGyUFAAAAAAAAAAADBgoAJ+b/AAA6VwEAAAAACAAAUwBBVuBbr8z/ddn//w66//sVnfn9JJD0/jps\r
+        9f4jkvT+EK/2/xan9/8Psvn+D7P4/wmm9f4luP38xOX//WnG7v8AUHb+HjVB/yFKXv8xVWX/HV2F/xZX\r
+        gv8yXnT/J1Jn/zNwkv8kTWD/LZjJ/yFRaP8udZn/GFmB/yZ5p/8nVWv/ID9O/y6BsP8qVmr/MZ/S/zZx\r
+        i/09eJP/GzZC8gAAABwJAgAAAAAAAAAAAAAAAAAABSAtAQE0TgAKAQE7AEty/2/P//+Bz//6B6D0/TCA\r
+        +P48cvn+O2z5/jtw+v87dvv/LIP1/ztt9/8lj/b/HJz4/i+J+P8XiPb+ZY32/vnv//9lyf/+AGeR/zI7\r
+        PP8bIyb/NG+N/zSUxP83aH3/KoCt/xZPev8sgbL/HThE/zJngP8yW2z/Mp3Q/zCf1P81Wmr/OYGo/xVW\r
+        g/8sdJ3/LWJ5/ytbcf0neqD/KmN/9QAAACIAAAAAAAAAAAYFBwAAAAAABBkqAQggKxIAS3DeUsb//s3M\r
+        +vsrefP/Lob8/ilE1v4ULbz/PXr//zRm8f8vXun/PnL9/zls9/82c/f/L4b6/0Bz//8uU9//ESq7/2+O\r
+        8v+Qo/D/IHPN/xc0Tf8nYYT/Ikpf/ypJVv8oPEX/LGuM/x5wov8tfaj/OWyD/ymFtP8vdJf/NV5u/zFl\r
+        fP89cIf/O7Lv/xdEX/8vk8b/KDtC/yxQX/0mdpz/KVFi6WJRShIAAAAAAAAAAAYFBgAyWHQCD0h0AAIH\r
+        Ioc6fOD/4ev/+3ma+f8uZ/r+RoD//xYuvf8AAJP/OXL5/yxV4P8DCZr/MWbv/z15//87cvv/MVzp/zdx\r
+        +P8sWOH/AACV/wAAiP8ANF3/AnSB/wUmOf8VHiv/GlyB/zBid/8yY3z/L2F5/y5xkP86epb/RYyw/xJG\r
+        bP8rgrb/Q5zE/x82Qf80a4f/O3mV/0G17P82cIn/LWOE/z9nffxNjan/JjtCwqHT5gBhf4oGAAAAAAYE\r
+        AwAvS0wAE1NlFwwsd++PrP/91dbz/Txx9P4lUd7/FCu5/wwYrf8AAJX/Bw6l/wkTqP8AAJH/Chaq/xUt\r
+        u/8vX+j/HT3J/wcPoP8KFqn/AACg/wIBZP8MPFr/Enyp/wEuQf9CW1T/NHaW/zxxiP8lYob/G2KQ/zFX\r
+        af8eJCX/MHGP/zOb0/80q+n/O4Cf/yRlif8XVn3/PG2J/ztvhP8zZoH/Ez1d/iJhh/stSFT+BgcHeAoa\r
+        IAAFBwcHAAAAAAkVLgIAAAAAAAAAOSNTuv/C1//9oKDd/gUNov4CBJr/AACQ/wAAlf8AAJr/AACZ/wAA\r
+        mP8AAJ7/AACb/wAAkv8FDKH/DRus/wAAkf8AAJT/AACY/wECp/8CAKL/CgiI/y1Ja/+V6uX/PVxf/zNd\r
+        cf8eZ47/EkBd/ztwiv8sao7/J1l2/zhofP9Jrtn/L1ls/yyHu/8cZpf/PrDp/yU4P/83cIr/MpzT/jqq\r
+        4/sgNj//AwMEZgMAAAAGBgUHAAAAAAAEJwIAAQgAAAEDQRIrof7I2f38l5rd/QAAmP8AAKP/AACd/wAA\r
+        oP8AAJf/AQGJ/wEBi/8AAIr/AACL/wAAlP8AAJr/AACb/wAAof8AAKX/AACc/wAAYf8XJk7/UIOF/p77\r
+        +P+g/Pj+OlhZ/iQ4Q/41gqb+QZ7K/jl0kf8iZpP/E0lr/0Cx6P80SlT/JT5K/zB/pP9Dwfb/OX6e/yta\r
+        ef87dZn+SY2r/Td3lPw1V2T8BAMDSgUFAwALDQ0FAAAAAAQCNAMFBCkACAcXVQAAhf6zuvP6rbLl/QAA\r
+        cv8EA1D+BwlD/xoBLf8aBDX/Dw1r/w0LZf8QDmT/FhBX/wcjO/8BFUP/CgRF/wgIV/8EA2L/CxJJ/2Og\r
+        lf+a+vD/q////3W3sf8iOUf+LDVB/jFTYPwhUW3/Ol5y/h45Rv4vmM//NpvR/0G79v82aYD/NZLD/zJw\r
+        lf8uTFj/Mltv/xdIav4hcKH/MU1a+kCJqv8aRVi+JFlxACtPXwEAAAAAAAAAAAICHgIBARMAAAAUPwIB\r
+        Q/52ebj72OD5/QcHdf0CAYT9BhV3/pgEAP9RDCj+FRqM/yYdkP8GB6f+GQmP/xRncv4CmIf+HQZS/xMW\r
+        h/4QB1r/OldT/6r///+V8/X/ME1J/gAARP8AAIT+Gxwm/zNpgP8ORG37NIrA/jJZaf8oVmv+LXKR/iVK\r
+        Wv83fZ7/E0Zn/x9vov85dpL/NkxT/zqs5f8zh7T9OGR1/kCMr/g/Ozk5Q0lLACAzOwIAAAAAAAAAAAAA\r
+        AAAHCAYAUlQJBxIPD+AeG3X/wMbw/0ZIvP8PCpr/JyBV/6EAAv4qE1P/CQuy/xUQwv8KCbL/DQiO/hYZ\r
+        T/8Atar/GSVS/xAJff8gF4T+LDdK/qL//v52wLn/AAA2/gEDYv8CBE37AAAATRs2Qb8weKH/Obbt/z+F\r
+        pfsvdJv+HGiU/zWJs/41bYX/Na3o/y+Wyv88d4//Royw/0N8nf5CfZz8L0tX+RYfI4xXVFsZRD9FAwAA\r
+        AAAAAAAAAAAAAAAAAAAMDAwCJCUQAAoLCHMKCQffS05etpedu9MICyrpQA8X+YoAAP4NFzH6FhB++xcT\r
+        c/ocF177GRlt/BwGR/sAfnr9D2Rt/x4LR/4gH17/DwcV/zRYVv9wppf+BQBc+wAAl/4AAxGxAAFhAGgA\r
+        ABEcGhyXK1hn6yRMXv8xmM7+F05y+jOj3/0nQ03/SYen/jyDs/4qLTL/M2dj/zlMKv1AbDf+IToL3gEH\r
+        AG4bXAARLGsAAAEDAgIBAAEAAAAAAAAAAAAAAAAAAAAEAQQDBAkDAwOmAAAArJWcspIoR0ueRwAA7nAA\r
+        AP8ABgDPRUEqxCkpGckAAADVAAIA2gAAANcAQkL5AHl4/gYAAMgECQCsCgwJrwAAAOgIS1X/AkVd+gIK\r
+        Nf8LAABoEQsKAB4YGwAHAAAAAAAAGggFBnwwcZD9OabY/z+y6P9BZoD+OVND/ydMGP8icQD/LJoC/y+u\r
+        Gv0pnBP+G24V1QoeA2gcPQZQDhIJJgEAAgABAAEDAAAAAAAAAAAAAAAABgYFAQsLCwANDQ0kAgICwiEi\r
+        K8EnMkLGPQAC/iEMDN0BAwWPS0pQixsbH5EAAAKWAgMGngMCA5sCCAjJAFBQ/wkND+IKCQvEAAAArAAA\r
+        AKIFISrbAZmv/wDH2vsDXnLyCAsKPQ8YGAAEIScFFRQQABEAAAADAAApAQMOcQ8SHakgSRD+LY8G/i6S\r
+        AP4zqQn/MZEN/zCZGv8ylxv/M4kO/yNSAf8WLQD/Dh0BpgAAATEBAAACAAAAAAAAAAAAAAAACAcIAAkJ\r
+        BAEDAwQAAwMCFwIBAMARAADKmAAA/xQMC5IAAABJ4uHgXGpqaVwAAABcAgMDXgADA1MQAQGBA5qa+wBD\r
+        Q9AKAQGyQWpq/yI4OOAFAADIAiAo7QDX//sAwO3/AyUsgAQ1QAAFUmQDFw4HAQ8AAAUOIggsHjEAgCZ6\r
+        Ddkwux/9MnwE/TGREP4wnhT/MJoP/zFjAP4udQD8I1AA/REVBKgWHQc0GicKIgAAAAYAAAAAAAAAAAwT\r
+        GgAHDxYABQUGAQkIEAUFAQAFDAoGKwUQOtQFGGL+GxNB/w8UErkMDAqFbm9wfGJiYmwEBARrCgoKawgL\r
+        DGkOAABrDmxs9gB5efUfGxvrsP///2qqqv0AAACRAyEoqgDN+/wDl7j/CRYWUgsWGAADHSQEAAAAAAAA\r
+        AF0DBgD4JW4U/ymvJv8tfQf/LmoA/zGvIf4weQT/MMIp/zGWE/8rWwD+GEYA/REzA/UAAAKjAQAGWggG\r
+        BjUKCAcAAAAAAA0VHQAIDxcAAAAAAAMPPAAEDTYAAgYbkQArw/8AOe75ADnr/gEWYv8GBgWfCgwQfBMU\r
+        FJwdHh+tJSYnrh4oKbAcHyCpDjc31ACdnv0BAAC+QE9O/CxJS/8AOETLAaC+/wGlx/8MLTWeF3d3ARNM\r
+        XAIAAAAAAAAAAAAAABURLAFbDjUIXAkQAKkYMwDyK2IA/DG2Jv4vfgn/MI8N/jDXN/4tiA7+LmEA/CRF\r
+        A/wIDwHVBAMBngkOAj8JBwYAAAAAAAwTGgAECQ0AAAAAHwsTKGsJDyJbDQwQmwold/0AHpD7ACCv/QAa\r
+        df0HAwQ1BwEAAAAAAAcAAAAHAAAACAgIBwsICgoHBQYFUQGVk/8ASkh3AG1pPwA2OaUBbYDfAWZ6yAEB\r
+        A2YAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAANGwAAER8AKxEkAG0XRwWpL20A/jGmHvwwhxH/MHEA/zGX\r
+        F/8txy3+JHoG/xxNAf0IGAKPAAADNgQACAQCAQEAAAAAARopNwASIjACIC05yVZ0kP9KZHz/UWyH/1t4\r
+        jf9adYr8PlVu/w8VHeMAAAAaAAAAACEaEwAAAAEABgwOAAwBAAAKAAAABwAADAJwc+0BXGXeA5moFQB4\r
+        hi8AAAACAAAAAAADAAAAAwIADQAAAA0AAAAAAAAACwgIAAAAAAAZPgIICRUDFAAABSAkdALsM30A/S+I\r
+        E/4wdwr+MYMA/jJuAP0ldA39DjgS1xExAuAHHADrCQUHvQgCC30HBQUtBAMDBQAAAAAAAAAhKjlG+Vt4\r
+        kfpDWG36KzxM/VNyj/89U2r+RmB3/jZKW/lJY3vgKTZEuRIQECoUFhgACg8RAyAAIAABAAMIABcASAYR\r
+        CeEBQgn/BSwA5ABEAP0BLAPEAhIGnwIAAh8DAAINEwAMACQCGAAAAAAAIRkXABgdDQJHcxIADAAQDhc1\r
+        BtYwmwD/LF0A/yZvBfwybwH+KnoA/y10AP4rVQD/CA0CpSx5AQ4teAAdBwAGPwQFADwAAAAPAwEBAzRH\r
+        VwA7XWAXM0VT567W9P+2xdf4XnCA/sjd7/652vv+epWr/h8oL/89Umf/YoWn/xciLI8uQ1UAJTc/BgcA\r
+        BAUDDAKDAWAA/wDJAP4AgwD+AMsD/wCQAv8AhwD/AJQA/gE6AfcEKgNpBjIEAAgiBQMAAAAAHhYVACxr\r
+        CwAAABIrFDgF0SN2AP8SPQDQCRQAuiFtAPMpWQD+GlAA/BxVAO8qVQDzIVIA/wYaAmUOMQMACBgDAAYF\r
+        AgAAAAAABQMCACg2QQIlODsACBIbTxoqM/RYcH7/dnR0/2daV/61ur//g4GB/6CnsvyApMT7Hys2/wkM\r
+        D1gLDRIADxoRAQ4ACQkFMgPgAJMA+gCrAPgAlgD8AKMA/QBeAf0AkwP/AIAD/wZxBOQDEgJRARAAAAAN\r
+        AAISDQ0BCQIJAAMACFkMGgTYHWQA4QgeAXwAAAAjDzUAmBlRAv8PHgCuEjsAxxRLAM8PEgBcLmkA/xAt\r
+        APoABQI7Ag0DAAQDAwMAAAAAAwAAAGiNrAAAAAABCxMbACIAAC1UIiyVSyco8YAAAP5MWmT7V2Bv/4ii\r
+        wP91mrf+ISs0yAAAABURIBcBAgIAAAkABlMEVAP8AIIA/wBWA/8AUAP/ADYA/QAMAP8BCgDnAAAAeRlj\r
+        EgwJPgYABgAEAAAwAABXQj8AAAAAAAAOABYAAAAUAQADBQUEAwAJFAISDzUB9wAOAIIGCwA8CRoBchA1\r
+        Af4AAAAYChgAYBEiAdUBAAKvAgAEMwUEAwACAQEDAAAAAENabQAAAAAAAwAAAlIIBQBvAAAlKQAA508B\r
+        AO0AAAAxAAAAMgAAAEIAAAAyAAAAAgQFBgAWIhkBCQAGAAAEADcAGwBzATwBjQkBAK0CAADIATA0/wQ3\r
+        Or0VmJwUBLCzAAAAAAAQVwoBBAQCAAAYAAAyJiQAAQABAAAAAAADAwIAEBIKAAwNBwAKCgWKBAQDqDkq\r
+        JwMACgARETQGIwokAf8FBwNlAgMCAAAAAFQAAgA2AAMACQAAAAAKBwcAAAAAAAAAAAABAAAAAgICAAAC\r
+        ACAcA23yYBTX/zcMmPsNBxFLFgkmABwKMwAAAAAAAAAAAAAAAAAVIxkACgAHAAEEAQAAKwAAAdMBABHn\r
+        8gAJ19YFA3Jy5wGhodMA+/kAAtXUAgAdAAAOUAkAAwQCAAAAAAAAAAAAAAAAAAAAAAATDw0CEAwLAAoH\r
+        ByUHBQWnVUU8BRANCwABDwACEEkDAAQNAcsCBgGhAwsBAgECAAIAAAA7AAAACQAAAAAAAAAAAAAAAAAA\r
+        AAAPCRECCgAWAAMAAFVfDdn/rH7/+IhI//8cAEmtRAC1AkgIpwYDAwMCAAAAAAAAAAAKCwcADQMJAAcF\r
+        BQEBCgEDAP8AAwZbWQUGeXgACCwrggF+f/8CAAA6AwAAAAQFBAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAABAAAAAAAAADwAAAAbBQQDAAAAAAEKCQcCBAAEAAYEBGIEBAPJAwICAAAAAAAAAAAKAAAAFAAA\r
+        AAAAAAAAAAAAAAAAAAAJBQoBBwQPAAQCByc7B43pfDbo/E8bp/kFAhJiDwM2ABwFQAIAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAEGAAAABAAAGwQaGdkEFBNWBRwcAAUNDQIAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAABAQEAAAAAAAAAAAAAAAAADAoJAAAAAAAeGBQABgcEAAYFBAcGBQSpAQAAIgEB\r
+        AQAEAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAOCA8AGwszABcHLQABAQJ8HQBT4gAABbUAHAAAAH4AAAA4\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAANAAAAFQwJAAoAABgBAAAMAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAdFhMACQcGAwgG\r
+        BQAFBANhBgUEUQgGBQAKCAYDAAAAAQAAAAAAAAAA////////AAD///////8AAP/+P////wAA/8AD4AP/\r
+        AAD/gAAAAP8AAP8AAAAAfwAA/4AAAAA/AAD/wAAAAD8AAP/wBgAAPwAA//wcAAA/AAD//jwAAB8AAP/+\r
+        PAAAHwAA//44AAAPAAD//jgAAA8AAP/+OAAABwAA//44AAAHAAD//DgAAAcAAP/8GAAAAwAA//gYAAAD\r
+        AAD/wAAAAAMAAP8AAAAAAwAA/AAAAAADAAD8AAAAAAMAAPgAAAAAAwAA8AAAAAADAADwAAAAAAMAAPAA\r
+        AAAAAwAA8AAAAAAHAADgAAAAAAcAAPAAAAAADwAA8AAAEAAPAADwAAAYAA8AAPgAAB4ABwAA/AAAH4AD\r
+        AAD+EAAPgA8AAP4AAA4AAwAA/AAAHwADAADwH8Q/wAcAAOAf5//gAQAA4Afgf8AfAADgA4AfgA8AAPAD\r
+        gB4QDwAA+AcAf/JHAAD8/4H/5y8AAPj/+f/vPwAA8H/5//8/AAD4f/z//78AAPj/////nwAAKAAAACAA\r
+        AABAAAAAAQAgAAAAAACAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAQEBAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlDWggSKjYNDyIsDQsc\r
+        JAwoQlEJFB4jAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMD\r
+        AgAMDQAGDA0OEQAAABoAAAAmAAAAMAAAADYAAAA1AAAALwsLCycYGRkfDAwMGwAAABkEDBAbAAAAHAAA\r
+        ACgAAAA0AAAAOAAAADMAAAAqAAYKHwABAhIAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAACCwkGEgEAACkAAABDCAYFeR0cHJ0bGxy1FxcXtxcXF7MMCwqhAAAAggAAAGEAAABCAAAANwAA\r
+        AEgMICqQDyAotxMrN84QHybQEBkeuAcFA5IBAABsAQAARwEAAC0AAAASAAAAAgAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAsHBgYkAAAASTk4ONV6eXn/lpaW/4uMjP9mZmb/ZmZm/2NjYv9iYmL4gICA60tL\r
+        S8gBAgSFFy453x1bgv8iT2n/H1Bp/x9GXP8iWHn/GkBW/w4nOPEBAwacAAAAWwAAADwAAAAaAAAAAwAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAABgICAhsAAAAzIiAftFJRUf9oaGj/lpaW/7i4uP16enr9c3Nz/42N\r
+        jv+AgYH/ODEt7g8lMOAlaIv/IEVZ+ipWbfwdSWP9IEpl/RtMZ/0bQFT8LWyO/x0/TvcDBQauAAABUAAA\r
+        AC8GFBoQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwEBAA4AAAAaDQsJXS8tLKI7OjrixcXF/pKT\r
+        k/5TUlLzWlpbu0dISI0OHyqxIk1o+hw9TfwfXYT+LEtc/x9HYP4laZD+LGeE/yNSbf8pY4L9KVBk/hIw\r
+        Qf8DBASNBQoNLAUAABQGDBABAAAAAAAAAAAAAAAAAAAAAAAAAAABAQAAAgIBAAAAAAAAAAAAAAAAAAAA\r
+        AD+EhIP7iYmJ/w0NDHAGAAAAAAAACyRXdPAfUnL/IFNw/SVhgf8rZIP+JVBn/ypde/8oTF7+JlNq/y6A\r
+        qv8tYHv7JHil/hlBU8mk//8MCjZOCFSt1wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAF7e3sBjY2NB2pqauB2dnb7AAAAHAALEwEVJS1NHDpI/xlPbfweX4v+KEpd/iZdev8yYXX/ImuZ/yp7\r
+        pP8eRmH+IVRy/iZNYf4ydpn8I1Rq+RkqMXQzU1cAJkxeAj5vggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAO3t7QH09PQAaGhouGVlZeLd3d0DGoW6AClOYbYYQlj+GVd4+y9+pf8qYH3/G2OS/yZK\r
+        Wf8zY3j/N2+J/yRsk/8icZj/Il2A/x5Laf4fSFn+LnOS/yYyMTAmNz8AHSwyAwAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAA3NzcAuTk5ABlZWa0Xl5f1gAAAAA8j74AGSkwxRtUd/4aUXL8Kk9d/i14\r
+        nP8ui73/MmuI/yNpk/8qUWT/IlJo/yFlg/8lZob+M4u1/x5UdfofUnL9ERcXZw8UFAAWIycIAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAQDAsAEgAAAP///wKFhoYEmJucB2dqauZsb2/mS05PCwAJFQMXHyKVJ1dw/yVc\r
+        evsgW4D/MW2K/y9LVP8xfqT/HGyg/zFwj/8kWn7/HlBu/xpIXf8eTWL+JHWh+yd/sP4IFx2iP3WMAA4s\r
+        OwgAAAAAAAAAAAAAAAABKDQAAAAAAA4JBwIAAAACSk1MABoWFgAGAABrpp2b/3xycfwAAAA8M36tABk/\r
+        V8EfQFP/K09f/CV3pP8veJz/GEFZ/yJkhv8rb5D/JU5g/zCAq/8rZYP/H2WP/xtbgf8aTWT9I26P/xdL\r
+        ZPI3PUAcBA0SAAAAAAAAAAAAAAAAAAEUGgAAvPsCGRISAAAAAABOODYfL0NFch9RWfBRgI38O2t2/hk0\r
+        O85JhZw1FjNIwR1TdP8dUXP8NG2L/yZVaf8hcqH/I3Kd/xlPa/8gbJb/JlZr/ylXa/8qg7D/LY6+/xhC\r
+        W/4hUW/+IWqM/wAAADoAAAAAAAAAAAAAAAAAPlsAAQ4TAQAQFAAAAAA8MFNfsimZs/MAr93/Bbz7/wDH\r
+        +v4A0P7+C8Px/zydt/8hZXfwCyw6/yJXeP4wfaT/Ij1O/yZoif8gXnr/JXag/yeAtP8kZIX/JnSj/y5x\r
+        kf8hW3T/I2uS/yuBs/wfQ1P+AgYJXAAAAAAMEyYAAAAAAAA2SAEAPEgAACg5hUWZuP9Oy///Hqv//y+E\r
+        /fwygvv+HKD3/xqm+v8Pr/z9JrH//6je//9CkrL/FENW/y5KVv8ka5f/LGWB/yhbd/8nZoj/J2uJ/y1i\r
+        fP8if7P/LGF7/yRVcf8qcJX+MoOn+zBmf/8XM0CSGjpJAAsSJQAZbI0DBl+EAAAtSl9PodT/grz//B1/\r
+        +PspQtP+PW77/zVn8f49cPv+NnT3/jSK/v8nY+/+T2LZ/pG7/v8WXJP+IDhH/ypeeP8xW2z/JGyT/yl4\r
+        pf8vZX//L2+P/zR3lP89e5f/K4Cw/yVsk/8uTlv7K3KT/yVKWowtVmgACw8aAlOIjgAPZW4TMl2q6rvV\r
+        //1Hd/r8Llnm/wMHm/4kStb/Dh2v/yNI0v84cPb/LVjj/yRF0f8AAJH/BS9s/wdieP8RJDT/KmSB/y9e\r
+        df8pZIP/NGN1/zB3nv8qjMT/NHCL/yZSa/9AjbH/M3WV/ihRbv07aX3+GCImUxIZGgAUKlkJAAAoAAAA\r
+        IE94l+P/naLn/AgctP8CBKH+AAGh/wAAmf8AAJz/AACc/wsZtP8KFrD/AACX/wAAnP8AAIH+Cih2/2uq\r
+        p/5Fcn3+IWGG/yVihP4rT2L/K2WE/0GXv/8saor/I4G4/zdxjv4yYHf+LpDD/yJBUP4AAAAoAAAAAAUO\r
+        egoBBFAAAANBYXOD2f2Lj9f6AAB4/gACe/4AAHn+BQR6/wYFeP8GBnT/AABw/wAAfP8BAY3/AwV2/zhW\r
+        f/+GztH/hNHL/jFDSP4tZYD9OnSP/yVslf4vkMP+OnKK/y1hfP87krb/K2B+/y5nifxChqL/Lltv4Ud7\r
+        hxFAk6QEAwFFCgAAKAAAAB5cQkKR/6iv4v4AAHf/Jw9L/2EGCf4VGID9Ew6V/RQWcv0Ib2L+FRRc/ggA\r
+        Wf1TgYT9q////kVxfP8CA1L/Hi44/iNihf8ya4z6K2N+/DGBpf4zdJL+IHCf/zNieP80cY7+LH2t+zlr\r
+        g/4pV25kVpy5ADlpfQcJCAADAQAAAAcIBRsTEC3ri47B7CcxnftKCy/9Ywsc/wkRp/8WEqj/Fwd7/wt3\r
+        f/4UQXL/GAVq/0Jgbv99x779AABM/gAAWN8/SHBHJ1dy2DKIsf8ucJX/InCd/jRzj/83ltD+N2yQ/kJy\r
+        i/1CbXL+HzAuxxMfEgxia2sAKCIeAg0LAwAHBwgCBwgLAAAAAGgjISC9U3F5p0gAAPMxBgfuHyo3zxIR\r
+        GN0KBBTgAjA38wVQT/kRBhTIAAAAxxVBQvgHPHj/BQIlpBUTZwAVOkcQPzw8YSRffN4ymdD7OGaF/Dhc\r
+        RP8lYQ/+Lo4W/S+PFv4VRgawBwwAYwAPABgAAAAACgkPAAcGBgADAQACBAMABwMEA3sdFRDHVgEA8wwH\r
+        Botna2xsCgwNeQAAAHYDEhCaAVdX9wcHBcATISHAAg4TzQCInvkBoL/0AAwCPQg1RQBLamcACQAAGRgy\r
+        GYondBryLooA/jCkCf4wjgr+MIoP/iZdBvQhTwCwFzQFRGqJAAAAAAAAAAAAAAQSRwAHDy8ABgwZOgYR\r
+        TPAwFD72BQYCjYN5YXgoIhJ4EgAAdRgAAH0FeHjyEjo75H28vf8fFQ6/AGyH1wOy3P8HKS05ADpMAExK\r
+        QBMJDgSqI3cS9CyND/8whAz+MJgW/zGnGv4rYgD9GDgA8RAtBIUHGAZBBgIGAwAAAAAAAAAAAB2KAwAf\r
+        jRYCD0SbACvE/wApx/8BDTezBhxnQwwaTGkOYGFuDmRlZwZlZcYAZ2XMJ05NrwpJVeAAiKTqBmp0eQaI\r
+        mQABcnkBABMAAwIQAC4HIQRjFScAyS6KEP0xjxH9MJ4X/i6vIP0nXQD/BhEAyjAsA00LGAUAi4+UBI+V\r
+        nQAnND+hO1Jj8TtQZu09V3j8JTtm/goRI30ABCwABAwqAAdaWwAEYGIABDpDTQFdaeMAPEo3AA8nTwAA\r
+        ABgIV18ABEWBAAaKZAAQGAYATWADAIGZAgwkaQHAMoMG/zCCDfozeQD+J3sR+RE/CcsWIhG8OjMFcwge\r
+        Ay7X4uoAi56jB0ZZa+iDnLf/XXOF/4qrwvxUaXr6MUJR9UVbatEAAAAcLDJABBYACCQFRACvAWQB/wF3\r
+        AP0AYwDmAkAAsBAHBEwEHwAACC4JAhtEBwAiTAgJHDwHoyJpAP8iVgDnLGwB/yVqAPsoUwD/DRwChERu\r
+        IAIYTwEkKGoMDUxbaAYtQVAAESw6ZlRzgvh3bHL9o52k/4+eqv99la//MURW/SsuLRcAQQAAAy0CmwCR\r
+        AP8ArQH9AIsA/gB0AP8AcgD/ATIAdgNjAwAHQwMDFkUEDg4lBZMXUQC6AxQASBJDAM4SMgDHET4A0RxB\r
+        AZcdQQD/DSIAUxIrAQAGCgMAvdz2AAAAAAFkAAAAewAALEMAAOVFBwDFSDU7o0xgbq0aIylWUENTAAUR\r
+        BQkDOAKkAlQA3AEWAPIAIg7+AhMNnQQLDCQDBgYAAwADABr8BQBq/xUDCRUCDgoUBAAKFgRDChwCq0Z6\r
+        ERQNKgG2BxgBXxdABFIAAAKIAAACCgUFAwOUrcEAQAmRAmAEjgE+AlJ6Vxuw+zEMY5xnFIcASwCEACw7\r
+        RwAAAAAAAP//ABT2DQAKSVkGCYaPIAJ0d+0DeXo/A4iIAAN0dQMEAAMAGv8IAAMIAABIRkgAAwACDAcE\r
+        BXcBAAESDBwEAAUOAlsECwGjETkGAAACACEAAgAEAAAAAQAAAABzE+QCiQ/0ADYGk7GISv//Sh2XyspG\r
+        +wWqLu0EJzM9AwAAAAAAAAAAAAAAAAB2dQECgYAABD8+kQJDQ5YCXFwCAm9vAwIgAgAAAAAAAAAAAA4R\r
+        DwAAAAAKAAAADgAAAAADAAMBBQMEDwUDBI4AAAAKAAAABgUEAwQAAAEAAAAAABABMwMNATkAEwImSyoA\r
+        besJABliNglYAC0JUgMAAAAAAAAAAAAAAAAAAAAAAAAAAwkAAAQDAAAXBwAAQAoAAAAaAAABAAAAAAAA\r
+        AAAAAAAAFxgZAAAAAAAAAAAAAAAAAwoJBgEGBQMABQQDVAYKAyQFBAMADwwKAAAAAAD///////////4B\r
+        wH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAAAAHgAAAB4AAAAeAA\r
+        AAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9/s/j/P/v8///7ygA\r
+        AAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoJuXACEgIQBvbm4AAAAAAP//\r
+        /wMAAAAAyMPAABAuPwDY//8A////CQAAAAAAAAAAAAAAAKoKCgARKDMAAAAAAIJ9eAAuMTUWNzY1c1pa\r
+        Wqo5OTmzNzc3oDw5N28GEhlZFTVIqRYxQL8PIy+lAQIEXgAAABeOCwwCBB8uAAAAAABqaGcAGBgYFCoq\r
+        KZ9mZWX8kZGR/25vb/9RUlPfFjtP8CRUbv8hT2r/IVJt/xw/UfIDCg5vbQ0PDQkcJgAAAAAAAAAAABIS\r
+        EwBISUoAOTg4H3p6e+xXRTpCETdMfB9UdP8nV3L4KV56/CdgfvgpYoH/HUpgynTAwQk4dZICAwwQAAAA\r
+        AAAjIyQAtra4Bevu7wBbYGGpTSscEhhBWMMhXHv+K2uO/C1lgv4mYoD/I2GB+iZffP8hSl1gL2J9ABBS\r
+        aAA4bHQAKygpACwpKQBkV1MIdWZj2DwOBBkaPVO/J19+/ytohvwmaIz/KGB9/iFdfPsgY4b+GU5qryqJ\r
+        tQAWYnsBO3B1AC1CQwEnZWhWDmqEvCSdtP8cdIG2Hkxf3iddev8lYoL9IGaL/yZnif4ob5T9IWSI/h9W\r
+        ct5+vckEQXiGA1R/iAdDia+zPJj0/y2B//8imv/9K6T//12T1f8bS2T+KVp1/ipsjv8rcZT+Lm+P/itu\r
+        kf8tYnvuAAAAIG2MwgBAWpZgb43n/wwiwPgJD6X7Gya+/hYixvsACY79M2yB/zRofP8pYYD8M3yh/zB1\r
+        lvwyc5P+LFtz30jA2gR0gMUAQEaKf1Vauf8YAE/9FgZ9/wYeev8FC2n/Tnim/091kvoqTWf/LnKY/zB4\r
+        n/8xcZ/7NW+W/zBfd41EhKMACQIAAA0EADA8P1nFTBMb6iQSV9sKL1HoDS5C6zFMVeoBIF7WFFpuSydw\r
+        hrswdpD2M3ZR/TJ2NfgTJxNYSm8RAwAIPQgJFFcAAAMtbxwPN9shIQBkBxAChQ9SUNknQUjcAISf6A+o\r
+        0QYeRhc1JGgM3TGbBPorgwf9EykAs0JpBxM7bbwCIUiUdDNUkeIcOn7oRE1QOwxjSxsFVk2ZDE48qgpl\r
+        aVUZfEQDX5EmDyBaAq8xhwz/KXsL+w4nA5onaQkwiHt1AF5fWYBybWrzcH2E+kFTaoAFKQofAW0A+gBm\r
+        APQDPQJ5CE0AABJBAjQUPwGYF0MAxhpAAMgPIAFWFzkDCE0AUABQFFYRSQ1t0SsXOz8eEDYKAj4rFgRD\r
+        MFwCR0mXBU9PBAJJSwIGBQMCBQUEJQQHAyUFDwJcBAYCIxM9BAEtDpYAHAByLFEls+ERAC4EEgIuAAkf\r
+        IwAGUV0ABDQzSwkyMgQBNTQAFCIPAAYCBQUGBAQABAAEOwUEBAAAAAEB//8AAOAHAADgAwAA+gMAAPoB\r
+        AAD6AQAA4AEAAMABAACAAQAAgAEAAMBBAADAYQAAjGEAAIRhAADc+wAA3/8AAA==\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/win/C#/frmAddPreset.Designer.cs b/win/C#/frmAddPreset.Designer.cs
new file mode 100644 (file)
index 0000000..3db705c
--- /dev/null
@@ -0,0 +1,124 @@
+/*  AudioTrack.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace Handbrake\r
+{\r
+    partial class frmAddPreset\r
+    {\r
+        /// <summary>\r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows Form Designer generated code\r
+\r
+        /// <summary>\r
+        /// Required method for Designer support - do not modify\r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAddPreset));\r
+            this.lbl_name = new System.Windows.Forms.Label();\r
+            this.txt_preset_name = new System.Windows.Forms.TextBox();\r
+            this.btn_add = new System.Windows.Forms.Button();\r
+            this.btn_cancel = new System.Windows.Forms.Button();\r
+            this.SuspendLayout();\r
+            // \r
+            // lbl_name\r
+            // \r
+            this.lbl_name.AutoSize = true;\r
+            this.lbl_name.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_name.Location = new System.Drawing.Point(14, 20);\r
+            this.lbl_name.Name = "lbl_name";\r
+            this.lbl_name.Size = new System.Drawing.Size(89, 13);\r
+            this.lbl_name.TabIndex = 1;\r
+            this.lbl_name.Text = "Preset Name: ";\r
+            // \r
+            // txt_preset_name\r
+            // \r
+            this.txt_preset_name.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
+            this.txt_preset_name.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.txt_preset_name.Location = new System.Drawing.Point(109, 17);\r
+            this.txt_preset_name.Name = "txt_preset_name";\r
+            this.txt_preset_name.Size = new System.Drawing.Size(241, 21);\r
+            this.txt_preset_name.TabIndex = 2;\r
+            // \r
+            // btn_add\r
+            // \r
+            this.btn_add.BackColor = System.Drawing.SystemColors.Control;\r
+            this.btn_add.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_add.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_add.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_add.Location = new System.Drawing.Point(284, 44);\r
+            this.btn_add.Name = "btn_add";\r
+            this.btn_add.Size = new System.Drawing.Size(66, 22);\r
+            this.btn_add.TabIndex = 0;\r
+            this.btn_add.TabStop = false;\r
+            this.btn_add.Text = "Add";\r
+            this.btn_add.UseVisualStyleBackColor = false;\r
+            this.btn_add.Click += new System.EventHandler(this.btn_add_Click);\r
+            // \r
+            // btn_cancel\r
+            // \r
+            this.btn_cancel.BackColor = System.Drawing.SystemColors.Control;\r
+            this.btn_cancel.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_cancel.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_cancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_cancel.Location = new System.Drawing.Point(212, 44);\r
+            this.btn_cancel.Name = "btn_cancel";\r
+            this.btn_cancel.Size = new System.Drawing.Size(66, 22);\r
+            this.btn_cancel.TabIndex = 3;\r
+            this.btn_cancel.TabStop = false;\r
+            this.btn_cancel.Text = "Cancel";\r
+            this.btn_cancel.UseVisualStyleBackColor = false;\r
+            this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);\r
+            // \r
+            // frmAddPreset\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.ClientSize = new System.Drawing.Size(362, 76);\r
+            this.Controls.Add(this.btn_cancel);\r
+            this.Controls.Add(this.btn_add);\r
+            this.Controls.Add(this.txt_preset_name);\r
+            this.Controls.Add(this.lbl_name);\r
+            this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MaximizeBox = false;\r
+            this.MinimizeBox = false;\r
+            this.Name = "frmAddPreset";\r
+            this.ShowInTaskbar = false;\r
+            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\r
+            this.Text = "Add Preset";\r
+            this.TopMost = true;\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        private System.Windows.Forms.Label lbl_name;\r
+        private System.Windows.Forms.TextBox txt_preset_name;\r
+        internal System.Windows.Forms.Button btn_add;\r
+        internal System.Windows.Forms.Button btn_cancel;\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmAddPreset.cs b/win/C#/frmAddPreset.cs
new file mode 100644 (file)
index 0000000..3fa157d
--- /dev/null
@@ -0,0 +1,47 @@
+/*  frmAddPreset.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.IO;\r
+\r
+namespace Handbrake\r
+{\r
+    public partial class frmAddPreset : Form\r
+    {\r
+        private frmMain frmMainWindow;\r
+        Presets.PresetsHandler presetCode;\r
+        private string query = "";\r
+\r
+        public frmAddPreset(frmMain fmw, string query_string, Presets.PresetsHandler presetHandler)\r
+        {\r
+            InitializeComponent();\r
+            frmMainWindow = fmw;\r
+            presetCode = presetHandler;\r
+            this.query = query_string;\r
+        }\r
+\r
+        private void btn_add_Click(object sender, EventArgs e)\r
+        {\r
+            if (presetCode.addPreset(txt_preset_name.Text.Trim(), query) == true)\r
+            {\r
+                frmMainWindow.loadPresetPanel();\r
+                this.Close();\r
+            }\r
+        }\r
+\r
+        private void btn_cancel_Click(object sender, EventArgs e)\r
+        {\r
+            this.Close();\r
+        }\r
+\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmAddPreset.resx b/win/C#/frmAddPreset.resx
new file mode 100644 (file)
index 0000000..37f9290
--- /dev/null
@@ -0,0 +1,500 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
+        IACoJQAAHh0AACAgAAABACAAqBAAAMZCAAAQEAAAAQAgAGgEAABuUwAAKAAAADAAAABgAAAAAQAIAAAA\r
+        AACACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAD///8A/wAAAAD/AAAAAIAAgICAAICAAAAAgAAAAICAAIAA\r
+        AACAAIAAgP//ACAgIADg4OAAIAAAAAAgAABg4CAAQOBAAGBgYAAgYAAAQKDgAAAAIABAwCAAIEAAAECg\r
+        AABg4AAAIGCAAECAoABgoMAAYECgAGDAAABgICAAoKCgAOAAAAAgIAAAAGAAAEDgAABgAAAAIAAgAEAg\r
+        IAAgQGAAIIDAAADg4ABgAGAAgOD/ACCA/wCgAAAAQGAAACCAAAAAoAAAYCAAAAAgIAAgIEAAYGBAAEBg\r
+        YAAAIIAAAGCAAGCAgABAAKAAAICgAACgoACAoKAAIKDAAECgwAAAAOAAQADgAADA4ABgwOAAIODgAADg\r
+        AADA4AAAAEAgAKDgIAAA4EAAYABAAABAYACAAGAAgCBgAGAggABA4KAAAECgAGBAwADgIOAAIEDgAACA\r
+        4ADgoOAAYAD/ACBg/wAAoP8A4KD/AGD//wAICAgACAAAAAgIAAAAAJgACAAIAAAACAAACAAACBAQACA4\r
+        SAAgYIgAOHCIADhw+AAIGAAAEBAIACg4QAAwYHgAAACIACA4QAAoQFAAKFh4AHh4eAAwaIAAIGiQADh4\r
+        mAAACAgAEAgIABAYGAAgGBgASEhIABhIYAAoUGAAIFBoAChQaAAoWGgAMFhoAChoiAAweJgAKHioACiA\r
+        sAAIEAAACAgQAAgQGAAQGCAAGCAoABhAUAAoSFgAaGhoABhQcAAgWHAAKFhwADhgcAAYWIAAOGiAAIiI\r
+        iAAoaJAAKHCYACh4oAA4gKAAMICoAKioqAAwmNAAEDgAAChYAAAweAAAMIgQAAgYGAAYGBgACBggABAg\r
+        KAAgKCgAKCgoACAwOAA4ODgAKDhIADBQWABYWFgAGEhoADBYcAAYUHgAGFh4ACBYeAAoYHgAKGCAABhY\r
+        iAAgaJgAKICoACiIuAC4uLgAMJDIADiw6AAQCAAAABgAAAggAAAAOAAAMGgAABgQCAAwgAgAEAgQABgQ\r
+        EAAwmBgAGBggAAgYKAAAICgACCAoABgoMAAgKDAAGDBAABg4QAAYOFAAEEBYACBIWAAwSFgAOEhYACBI\r
+        YAAQSGgAOFhoABhIcAAoUHAAQFhwACBgeABAaIAAIGiIADBwiABAcIgAGGCQADhwkABYeJAACBCgAChw\r
+        oAAweKAAKIC4ACiQwAAwmMgAOKjgADBg6ABAsOgAELD4AAgoAAAIMAAAGDAAABhIAAAYUAAAKHgAAACY\r
+        AAAwmAAAAMgAABAACAAIEAgAEBgIABA4CAAYOAgAMHgIABAYEAAYGBAAIBgQACh4EAAwmBAAEBAYABgg\r
+        GAAoIBgAGCAgAAgIKAAgICgAGAgwAAggMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAn2KfdXV1XAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoo2+QIJCJb28Sd3em\r
+        nQAAAFuKqW0aqsd6Y5/DXAAAAAAAAAAAAAAAAAAAAAAAAAB3kAWQkG8SpqaJb28gsncAbIeSroyii21x\r
+        kczIwwAAAAAAAAAAAAAAAAAAAAAAAABoo4mJkLKylm9vb5BvdwwAcZO/fox7z2NjqsOss2MAWwAAAAAA\r
+        AAAAAAAAAAAAAAAAvaGmo5ANlgUFEiBvo1xjq3p6qMTJroBkxXt9cGzFnAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAL2ylgV3vQAAAGOvxMXXq41uh6yVjxqp1YhknwAAAAAAAAAAAAAAAAAAAAAAAAAAAABvsolbAAAA\r
+        +5KneouS2Kx4pZF9ndywsXuvkocAAAAAAAAAAAAAAAAAAAAAAAAAAAB3sncAAAAAdayHca95bH9+cKmv\r
+        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\r
+        eAAoaIgAMICoAChggAAACAgAEAgIABgYGAAoUGgAKFhwAChwkAAIGAgACBAQABAgKAAQKDgAIEhgACBQ\r
+        aAAAAHgAIFh4AChgeAAAeHgAeHh4AChogAAwaIAAIGCIADBoiAA4cIgAIGiQADhwkAAoeKgAKICwAAgQ\r
+        AAAIIAAACAAIABhICAAICBAAMIgQABAYGAAYICgAGCgwAEhISAAwSFgAGFBoAChYaAAICHgAOGiAACh4\r
+        oAAweKAAGAAAAAAIAAAAGAAACBgAABAoAAAYUAAAKGAAAChoAAAAeAAAAAAIAAgQCAAQEAgAGP8IACAY\r
+        EAAIEBgAMJAYABggIAAAACgACBAoACgwMAAAKDgAEDA4ADg4OAAoOEAAGDhIACA4SAAAQEgAMEBIAEhQ\r
+        UAAISFgAIEhYAChIWAAwUFgAIEhoAEhYaAAYUHAAMFhwABhYeAAoWHgAIFiAAEhwgACIiIgAGGCQAAAA\r
+        mAAgcJgAKHCYADB4mACYmJgAACjIAEBw+ACo//8ASAAAAFgAAABoAAAAeAAAABAIAABICAAAGCgAAAA4\r
+        AAAYOAAACEAAAAhIAAAoUAAAAFgAACBYAAAAaAAAIGgAADB4AAAAiAAAMIgAAGiIAACAmAAAGAAIADAI\r
+        CABgCAgAEBgIAAggCAAQIAgAECgIAAgwCAAQMAgAODAIABA4CAAYOAgAEEAIABhACAAgQAgAIFAIAChg\r
+        CAAwgAgAMJAIADCoCAAACBAAGBAQABggEAAoIBAAKGAQAChoEAAgeBAAKHgQAEh4EAAY+BAACAAYAAAI\r
+        GAAICBgAEAgYAAAQGAAQEBgAABgYAAgYGAAYMBgAKHgYADCYGAAwoBgAMKgYAGj/GABgCCAACBAgAAgY\r
+        IAAQGCAAGBggACggIABIcCAACAAoABAAKAAAECgAEBAoAAggKAAACDAASAgwAAgQMAAIKDAAECgwAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAARxBSUlJHAAAAAABYWFlY8kYAAAAAAAAAAAAAAAAAAJFgqqRLSzAwBXMAkKJbW1pdSVmE\r
+        AAAAAAAAAAAAAAAAEJdLqhpgYKQFkf9NmVRanHVJVZRQAAAAAAAAAAAAAAAAUY6RO6qXMHNYW5MxdFpm\r
+        TVtPSpAAAAAAAAAAAAAAAAAAAAAFpIYAAFSeW09PU15KU05MaEkAAAAAAAAAAAAAAAAAAEtgAAAAk55j\r
+        ml5Mp2haXUqpW3IAAAAAAAAAAAAAAAAAS0sAAEpJoE5PpZpMZVWnMZyZVQAAAAAAAAAAAAAAAABLMAAA\r
+        cqCeSnppZGZKWzFNaV2ecAAAAAAAAAAAAAAAAEtLAACLVF6iZHROp2eiW1paeWnxAAAAAAAAAAAAAABI\r
+        GmAAAElJSmh6SWNVSk5hZqJ1VXUAAAAAAAAAAAAAlpmjeJAAk12eZXZ5p3WndnZpaUlbZgAAAAAAAAAA\r
+        m2lFRTw8PDZeWV1OlE0xeWlNeVVdZmmZUAAAAAAAjzYKRaysRUVFRa02SXSnYaFNTUxpTFSoTmKTAAAA\r
+        AI8KOkSrrKysrKxErDullF6fVWhiVakLaVWbVZoAAAAAqK2sRKZEqyCsRKummKBZT0xPTHppZVMLqVN4\r
+        cQAAAAA6O6sYGKYYGKsYphgELjejY09KTTZNaWdMNpkAAAAA+zc6XFxcd3d3XASmXEw6PZZiZ6g2ZUw2\r
+        T2QLnwAAAAAdoTtcLcV3pndfLi2jraMtcmNkT05np0xnaXhUAAAAAAD5NKL87xgYd1+eLZ06+1wAVE6o\r
+        p2cKZ2WjjgAAAAAAAAAQo67EcuZuj5jkACue9gAAkTEKeJfbioptRgAAAAAAAACIr0dLVwBXmEeL5Qg4\r
+        AAAAAOnqwNbVb9O5AAAAAAAAAP38RmDae3tfkDqIX0UAAABq3W9v6+2BtssAAAAAAAD9q6v7AFl1dV9f\r
+        mpgIXwAAAABrtG9v7O2BagAAAACSF52fL/AAAAAAAHUAAAAAAAAAAACC1NS+3s/ZzAAAAJ03MjqjdJ0A\r
+        AAC3FIMUtwAAAAAAzr27goK5awAAAAAAWaNgGho3dAAAyr+/v4ODtQAAAMmAAM+2zxMTawAAAAAAAK6z\r
+        kZ1xAAC1un3HVwAAAAAAAAAAawB/ftAAAAAAAABCNUIAAAAAAAAAAF8AAAAAAAAAAEcAAGpGAAAAAAAA\r
+        AEKsEQAAAAAAAAAAlZUAAAAAAAAAAAAAAEgAAAAAAAAAAC3hAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAA\r
+        AAD///////////4BwH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAA\r
+        AAHgAAAB4AAAAeAAAAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9\r
+        /s/j/P/v8///7ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AFEl\r
+        swBJDW0ABEMwAAJHSQAFDwIAXl9ZAHJtagBwfYQAQVNqAAFtAAAAZgAAAz0CABQ/AQAXQwAAGkAAAA8g\r
+        AQAhSJQAM1SRABw6fgAFVk0ADE48AAplaQAgWgIAMYcMACl7CwAOJwMAAAMtABwPNwAhIQAABxACAA9S\r
+        UAAnQUgAAISfACRoDAAxmwQAK4MHABMpAAA8P1kATBMbACQSVwAKL1EADS5CADFMVQABIF4AJ3CGADB2\r
+        kAAzdlEAMnY1ABMnEwBARooAVVq5ABgATwAWBn0ABh56AAULaQBOeKYAT3WSACpNZwAucpgAMHifADFx\r
+        nwA1b5YAMF93AEBalgBvjecADCLAAAkPpQAbJr4AFiLGAAAJjgAzbIEANGh8AClhgAAzfKEAMHWWADJz\r
+        kwAsW3MAQ4mvADyY9AAtgf8AIpr/ACuk/wBdk9UAG0tkACladQAqbI4AK3GUAC5vjwArbpEALWJ7ACdl\r
+        aAAOaoQAJJ20ABx0gQAeTF8AJ116ACViggAgZosAJmeJAChvlAAhZIgAH1ZyAHVmYwAaPVMAJ19+ACto\r
+        hgAmaIwAKGB9ACFdfAAgY4YAGU5qAFtgYQAYQVgAIVx7ACtrjgAtZYIAJmKAACNhgQAmX3wAIUpdAHp6\r
+        ewARN0wAH1R0ACdXcgApXnoAJ2B+ACligQAdSmAAKiopAGZlZQCRkZEAbm9vAFFSUwAWO08AJFRuACFP\r
+        agAhUm0AHD9RAAMKDgA3NjUAWlpaADk5OQA3NzcAPDk3AAYSGQAVNUgAFjFAAA8jLwABAgQAVQAAAP//\r
+        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\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/win/C#/frmDownload.Designer.cs b/win/C#/frmDownload.Designer.cs
new file mode 100644 (file)
index 0000000..5d0f452
--- /dev/null
@@ -0,0 +1,114 @@
+/*  frmDownload.Designer.cs \r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace Handbrake\r
+{\r
+    partial class frmDownload\r
+    {\r
+        /// <summary>\r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows Form Designer generated code\r
+\r
+        /// <summary>\r
+        /// Required method for Designer support - do not modify\r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmDownload));\r
+            this.lblProgress = new System.Windows.Forms.Label();\r
+            this.progress_download = new System.Windows.Forms.ProgressBar();\r
+            this.PictureBox1 = new System.Windows.Forms.PictureBox();\r
+            this.btn_cancel = new System.Windows.Forms.Button();\r
+            ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();\r
+            this.SuspendLayout();\r
+            // \r
+            // lblProgress\r
+            // \r
+            this.lblProgress.AutoSize = true;\r
+            this.lblProgress.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lblProgress.Location = new System.Drawing.Point(93, 38);\r
+            this.lblProgress.Name = "lblProgress";\r
+            this.lblProgress.Size = new System.Drawing.Size(115, 13);\r
+            this.lblProgress.TabIndex = 10;\r
+            this.lblProgress.Text = "Awaiting Download";\r
+            // \r
+            // progress_download\r
+            // \r
+            this.progress_download.Location = new System.Drawing.Point(93, 12);\r
+            this.progress_download.Name = "progress_download";\r
+            this.progress_download.Size = new System.Drawing.Size(318, 23);\r
+            this.progress_download.Style = System.Windows.Forms.ProgressBarStyle.Continuous;\r
+            this.progress_download.TabIndex = 9;\r
+            // \r
+            // PictureBox1\r
+            // \r
+            this.PictureBox1.Image = global::Handbrake.Properties.Resources.logo64;\r
+            this.PictureBox1.InitialImage = null;\r
+            this.PictureBox1.Location = new System.Drawing.Point(12, 12);\r
+            this.PictureBox1.Name = "PictureBox1";\r
+            this.PictureBox1.Size = new System.Drawing.Size(75, 64);\r
+            this.PictureBox1.TabIndex = 25;\r
+            this.PictureBox1.TabStop = false;\r
+            // \r
+            // btn_cancel\r
+            // \r
+            this.btn_cancel.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_cancel.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_cancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_cancel.Location = new System.Drawing.Point(321, 54);\r
+            this.btn_cancel.Name = "btn_cancel";\r
+            this.btn_cancel.Size = new System.Drawing.Size(90, 22);\r
+            this.btn_cancel.TabIndex = 56;\r
+            this.btn_cancel.Text = "Cancel";\r
+            this.btn_cancel.UseVisualStyleBackColor = false;\r
+            this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);\r
+            // \r
+            // frmDownload\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.ClientSize = new System.Drawing.Size(426, 87);\r
+            this.Controls.Add(this.btn_cancel);\r
+            this.Controls.Add(this.PictureBox1);\r
+            this.Controls.Add(this.lblProgress);\r
+            this.Controls.Add(this.progress_download);\r
+            this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.Name = "frmDownload";\r
+            this.ShowIcon = false;\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
+            this.Text = "Downloading Update";\r
+            ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        private System.Windows.Forms.Label lblProgress;\r
+        private System.Windows.Forms.ProgressBar progress_download;\r
+        internal System.Windows.Forms.PictureBox PictureBox1;\r
+        internal System.Windows.Forms.Button btn_cancel;\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmDownload.cs b/win/C#/frmDownload.cs
new file mode 100644 (file)
index 0000000..8fe53ba
--- /dev/null
@@ -0,0 +1,135 @@
+/*  frmDownload.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Windows.Forms;\r
+using System.Net;\r
+using System.IO;\r
+using System.Threading;\r
+using System.Diagnostics;\r
+\r
+namespace Handbrake\r
+{\r
+    public partial class frmDownload : Form\r
+    {\r
+        private Thread downloadThread;\r
+        private Stream responceStream;\r
+        private Stream loacalStream;\r
+        private HttpWebRequest webRequest;\r
+        private HttpWebResponse webResponse;\r
+        private static int progress;\r
+        private delegate void UpdateProgessCallback(Int64 BytesRead, Int64 TotalBytes);\r
+        private delegate void DownloadCompleteCallback();\r
+        private delegate void DownloadFailedCallback();\r
+\r
+        private string file;\r
+\r
+        public frmDownload(string filename)\r
+        {\r
+            InitializeComponent();\r
+\r
+            file = filename;\r
+            downloadThread = new Thread(Download);\r
+            downloadThread.Start();\r
+        }\r
+\r
+        private void Download()\r
+        {\r
+            string tempPath = Path.Combine(Path.GetTempPath(), "handbrake-setup.exe");\r
+            string hbUpdate = file;\r
+            WebClient wcDownload = new WebClient();\r
+\r
+            try\r
+            {\r
+                if (File.Exists(tempPath))\r
+                    File.Delete(tempPath);\r
+\r
+                webRequest = (HttpWebRequest)WebRequest.Create(hbUpdate);\r
+                webRequest.Credentials = CredentialCache.DefaultCredentials;\r
+                webResponse = (HttpWebResponse)webRequest.GetResponse();\r
+                Int64 fileSize = webResponse.ContentLength;\r
+\r
+                responceStream = wcDownload.OpenRead(hbUpdate);\r
+                loacalStream = new FileStream(tempPath, FileMode.Create, FileAccess.Write, FileShare.None);\r
+\r
+                int bytesSize = 0;\r
+                byte[] downBuffer = new byte[2048];\r
+\r
+                long flength = 0;\r
+                while ((bytesSize = responceStream.Read(downBuffer, 0, downBuffer.Length)) > 0)\r
+                {\r
+                    loacalStream.Write(downBuffer, 0, bytesSize);\r
+                    flength = loacalStream.Length;\r
+                    this.Invoke(new UpdateProgessCallback(this.UpdateProgress), new object[] { loacalStream.Length, fileSize });\r
+                }\r
+\r
+                responceStream.Close();\r
+                loacalStream.Close();\r
+\r
+                if (flength != fileSize)\r
+                    this.Invoke(new DownloadFailedCallback(this.downloadFailed));\r
+                else\r
+                    this.Invoke(new DownloadCompleteCallback(this.downloadComplete));\r
+            }\r
+            catch (Exception)\r
+            {\r
+                // Do Nothing \r
+            }\r
+        }\r
+\r
+        private void UpdateProgress(Int64 BytesRead, Int64 TotalBytes)\r
+        {\r
+            try\r
+            {\r
+                long p = (BytesRead * 100) / TotalBytes;\r
+                progress = int.Parse(p.ToString());\r
+                progress_download.Value = progress;\r
+                lblProgress.Text = (BytesRead / 1024) + "k of " + (TotalBytes / 1024) + "k ";\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("Integer Convertion Error On Download \n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+            }\r
+        }\r
+\r
+        private void downloadComplete()\r
+        {\r
+            lblProgress.Text = "Download Complete";\r
+            btn_cancel.Text = "Close";\r
+\r
+            string tempPath = Path.Combine(Path.GetTempPath(), "handbrake-setup.exe");\r
+\r
+            Process startInstall = Process.Start(tempPath);\r
+            this.Close();\r
+            Application.Exit();\r
+        }\r
+\r
+        private void downloadFailed()\r
+        {\r
+            lblProgress.Text = "Download Failed";\r
+            btn_cancel.Text = "Close";\r
+        }\r
+\r
+        private void btn_cancel_Click(object sender, EventArgs e)\r
+        {\r
+            try\r
+            {\r
+                webResponse.Close();\r
+                responceStream.Close();\r
+                loacalStream.Close();\r
+                downloadThread.Abort();\r
+                progress_download.Value = 0;\r
+                lblProgress.Text = "Download Stopped";\r
+                this.Close();\r
+            }\r
+            catch (Exception)\r
+            {\r
+                // Do nothing\r
+            }\r
+        }\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmDownload.resx b/win/C#/frmDownload.resx
new file mode 100644 (file)
index 0000000..37f9290
--- /dev/null
@@ -0,0 +1,500 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
+        IACoJQAAHh0AACAgAAABACAAqBAAAMZCAAAQEAAAAQAgAGgEAABuUwAAKAAAADAAAABgAAAAAQAIAAAA\r
+        AACACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAD///8A/wAAAAD/AAAAAIAAgICAAICAAAAAgAAAAICAAIAA\r
+        AACAAIAAgP//ACAgIADg4OAAIAAAAAAgAABg4CAAQOBAAGBgYAAgYAAAQKDgAAAAIABAwCAAIEAAAECg\r
+        AABg4AAAIGCAAECAoABgoMAAYECgAGDAAABgICAAoKCgAOAAAAAgIAAAAGAAAEDgAABgAAAAIAAgAEAg\r
+        IAAgQGAAIIDAAADg4ABgAGAAgOD/ACCA/wCgAAAAQGAAACCAAAAAoAAAYCAAAAAgIAAgIEAAYGBAAEBg\r
+        YAAAIIAAAGCAAGCAgABAAKAAAICgAACgoACAoKAAIKDAAECgwAAAAOAAQADgAADA4ABgwOAAIODgAADg\r
+        AADA4AAAAEAgAKDgIAAA4EAAYABAAABAYACAAGAAgCBgAGAggABA4KAAAECgAGBAwADgIOAAIEDgAACA\r
+        4ADgoOAAYAD/ACBg/wAAoP8A4KD/AGD//wAICAgACAAAAAgIAAAAAJgACAAIAAAACAAACAAACBAQACA4\r
+        SAAgYIgAOHCIADhw+AAIGAAAEBAIACg4QAAwYHgAAACIACA4QAAoQFAAKFh4AHh4eAAwaIAAIGiQADh4\r
+        mAAACAgAEAgIABAYGAAgGBgASEhIABhIYAAoUGAAIFBoAChQaAAoWGgAMFhoAChoiAAweJgAKHioACiA\r
+        sAAIEAAACAgQAAgQGAAQGCAAGCAoABhAUAAoSFgAaGhoABhQcAAgWHAAKFhwADhgcAAYWIAAOGiAAIiI\r
+        iAAoaJAAKHCYACh4oAA4gKAAMICoAKioqAAwmNAAEDgAAChYAAAweAAAMIgQAAgYGAAYGBgACBggABAg\r
+        KAAgKCgAKCgoACAwOAA4ODgAKDhIADBQWABYWFgAGEhoADBYcAAYUHgAGFh4ACBYeAAoYHgAKGCAABhY\r
+        iAAgaJgAKICoACiIuAC4uLgAMJDIADiw6AAQCAAAABgAAAggAAAAOAAAMGgAABgQCAAwgAgAEAgQABgQ\r
+        EAAwmBgAGBggAAgYKAAAICgACCAoABgoMAAgKDAAGDBAABg4QAAYOFAAEEBYACBIWAAwSFgAOEhYACBI\r
+        YAAQSGgAOFhoABhIcAAoUHAAQFhwACBgeABAaIAAIGiIADBwiABAcIgAGGCQADhwkABYeJAACBCgAChw\r
+        oAAweKAAKIC4ACiQwAAwmMgAOKjgADBg6ABAsOgAELD4AAgoAAAIMAAAGDAAABhIAAAYUAAAKHgAAACY\r
+        AAAwmAAAAMgAABAACAAIEAgAEBgIABA4CAAYOAgAMHgIABAYEAAYGBAAIBgQACh4EAAwmBAAEBAYABgg\r
+        GAAoIBgAGCAgAAgIKAAgICgAGAgwAAggMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAn2KfdXV1XAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoo2+QIJCJb28Sd3em\r
+        nQAAAFuKqW0aqsd6Y5/DXAAAAAAAAAAAAAAAAAAAAAAAAAB3kAWQkG8SpqaJb28gsncAbIeSroyii21x\r
+        kczIwwAAAAAAAAAAAAAAAAAAAAAAAABoo4mJkLKylm9vb5BvdwwAcZO/fox7z2NjqsOss2MAWwAAAAAA\r
+        AAAAAAAAAAAAAAAAvaGmo5ANlgUFEiBvo1xjq3p6qMTJroBkxXt9cGzFnAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAL2ylgV3vQAAAGOvxMXXq41uh6yVjxqp1YhknwAAAAAAAAAAAAAAAAAAAAAAAAAAAABvsolbAAAA\r
+        +5KneouS2Kx4pZF9ndywsXuvkocAAAAAAAAAAAAAAAAAAAAAAAAAAAB3sncAAAAAdayHca95bH9+cKmv\r
+        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\r
+        eAAoaIgAMICoAChggAAACAgAEAgIABgYGAAoUGgAKFhwAChwkAAIGAgACBAQABAgKAAQKDgAIEhgACBQ\r
+        aAAAAHgAIFh4AChgeAAAeHgAeHh4AChogAAwaIAAIGCIADBoiAA4cIgAIGiQADhwkAAoeKgAKICwAAgQ\r
+        AAAIIAAACAAIABhICAAICBAAMIgQABAYGAAYICgAGCgwAEhISAAwSFgAGFBoAChYaAAICHgAOGiAACh4\r
+        oAAweKAAGAAAAAAIAAAAGAAACBgAABAoAAAYUAAAKGAAAChoAAAAeAAAAAAIAAgQCAAQEAgAGP8IACAY\r
+        EAAIEBgAMJAYABggIAAAACgACBAoACgwMAAAKDgAEDA4ADg4OAAoOEAAGDhIACA4SAAAQEgAMEBIAEhQ\r
+        UAAISFgAIEhYAChIWAAwUFgAIEhoAEhYaAAYUHAAMFhwABhYeAAoWHgAIFiAAEhwgACIiIgAGGCQAAAA\r
+        mAAgcJgAKHCYADB4mACYmJgAACjIAEBw+ACo//8ASAAAAFgAAABoAAAAeAAAABAIAABICAAAGCgAAAA4\r
+        AAAYOAAACEAAAAhIAAAoUAAAAFgAACBYAAAAaAAAIGgAADB4AAAAiAAAMIgAAGiIAACAmAAAGAAIADAI\r
+        CABgCAgAEBgIAAggCAAQIAgAECgIAAgwCAAQMAgAODAIABA4CAAYOAgAEEAIABhACAAgQAgAIFAIAChg\r
+        CAAwgAgAMJAIADCoCAAACBAAGBAQABggEAAoIBAAKGAQAChoEAAgeBAAKHgQAEh4EAAY+BAACAAYAAAI\r
+        GAAICBgAEAgYAAAQGAAQEBgAABgYAAgYGAAYMBgAKHgYADCYGAAwoBgAMKgYAGj/GABgCCAACBAgAAgY\r
+        IAAQGCAAGBggACggIABIcCAACAAoABAAKAAAECgAEBAoAAggKAAACDAASAgwAAgQMAAIKDAAECgwAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAARxBSUlJHAAAAAABYWFlY8kYAAAAAAAAAAAAAAAAAAJFgqqRLSzAwBXMAkKJbW1pdSVmE\r
+        AAAAAAAAAAAAAAAAEJdLqhpgYKQFkf9NmVRanHVJVZRQAAAAAAAAAAAAAAAAUY6RO6qXMHNYW5MxdFpm\r
+        TVtPSpAAAAAAAAAAAAAAAAAAAAAFpIYAAFSeW09PU15KU05MaEkAAAAAAAAAAAAAAAAAAEtgAAAAk55j\r
+        ml5Mp2haXUqpW3IAAAAAAAAAAAAAAAAAS0sAAEpJoE5PpZpMZVWnMZyZVQAAAAAAAAAAAAAAAABLMAAA\r
+        cqCeSnppZGZKWzFNaV2ecAAAAAAAAAAAAAAAAEtLAACLVF6iZHROp2eiW1paeWnxAAAAAAAAAAAAAABI\r
+        GmAAAElJSmh6SWNVSk5hZqJ1VXUAAAAAAAAAAAAAlpmjeJAAk12eZXZ5p3WndnZpaUlbZgAAAAAAAAAA\r
+        m2lFRTw8PDZeWV1OlE0xeWlNeVVdZmmZUAAAAAAAjzYKRaysRUVFRa02SXSnYaFNTUxpTFSoTmKTAAAA\r
+        AI8KOkSrrKysrKxErDullF6fVWhiVakLaVWbVZoAAAAAqK2sRKZEqyCsRKummKBZT0xPTHppZVMLqVN4\r
+        cQAAAAA6O6sYGKYYGKsYphgELjejY09KTTZNaWdMNpkAAAAA+zc6XFxcd3d3XASmXEw6PZZiZ6g2ZUw2\r
+        T2QLnwAAAAAdoTtcLcV3pndfLi2jraMtcmNkT05np0xnaXhUAAAAAAD5NKL87xgYd1+eLZ06+1wAVE6o\r
+        p2cKZ2WjjgAAAAAAAAAQo67EcuZuj5jkACue9gAAkTEKeJfbioptRgAAAAAAAACIr0dLVwBXmEeL5Qg4\r
+        AAAAAOnqwNbVb9O5AAAAAAAAAP38RmDae3tfkDqIX0UAAABq3W9v6+2BtssAAAAAAAD9q6v7AFl1dV9f\r
+        mpgIXwAAAABrtG9v7O2BagAAAACSF52fL/AAAAAAAHUAAAAAAAAAAACC1NS+3s/ZzAAAAJ03MjqjdJ0A\r
+        AAC3FIMUtwAAAAAAzr27goK5awAAAAAAWaNgGho3dAAAyr+/v4ODtQAAAMmAAM+2zxMTawAAAAAAAK6z\r
+        kZ1xAAC1un3HVwAAAAAAAAAAawB/ftAAAAAAAABCNUIAAAAAAAAAAF8AAAAAAAAAAEcAAGpGAAAAAAAA\r
+        AEKsEQAAAAAAAAAAlZUAAAAAAAAAAAAAAEgAAAAAAAAAAC3hAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAA\r
+        AAD///////////4BwH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAA\r
+        AAHgAAAB4AAAAeAAAAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9\r
+        /s/j/P/v8///7ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AFEl\r
+        swBJDW0ABEMwAAJHSQAFDwIAXl9ZAHJtagBwfYQAQVNqAAFtAAAAZgAAAz0CABQ/AQAXQwAAGkAAAA8g\r
+        AQAhSJQAM1SRABw6fgAFVk0ADE48AAplaQAgWgIAMYcMACl7CwAOJwMAAAMtABwPNwAhIQAABxACAA9S\r
+        UAAnQUgAAISfACRoDAAxmwQAK4MHABMpAAA8P1kATBMbACQSVwAKL1EADS5CADFMVQABIF4AJ3CGADB2\r
+        kAAzdlEAMnY1ABMnEwBARooAVVq5ABgATwAWBn0ABh56AAULaQBOeKYAT3WSACpNZwAucpgAMHifADFx\r
+        nwA1b5YAMF93AEBalgBvjecADCLAAAkPpQAbJr4AFiLGAAAJjgAzbIEANGh8AClhgAAzfKEAMHWWADJz\r
+        kwAsW3MAQ4mvADyY9AAtgf8AIpr/ACuk/wBdk9UAG0tkACladQAqbI4AK3GUAC5vjwArbpEALWJ7ACdl\r
+        aAAOaoQAJJ20ABx0gQAeTF8AJ116ACViggAgZosAJmeJAChvlAAhZIgAH1ZyAHVmYwAaPVMAJ19+ACto\r
+        hgAmaIwAKGB9ACFdfAAgY4YAGU5qAFtgYQAYQVgAIVx7ACtrjgAtZYIAJmKAACNhgQAmX3wAIUpdAHp6\r
+        ewARN0wAH1R0ACdXcgApXnoAJ2B+ACligQAdSmAAKiopAGZlZQCRkZEAbm9vAFFSUwAWO08AJFRuACFP\r
+        agAhUm0AHD9RAAMKDgA3NjUAWlpaADk5OQA3NzcAPDk3AAYSGQAVNUgAFjFAAA8jLwABAgQAVQAAAP//\r
+        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\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
new file mode 100644 (file)
index 0000000..28d111e
--- /dev/null
@@ -0,0 +1,3483 @@
+/*  frmMain.Designer.cs \r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace Handbrake\r
+{\r
+    partial class frmMain\r
+    {\r
+        /// <summary>\r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows Form Designer generated code\r
+\r
+        /// <summary>\r
+        /// Required method for Designer support - do not modify\r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            this.components = new System.ComponentModel.Container();\r
+            System.Windows.Forms.Label Label38;\r
+            System.Windows.Forms.ContextMenuStrip notifyIconMenu;\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));\r
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();\r
+            this.btn_restore = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.DVD_Save = new System.Windows.Forms.SaveFileDialog();\r
+            this.File_Save = new System.Windows.Forms.SaveFileDialog();\r
+            this.ToolTip = new System.Windows.Forms.ToolTip(this.components);\r
+            this.drop_chapterFinish = new System.Windows.Forms.ComboBox();\r
+            this.drop_chapterStart = new System.Windows.Forms.ComboBox();\r
+            this.drp_dvdtitle = new System.Windows.Forms.ComboBox();\r
+            this.text_source = new System.Windows.Forms.TextBox();\r
+            this.text_destination = new System.Windows.Forms.TextBox();\r
+            this.drp_videoEncoder = new System.Windows.Forms.ComboBox();\r
+            this.drp_audbit_1 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audsr_1 = new System.Windows.Forms.ComboBox();\r
+            this.check_largeFile = new System.Windows.Forms.CheckBox();\r
+            this.check_turbo = new System.Windows.Forms.CheckBox();\r
+            this.drp_videoFramerate = new System.Windows.Forms.ComboBox();\r
+            this.slider_videoQuality = new System.Windows.Forms.TrackBar();\r
+            this.text_filesize = new System.Windows.Forms.TextBox();\r
+            this.text_bitrate = new System.Windows.Forms.TextBox();\r
+            this.drp_subtitle = new System.Windows.Forms.ComboBox();\r
+            this.btn_setDefault = new System.Windows.Forms.Button();\r
+            this.drp_audmix_1 = new System.Windows.Forms.ComboBox();\r
+            this.text_height = new System.Windows.Forms.TextBox();\r
+            this.text_width = new System.Windows.Forms.TextBox();\r
+            this.check_optimiseMP4 = new System.Windows.Forms.CheckBox();\r
+            this.check_iPodAtom = new System.Windows.Forms.CheckBox();\r
+            this.data_chpt = new System.Windows.Forms.DataGridView();\r
+            this.number = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
+            this.name = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
+            this.btn_addPreset = new System.Windows.Forms.Button();\r
+            this.btn_removePreset = new System.Windows.Forms.Button();\r
+            this.drp_audmix_2 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audenc_1 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audenc_2 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audbit_2 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audsr_2 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audsr_3 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audbit_3 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audenc_3 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audmix_3 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audsr_4 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audbit_4 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audenc_4 = new System.Windows.Forms.ComboBox();\r
+            this.drp_audmix_4 = new System.Windows.Forms.ComboBox();\r
+            this.drop_format = new System.Windows.Forms.ComboBox();\r
+            this.check_customCrop = new System.Windows.Forms.RadioButton();\r
+            this.check_autoCrop = new System.Windows.Forms.RadioButton();\r
+            this.check_Cabac = new System.Windows.Forms.CheckBox();\r
+            this.check_noDCTDecimate = new System.Windows.Forms.CheckBox();\r
+            this.check_noFastPSkip = new System.Windows.Forms.CheckBox();\r
+            this.drop_trellis = new System.Windows.Forms.ComboBox();\r
+            this.drop_deblockBeta = new System.Windows.Forms.ComboBox();\r
+            this.drop_deblockAlpha = new System.Windows.Forms.ComboBox();\r
+            this.check_8x8DCT = new System.Windows.Forms.CheckBox();\r
+            this.drop_analysis = new System.Windows.Forms.ComboBox();\r
+            this.drop_subpixelMotionEstimation = new System.Windows.Forms.ComboBox();\r
+            this.drop_MotionEstimationRange = new System.Windows.Forms.ComboBox();\r
+            this.drop_MotionEstimationMethod = new System.Windows.Forms.ComboBox();\r
+            this.check_pyrmidalBFrames = new System.Windows.Forms.CheckBox();\r
+            this.check_weightedBFrames = new System.Windows.Forms.CheckBox();\r
+            this.drop_directPrediction = new System.Windows.Forms.ComboBox();\r
+            this.drop_bFrames = new System.Windows.Forms.ComboBox();\r
+            this.drop_refFrames = new System.Windows.Forms.ComboBox();\r
+            this.check_mixedReferences = new System.Windows.Forms.CheckBox();\r
+            this.lbl_src_res = new System.Windows.Forms.Label();\r
+            this.lbl_duration = new System.Windows.Forms.Label();\r
+            this.label_duration = new System.Windows.Forms.Label();\r
+            this.label7 = new System.Windows.Forms.Label();\r
+            this.DVD_Open = new System.Windows.Forms.FolderBrowserDialog();\r
+            this.File_Open = new System.Windows.Forms.OpenFileDialog();\r
+            this.ISO_Open = new System.Windows.Forms.OpenFileDialog();\r
+            this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_exit = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_open3 = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.ToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_encode = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_encodeLog = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.ToolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.mnu_options = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.PresetsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_presetReset = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_delete_preset = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.btn_new_preset = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_SelectDefault = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.HelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_user_guide = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_handbrake_home = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_handbrake_forums = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.ToolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.mnu_UpdateCheck = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.mnu_about = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.frmMainMenu = new System.Windows.Forms.MenuStrip();\r
+            this.GroupBox1 = new System.Windows.Forms.GroupBox();\r
+            this.Label13 = new System.Windows.Forms.Label();\r
+            this.Label17 = new System.Windows.Forms.Label();\r
+            this.Label9 = new System.Windows.Forms.Label();\r
+            this.Label10 = new System.Windows.Forms.Label();\r
+            this.groupBox_output = new System.Windows.Forms.GroupBox();\r
+            this.label5 = new System.Windows.Forms.Label();\r
+            this.Label47 = new System.Windows.Forms.Label();\r
+            this.Label3 = new System.Windows.Forms.Label();\r
+            this.TabPage2 = new System.Windows.Forms.TabPage();\r
+            this.lbl_drc4 = new System.Windows.Forms.Label();\r
+            this.lbl_drc3 = new System.Windows.Forms.Label();\r
+            this.lbl_drc2 = new System.Windows.Forms.Label();\r
+            this.lbl_drc1 = new System.Windows.Forms.Label();\r
+            this.trackBar4 = new System.Windows.Forms.TrackBar();\r
+            this.drp_track4Audio = new System.Windows.Forms.ComboBox();\r
+            this.lbl_t4 = new System.Windows.Forms.Label();\r
+            this.trackBar3 = new System.Windows.Forms.TrackBar();\r
+            this.drp_track3Audio = new System.Windows.Forms.ComboBox();\r
+            this.lbl_t3 = new System.Windows.Forms.Label();\r
+            this.trackBar2 = new System.Windows.Forms.TrackBar();\r
+            this.label16 = new System.Windows.Forms.Label();\r
+            this.trackBar1 = new System.Windows.Forms.TrackBar();\r
+            this.groupBox5 = new System.Windows.Forms.GroupBox();\r
+            this.groupBox3 = new System.Windows.Forms.GroupBox();\r
+            this.label68 = new System.Windows.Forms.Label();\r
+            this.label67 = new System.Windows.Forms.Label();\r
+            this.label66 = new System.Windows.Forms.Label();\r
+            this.label65 = new System.Windows.Forms.Label();\r
+            this.label14 = new System.Windows.Forms.Label();\r
+            this.check_forced = new System.Windows.Forms.CheckBox();\r
+            this.drp_track2Audio = new System.Windows.Forms.ComboBox();\r
+            this.label28 = new System.Windows.Forms.Label();\r
+            this.label27 = new System.Windows.Forms.Label();\r
+            this.Label19 = new System.Windows.Forms.Label();\r
+            this.Label20 = new System.Windows.Forms.Label();\r
+            this.drp_track1Audio = new System.Windows.Forms.ComboBox();\r
+            this.Label32 = new System.Windows.Forms.Label();\r
+            this.TabPage3 = new System.Windows.Forms.TabPage();\r
+            this.label25 = new System.Windows.Forms.Label();\r
+            this.check_grayscale = new System.Windows.Forms.CheckBox();\r
+            this.Label22 = new System.Windows.Forms.Label();\r
+            this.check_2PassEncode = new System.Windows.Forms.CheckBox();\r
+            this.Label2 = new System.Windows.Forms.Label();\r
+            this.Label42 = new System.Windows.Forms.Label();\r
+            this.SliderValue = new System.Windows.Forms.Label();\r
+            this.Label46 = new System.Windows.Forms.Label();\r
+            this.Label40 = new System.Windows.Forms.Label();\r
+            this.TabPage1 = new System.Windows.Forms.TabPage();\r
+            this.slider_deblock = new System.Windows.Forms.TrackBar();\r
+            this.label8 = new System.Windows.Forms.Label();\r
+            this.lbl_deblockVal = new System.Windows.Forms.Label();\r
+            this.check_decomb = new System.Windows.Forms.CheckBox();\r
+            this.label6 = new System.Windows.Forms.Label();\r
+            this.drp_anamorphic = new System.Windows.Forms.ComboBox();\r
+            this.text_bottom = new System.Windows.Forms.NumericUpDown();\r
+            this.text_top = new System.Windows.Forms.NumericUpDown();\r
+            this.text_left = new System.Windows.Forms.NumericUpDown();\r
+            this.text_right = new System.Windows.Forms.NumericUpDown();\r
+            this.label26 = new System.Windows.Forms.Label();\r
+            this.Label56 = new System.Windows.Forms.Label();\r
+            this.lbl_Aspect = new System.Windows.Forms.Label();\r
+            this.Label91 = new System.Windows.Forms.Label();\r
+            this.Label55 = new System.Windows.Forms.Label();\r
+            this.label24 = new System.Windows.Forms.Label();\r
+            this.drp_deNoise = new System.Windows.Forms.ComboBox();\r
+            this.label11 = new System.Windows.Forms.Label();\r
+            this.check_detelecine = new System.Windows.Forms.CheckBox();\r
+            this.label4 = new System.Windows.Forms.Label();\r
+            this.drp_deInterlace_option = new System.Windows.Forms.ComboBox();\r
+            this.Label1 = new System.Windows.Forms.Label();\r
+            this.Label53 = new System.Windows.Forms.Label();\r
+            this.Label52 = new System.Windows.Forms.Label();\r
+            this.Label51 = new System.Windows.Forms.Label();\r
+            this.Label15 = new System.Windows.Forms.Label();\r
+            this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();\r
+            this.advancedOptions = new System.Windows.Forms.TabControl();\r
+            this.tab_chapters = new System.Windows.Forms.TabPage();\r
+            this.label31 = new System.Windows.Forms.Label();\r
+            this.h264Tab = new System.Windows.Forms.TabPage();\r
+            this.label43 = new System.Windows.Forms.Label();\r
+            this.btn_reset = new System.Windows.Forms.Button();\r
+            this.rtf_x264Query = new System.Windows.Forms.RichTextBox();\r
+            this.lbl_trellis = new System.Windows.Forms.Label();\r
+            this.label41 = new System.Windows.Forms.Label();\r
+            this.panel3 = new System.Windows.Forms.Panel();\r
+            this.panel1 = new System.Windows.Forms.Panel();\r
+            this.panel2 = new System.Windows.Forms.Panel();\r
+            this.label45 = new System.Windows.Forms.Label();\r
+            this.label48 = new System.Windows.Forms.Label();\r
+            this.label49 = new System.Windows.Forms.Label();\r
+            this.label54 = new System.Windows.Forms.Label();\r
+            this.lbl_direct_prediction = new System.Windows.Forms.Label();\r
+            this.label62 = new System.Windows.Forms.Label();\r
+            this.label64 = new System.Windows.Forms.Label();\r
+            this.tabPage4 = new System.Windows.Forms.TabPage();\r
+            this.btn_clear = new System.Windows.Forms.Button();\r
+            this.label34 = new System.Windows.Forms.Label();\r
+            this.btn_generate_Query = new System.Windows.Forms.Button();\r
+            this.label33 = new System.Windows.Forms.Label();\r
+            this.rtf_query = new System.Windows.Forms.RichTextBox();\r
+            this.groupBox_dest = new System.Windows.Forms.GroupBox();\r
+            this.btn_destBrowse = new System.Windows.Forms.Button();\r
+            this.groupBox2 = new System.Windows.Forms.GroupBox();\r
+            this.splitContainer1 = new System.Windows.Forms.SplitContainer();\r
+            this.treeView_presets = new System.Windows.Forms.TreeView();\r
+            this.presets_menu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
+            this.pmnu_expandAll = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.pmnu_collapse = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.sep1 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.pmnu_delete = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStrip1 = new System.Windows.Forms.ToolStrip();\r
+            this.btn_source = new System.Windows.Forms.ToolStripDropDownButton();\r
+            this.btn_file_source = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.btn_dvd_source = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.mnu_dvd_drive = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.btn_start = new System.Windows.Forms.ToolStripButton();\r
+            this.btn_add2Queue = new System.Windows.Forms.ToolStripButton();\r
+            this.btn_showQueue = new System.Windows.Forms.ToolStripButton();\r
+            this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.btn_ActivityWindow = new System.Windows.Forms.ToolStripButton();\r
+            this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.btn_minimize = new System.Windows.Forms.ToolStripButton();\r
+            this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);\r
+            this.StatusStrip = new System.Windows.Forms.StatusStrip();\r
+            this.lbl_encode = new System.Windows.Forms.ToolStripStatusLabel();\r
+            Label38 = new System.Windows.Forms.Label();\r
+            notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
+            notifyIconMenu.SuspendLayout();\r
+            ((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.data_chpt)).BeginInit();\r
+            this.frmMainMenu.SuspendLayout();\r
+            this.GroupBox1.SuspendLayout();\r
+            this.groupBox_output.SuspendLayout();\r
+            this.TabPage2.SuspendLayout();\r
+            ((System.ComponentModel.ISupportInitialize)(this.trackBar4)).BeginInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.trackBar3)).BeginInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.trackBar2)).BeginInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();\r
+            this.TabPage3.SuspendLayout();\r
+            this.TabPage1.SuspendLayout();\r
+            ((System.ComponentModel.ISupportInitialize)(this.slider_deblock)).BeginInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.text_bottom)).BeginInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.text_top)).BeginInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.text_left)).BeginInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.text_right)).BeginInit();\r
+            this.advancedOptions.SuspendLayout();\r
+            this.tab_chapters.SuspendLayout();\r
+            this.h264Tab.SuspendLayout();\r
+            this.tabPage4.SuspendLayout();\r
+            this.groupBox_dest.SuspendLayout();\r
+            this.groupBox2.SuspendLayout();\r
+            this.splitContainer1.Panel1.SuspendLayout();\r
+            this.splitContainer1.Panel2.SuspendLayout();\r
+            this.splitContainer1.SuspendLayout();\r
+            this.presets_menu.SuspendLayout();\r
+            this.toolStrip1.SuspendLayout();\r
+            this.StatusStrip.SuspendLayout();\r
+            this.SuspendLayout();\r
+            // \r
+            // Label38\r
+            // \r
+            Label38.AutoSize = true;\r
+            Label38.BackColor = System.Drawing.Color.Transparent;\r
+            Label38.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            Label38.Location = new System.Drawing.Point(334, 38);\r
+            Label38.Name = "Label38";\r
+            Label38.Size = new System.Drawing.Size(108, 13);\r
+            Label38.TabIndex = 11;\r
+            Label38.Text = "Target Size (MB):";\r
+            // \r
+            // notifyIconMenu\r
+            // \r
+            notifyIconMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.btn_restore});\r
+            notifyIconMenu.Name = "notifyIconMenu";\r
+            notifyIconMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;\r
+            notifyIconMenu.Size = new System.Drawing.Size(129, 26);\r
+            // \r
+            // btn_restore\r
+            // \r
+            this.btn_restore.Name = "btn_restore";\r
+            this.btn_restore.Size = new System.Drawing.Size(128, 22);\r
+            this.btn_restore.Text = "Restore";\r
+            this.btn_restore.Click += new System.EventHandler(this.btn_restore_Click);\r
+            // \r
+            // DVD_Save\r
+            // \r
+            this.DVD_Save.Filter = "mp4|*.mp4|m4v|*.m4v|avi|*.avi|ogm|*.ogm|mkv|*.mkv";\r
+            // \r
+            // File_Save\r
+            // \r
+            this.File_Save.DefaultExt = "hb";\r
+            this.File_Save.Filter = "hb|*.hb";\r
+            // \r
+            // ToolTip\r
+            // \r
+            this.ToolTip.Active = false;\r
+            this.ToolTip.AutomaticDelay = 1000;\r
+            this.ToolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;\r
+            this.ToolTip.ToolTipTitle = "Tooltip";\r
+            // \r
+            // drop_chapterFinish\r
+            // \r
+            this.drop_chapterFinish.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drop_chapterFinish.FormattingEnabled = true;\r
+            this.drop_chapterFinish.Location = new System.Drawing.Point(427, 52);\r
+            this.drop_chapterFinish.Name = "drop_chapterFinish";\r
+            this.drop_chapterFinish.Size = new System.Drawing.Size(69, 21);\r
+            this.drop_chapterFinish.TabIndex = 10;\r
+            this.drop_chapterFinish.Text = "Auto";\r
+            this.ToolTip.SetToolTip(this.drop_chapterFinish, "Select the chapter range you would like to enocde. (default: All Chapters)");\r
+            this.drop_chapterFinish.SelectedIndexChanged += new System.EventHandler(this.drop_chapterFinish_SelectedIndexChanged);\r
+            // \r
+            // drop_chapterStart\r
+            // \r
+            this.drop_chapterStart.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drop_chapterStart.FormattingEnabled = true;\r
+            this.drop_chapterStart.Location = new System.Drawing.Point(295, 52);\r
+            this.drop_chapterStart.Name = "drop_chapterStart";\r
+            this.drop_chapterStart.Size = new System.Drawing.Size(69, 21);\r
+            this.drop_chapterStart.TabIndex = 9;\r
+            this.drop_chapterStart.Text = "Auto";\r
+            this.ToolTip.SetToolTip(this.drop_chapterStart, "Select the chapter range you would like to enocde. (default: All Chapters)");\r
+            this.drop_chapterStart.SelectedIndexChanged += new System.EventHandler(this.drop_chapterStart_SelectedIndexChanged);\r
+            // \r
+            // drp_dvdtitle\r
+            // \r
+            this.drp_dvdtitle.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_dvdtitle.FormattingEnabled = true;\r
+            this.drp_dvdtitle.Items.AddRange(new object[] {\r
+            "Automatic"});\r
+            this.drp_dvdtitle.Location = new System.Drawing.Point(99, 52);\r
+            this.drp_dvdtitle.Name = "drp_dvdtitle";\r
+            this.drp_dvdtitle.Size = new System.Drawing.Size(119, 21);\r
+            this.drp_dvdtitle.TabIndex = 7;\r
+            this.drp_dvdtitle.Text = "Automatic";\r
+            this.ToolTip.SetToolTip(this.drp_dvdtitle, "Select the title you wish to encode.\r\nThe longest title is selected by default af" +\r
+                    "ter you have scanned a source.");\r
+            this.drp_dvdtitle.SelectedIndexChanged += new System.EventHandler(this.drp_dvdtitle_SelectedIndexChanged);\r
+            this.drp_dvdtitle.Click += new System.EventHandler(this.drp_dvdtitle_Click);\r
+            // \r
+            // text_source\r
+            // \r
+            this.text_source.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.text_source.Location = new System.Drawing.Point(99, 19);\r
+            this.text_source.Name = "text_source";\r
+            this.text_source.Size = new System.Drawing.Size(584, 21);\r
+            this.text_source.TabIndex = 1;\r
+            this.text_source.Text = "Click \'Source\' to continue";\r
+            this.ToolTip.SetToolTip(this.text_source, "Location of the source input file, folder or dvd.");\r
+            // \r
+            // text_destination\r
+            // \r
+            this.text_destination.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.text_destination.Location = new System.Drawing.Point(99, 19);\r
+            this.text_destination.Name = "text_destination";\r
+            this.text_destination.Size = new System.Drawing.Size(503, 21);\r
+            this.text_destination.TabIndex = 1;\r
+            this.ToolTip.SetToolTip(this.text_destination, "Location where the encoded file will be saved.");\r
+            this.text_destination.TextChanged += new System.EventHandler(this.text_destination_TextChanged);\r
+            // \r
+            // drp_videoEncoder\r
+            // \r
+            this.drp_videoEncoder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drp_videoEncoder.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_videoEncoder.FormattingEnabled = true;\r
+            this.drp_videoEncoder.Items.AddRange(new object[] {\r
+            "MPEG-4 (FFmpeg)",\r
+            "MPEG-4 (XviD)",\r
+            "H.264 (x264)",\r
+            "VP3 (Theora)"});\r
+            this.drp_videoEncoder.Location = new System.Drawing.Point(125, 35);\r
+            this.drp_videoEncoder.Name = "drp_videoEncoder";\r
+            this.drp_videoEncoder.Size = new System.Drawing.Size(126, 21);\r
+            this.drp_videoEncoder.TabIndex = 1;\r
+            this.ToolTip.SetToolTip(this.drp_videoEncoder, "Select a video encoder");\r
+            this.drp_videoEncoder.SelectedIndexChanged += new System.EventHandler(this.drp_videoEncoder_SelectedIndexChanged);\r
+            // \r
+            // drp_audbit_1\r
+            // \r
+            this.drp_audbit_1.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audbit_1.FormattingEnabled = true;\r
+            this.drp_audbit_1.Items.AddRange(new object[] {\r
+            "32",\r
+            "40",\r
+            "48",\r
+            "56",\r
+            "64",\r
+            "80",\r
+            "86",\r
+            "112",\r
+            "128",\r
+            "160"});\r
+            this.drp_audbit_1.Location = new System.Drawing.Point(546, 53);\r
+            this.drp_audbit_1.Name = "drp_audbit_1";\r
+            this.drp_audbit_1.Size = new System.Drawing.Size(70, 20);\r
+            this.drp_audbit_1.TabIndex = 11;\r
+            this.drp_audbit_1.Text = "160";\r
+            this.ToolTip.SetToolTip(this.drp_audbit_1, "Set the Audio Bit-Rate");\r
+            // \r
+            // drp_audsr_1\r
+            // \r
+            this.drp_audsr_1.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audsr_1.FormattingEnabled = true;\r
+            this.drp_audsr_1.Items.AddRange(new object[] {\r
+            "Auto",\r
+            "48",\r
+            "44.1",\r
+            "32",\r
+            "24",\r
+            "22.05"});\r
+            this.drp_audsr_1.Location = new System.Drawing.Point(488, 53);\r
+            this.drp_audsr_1.Name = "drp_audsr_1";\r
+            this.drp_audsr_1.Size = new System.Drawing.Size(55, 20);\r
+            this.drp_audsr_1.TabIndex = 9;\r
+            this.drp_audsr_1.Text = "Auto";\r
+            this.ToolTip.SetToolTip(this.drp_audsr_1, "Set the Audio Sample Rate");\r
+            // \r
+            // check_largeFile\r
+            // \r
+            this.check_largeFile.AutoSize = true;\r
+            this.check_largeFile.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_largeFile.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_largeFile.Location = new System.Drawing.Point(193, 22);\r
+            this.check_largeFile.Name = "check_largeFile";\r
+            this.check_largeFile.Size = new System.Drawing.Size(105, 17);\r
+            this.check_largeFile.TabIndex = 4;\r
+            this.check_largeFile.Text = "Large file size";\r
+            this.ToolTip.SetToolTip(this.check_largeFile, "Caution: This option will likely break device compatibility with all but the Appl" +\r
+                    "eTV Take 2.\r\nChecking this box enables a 64bit mp4 file which can be over 4GB.");\r
+            this.check_largeFile.UseVisualStyleBackColor = false;\r
+            // \r
+            // check_turbo\r
+            // \r
+            this.check_turbo.AutoSize = true;\r
+            this.check_turbo.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_turbo.Enabled = false;\r
+            this.check_turbo.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_turbo.Location = new System.Drawing.Point(37, 184);\r
+            this.check_turbo.Name = "check_turbo";\r
+            this.check_turbo.Size = new System.Drawing.Size(115, 17);\r
+            this.check_turbo.TabIndex = 7;\r
+            this.check_turbo.Text = "Turbo first Pass";\r
+            this.ToolTip.SetToolTip(this.check_turbo, "Makes the first pass of a 2 pass encode faster.");\r
+            this.check_turbo.UseVisualStyleBackColor = false;\r
+            // \r
+            // drp_videoFramerate\r
+            // \r
+            this.drp_videoFramerate.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_videoFramerate.FormattingEnabled = true;\r
+            this.drp_videoFramerate.Items.AddRange(new object[] {\r
+            "Same as source",\r
+            "5",\r
+            "10",\r
+            "12",\r
+            "15",\r
+            "23.976",\r
+            "24",\r
+            "25",\r
+            "29.97"});\r
+            this.drp_videoFramerate.Location = new System.Drawing.Point(125, 68);\r
+            this.drp_videoFramerate.Name = "drp_videoFramerate";\r
+            this.drp_videoFramerate.Size = new System.Drawing.Size(126, 21);\r
+            this.drp_videoFramerate.TabIndex = 2;\r
+            this.drp_videoFramerate.Text = "Same as source";\r
+            this.ToolTip.SetToolTip(this.drp_videoFramerate, "Can be left to \"Same as source\" in most cases.");\r
+            // \r
+            // slider_videoQuality\r
+            // \r
+            this.slider_videoQuality.Location = new System.Drawing.Point(468, 91);\r
+            this.slider_videoQuality.Maximum = 100;\r
+            this.slider_videoQuality.Name = "slider_videoQuality";\r
+            this.slider_videoQuality.Size = new System.Drawing.Size(167, 42);\r
+            this.slider_videoQuality.TabIndex = 14;\r
+            this.slider_videoQuality.TickFrequency = 17;\r
+            this.ToolTip.SetToolTip(this.slider_videoQuality, "Set the quality level of the video. (Around 70% is fine for most)");\r
+            this.slider_videoQuality.Scroll += new System.EventHandler(this.slider_videoQuality_Scroll);\r
+            // \r
+            // text_filesize\r
+            // \r
+            this.text_filesize.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.text_filesize.Location = new System.Drawing.Point(476, 36);\r
+            this.text_filesize.Name = "text_filesize";\r
+            this.text_filesize.Size = new System.Drawing.Size(81, 21);\r
+            this.text_filesize.TabIndex = 12;\r
+            this.ToolTip.SetToolTip(this.text_filesize, "Set the file size you wish the encoded file to be.");\r
+            this.text_filesize.TextChanged += new System.EventHandler(this.text_filesize_TextChanged);\r
+            // \r
+            // text_bitrate\r
+            // \r
+            this.text_bitrate.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.text_bitrate.Location = new System.Drawing.Point(476, 63);\r
+            this.text_bitrate.Name = "text_bitrate";\r
+            this.text_bitrate.Size = new System.Drawing.Size(81, 21);\r
+            this.text_bitrate.TabIndex = 10;\r
+            this.ToolTip.SetToolTip(this.text_bitrate, "Set the bitrate of the video");\r
+            this.text_bitrate.TextChanged += new System.EventHandler(this.text_bitrate_TextChanged);\r
+            // \r
+            // drp_subtitle\r
+            // \r
+            this.drp_subtitle.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_subtitle.FormattingEnabled = true;\r
+            this.drp_subtitle.Items.AddRange(new object[] {\r
+            "None",\r
+            "Autoselect"});\r
+            this.drp_subtitle.Location = new System.Drawing.Point(79, 244);\r
+            this.drp_subtitle.Name = "drp_subtitle";\r
+            this.drp_subtitle.Size = new System.Drawing.Size(138, 21);\r
+            this.drp_subtitle.TabIndex = 43;\r
+            this.drp_subtitle.Text = "None";\r
+            this.ToolTip.SetToolTip(this.drp_subtitle, resources.GetString("drp_subtitle.ToolTip"));\r
+            this.drp_subtitle.SelectedIndexChanged += new System.EventHandler(this.drp_subtitle_SelectedIndexChanged);\r
+            // \r
+            // btn_setDefault\r
+            // \r
+            this.btn_setDefault.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_setDefault.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_setDefault.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_setDefault.Location = new System.Drawing.Point(108, 8);\r
+            this.btn_setDefault.Name = "btn_setDefault";\r
+            this.btn_setDefault.Size = new System.Drawing.Size(72, 22);\r
+            this.btn_setDefault.TabIndex = 1;\r
+            this.btn_setDefault.TabStop = false;\r
+            this.btn_setDefault.Text = "Set Default";\r
+            this.ToolTip.SetToolTip(this.btn_setDefault, "Set current settings as program defaults.\r\nRequires option to be enabled in Tools" +\r
+                    " > Options");\r
+            this.btn_setDefault.UseVisualStyleBackColor = true;\r
+            this.btn_setDefault.Click += new System.EventHandler(this.btn_setDefault_Click);\r
+            // \r
+            // drp_audmix_1\r
+            // \r
+            this.drp_audmix_1.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audmix_1.FormattingEnabled = true;\r
+            this.drp_audmix_1.Items.AddRange(new object[] {\r
+            "Automatic",\r
+            "Mono",\r
+            "Stereo",\r
+            "Dolby Surround",\r
+            "Dolby Pro Logic II",\r
+            "6 Channel Discrete"});\r
+            this.drp_audmix_1.Location = new System.Drawing.Point(353, 53);\r
+            this.drp_audmix_1.Name = "drp_audmix_1";\r
+            this.drp_audmix_1.Size = new System.Drawing.Size(129, 20);\r
+            this.drp_audmix_1.TabIndex = 7;\r
+            this.drp_audmix_1.Text = "Automatic";\r
+            this.ToolTip.SetToolTip(this.drp_audmix_1, "Please note: Some options require a 5.1 audio channel to be selected");\r
+            this.drp_audmix_1.SelectedIndexChanged += new System.EventHandler(this.drp_audmix_1_SelectedIndexChanged);\r
+            // \r
+            // text_height\r
+            // \r
+            this.text_height.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.text_height.ForeColor = System.Drawing.SystemColors.InfoText;\r
+            this.text_height.Location = new System.Drawing.Point(498, 81);\r
+            this.text_height.Name = "text_height";\r
+            this.text_height.Size = new System.Drawing.Size(64, 21);\r
+            this.text_height.TabIndex = 19;\r
+            this.ToolTip.SetToolTip(this.text_height, "Video Resolution (Height)\r\nCan only be altered when Anamorphic is set to \"None\"");\r
+            this.text_height.TextChanged += new System.EventHandler(this.text_height_TextChanged);\r
+            // \r
+            // text_width\r
+            // \r
+            this.text_width.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.text_width.Location = new System.Drawing.Point(407, 81);\r
+            this.text_width.Name = "text_width";\r
+            this.text_width.Size = new System.Drawing.Size(64, 21);\r
+            this.text_width.TabIndex = 17;\r
+            this.ToolTip.SetToolTip(this.text_width, "Video Resolution (Width)\r\nCan only be altered when Anamorphic is set to \"None\" or" +\r
+                    " \"Loose\"");\r
+            this.text_width.TextChanged += new System.EventHandler(this.text_width_TextChanged);\r
+            // \r
+            // check_optimiseMP4\r
+            // \r
+            this.check_optimiseMP4.AutoSize = true;\r
+            this.check_optimiseMP4.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_optimiseMP4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_optimiseMP4.Location = new System.Drawing.Point(304, 22);\r
+            this.check_optimiseMP4.Name = "check_optimiseMP4";\r
+            this.check_optimiseMP4.Size = new System.Drawing.Size(110, 17);\r
+            this.check_optimiseMP4.TabIndex = 25;\r
+            this.check_optimiseMP4.Text = "Web optimized";\r
+            this.ToolTip.SetToolTip(this.check_optimiseMP4, "MP4 files can be optimized for progressive downloads over the Web,\r\nbut note that" +\r
+                    " QuickTime can only read the files as long as the file extension is .mp4\r\nCan on" +\r
+                    "ly be used with H.264 ");\r
+            this.check_optimiseMP4.UseVisualStyleBackColor = false;\r
+            // \r
+            // check_iPodAtom\r
+            // \r
+            this.check_iPodAtom.AutoSize = true;\r
+            this.check_iPodAtom.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_iPodAtom.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_iPodAtom.Location = new System.Drawing.Point(420, 22);\r
+            this.check_iPodAtom.Name = "check_iPodAtom";\r
+            this.check_iPodAtom.Size = new System.Drawing.Size(117, 17);\r
+            this.check_iPodAtom.TabIndex = 26;\r
+            this.check_iPodAtom.Text = "iPod 5G support";\r
+            this.ToolTip.SetToolTip(this.check_iPodAtom, "Support for legacy 5th Generation iPods.\r\nEncodes will not sync if this option is" +\r
+                    " not enabled for H.264 encodes.");\r
+            this.check_iPodAtom.UseVisualStyleBackColor = false;\r
+            // \r
+            // data_chpt\r
+            // \r
+            this.data_chpt.AllowUserToAddRows = false;\r
+            this.data_chpt.AllowUserToDeleteRows = false;\r
+            this.data_chpt.AllowUserToResizeRows = false;\r
+            this.data_chpt.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;\r
+            this.data_chpt.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {\r
+            this.number,\r
+            this.name});\r
+            this.data_chpt.Location = new System.Drawing.Point(16, 55);\r
+            this.data_chpt.Name = "data_chpt";\r
+            this.data_chpt.Size = new System.Drawing.Size(661, 234);\r
+            this.data_chpt.TabIndex = 3;\r
+            this.ToolTip.SetToolTip(this.data_chpt, resources.GetString("data_chpt.ToolTip"));\r
+            // \r
+            // number\r
+            // \r
+            dataGridViewCellStyle1.Format = "N0";\r
+            dataGridViewCellStyle1.NullValue = null;\r
+            this.number.DefaultCellStyle = dataGridViewCellStyle1;\r
+            this.number.HeaderText = "Chapter Number";\r
+            this.number.MaxInputLength = 3;\r
+            this.number.Name = "number";\r
+            this.number.Width = 135;\r
+            // \r
+            // name\r
+            // \r
+            this.name.HeaderText = "Chapter Name";\r
+            this.name.Name = "name";\r
+            this.name.Width = 460;\r
+            // \r
+            // btn_addPreset\r
+            // \r
+            this.btn_addPreset.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_addPreset.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_addPreset.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_addPreset.Location = new System.Drawing.Point(3, 8);\r
+            this.btn_addPreset.Name = "btn_addPreset";\r
+            this.btn_addPreset.Size = new System.Drawing.Size(35, 22);\r
+            this.btn_addPreset.TabIndex = 3;\r
+            this.btn_addPreset.TabStop = false;\r
+            this.btn_addPreset.Text = "Add";\r
+            this.ToolTip.SetToolTip(this.btn_addPreset, "Add a preset to the preset panel");\r
+            this.btn_addPreset.UseVisualStyleBackColor = true;\r
+            this.btn_addPreset.Click += new System.EventHandler(this.btn_addPreset_Click);\r
+            // \r
+            // btn_removePreset\r
+            // \r
+            this.btn_removePreset.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_removePreset.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_removePreset.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_removePreset.Location = new System.Drawing.Point(44, 8);\r
+            this.btn_removePreset.Name = "btn_removePreset";\r
+            this.btn_removePreset.Size = new System.Drawing.Size(58, 22);\r
+            this.btn_removePreset.TabIndex = 4;\r
+            this.btn_removePreset.TabStop = false;\r
+            this.btn_removePreset.Text = "Remove";\r
+            this.ToolTip.SetToolTip(this.btn_removePreset, "Remove a preset from the panel above.");\r
+            this.btn_removePreset.UseVisualStyleBackColor = true;\r
+            this.btn_removePreset.Click += new System.EventHandler(this.btn_removePreset_Click);\r
+            // \r
+            // drp_audmix_2\r
+            // \r
+            this.drp_audmix_2.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audmix_2.FormattingEnabled = true;\r
+            this.drp_audmix_2.Items.AddRange(new object[] {\r
+            "Automatic",\r
+            "Mono",\r
+            "Stereo",\r
+            "Dolby Surround",\r
+            "Dolby Pro Logic II",\r
+            "6 Channel Discrete"});\r
+            this.drp_audmix_2.Location = new System.Drawing.Point(353, 92);\r
+            this.drp_audmix_2.Name = "drp_audmix_2";\r
+            this.drp_audmix_2.Size = new System.Drawing.Size(129, 20);\r
+            this.drp_audmix_2.TabIndex = 19;\r
+            this.drp_audmix_2.Text = "Automatic";\r
+            this.ToolTip.SetToolTip(this.drp_audmix_2, "Please note: Some options require a 5.1 audio channel to be selected");\r
+            this.drp_audmix_2.SelectedIndexChanged += new System.EventHandler(this.drp_audmix_2_SelectedIndexChanged);\r
+            // \r
+            // drp_audenc_1\r
+            // \r
+            this.drp_audenc_1.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audenc_1.FormattingEnabled = true;\r
+            this.drp_audenc_1.Items.AddRange(new object[] {\r
+            "AAC",\r
+            "MP3",\r
+            "Vorbis",\r
+            "AC3"});\r
+            this.drp_audenc_1.Location = new System.Drawing.Point(236, 53);\r
+            this.drp_audenc_1.Name = "drp_audenc_1";\r
+            this.drp_audenc_1.Size = new System.Drawing.Size(111, 20);\r
+            this.drp_audenc_1.TabIndex = 5;\r
+            this.drp_audenc_1.Text = "AAC";\r
+            this.ToolTip.SetToolTip(this.drp_audenc_1, "Select an audio encoder.");\r
+            this.drp_audenc_1.SelectedIndexChanged += new System.EventHandler(this.drp_audenc_1_SelectedIndexChanged);\r
+            // \r
+            // drp_audenc_2\r
+            // \r
+            this.drp_audenc_2.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audenc_2.FormattingEnabled = true;\r
+            this.drp_audenc_2.Items.AddRange(new object[] {\r
+            "AAC",\r
+            "MP3",\r
+            "Vorbis",\r
+            "AC3"});\r
+            this.drp_audenc_2.Location = new System.Drawing.Point(236, 92);\r
+            this.drp_audenc_2.Name = "drp_audenc_2";\r
+            this.drp_audenc_2.Size = new System.Drawing.Size(111, 20);\r
+            this.drp_audenc_2.TabIndex = 18;\r
+            this.drp_audenc_2.Text = "AAC";\r
+            this.ToolTip.SetToolTip(this.drp_audenc_2, "Select an audio encoder.");\r
+            this.drp_audenc_2.SelectedIndexChanged += new System.EventHandler(this.drp_audenc_2_SelectedIndexChanged);\r
+            // \r
+            // drp_audbit_2\r
+            // \r
+            this.drp_audbit_2.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audbit_2.FormattingEnabled = true;\r
+            this.drp_audbit_2.Items.AddRange(new object[] {\r
+            "32",\r
+            "40",\r
+            "48",\r
+            "56",\r
+            "64",\r
+            "80",\r
+            "86",\r
+            "112",\r
+            "128",\r
+            "160"});\r
+            this.drp_audbit_2.Location = new System.Drawing.Point(546, 92);\r
+            this.drp_audbit_2.Name = "drp_audbit_2";\r
+            this.drp_audbit_2.Size = new System.Drawing.Size(71, 20);\r
+            this.drp_audbit_2.TabIndex = 21;\r
+            this.drp_audbit_2.Text = "160";\r
+            this.ToolTip.SetToolTip(this.drp_audbit_2, "Set the Audio Bit-Rate");\r
+            // \r
+            // drp_audsr_2\r
+            // \r
+            this.drp_audsr_2.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audsr_2.FormattingEnabled = true;\r
+            this.drp_audsr_2.Items.AddRange(new object[] {\r
+            "Auto",\r
+            "48",\r
+            "44.1",\r
+            "32",\r
+            "24",\r
+            "22.05"});\r
+            this.drp_audsr_2.Location = new System.Drawing.Point(488, 92);\r
+            this.drp_audsr_2.Name = "drp_audsr_2";\r
+            this.drp_audsr_2.Size = new System.Drawing.Size(52, 20);\r
+            this.drp_audsr_2.TabIndex = 20;\r
+            this.drp_audsr_2.Text = "Auto";\r
+            this.ToolTip.SetToolTip(this.drp_audsr_2, "Set the Audio Sample Rate");\r
+            // \r
+            // drp_audsr_3\r
+            // \r
+            this.drp_audsr_3.Enabled = false;\r
+            this.drp_audsr_3.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audsr_3.FormattingEnabled = true;\r
+            this.drp_audsr_3.Items.AddRange(new object[] {\r
+            "Auto",\r
+            "48",\r
+            "44.1",\r
+            "32",\r
+            "24",\r
+            "22.05"});\r
+            this.drp_audsr_3.Location = new System.Drawing.Point(488, 133);\r
+            this.drp_audsr_3.Name = "drp_audsr_3";\r
+            this.drp_audsr_3.Size = new System.Drawing.Size(52, 20);\r
+            this.drp_audsr_3.TabIndex = 28;\r
+            this.drp_audsr_3.Text = "Auto";\r
+            this.ToolTip.SetToolTip(this.drp_audsr_3, "Set the Audio Sample Rate");\r
+            // \r
+            // drp_audbit_3\r
+            // \r
+            this.drp_audbit_3.Enabled = false;\r
+            this.drp_audbit_3.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audbit_3.FormattingEnabled = true;\r
+            this.drp_audbit_3.Items.AddRange(new object[] {\r
+            "32",\r
+            "40",\r
+            "48",\r
+            "56",\r
+            "64",\r
+            "80",\r
+            "86",\r
+            "112",\r
+            "128",\r
+            "160"});\r
+            this.drp_audbit_3.Location = new System.Drawing.Point(546, 133);\r
+            this.drp_audbit_3.Name = "drp_audbit_3";\r
+            this.drp_audbit_3.Size = new System.Drawing.Size(71, 20);\r
+            this.drp_audbit_3.TabIndex = 29;\r
+            this.drp_audbit_3.Text = "160";\r
+            this.ToolTip.SetToolTip(this.drp_audbit_3, "Set the Audio Bit-Rate");\r
+            // \r
+            // drp_audenc_3\r
+            // \r
+            this.drp_audenc_3.Enabled = false;\r
+            this.drp_audenc_3.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audenc_3.FormattingEnabled = true;\r
+            this.drp_audenc_3.Items.AddRange(new object[] {\r
+            "AAC",\r
+            "MP3",\r
+            "Vorbis",\r
+            "AC3"});\r
+            this.drp_audenc_3.Location = new System.Drawing.Point(236, 133);\r
+            this.drp_audenc_3.Name = "drp_audenc_3";\r
+            this.drp_audenc_3.Size = new System.Drawing.Size(111, 20);\r
+            this.drp_audenc_3.TabIndex = 26;\r
+            this.drp_audenc_3.Text = "AAC";\r
+            this.ToolTip.SetToolTip(this.drp_audenc_3, "Select an audio encoder.");\r
+            this.drp_audenc_3.SelectedIndexChanged += new System.EventHandler(this.drp_audenc_3_SelectedIndexChanged);\r
+            // \r
+            // drp_audmix_3\r
+            // \r
+            this.drp_audmix_3.Enabled = false;\r
+            this.drp_audmix_3.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audmix_3.FormattingEnabled = true;\r
+            this.drp_audmix_3.Items.AddRange(new object[] {\r
+            "Automatic",\r
+            "Mono",\r
+            "Stereo",\r
+            "Dolby Surround",\r
+            "Dolby Pro Logic II",\r
+            "6 Channel Discrete"});\r
+            this.drp_audmix_3.Location = new System.Drawing.Point(353, 133);\r
+            this.drp_audmix_3.Name = "drp_audmix_3";\r
+            this.drp_audmix_3.Size = new System.Drawing.Size(129, 20);\r
+            this.drp_audmix_3.TabIndex = 27;\r
+            this.drp_audmix_3.Text = "Automatic";\r
+            this.ToolTip.SetToolTip(this.drp_audmix_3, "Please note: Some options require a 5.1 audio channel to be selected");\r
+            this.drp_audmix_3.SelectedIndexChanged += new System.EventHandler(this.drp_audmix_3_SelectedIndexChanged);\r
+            // \r
+            // drp_audsr_4\r
+            // \r
+            this.drp_audsr_4.Enabled = false;\r
+            this.drp_audsr_4.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audsr_4.FormattingEnabled = true;\r
+            this.drp_audsr_4.Items.AddRange(new object[] {\r
+            "Auto",\r
+            "48",\r
+            "44.1",\r
+            "32",\r
+            "24",\r
+            "22.05"});\r
+            this.drp_audsr_4.Location = new System.Drawing.Point(488, 175);\r
+            this.drp_audsr_4.Name = "drp_audsr_4";\r
+            this.drp_audsr_4.Size = new System.Drawing.Size(52, 20);\r
+            this.drp_audsr_4.TabIndex = 36;\r
+            this.drp_audsr_4.Text = "Auto";\r
+            this.ToolTip.SetToolTip(this.drp_audsr_4, "Set the Audio Sample Rate");\r
+            // \r
+            // drp_audbit_4\r
+            // \r
+            this.drp_audbit_4.Enabled = false;\r
+            this.drp_audbit_4.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audbit_4.FormattingEnabled = true;\r
+            this.drp_audbit_4.Items.AddRange(new object[] {\r
+            "32",\r
+            "40",\r
+            "48",\r
+            "56",\r
+            "64",\r
+            "80",\r
+            "86",\r
+            "112",\r
+            "128",\r
+            "160"});\r
+            this.drp_audbit_4.Location = new System.Drawing.Point(546, 175);\r
+            this.drp_audbit_4.Name = "drp_audbit_4";\r
+            this.drp_audbit_4.Size = new System.Drawing.Size(70, 20);\r
+            this.drp_audbit_4.TabIndex = 37;\r
+            this.drp_audbit_4.Text = "160";\r
+            this.ToolTip.SetToolTip(this.drp_audbit_4, "Set the Audio Bit-Rate");\r
+            // \r
+            // drp_audenc_4\r
+            // \r
+            this.drp_audenc_4.Enabled = false;\r
+            this.drp_audenc_4.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audenc_4.FormattingEnabled = true;\r
+            this.drp_audenc_4.Items.AddRange(new object[] {\r
+            "AAC",\r
+            "MP3",\r
+            "Vorbis",\r
+            "AC3"});\r
+            this.drp_audenc_4.Location = new System.Drawing.Point(236, 175);\r
+            this.drp_audenc_4.Name = "drp_audenc_4";\r
+            this.drp_audenc_4.Size = new System.Drawing.Size(111, 20);\r
+            this.drp_audenc_4.TabIndex = 34;\r
+            this.drp_audenc_4.Text = "AAC";\r
+            this.ToolTip.SetToolTip(this.drp_audenc_4, "Select an audio encoder.");\r
+            this.drp_audenc_4.SelectedIndexChanged += new System.EventHandler(this.drp_audenc_4_SelectedIndexChanged);\r
+            // \r
+            // drp_audmix_4\r
+            // \r
+            this.drp_audmix_4.Enabled = false;\r
+            this.drp_audmix_4.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_audmix_4.FormattingEnabled = true;\r
+            this.drp_audmix_4.Items.AddRange(new object[] {\r
+            "Automatic",\r
+            "Mono",\r
+            "Stereo",\r
+            "Dolby Surround",\r
+            "Dolby Pro Logic II",\r
+            "6 Channel Discrete"});\r
+            this.drp_audmix_4.Location = new System.Drawing.Point(353, 175);\r
+            this.drp_audmix_4.Name = "drp_audmix_4";\r
+            this.drp_audmix_4.Size = new System.Drawing.Size(129, 20);\r
+            this.drp_audmix_4.TabIndex = 35;\r
+            this.drp_audmix_4.Text = "Automatic";\r
+            this.ToolTip.SetToolTip(this.drp_audmix_4, "Please note: Some options require a 5.1 audio channel to be selected");\r
+            this.drp_audmix_4.SelectedIndexChanged += new System.EventHandler(this.drp_audmix_4_SelectedIndexChanged);\r
+            // \r
+            // drop_format\r
+            // \r
+            this.drop_format.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_format.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drop_format.FormattingEnabled = true;\r
+            this.drop_format.Items.AddRange(new object[] {\r
+            "MP4 File",\r
+            "M4V File",\r
+            "MKV File",\r
+            "AVI File",\r
+            "OGM File"});\r
+            this.drop_format.Location = new System.Drawing.Point(75, 19);\r
+            this.drop_format.Name = "drop_format";\r
+            this.drop_format.Size = new System.Drawing.Size(106, 21);\r
+            this.drop_format.TabIndex = 28;\r
+            this.ToolTip.SetToolTip(this.drop_format, "Select the file container format.");\r
+            this.drop_format.SelectedIndexChanged += new System.EventHandler(this.drop_format_SelectedIndexChanged);\r
+            // \r
+            // check_customCrop\r
+            // \r
+            this.check_customCrop.AutoSize = true;\r
+            this.check_customCrop.Location = new System.Drawing.Point(16, 58);\r
+            this.check_customCrop.Name = "check_customCrop";\r
+            this.check_customCrop.Size = new System.Drawing.Size(74, 17);\r
+            this.check_customCrop.TabIndex = 34;\r
+            this.check_customCrop.Text = "Custom:";\r
+            this.ToolTip.SetToolTip(this.check_customCrop, "Set some custom cropping values.");\r
+            this.check_customCrop.UseVisualStyleBackColor = true;\r
+            this.check_customCrop.CheckedChanged += new System.EventHandler(this.check_customCrop_CheckedChanged);\r
+            // \r
+            // check_autoCrop\r
+            // \r
+            this.check_autoCrop.AutoSize = true;\r
+            this.check_autoCrop.Checked = true;\r
+            this.check_autoCrop.Location = new System.Drawing.Point(16, 34);\r
+            this.check_autoCrop.Name = "check_autoCrop";\r
+            this.check_autoCrop.Size = new System.Drawing.Size(82, 17);\r
+            this.check_autoCrop.TabIndex = 33;\r
+            this.check_autoCrop.TabStop = true;\r
+            this.check_autoCrop.Text = "Automatic";\r
+            this.ToolTip.SetToolTip(this.check_autoCrop, "Automatically set cropping values.");\r
+            this.check_autoCrop.UseVisualStyleBackColor = true;\r
+            this.check_autoCrop.CheckedChanged += new System.EventHandler(this.check_autoCrop_CheckedChanged);\r
+            // \r
+            // check_Cabac\r
+            // \r
+            this.check_Cabac.AutoSize = true;\r
+            this.check_Cabac.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.check_Cabac.Checked = true;\r
+            this.check_Cabac.CheckState = System.Windows.Forms.CheckState.Checked;\r
+            this.check_Cabac.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.check_Cabac.Location = new System.Drawing.Point(536, 214);\r
+            this.check_Cabac.Name = "check_Cabac";\r
+            this.check_Cabac.RightToLeft = System.Windows.Forms.RightToLeft.No;\r
+            this.check_Cabac.Size = new System.Drawing.Size(144, 16);\r
+            this.check_Cabac.TabIndex = 40;\r
+            this.check_Cabac.Text = "CABAC Entropy Coding:";\r
+            this.check_Cabac.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.ToolTip.SetToolTip(this.check_Cabac, resources.GetString("check_Cabac.ToolTip"));\r
+            this.check_Cabac.UseVisualStyleBackColor = true;\r
+            this.check_Cabac.CheckStateChanged += new System.EventHandler(this.check_Cabac_CheckedChanged);\r
+            // \r
+            // check_noDCTDecimate\r
+            // \r
+            this.check_noDCTDecimate.AutoSize = true;\r
+            this.check_noDCTDecimate.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.check_noDCTDecimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.check_noDCTDecimate.Location = new System.Drawing.Point(562, 192);\r
+            this.check_noDCTDecimate.Name = "check_noDCTDecimate";\r
+            this.check_noDCTDecimate.RightToLeft = System.Windows.Forms.RightToLeft.No;\r
+            this.check_noDCTDecimate.Size = new System.Drawing.Size(118, 16);\r
+            this.check_noDCTDecimate.TabIndex = 39;\r
+            this.check_noDCTDecimate.Text = "No DCT-Decimate:";\r
+            this.check_noDCTDecimate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.ToolTip.SetToolTip(this.check_noDCTDecimate, "Only use this with constant quality encoding. \r\nIt increases quality but also bit" +\r
+                    "rate/file size.");\r
+            this.check_noDCTDecimate.UseVisualStyleBackColor = true;\r
+            this.check_noDCTDecimate.CheckStateChanged += new System.EventHandler(this.check_noDCTDecimate_CheckedChanged);\r
+            // \r
+            // check_noFastPSkip\r
+            // \r
+            this.check_noFastPSkip.AutoSize = true;\r
+            this.check_noFastPSkip.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.check_noFastPSkip.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.check_noFastPSkip.Location = new System.Drawing.Point(444, 192);\r
+            this.check_noFastPSkip.Name = "check_noFastPSkip";\r
+            this.check_noFastPSkip.RightToLeft = System.Windows.Forms.RightToLeft.No;\r
+            this.check_noFastPSkip.Size = new System.Drawing.Size(103, 16);\r
+            this.check_noFastPSkip.TabIndex = 38;\r
+            this.check_noFastPSkip.Text = "No Fast-P-Skip:";\r
+            this.check_noFastPSkip.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.ToolTip.SetToolTip(this.check_noFastPSkip, "This can help with blocking on solid colors like blue skies, \r\nbut it also slows " +\r
+                    "down the encode.");\r
+            this.check_noFastPSkip.UseVisualStyleBackColor = true;\r
+            this.check_noFastPSkip.CheckStateChanged += new System.EventHandler(this.check_noFastPSkip_CheckedChanged);\r
+            // \r
+            // drop_trellis\r
+            // \r
+            this.drop_trellis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_trellis.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
+            this.drop_trellis.FormattingEnabled = true;\r
+            this.drop_trellis.Items.AddRange(new object[] {\r
+            "Default (0)",\r
+            "0",\r
+            "1",\r
+            "2"});\r
+            this.drop_trellis.Location = new System.Drawing.Point(537, 166);\r
+            this.drop_trellis.Name = "drop_trellis";\r
+            this.drop_trellis.Size = new System.Drawing.Size(143, 20);\r
+            this.drop_trellis.TabIndex = 37;\r
+            this.ToolTip.SetToolTip(this.drop_trellis, "Trellis fine-tunes how bitrate is doled out, so it can reduce file size/bitrate o" +\r
+                    "r increase quality. \r\nA value of 2 forces it to be used more often than a value " +\r
+                    "of 1.");\r
+            this.drop_trellis.SelectedIndexChanged += new System.EventHandler(this.drop_trellis_SelectedIndexChanged);\r
+            // \r
+            // drop_deblockBeta\r
+            // \r
+            this.drop_deblockBeta.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_deblockBeta.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
+            this.drop_deblockBeta.FormattingEnabled = true;\r
+            this.drop_deblockBeta.Items.AddRange(new object[] {\r
+            "Default (0)",\r
+            "-6",\r
+            "-5",\r
+            "-4",\r
+            "-3",\r
+            "-2",\r
+            "-1",\r
+            "0",\r
+            "1",\r
+            "2",\r
+            "3",\r
+            "4",\r
+            "5",\r
+            "6"});\r
+            this.drop_deblockBeta.Location = new System.Drawing.Point(611, 139);\r
+            this.drop_deblockBeta.Name = "drop_deblockBeta";\r
+            this.drop_deblockBeta.Size = new System.Drawing.Size(69, 20);\r
+            this.drop_deblockBeta.TabIndex = 36;\r
+            this.ToolTip.SetToolTip(this.drop_deblockBeta, resources.GetString("drop_deblockBeta.ToolTip"));\r
+            this.drop_deblockBeta.SelectedIndexChanged += new System.EventHandler(this.drop_deblockBeta_SelectedIndexChanged);\r
+            // \r
+            // drop_deblockAlpha\r
+            // \r
+            this.drop_deblockAlpha.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_deblockAlpha.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
+            this.drop_deblockAlpha.FormattingEnabled = true;\r
+            this.drop_deblockAlpha.Items.AddRange(new object[] {\r
+            "Default (0)",\r
+            "-6",\r
+            "-5",\r
+            "-4",\r
+            "-3",\r
+            "-2",\r
+            "-1",\r
+            "0",\r
+            "1",\r
+            "2",\r
+            "3",\r
+            "4",\r
+            "5",\r
+            "6"});\r
+            this.drop_deblockAlpha.Location = new System.Drawing.Point(537, 139);\r
+            this.drop_deblockAlpha.Name = "drop_deblockAlpha";\r
+            this.drop_deblockAlpha.Size = new System.Drawing.Size(68, 20);\r
+            this.drop_deblockAlpha.TabIndex = 35;\r
+            this.ToolTip.SetToolTip(this.drop_deblockAlpha, resources.GetString("drop_deblockAlpha.ToolTip"));\r
+            this.drop_deblockAlpha.SelectedIndexChanged += new System.EventHandler(this.drop_deblockAlpha_SelectedIndexChanged);\r
+            // \r
+            // check_8x8DCT\r
+            // \r
+            this.check_8x8DCT.AutoSize = true;\r
+            this.check_8x8DCT.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.check_8x8DCT.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.check_8x8DCT.Location = new System.Drawing.Point(608, 106);\r
+            this.check_8x8DCT.Name = "check_8x8DCT";\r
+            this.check_8x8DCT.RightToLeft = System.Windows.Forms.RightToLeft.No;\r
+            this.check_8x8DCT.Size = new System.Drawing.Size(71, 16);\r
+            this.check_8x8DCT.TabIndex = 34;\r
+            this.check_8x8DCT.Text = "8x8 DCT:";\r
+            this.check_8x8DCT.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.ToolTip.SetToolTip(this.check_8x8DCT, resources.GetString("check_8x8DCT.ToolTip"));\r
+            this.check_8x8DCT.UseVisualStyleBackColor = true;\r
+            this.check_8x8DCT.CheckStateChanged += new System.EventHandler(this.check_8x8DCT_CheckedChanged);\r
+            // \r
+            // drop_analysis\r
+            // \r
+            this.drop_analysis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_analysis.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
+            this.drop_analysis.FormattingEnabled = true;\r
+            this.drop_analysis.Items.AddRange(new object[] {\r
+            "Default (some)",\r
+            "None",\r
+            "All"});\r
+            this.drop_analysis.Location = new System.Drawing.Point(537, 105);\r
+            this.drop_analysis.Name = "drop_analysis";\r
+            this.drop_analysis.Size = new System.Drawing.Size(63, 20);\r
+            this.drop_analysis.TabIndex = 33;\r
+            this.ToolTip.SetToolTip(this.drop_analysis, resources.GetString("drop_analysis.ToolTip"));\r
+            this.drop_analysis.SelectedIndexChanged += new System.EventHandler(this.drop_analysis_SelectedIndexChanged);\r
+            // \r
+            // drop_subpixelMotionEstimation\r
+            // \r
+            this.drop_subpixelMotionEstimation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_subpixelMotionEstimation.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
+            this.drop_subpixelMotionEstimation.FormattingEnabled = true;\r
+            this.drop_subpixelMotionEstimation.Items.AddRange(new object[] {\r
+            "Default (6)",\r
+            "0",\r
+            "1",\r
+            "2",\r
+            "3",\r
+            "4",\r
+            "5",\r
+            "6",\r
+            "7",\r
+            "8",\r
+            "9"});\r
+            this.drop_subpixelMotionEstimation.Location = new System.Drawing.Point(537, 69);\r
+            this.drop_subpixelMotionEstimation.Name = "drop_subpixelMotionEstimation";\r
+            this.drop_subpixelMotionEstimation.Size = new System.Drawing.Size(139, 20);\r
+            this.drop_subpixelMotionEstimation.TabIndex = 32;\r
+            this.ToolTip.SetToolTip(this.drop_subpixelMotionEstimation, resources.GetString("drop_subpixelMotionEstimation.ToolTip"));\r
+            this.drop_subpixelMotionEstimation.SelectedIndexChanged += new System.EventHandler(this.drop_subpixelMotionEstimation_SelectedIndexChanged);\r
+            // \r
+            // drop_MotionEstimationRange\r
+            // \r
+            this.drop_MotionEstimationRange.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_MotionEstimationRange.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
+            this.drop_MotionEstimationRange.FormattingEnabled = true;\r
+            this.drop_MotionEstimationRange.Items.AddRange(new object[] {\r
+            "Default (16)",\r
+            "4",\r
+            "5",\r
+            "6",\r
+            "7",\r
+            "8",\r
+            "9",\r
+            "10",\r
+            "11",\r
+            "12",\r
+            "13",\r
+            "14",\r
+            "15",\r
+            "16",\r
+            "17",\r
+            "18",\r
+            "19",\r
+            "20",\r
+            "21",\r
+            "22",\r
+            "23",\r
+            "24",\r
+            "25",\r
+            "26",\r
+            "27",\r
+            "28",\r
+            "29",\r
+            "30",\r
+            "31",\r
+            "32",\r
+            "33",\r
+            "34",\r
+            "35",\r
+            "36",\r
+            "37",\r
+            "38",\r
+            "39",\r
+            "40",\r
+            "41",\r
+            "42",\r
+            "43",\r
+            "44",\r
+            "45",\r
+            "46",\r
+            "47",\r
+            "48",\r
+            "49",\r
+            "50",\r
+            "51",\r
+            "52",\r
+            "53",\r
+            "54",\r
+            "55",\r
+            "56",\r
+            "57",\r
+            "58",\r
+            "59",\r
+            "60",\r
+            "61",\r
+            "62",\r
+            "63",\r
+            "64"});\r
+            this.drop_MotionEstimationRange.Location = new System.Drawing.Point(537, 40);\r
+            this.drop_MotionEstimationRange.Name = "drop_MotionEstimationRange";\r
+            this.drop_MotionEstimationRange.Size = new System.Drawing.Size(139, 20);\r
+            this.drop_MotionEstimationRange.TabIndex = 31;\r
+            this.ToolTip.SetToolTip(this.drop_MotionEstimationRange, resources.GetString("drop_MotionEstimationRange.ToolTip"));\r
+            this.drop_MotionEstimationRange.SelectedIndexChanged += new System.EventHandler(this.drop_MotionEstimationRange_SelectedIndexChanged);\r
+            // \r
+            // drop_MotionEstimationMethod\r
+            // \r
+            this.drop_MotionEstimationMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_MotionEstimationMethod.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
+            this.drop_MotionEstimationMethod.FormattingEnabled = true;\r
+            this.drop_MotionEstimationMethod.ItemHeight = 12;\r
+            this.drop_MotionEstimationMethod.Items.AddRange(new object[] {\r
+            "Default (Hexagon)",\r
+            "Diamond",\r
+            "Hexagon",\r
+            "Uneven Multi-Hexagon",\r
+            "Exhaustive"});\r
+            this.drop_MotionEstimationMethod.Location = new System.Drawing.Point(537, 11);\r
+            this.drop_MotionEstimationMethod.Name = "drop_MotionEstimationMethod";\r
+            this.drop_MotionEstimationMethod.Size = new System.Drawing.Size(139, 20);\r
+            this.drop_MotionEstimationMethod.TabIndex = 30;\r
+            this.ToolTip.SetToolTip(this.drop_MotionEstimationMethod, resources.GetString("drop_MotionEstimationMethod.ToolTip"));\r
+            this.drop_MotionEstimationMethod.SelectedIndexChanged += new System.EventHandler(this.drop_MotionEstimationMethod_SelectedIndexChanged);\r
+            // \r
+            // check_pyrmidalBFrames\r
+            // \r
+            this.check_pyrmidalBFrames.AutoSize = true;\r
+            this.check_pyrmidalBFrames.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.check_pyrmidalBFrames.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.check_pyrmidalBFrames.Location = new System.Drawing.Point(46, 165);\r
+            this.check_pyrmidalBFrames.Name = "check_pyrmidalBFrames";\r
+            this.check_pyrmidalBFrames.RightToLeft = System.Windows.Forms.RightToLeft.No;\r
+            this.check_pyrmidalBFrames.Size = new System.Drawing.Size(121, 16);\r
+            this.check_pyrmidalBFrames.TabIndex = 17;\r
+            this.check_pyrmidalBFrames.Text = "Pyrmidal B-Frames:";\r
+            this.check_pyrmidalBFrames.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.ToolTip.SetToolTip(this.check_pyrmidalBFrames, resources.GetString("check_pyrmidalBFrames.ToolTip"));\r
+            this.check_pyrmidalBFrames.UseVisualStyleBackColor = true;\r
+            this.check_pyrmidalBFrames.CheckStateChanged += new System.EventHandler(this.check_pyrmidalBFrames_CheckedChanged);\r
+            // \r
+            // check_weightedBFrames\r
+            // \r
+            this.check_weightedBFrames.AutoSize = true;\r
+            this.check_weightedBFrames.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.check_weightedBFrames.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.check_weightedBFrames.Location = new System.Drawing.Point(44, 144);\r
+            this.check_weightedBFrames.Name = "check_weightedBFrames";\r
+            this.check_weightedBFrames.RightToLeft = System.Windows.Forms.RightToLeft.No;\r
+            this.check_weightedBFrames.Size = new System.Drawing.Size(123, 16);\r
+            this.check_weightedBFrames.TabIndex = 14;\r
+            this.check_weightedBFrames.Text = "Weighted B-Frames:";\r
+            this.ToolTip.SetToolTip(this.check_weightedBFrames, resources.GetString("check_weightedBFrames.ToolTip"));\r
+            this.check_weightedBFrames.UseVisualStyleBackColor = true;\r
+            this.check_weightedBFrames.CheckStateChanged += new System.EventHandler(this.check_weightedBFrames_CheckedChanged);\r
+            // \r
+            // drop_directPrediction\r
+            // \r
+            this.drop_directPrediction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_directPrediction.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
+            this.drop_directPrediction.FormattingEnabled = true;\r
+            this.drop_directPrediction.Items.AddRange(new object[] {\r
+            "Default (Spatial)",\r
+            "None",\r
+            "Spatial",\r
+            "Temporal",\r
+            "Automatic"});\r
+            this.drop_directPrediction.Location = new System.Drawing.Point(157, 118);\r
+            this.drop_directPrediction.Name = "drop_directPrediction";\r
+            this.drop_directPrediction.Size = new System.Drawing.Size(121, 20);\r
+            this.drop_directPrediction.TabIndex = 13;\r
+            this.ToolTip.SetToolTip(this.drop_directPrediction, resources.GetString("drop_directPrediction.ToolTip"));\r
+            this.drop_directPrediction.SelectedIndexChanged += new System.EventHandler(this.drop_directPrediction_SelectedIndexChanged);\r
+            // \r
+            // drop_bFrames\r
+            // \r
+            this.drop_bFrames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_bFrames.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
+            this.drop_bFrames.FormattingEnabled = true;\r
+            this.drop_bFrames.Items.AddRange(new object[] {\r
+            "Default (0)",\r
+            "0",\r
+            "1",\r
+            "2",\r
+            "3",\r
+            "4",\r
+            "5",\r
+            "6",\r
+            "7",\r
+            "8",\r
+            "9",\r
+            "10",\r
+            "11",\r
+            "12",\r
+            "13",\r
+            "14",\r
+            "15",\r
+            "16"});\r
+            this.drop_bFrames.Location = new System.Drawing.Point(157, 91);\r
+            this.drop_bFrames.Name = "drop_bFrames";\r
+            this.drop_bFrames.Size = new System.Drawing.Size(121, 20);\r
+            this.drop_bFrames.TabIndex = 12;\r
+            this.ToolTip.SetToolTip(this.drop_bFrames, "Sane values are 1-6. \r\nB-Frames are smaller than other frames, so they let you pa" +\r
+                    "ck in more quality at the same bitrate. \r\nUse more of them with animated materia" +\r
+                    "l: 9-16. ");\r
+            this.drop_bFrames.SelectedIndexChanged += new System.EventHandler(this.drop_bFrames_SelectedIndexChanged);\r
+            // \r
+            // drop_refFrames\r
+            // \r
+            this.drop_refFrames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drop_refFrames.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
+            this.drop_refFrames.FormattingEnabled = true;\r
+            this.drop_refFrames.Items.AddRange(new object[] {\r
+            "Default (1)",\r
+            "0",\r
+            "1",\r
+            "2",\r
+            "3",\r
+            "4",\r
+            "5",\r
+            "6",\r
+            "7",\r
+            "8",\r
+            "9",\r
+            "10",\r
+            "11",\r
+            "12",\r
+            "13",\r
+            "14",\r
+            "15",\r
+            "16"});\r
+            this.drop_refFrames.Location = new System.Drawing.Point(157, 37);\r
+            this.drop_refFrames.Name = "drop_refFrames";\r
+            this.drop_refFrames.Size = new System.Drawing.Size(121, 20);\r
+            this.drop_refFrames.TabIndex = 10;\r
+            this.ToolTip.SetToolTip(this.drop_refFrames, "Sane values are 1-6. The more you add, the higher the quality \97 but the slower th" +\r
+                    "e encode. ");\r
+            this.drop_refFrames.SelectedIndexChanged += new System.EventHandler(this.drop_refFrames_SelectedIndexChanged);\r
+            // \r
+            // check_mixedReferences\r
+            // \r
+            this.check_mixedReferences.AutoSize = true;\r
+            this.check_mixedReferences.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.check_mixedReferences.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.check_mixedReferences.Location = new System.Drawing.Point(54, 63);\r
+            this.check_mixedReferences.Name = "check_mixedReferences";\r
+            this.check_mixedReferences.RightToLeft = System.Windows.Forms.RightToLeft.No;\r
+            this.check_mixedReferences.Size = new System.Drawing.Size(114, 16);\r
+            this.check_mixedReferences.TabIndex = 11;\r
+            this.check_mixedReferences.Text = "Mixed References:";\r
+            this.check_mixedReferences.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            this.ToolTip.SetToolTip(this.check_mixedReferences, "With this on, different parts of a frame will refer back to different prior frame" +\r
+                    "s, \r\ndepending on what\'s best for that part of the image. ");\r
+            this.check_mixedReferences.UseVisualStyleBackColor = true;\r
+            this.check_mixedReferences.CheckStateChanged += new System.EventHandler(this.check_mixedReferences_CheckedChanged);\r
+            // \r
+            // lbl_src_res\r
+            // \r
+            this.lbl_src_res.AutoSize = true;\r
+            this.lbl_src_res.BackColor = System.Drawing.Color.Transparent;\r
+            this.lbl_src_res.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_src_res.Location = new System.Drawing.Point(405, 34);\r
+            this.lbl_src_res.Name = "lbl_src_res";\r
+            this.lbl_src_res.Size = new System.Drawing.Size(72, 12);\r
+            this.lbl_src_res.TabIndex = 13;\r
+            this.lbl_src_res.Text = "Select a Title";\r
+            // \r
+            // lbl_duration\r
+            // \r
+            this.lbl_duration.AutoSize = true;\r
+            this.lbl_duration.BackColor = System.Drawing.Color.Transparent;\r
+            this.lbl_duration.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_duration.Location = new System.Drawing.Point(569, 56);\r
+            this.lbl_duration.Name = "lbl_duration";\r
+            this.lbl_duration.Size = new System.Drawing.Size(72, 12);\r
+            this.lbl_duration.TabIndex = 43;\r
+            this.lbl_duration.Text = "Select a Title";\r
+            // \r
+            // label_duration\r
+            // \r
+            this.label_duration.AutoSize = true;\r
+            this.label_duration.BackColor = System.Drawing.Color.Transparent;\r
+            this.label_duration.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label_duration.Location = new System.Drawing.Point(502, 55);\r
+            this.label_duration.Name = "label_duration";\r
+            this.label_duration.Size = new System.Drawing.Size(61, 13);\r
+            this.label_duration.TabIndex = 42;\r
+            this.label_duration.Text = "Duration:";\r
+            // \r
+            // label7\r
+            // \r
+            this.label7.AutoSize = true;\r
+            this.label7.BackColor = System.Drawing.Color.Transparent;\r
+            this.label7.Location = new System.Drawing.Point(311, 34);\r
+            this.label7.Name = "label7";\r
+            this.label7.Size = new System.Drawing.Size(52, 13);\r
+            this.label7.TabIndex = 12;\r
+            this.label7.Text = "Source:";\r
+            // \r
+            // DVD_Open\r
+            // \r
+            this.DVD_Open.Description = "Select the \"VIDEO_TS\" folder from your DVD Drive.";\r
+            // \r
+            // File_Open\r
+            // \r
+            this.File_Open.DefaultExt = "hb";\r
+            this.File_Open.Filter = "hb|*.hb";\r
+            // \r
+            // ISO_Open\r
+            // \r
+            this.ISO_Open.DefaultExt = "ISO";\r
+            this.ISO_Open.Filter = "All Files|*.*";\r
+            this.ISO_Open.RestoreDirectory = true;\r
+            this.ISO_Open.SupportMultiDottedExtensions = true;\r
+            // \r
+            // FileToolStripMenuItem\r
+            // \r
+            this.FileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.mnu_exit});\r
+            this.FileToolStripMenuItem.Name = "FileToolStripMenuItem";\r
+            this.FileToolStripMenuItem.Size = new System.Drawing.Size(38, 20);\r
+            this.FileToolStripMenuItem.Text = "&File";\r
+            // \r
+            // mnu_exit\r
+            // \r
+            this.mnu_exit.Name = "mnu_exit";\r
+            this.mnu_exit.Size = new System.Drawing.Size(106, 22);\r
+            this.mnu_exit.Text = "E&xit";\r
+            this.mnu_exit.Click += new System.EventHandler(this.mnu_exit_Click);\r
+            // \r
+            // mnu_open3\r
+            // \r
+            this.mnu_open3.Name = "mnu_open3";\r
+            this.mnu_open3.Size = new System.Drawing.Size(32, 19);\r
+            // \r
+            // ToolsToolStripMenuItem\r
+            // \r
+            this.ToolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.mnu_encode,\r
+            this.mnu_encodeLog,\r
+            this.ToolStripSeparator5,\r
+            this.mnu_options});\r
+            this.ToolsToolStripMenuItem.Name = "ToolsToolStripMenuItem";\r
+            this.ToolsToolStripMenuItem.Size = new System.Drawing.Size(49, 20);\r
+            this.ToolsToolStripMenuItem.Text = "&Tools";\r
+            // \r
+            // mnu_encode\r
+            // \r
+            this.mnu_encode.Image = global::Handbrake.Properties.Resources.Queue_Small;\r
+            this.mnu_encode.Name = "mnu_encode";\r
+            this.mnu_encode.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));\r
+            this.mnu_encode.Size = new System.Drawing.Size(203, 22);\r
+            this.mnu_encode.Text = "Show Queue";\r
+            this.mnu_encode.Click += new System.EventHandler(this.mnu_encode_Click);\r
+            // \r
+            // mnu_encodeLog\r
+            // \r
+            this.mnu_encodeLog.Image = global::Handbrake.Properties.Resources.ActivityWindow_small;\r
+            this.mnu_encodeLog.Name = "mnu_encodeLog";\r
+            this.mnu_encodeLog.Size = new System.Drawing.Size(203, 22);\r
+            this.mnu_encodeLog.Text = "Activity Window";\r
+            this.mnu_encodeLog.Click += new System.EventHandler(this.mnu_encodeLog_Click);\r
+            // \r
+            // ToolStripSeparator5\r
+            // \r
+            this.ToolStripSeparator5.Name = "ToolStripSeparator5";\r
+            this.ToolStripSeparator5.Size = new System.Drawing.Size(200, 6);\r
+            // \r
+            // mnu_options\r
+            // \r
+            this.mnu_options.Image = global::Handbrake.Properties.Resources.Pref_Small;\r
+            this.mnu_options.Name = "mnu_options";\r
+            this.mnu_options.Size = new System.Drawing.Size(203, 22);\r
+            this.mnu_options.Text = "Options";\r
+            this.mnu_options.Click += new System.EventHandler(this.mnu_options_Click);\r
+            // \r
+            // PresetsToolStripMenuItem\r
+            // \r
+            this.PresetsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.mnu_presetReset,\r
+            this.mnu_delete_preset,\r
+            this.toolStripSeparator7,\r
+            this.btn_new_preset,\r
+            this.mnu_SelectDefault});\r
+            this.PresetsToolStripMenuItem.Name = "PresetsToolStripMenuItem";\r
+            this.PresetsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);\r
+            this.PresetsToolStripMenuItem.Text = "&Presets";\r
+            // \r
+            // mnu_presetReset\r
+            // \r
+            this.mnu_presetReset.Name = "mnu_presetReset";\r
+            this.mnu_presetReset.Size = new System.Drawing.Size(215, 22);\r
+            this.mnu_presetReset.Text = "Update Built-in Presets";\r
+            this.mnu_presetReset.ToolTipText = "Resets all presets.";\r
+            this.mnu_presetReset.Click += new System.EventHandler(this.mnu_presetReset_Click);\r
+            // \r
+            // mnu_delete_preset\r
+            // \r
+            this.mnu_delete_preset.Name = "mnu_delete_preset";\r
+            this.mnu_delete_preset.Size = new System.Drawing.Size(215, 22);\r
+            this.mnu_delete_preset.Text = "Delete Built-in Presets";\r
+            this.mnu_delete_preset.Click += new System.EventHandler(this.mnu_delete_preset_Click);\r
+            // \r
+            // toolStripSeparator7\r
+            // \r
+            this.toolStripSeparator7.Name = "toolStripSeparator7";\r
+            this.toolStripSeparator7.Size = new System.Drawing.Size(212, 6);\r
+            // \r
+            // btn_new_preset\r
+            // \r
+            this.btn_new_preset.Name = "btn_new_preset";\r
+            this.btn_new_preset.Size = new System.Drawing.Size(215, 22);\r
+            this.btn_new_preset.Text = "New Preset";\r
+            this.btn_new_preset.Click += new System.EventHandler(this.btn_new_preset_Click);\r
+            // \r
+            // mnu_SelectDefault\r
+            // \r
+            this.mnu_SelectDefault.Name = "mnu_SelectDefault";\r
+            this.mnu_SelectDefault.Size = new System.Drawing.Size(215, 22);\r
+            this.mnu_SelectDefault.Text = "Select Default Preset";\r
+            this.mnu_SelectDefault.ToolTipText = "Select HandBrake\'s default preset";\r
+            this.mnu_SelectDefault.Click += new System.EventHandler(this.mnu_SelectDefault_Click);\r
+            // \r
+            // HelpToolStripMenuItem\r
+            // \r
+            this.HelpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.mnu_user_guide,\r
+            this.mnu_handbrake_home,\r
+            this.mnu_handbrake_forums,\r
+            this.ToolStripSeparator3,\r
+            this.mnu_UpdateCheck,\r
+            this.toolStripSeparator6,\r
+            this.mnu_about});\r
+            this.HelpToolStripMenuItem.Name = "HelpToolStripMenuItem";\r
+            this.HelpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\r
+            this.HelpToolStripMenuItem.Text = "&Help";\r
+            // \r
+            // mnu_user_guide\r
+            // \r
+            this.mnu_user_guide.Image = global::Handbrake.Properties.Resources.Help16;\r
+            this.mnu_user_guide.Name = "mnu_user_guide";\r
+            this.mnu_user_guide.Size = new System.Drawing.Size(215, 22);\r
+            this.mnu_user_guide.Text = "HandBrake User Guide";\r
+            this.mnu_user_guide.Click += new System.EventHandler(this.mnu_user_guide_Click);\r
+            // \r
+            // mnu_handbrake_home\r
+            // \r
+            this.mnu_handbrake_home.Image = global::Handbrake.Properties.Resources.info16;\r
+            this.mnu_handbrake_home.Name = "mnu_handbrake_home";\r
+            this.mnu_handbrake_home.Size = new System.Drawing.Size(215, 22);\r
+            this.mnu_handbrake_home.Text = "HandBrake Homepage";\r
+            this.mnu_handbrake_home.Click += new System.EventHandler(this.mnu_handbrake_home_Click);\r
+            // \r
+            // mnu_handbrake_forums\r
+            // \r
+            this.mnu_handbrake_forums.Name = "mnu_handbrake_forums";\r
+            this.mnu_handbrake_forums.Size = new System.Drawing.Size(215, 22);\r
+            this.mnu_handbrake_forums.Text = "HandBrake Forums";\r
+            this.mnu_handbrake_forums.Click += new System.EventHandler(this.mnu_handbrake_forums_Click);\r
+            // \r
+            // ToolStripSeparator3\r
+            // \r
+            this.ToolStripSeparator3.Name = "ToolStripSeparator3";\r
+            this.ToolStripSeparator3.Size = new System.Drawing.Size(212, 6);\r
+            // \r
+            // mnu_UpdateCheck\r
+            // \r
+            this.mnu_UpdateCheck.Name = "mnu_UpdateCheck";\r
+            this.mnu_UpdateCheck.Size = new System.Drawing.Size(215, 22);\r
+            this.mnu_UpdateCheck.Text = "Check for Updates";\r
+            this.mnu_UpdateCheck.Click += new System.EventHandler(this.mnu_UpdateCheck_Click);\r
+            // \r
+            // toolStripSeparator6\r
+            // \r
+            this.toolStripSeparator6.Name = "toolStripSeparator6";\r
+            this.toolStripSeparator6.Size = new System.Drawing.Size(212, 6);\r
+            // \r
+            // mnu_about\r
+            // \r
+            this.mnu_about.Image = global::Handbrake.Properties.Resources.hb16;\r
+            this.mnu_about.Name = "mnu_about";\r
+            this.mnu_about.Size = new System.Drawing.Size(215, 22);\r
+            this.mnu_about.Text = "About...";\r
+            this.mnu_about.Click += new System.EventHandler(this.mnu_about_Click);\r
+            // \r
+            // frmMainMenu\r
+            // \r
+            this.frmMainMenu.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.frmMainMenu.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;\r
+            this.frmMainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.FileToolStripMenuItem,\r
+            this.ToolsToolStripMenuItem,\r
+            this.PresetsToolStripMenuItem,\r
+            this.HelpToolStripMenuItem});\r
+            this.frmMainMenu.Location = new System.Drawing.Point(0, 0);\r
+            this.frmMainMenu.Name = "frmMainMenu";\r
+            this.frmMainMenu.Size = new System.Drawing.Size(985, 24);\r
+            this.frmMainMenu.TabIndex = 0;\r
+            this.frmMainMenu.Text = "MenuStrip1";\r
+            // \r
+            // GroupBox1\r
+            // \r
+            this.GroupBox1.Controls.Add(this.lbl_duration);\r
+            this.GroupBox1.Controls.Add(this.label_duration);\r
+            this.GroupBox1.Controls.Add(this.Label13);\r
+            this.GroupBox1.Controls.Add(this.drop_chapterFinish);\r
+            this.GroupBox1.Controls.Add(this.drop_chapterStart);\r
+            this.GroupBox1.Controls.Add(this.drp_dvdtitle);\r
+            this.GroupBox1.Controls.Add(this.Label17);\r
+            this.GroupBox1.Controls.Add(this.text_source);\r
+            this.GroupBox1.Controls.Add(this.Label9);\r
+            this.GroupBox1.Controls.Add(this.Label10);\r
+            this.GroupBox1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.GroupBox1.ForeColor = System.Drawing.Color.Black;\r
+            this.GroupBox1.Location = new System.Drawing.Point(12, 70);\r
+            this.GroupBox1.Name = "GroupBox1";\r
+            this.GroupBox1.Size = new System.Drawing.Size(705, 87);\r
+            this.GroupBox1.TabIndex = 2;\r
+            this.GroupBox1.TabStop = false;\r
+            this.GroupBox1.Text = "Source";\r
+            // \r
+            // Label13\r
+            // \r
+            this.Label13.AutoSize = true;\r
+            this.Label13.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label13.Location = new System.Drawing.Point(370, 55);\r
+            this.Label13.Name = "Label13";\r
+            this.Label13.Size = new System.Drawing.Size(51, 13);\r
+            this.Label13.TabIndex = 10;\r
+            this.Label13.Text = "through";\r
+            // \r
+            // Label17\r
+            // \r
+            this.Label17.AutoSize = true;\r
+            this.Label17.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label17.ForeColor = System.Drawing.Color.Black;\r
+            this.Label17.Location = new System.Drawing.Point(17, 22);\r
+            this.Label17.Name = "Label17";\r
+            this.Label17.Size = new System.Drawing.Size(52, 13);\r
+            this.Label17.TabIndex = 0;\r
+            this.Label17.Text = "Source:";\r
+            // \r
+            // Label9\r
+            // \r
+            this.Label9.AutoSize = true;\r
+            this.Label9.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label9.ForeColor = System.Drawing.Color.Black;\r
+            this.Label9.Location = new System.Drawing.Point(225, 55);\r
+            this.Label9.Name = "Label9";\r
+            this.Label9.Size = new System.Drawing.Size(64, 13);\r
+            this.Label9.TabIndex = 8;\r
+            this.Label9.Text = "Chapters:";\r
+            // \r
+            // Label10\r
+            // \r
+            this.Label10.AutoSize = true;\r
+            this.Label10.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label10.ForeColor = System.Drawing.Color.Black;\r
+            this.Label10.Location = new System.Drawing.Point(17, 55);\r
+            this.Label10.Name = "Label10";\r
+            this.Label10.Size = new System.Drawing.Size(36, 13);\r
+            this.Label10.TabIndex = 6;\r
+            this.Label10.Text = "Title:";\r
+            // \r
+            // groupBox_output\r
+            // \r
+            this.groupBox_output.Controls.Add(this.drop_format);\r
+            this.groupBox_output.Controls.Add(this.label5);\r
+            this.groupBox_output.Controls.Add(this.check_largeFile);\r
+            this.groupBox_output.Controls.Add(this.check_iPodAtom);\r
+            this.groupBox_output.Controls.Add(this.check_optimiseMP4);\r
+            this.groupBox_output.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.groupBox_output.ForeColor = System.Drawing.Color.Black;\r
+            this.groupBox_output.Location = new System.Drawing.Point(12, 214);\r
+            this.groupBox_output.Name = "groupBox_output";\r
+            this.groupBox_output.Size = new System.Drawing.Size(705, 50);\r
+            this.groupBox_output.TabIndex = 4;\r
+            this.groupBox_output.TabStop = false;\r
+            this.groupBox_output.Text = "Output Settings (Preset: None)";\r
+            // \r
+            // label5\r
+            // \r
+            this.label5.AutoSize = true;\r
+            this.label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label5.ForeColor = System.Drawing.Color.Black;\r
+            this.label5.Location = new System.Drawing.Point(17, 23);\r
+            this.label5.Name = "label5";\r
+            this.label5.Size = new System.Drawing.Size(52, 13);\r
+            this.label5.TabIndex = 27;\r
+            this.label5.Text = "Format:";\r
+            // \r
+            // Label47\r
+            // \r
+            this.Label47.AutoSize = true;\r
+            this.Label47.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label47.ForeColor = System.Drawing.Color.Black;\r
+            this.Label47.Location = new System.Drawing.Point(13, 39);\r
+            this.Label47.Name = "Label47";\r
+            this.Label47.Size = new System.Drawing.Size(84, 13);\r
+            this.Label47.TabIndex = 0;\r
+            this.Label47.Text = "Video Codec:";\r
+            // \r
+            // Label3\r
+            // \r
+            this.Label3.AutoSize = true;\r
+            this.Label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label3.ForeColor = System.Drawing.Color.Black;\r
+            this.Label3.Location = new System.Drawing.Point(17, 21);\r
+            this.Label3.Name = "Label3";\r
+            this.Label3.Size = new System.Drawing.Size(31, 13);\r
+            this.Label3.TabIndex = 0;\r
+            this.Label3.Text = "File:";\r
+            // \r
+            // TabPage2\r
+            // \r
+            this.TabPage2.BackColor = System.Drawing.Color.Transparent;\r
+            this.TabPage2.Controls.Add(this.lbl_drc4);\r
+            this.TabPage2.Controls.Add(this.lbl_drc3);\r
+            this.TabPage2.Controls.Add(this.lbl_drc2);\r
+            this.TabPage2.Controls.Add(this.lbl_drc1);\r
+            this.TabPage2.Controls.Add(this.trackBar4);\r
+            this.TabPage2.Controls.Add(this.drp_audsr_4);\r
+            this.TabPage2.Controls.Add(this.drp_audbit_4);\r
+            this.TabPage2.Controls.Add(this.drp_audenc_4);\r
+            this.TabPage2.Controls.Add(this.drp_audmix_4);\r
+            this.TabPage2.Controls.Add(this.drp_track4Audio);\r
+            this.TabPage2.Controls.Add(this.lbl_t4);\r
+            this.TabPage2.Controls.Add(this.trackBar3);\r
+            this.TabPage2.Controls.Add(this.drp_audsr_3);\r
+            this.TabPage2.Controls.Add(this.drp_audbit_3);\r
+            this.TabPage2.Controls.Add(this.drp_audenc_3);\r
+            this.TabPage2.Controls.Add(this.drp_audmix_3);\r
+            this.TabPage2.Controls.Add(this.drp_track3Audio);\r
+            this.TabPage2.Controls.Add(this.lbl_t3);\r
+            this.TabPage2.Controls.Add(this.trackBar2);\r
+            this.TabPage2.Controls.Add(this.label16);\r
+            this.TabPage2.Controls.Add(this.trackBar1);\r
+            this.TabPage2.Controls.Add(this.groupBox5);\r
+            this.TabPage2.Controls.Add(this.groupBox3);\r
+            this.TabPage2.Controls.Add(this.label68);\r
+            this.TabPage2.Controls.Add(this.label67);\r
+            this.TabPage2.Controls.Add(this.drp_audsr_2);\r
+            this.TabPage2.Controls.Add(this.label66);\r
+            this.TabPage2.Controls.Add(this.drp_audbit_2);\r
+            this.TabPage2.Controls.Add(this.label65);\r
+            this.TabPage2.Controls.Add(this.label14);\r
+            this.TabPage2.Controls.Add(this.drp_audenc_2);\r
+            this.TabPage2.Controls.Add(this.drp_audenc_1);\r
+            this.TabPage2.Controls.Add(this.drp_audmix_2);\r
+            this.TabPage2.Controls.Add(this.check_forced);\r
+            this.TabPage2.Controls.Add(this.drp_track2Audio);\r
+            this.TabPage2.Controls.Add(this.label28);\r
+            this.TabPage2.Controls.Add(this.label27);\r
+            this.TabPage2.Controls.Add(this.drp_subtitle);\r
+            this.TabPage2.Controls.Add(this.Label19);\r
+            this.TabPage2.Controls.Add(this.Label20);\r
+            this.TabPage2.Controls.Add(this.drp_audmix_1);\r
+            this.TabPage2.Controls.Add(this.drp_track1Audio);\r
+            this.TabPage2.Controls.Add(this.drp_audbit_1);\r
+            this.TabPage2.Controls.Add(this.Label32);\r
+            this.TabPage2.Controls.Add(this.drp_audsr_1);\r
+            this.TabPage2.Location = new System.Drawing.Point(4, 22);\r
+            this.TabPage2.Name = "TabPage2";\r
+            this.TabPage2.Padding = new System.Windows.Forms.Padding(3);\r
+            this.TabPage2.Size = new System.Drawing.Size(697, 316);\r
+            this.TabPage2.TabIndex = 3;\r
+            this.TabPage2.Text = "Audio && Subtitles";\r
+            // \r
+            // lbl_drc4\r
+            // \r
+            this.lbl_drc4.AutoSize = true;\r
+            this.lbl_drc4.BackColor = System.Drawing.Color.Transparent;\r
+            this.lbl_drc4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_drc4.Location = new System.Drawing.Point(670, 176);\r
+            this.lbl_drc4.Name = "lbl_drc4";\r
+            this.lbl_drc4.Size = new System.Drawing.Size(19, 13);\r
+            this.lbl_drc4.TabIndex = 39;\r
+            this.lbl_drc4.Text = "1:";\r
+            // \r
+            // lbl_drc3\r
+            // \r
+            this.lbl_drc3.AutoSize = true;\r
+            this.lbl_drc3.BackColor = System.Drawing.Color.Transparent;\r
+            this.lbl_drc3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_drc3.Location = new System.Drawing.Point(670, 135);\r
+            this.lbl_drc3.Name = "lbl_drc3";\r
+            this.lbl_drc3.Size = new System.Drawing.Size(19, 13);\r
+            this.lbl_drc3.TabIndex = 31;\r
+            this.lbl_drc3.Text = "1:";\r
+            // \r
+            // lbl_drc2\r
+            // \r
+            this.lbl_drc2.AutoSize = true;\r
+            this.lbl_drc2.BackColor = System.Drawing.Color.Transparent;\r
+            this.lbl_drc2.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_drc2.Location = new System.Drawing.Point(670, 90);\r
+            this.lbl_drc2.Name = "lbl_drc2";\r
+            this.lbl_drc2.Size = new System.Drawing.Size(19, 13);\r
+            this.lbl_drc2.TabIndex = 23;\r
+            this.lbl_drc2.Text = "1:";\r
+            // \r
+            // lbl_drc1\r
+            // \r
+            this.lbl_drc1.AutoSize = true;\r
+            this.lbl_drc1.BackColor = System.Drawing.Color.Transparent;\r
+            this.lbl_drc1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_drc1.Location = new System.Drawing.Point(670, 53);\r
+            this.lbl_drc1.Name = "lbl_drc1";\r
+            this.lbl_drc1.Size = new System.Drawing.Size(19, 13);\r
+            this.lbl_drc1.TabIndex = 15;\r
+            this.lbl_drc1.Text = "1:";\r
+            // \r
+            // trackBar4\r
+            // \r
+            this.trackBar4.Enabled = false;\r
+            this.trackBar4.LargeChange = 0;\r
+            this.trackBar4.Location = new System.Drawing.Point(620, 169);\r
+            this.trackBar4.Margin = new System.Windows.Forms.Padding(0);\r
+            this.trackBar4.Maximum = 30;\r
+            this.trackBar4.Name = "trackBar4";\r
+            this.trackBar4.Size = new System.Drawing.Size(49, 42);\r
+            this.trackBar4.TabIndex = 38;\r
+            this.trackBar4.TickFrequency = 10;\r
+            this.trackBar4.ValueChanged += new System.EventHandler(this.trackBar4_Scroll);\r
+            // \r
+            // drp_track4Audio\r
+            // \r
+            this.drp_track4Audio.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_track4Audio.FormattingEnabled = true;\r
+            this.drp_track4Audio.Items.AddRange(new object[] {\r
+            "None"});\r
+            this.drp_track4Audio.Location = new System.Drawing.Point(36, 174);\r
+            this.drp_track4Audio.Name = "drp_track4Audio";\r
+            this.drp_track4Audio.Size = new System.Drawing.Size(194, 20);\r
+            this.drp_track4Audio.TabIndex = 33;\r
+            this.drp_track4Audio.SelectedIndexChanged += new System.EventHandler(this.drp_track4Audio_SelectedIndexChanged);\r
+            // \r
+            // lbl_t4\r
+            // \r
+            this.lbl_t4.AutoSize = true;\r
+            this.lbl_t4.BackColor = System.Drawing.Color.Transparent;\r
+            this.lbl_t4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_t4.Location = new System.Drawing.Point(13, 177);\r
+            this.lbl_t4.Name = "lbl_t4";\r
+            this.lbl_t4.Size = new System.Drawing.Size(19, 13);\r
+            this.lbl_t4.TabIndex = 32;\r
+            this.lbl_t4.Text = "4:";\r
+            // \r
+            // trackBar3\r
+            // \r
+            this.trackBar3.Enabled = false;\r
+            this.trackBar3.LargeChange = 0;\r
+            this.trackBar3.Location = new System.Drawing.Point(620, 128);\r
+            this.trackBar3.Margin = new System.Windows.Forms.Padding(0);\r
+            this.trackBar3.Maximum = 30;\r
+            this.trackBar3.Name = "trackBar3";\r
+            this.trackBar3.Size = new System.Drawing.Size(49, 42);\r
+            this.trackBar3.TabIndex = 30;\r
+            this.trackBar3.TickFrequency = 10;\r
+            this.trackBar3.ValueChanged += new System.EventHandler(this.trackBar3_Scroll);\r
+            // \r
+            // drp_track3Audio\r
+            // \r
+            this.drp_track3Audio.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_track3Audio.FormattingEnabled = true;\r
+            this.drp_track3Audio.Items.AddRange(new object[] {\r
+            "None"});\r
+            this.drp_track3Audio.Location = new System.Drawing.Point(36, 132);\r
+            this.drp_track3Audio.Name = "drp_track3Audio";\r
+            this.drp_track3Audio.Size = new System.Drawing.Size(194, 20);\r
+            this.drp_track3Audio.TabIndex = 25;\r
+            this.drp_track3Audio.SelectedIndexChanged += new System.EventHandler(this.drp_track3Audio_SelectedIndexChanged);\r
+            // \r
+            // lbl_t3\r
+            // \r
+            this.lbl_t3.AutoSize = true;\r
+            this.lbl_t3.BackColor = System.Drawing.Color.Transparent;\r
+            this.lbl_t3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_t3.Location = new System.Drawing.Point(13, 135);\r
+            this.lbl_t3.Name = "lbl_t3";\r
+            this.lbl_t3.Size = new System.Drawing.Size(19, 13);\r
+            this.lbl_t3.TabIndex = 24;\r
+            this.lbl_t3.Text = "3:";\r
+            // \r
+            // trackBar2\r
+            // \r
+            this.trackBar2.LargeChange = 0;\r
+            this.trackBar2.Location = new System.Drawing.Point(620, 86);\r
+            this.trackBar2.Margin = new System.Windows.Forms.Padding(0);\r
+            this.trackBar2.Maximum = 30;\r
+            this.trackBar2.Name = "trackBar2";\r
+            this.trackBar2.Size = new System.Drawing.Size(49, 42);\r
+            this.trackBar2.TabIndex = 22;\r
+            this.trackBar2.TickFrequency = 10;\r
+            this.trackBar2.ValueChanged += new System.EventHandler(this.trackBar2_Scroll);\r
+            // \r
+            // label16\r
+            // \r
+            this.label16.AutoSize = true;\r
+            this.label16.BackColor = System.Drawing.Color.Transparent;\r
+            this.label16.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label16.Location = new System.Drawing.Point(628, 36);\r
+            this.label16.Name = "label16";\r
+            this.label16.Size = new System.Drawing.Size(28, 12);\r
+            this.label16.TabIndex = 14;\r
+            this.label16.Text = "DRC";\r
+            // \r
+            // trackBar1\r
+            // \r
+            this.trackBar1.LargeChange = 0;\r
+            this.trackBar1.Location = new System.Drawing.Point(619, 48);\r
+            this.trackBar1.Margin = new System.Windows.Forms.Padding(0);\r
+            this.trackBar1.Maximum = 30;\r
+            this.trackBar1.Name = "trackBar1";\r
+            this.trackBar1.Size = new System.Drawing.Size(50, 42);\r
+            this.trackBar1.TabIndex = 13;\r
+            this.trackBar1.TickFrequency = 10;\r
+            this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_Scroll);\r
+            // \r
+            // groupBox5\r
+            // \r
+            this.groupBox5.Location = new System.Drawing.Point(107, 13);\r
+            this.groupBox5.Name = "groupBox5";\r
+            this.groupBox5.Size = new System.Drawing.Size(577, 10);\r
+            this.groupBox5.TabIndex = 1;\r
+            this.groupBox5.TabStop = false;\r
+            // \r
+            // groupBox3\r
+            // \r
+            this.groupBox3.Location = new System.Drawing.Point(83, 219);\r
+            this.groupBox3.Name = "groupBox3";\r
+            this.groupBox3.Size = new System.Drawing.Size(601, 10);\r
+            this.groupBox3.TabIndex = 41;\r
+            this.groupBox3.TabStop = false;\r
+            // \r
+            // label68\r
+            // \r
+            this.label68.AutoSize = true;\r
+            this.label68.BackColor = System.Drawing.Color.Transparent;\r
+            this.label68.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label68.Location = new System.Drawing.Point(13, 13);\r
+            this.label68.Name = "label68";\r
+            this.label68.Size = new System.Drawing.Size(92, 13);\r
+            this.label68.TabIndex = 0;\r
+            this.label68.Text = "Audio Tracks";\r
+            // \r
+            // label67\r
+            // \r
+            this.label67.AutoSize = true;\r
+            this.label67.BackColor = System.Drawing.Color.Transparent;\r
+            this.label67.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label67.Location = new System.Drawing.Point(479, 24);\r
+            this.label67.Name = "label67";\r
+            this.label67.Size = new System.Drawing.Size(65, 24);\r
+            this.label67.TabIndex = 10;\r
+            this.label67.Text = "Samplerate \r\n(kHz)";\r
+            // \r
+            // label66\r
+            // \r
+            this.label66.AutoSize = true;\r
+            this.label66.BackColor = System.Drawing.Color.Transparent;\r
+            this.label66.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label66.Location = new System.Drawing.Point(542, 36);\r
+            this.label66.Name = "label66";\r
+            this.label66.Size = new System.Drawing.Size(75, 12);\r
+            this.label66.TabIndex = 12;\r
+            this.label66.Text = "Bitrate (Kbps)";\r
+            // \r
+            // label65\r
+            // \r
+            this.label65.AutoSize = true;\r
+            this.label65.BackColor = System.Drawing.Color.Transparent;\r
+            this.label65.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label65.Location = new System.Drawing.Point(255, 36);\r
+            this.label65.Name = "label65";\r
+            this.label65.Size = new System.Drawing.Size(69, 12);\r
+            this.label65.TabIndex = 6;\r
+            this.label65.Text = "Audio Codec";\r
+            // \r
+            // label14\r
+            // \r
+            this.label14.AutoSize = true;\r
+            this.label14.BackColor = System.Drawing.Color.Transparent;\r
+            this.label14.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label14.Location = new System.Drawing.Point(380, 36);\r
+            this.label14.Name = "label14";\r
+            this.label14.Size = new System.Drawing.Size(48, 12);\r
+            this.label14.TabIndex = 8;\r
+            this.label14.Text = "Mixdown";\r
+            // \r
+            // check_forced\r
+            // \r
+            this.check_forced.AutoSize = true;\r
+            this.check_forced.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_forced.Enabled = false;\r
+            this.check_forced.Location = new System.Drawing.Point(223, 247);\r
+            this.check_forced.Name = "check_forced";\r
+            this.check_forced.Size = new System.Drawing.Size(147, 17);\r
+            this.check_forced.TabIndex = 44;\r
+            this.check_forced.Text = "Forced Subtitles Only";\r
+            this.check_forced.UseVisualStyleBackColor = false;\r
+            // \r
+            // drp_track2Audio\r
+            // \r
+            this.drp_track2Audio.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_track2Audio.FormattingEnabled = true;\r
+            this.drp_track2Audio.Items.AddRange(new object[] {\r
+            "None"});\r
+            this.drp_track2Audio.Location = new System.Drawing.Point(36, 91);\r
+            this.drp_track2Audio.Name = "drp_track2Audio";\r
+            this.drp_track2Audio.Size = new System.Drawing.Size(194, 20);\r
+            this.drp_track2Audio.TabIndex = 17;\r
+            this.drp_track2Audio.SelectedIndexChanged += new System.EventHandler(this.drp_track2Audio_SelectedIndexChanged);\r
+            // \r
+            // label28\r
+            // \r
+            this.label28.AutoSize = true;\r
+            this.label28.BackColor = System.Drawing.Color.Transparent;\r
+            this.label28.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label28.Location = new System.Drawing.Point(13, 94);\r
+            this.label28.Name = "label28";\r
+            this.label28.Size = new System.Drawing.Size(19, 13);\r
+            this.label28.TabIndex = 16;\r
+            this.label28.Text = "2:";\r
+            // \r
+            // label27\r
+            // \r
+            this.label27.AutoSize = true;\r
+            this.label27.BackColor = System.Drawing.Color.Transparent;\r
+            this.label27.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label27.Location = new System.Drawing.Point(107, 36);\r
+            this.label27.Name = "label27";\r
+            this.label27.Size = new System.Drawing.Size(40, 12);\r
+            this.label27.TabIndex = 4;\r
+            this.label27.Text = "Source";\r
+            // \r
+            // Label19\r
+            // \r
+            this.Label19.AutoSize = true;\r
+            this.Label19.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label19.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label19.Location = new System.Drawing.Point(13, 219);\r
+            this.Label19.Name = "Label19";\r
+            this.Label19.Size = new System.Drawing.Size(64, 13);\r
+            this.Label19.TabIndex = 40;\r
+            this.Label19.Text = "Subtitles";\r
+            // \r
+            // Label20\r
+            // \r
+            this.Label20.AutoSize = true;\r
+            this.Label20.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label20.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label20.Location = new System.Drawing.Point(13, 247);\r
+            this.Label20.Name = "Label20";\r
+            this.Label20.Size = new System.Drawing.Size(61, 13);\r
+            this.Label20.TabIndex = 42;\r
+            this.Label20.Text = "Subtitles:";\r
+            // \r
+            // drp_track1Audio\r
+            // \r
+            this.drp_track1Audio.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_track1Audio.FormattingEnabled = true;\r
+            this.drp_track1Audio.Items.AddRange(new object[] {\r
+            "Automatic"});\r
+            this.drp_track1Audio.Location = new System.Drawing.Point(36, 54);\r
+            this.drp_track1Audio.Name = "drp_track1Audio";\r
+            this.drp_track1Audio.Size = new System.Drawing.Size(194, 20);\r
+            this.drp_track1Audio.TabIndex = 3;\r
+            // \r
+            // Label32\r
+            // \r
+            this.Label32.AutoSize = true;\r
+            this.Label32.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label32.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label32.Location = new System.Drawing.Point(13, 57);\r
+            this.Label32.Name = "Label32";\r
+            this.Label32.Size = new System.Drawing.Size(19, 13);\r
+            this.Label32.TabIndex = 2;\r
+            this.Label32.Text = "1:";\r
+            // \r
+            // TabPage3\r
+            // \r
+            this.TabPage3.BackColor = System.Drawing.Color.Transparent;\r
+            this.TabPage3.Controls.Add(this.drp_videoEncoder);\r
+            this.TabPage3.Controls.Add(this.Label47);\r
+            this.TabPage3.Controls.Add(this.label25);\r
+            this.TabPage3.Controls.Add(this.check_grayscale);\r
+            this.TabPage3.Controls.Add(this.check_turbo);\r
+            this.TabPage3.Controls.Add(this.Label22);\r
+            this.TabPage3.Controls.Add(this.check_2PassEncode);\r
+            this.TabPage3.Controls.Add(this.Label2);\r
+            this.TabPage3.Controls.Add(this.text_filesize);\r
+            this.TabPage3.Controls.Add(this.Label42);\r
+            this.TabPage3.Controls.Add(this.slider_videoQuality);\r
+            this.TabPage3.Controls.Add(this.text_bitrate);\r
+            this.TabPage3.Controls.Add(Label38);\r
+            this.TabPage3.Controls.Add(this.SliderValue);\r
+            this.TabPage3.Controls.Add(this.Label46);\r
+            this.TabPage3.Controls.Add(this.Label40);\r
+            this.TabPage3.Controls.Add(this.drp_videoFramerate);\r
+            this.TabPage3.Location = new System.Drawing.Point(4, 22);\r
+            this.TabPage3.Name = "TabPage3";\r
+            this.TabPage3.Padding = new System.Windows.Forms.Padding(3);\r
+            this.TabPage3.Size = new System.Drawing.Size(697, 316);\r
+            this.TabPage3.TabIndex = 2;\r
+            this.TabPage3.Text = "Video";\r
+            // \r
+            // label25\r
+            // \r
+            this.label25.AutoSize = true;\r
+            this.label25.BackColor = System.Drawing.Color.Transparent;\r
+            this.label25.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label25.Location = new System.Drawing.Point(13, 13);\r
+            this.label25.Name = "label25";\r
+            this.label25.Size = new System.Drawing.Size(43, 13);\r
+            this.label25.TabIndex = 0;\r
+            this.label25.Text = "Video";\r
+            // \r
+            // check_grayscale\r
+            // \r
+            this.check_grayscale.AutoSize = true;\r
+            this.check_grayscale.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_grayscale.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_grayscale.Location = new System.Drawing.Point(16, 138);\r
+            this.check_grayscale.Name = "check_grayscale";\r
+            this.check_grayscale.Size = new System.Drawing.Size(138, 17);\r
+            this.check_grayscale.TabIndex = 5;\r
+            this.check_grayscale.Text = "Grayscale Encoding";\r
+            this.check_grayscale.UseVisualStyleBackColor = false;\r
+            // \r
+            // Label22\r
+            // \r
+            this.Label22.AutoSize = true;\r
+            this.Label22.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label22.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label22.Location = new System.Drawing.Point(13, 118);\r
+            this.Label22.Name = "Label22";\r
+            this.Label22.Size = new System.Drawing.Size(191, 13);\r
+            this.Label22.TabIndex = 4;\r
+            this.Label22.Text = "Advanced Encoding Settings";\r
+            // \r
+            // check_2PassEncode\r
+            // \r
+            this.check_2PassEncode.AutoSize = true;\r
+            this.check_2PassEncode.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_2PassEncode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_2PassEncode.Location = new System.Drawing.Point(16, 161);\r
+            this.check_2PassEncode.Name = "check_2PassEncode";\r
+            this.check_2PassEncode.Size = new System.Drawing.Size(119, 17);\r
+            this.check_2PassEncode.TabIndex = 6;\r
+            this.check_2PassEncode.Text = "2-Pass Encoding";\r
+            this.check_2PassEncode.UseVisualStyleBackColor = false;\r
+            this.check_2PassEncode.CheckedChanged += new System.EventHandler(this.check_2PassEncode_CheckedChanged);\r
+            // \r
+            // Label2\r
+            // \r
+            this.Label2.AutoSize = true;\r
+            this.Label2.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label2.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label2.Location = new System.Drawing.Point(334, 13);\r
+            this.Label2.Name = "Label2";\r
+            this.Label2.Size = new System.Drawing.Size(53, 13);\r
+            this.Label2.TabIndex = 8;\r
+            this.Label2.Text = "Quality";\r
+            // \r
+            // Label42\r
+            // \r
+            this.Label42.AutoSize = true;\r
+            this.Label42.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label42.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label42.Location = new System.Drawing.Point(334, 65);\r
+            this.Label42.Name = "Label42";\r
+            this.Label42.Size = new System.Drawing.Size(117, 13);\r
+            this.Label42.TabIndex = 9;\r
+            this.Label42.Text = "Avg Bitrate (kbps):";\r
+            // \r
+            // SliderValue\r
+            // \r
+            this.SliderValue.AutoSize = true;\r
+            this.SliderValue.BackColor = System.Drawing.Color.Transparent;\r
+            this.SliderValue.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.SliderValue.Location = new System.Drawing.Point(641, 100);\r
+            this.SliderValue.Name = "SliderValue";\r
+            this.SliderValue.Size = new System.Drawing.Size(23, 12);\r
+            this.SliderValue.TabIndex = 15;\r
+            this.SliderValue.Text = "0%";\r
+            // \r
+            // Label46\r
+            // \r
+            this.Label46.AutoSize = true;\r
+            this.Label46.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label46.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label46.Location = new System.Drawing.Point(13, 71);\r
+            this.Label46.Name = "Label46";\r
+            this.Label46.Size = new System.Drawing.Size(106, 13);\r
+            this.Label46.TabIndex = 1;\r
+            this.Label46.Text = "Framerate (FPS):";\r
+            // \r
+            // Label40\r
+            // \r
+            this.Label40.AutoSize = true;\r
+            this.Label40.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label40.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label40.Location = new System.Drawing.Point(334, 99);\r
+            this.Label40.Name = "Label40";\r
+            this.Label40.Size = new System.Drawing.Size(107, 13);\r
+            this.Label40.TabIndex = 13;\r
+            this.Label40.Text = "Constant Quality:";\r
+            // \r
+            // TabPage1\r
+            // \r
+            this.TabPage1.BackColor = System.Drawing.Color.Transparent;\r
+            this.TabPage1.Controls.Add(this.slider_deblock);\r
+            this.TabPage1.Controls.Add(this.label8);\r
+            this.TabPage1.Controls.Add(this.lbl_deblockVal);\r
+            this.TabPage1.Controls.Add(this.check_customCrop);\r
+            this.TabPage1.Controls.Add(this.check_autoCrop);\r
+            this.TabPage1.Controls.Add(this.check_decomb);\r
+            this.TabPage1.Controls.Add(this.lbl_src_res);\r
+            this.TabPage1.Controls.Add(this.label7);\r
+            this.TabPage1.Controls.Add(this.label6);\r
+            this.TabPage1.Controls.Add(this.drp_anamorphic);\r
+            this.TabPage1.Controls.Add(this.text_bottom);\r
+            this.TabPage1.Controls.Add(this.text_top);\r
+            this.TabPage1.Controls.Add(this.text_left);\r
+            this.TabPage1.Controls.Add(this.text_right);\r
+            this.TabPage1.Controls.Add(this.label26);\r
+            this.TabPage1.Controls.Add(this.Label56);\r
+            this.TabPage1.Controls.Add(this.lbl_Aspect);\r
+            this.TabPage1.Controls.Add(this.Label91);\r
+            this.TabPage1.Controls.Add(this.text_height);\r
+            this.TabPage1.Controls.Add(this.Label55);\r
+            this.TabPage1.Controls.Add(this.text_width);\r
+            this.TabPage1.Controls.Add(this.label24);\r
+            this.TabPage1.Controls.Add(this.drp_deNoise);\r
+            this.TabPage1.Controls.Add(this.label11);\r
+            this.TabPage1.Controls.Add(this.check_detelecine);\r
+            this.TabPage1.Controls.Add(this.label4);\r
+            this.TabPage1.Controls.Add(this.drp_deInterlace_option);\r
+            this.TabPage1.Controls.Add(this.Label1);\r
+            this.TabPage1.Controls.Add(this.Label53);\r
+            this.TabPage1.Controls.Add(this.Label52);\r
+            this.TabPage1.Controls.Add(this.Label51);\r
+            this.TabPage1.Controls.Add(this.Label15);\r
+            this.TabPage1.Location = new System.Drawing.Point(4, 22);\r
+            this.TabPage1.Name = "TabPage1";\r
+            this.TabPage1.Padding = new System.Windows.Forms.Padding(3);\r
+            this.TabPage1.Size = new System.Drawing.Size(697, 316);\r
+            this.TabPage1.TabIndex = 0;\r
+            this.TabPage1.Text = "Picture Settings";\r
+            // \r
+            // slider_deblock\r
+            // \r
+            this.slider_deblock.Location = new System.Drawing.Point(407, 264);\r
+            this.slider_deblock.Maximum = 15;\r
+            this.slider_deblock.Minimum = 4;\r
+            this.slider_deblock.Name = "slider_deblock";\r
+            this.slider_deblock.Size = new System.Drawing.Size(174, 42);\r
+            this.slider_deblock.TabIndex = 35;\r
+            this.slider_deblock.Value = 4;\r
+            this.slider_deblock.Scroll += new System.EventHandler(this.slider_deblock_Scroll);\r
+            // \r
+            // label8\r
+            // \r
+            this.label8.AutoSize = true;\r
+            this.label8.BackColor = System.Drawing.Color.Transparent;\r
+            this.label8.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label8.Location = new System.Drawing.Point(311, 269);\r
+            this.label8.Name = "label8";\r
+            this.label8.Size = new System.Drawing.Size(58, 13);\r
+            this.label8.TabIndex = 37;\r
+            this.label8.Text = "Deblock:";\r
+            // \r
+            // lbl_deblockVal\r
+            // \r
+            this.lbl_deblockVal.AutoSize = true;\r
+            this.lbl_deblockVal.BackColor = System.Drawing.Color.Transparent;\r
+            this.lbl_deblockVal.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_deblockVal.Location = new System.Drawing.Point(585, 269);\r
+            this.lbl_deblockVal.Name = "lbl_deblockVal";\r
+            this.lbl_deblockVal.Size = new System.Drawing.Size(24, 13);\r
+            this.lbl_deblockVal.TabIndex = 36;\r
+            this.lbl_deblockVal.Text = "Off";\r
+            // \r
+            // check_decomb\r
+            // \r
+            this.check_decomb.AutoSize = true;\r
+            this.check_decomb.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_decomb.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_decomb.Location = new System.Drawing.Point(314, 188);\r
+            this.check_decomb.Name = "check_decomb";\r
+            this.check_decomb.Size = new System.Drawing.Size(73, 17);\r
+            this.check_decomb.TabIndex = 32;\r
+            this.check_decomb.Text = "Decomb";\r
+            this.check_decomb.UseVisualStyleBackColor = false;\r
+            // \r
+            // label6\r
+            // \r
+            this.label6.AutoSize = true;\r
+            this.label6.BackColor = System.Drawing.Color.Transparent;\r
+            this.label6.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label6.Location = new System.Drawing.Point(311, 111);\r
+            this.label6.Name = "label6";\r
+            this.label6.Size = new System.Drawing.Size(80, 13);\r
+            this.label6.TabIndex = 20;\r
+            this.label6.Text = "Anamorphic:";\r
+            // \r
+            // drp_anamorphic\r
+            // \r
+            this.drp_anamorphic.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drp_anamorphic.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_anamorphic.FormattingEnabled = true;\r
+            this.drp_anamorphic.Items.AddRange(new object[] {\r
+            "None",\r
+            "Strict",\r
+            "Loose"});\r
+            this.drp_anamorphic.Location = new System.Drawing.Point(407, 108);\r
+            this.drp_anamorphic.Name = "drp_anamorphic";\r
+            this.drp_anamorphic.Size = new System.Drawing.Size(110, 21);\r
+            this.drp_anamorphic.TabIndex = 21;\r
+            this.drp_anamorphic.SelectedIndexChanged += new System.EventHandler(this.drp_anamorphic_SelectedIndexChanged);\r
+            // \r
+            // text_bottom\r
+            // \r
+            this.text_bottom.Enabled = false;\r
+            this.text_bottom.Location = new System.Drawing.Point(96, 147);\r
+            this.text_bottom.Maximum = new decimal(new int[] {\r
+            1080,\r
+            0,\r
+            0,\r
+            0});\r
+            this.text_bottom.Name = "text_bottom";\r
+            this.text_bottom.Size = new System.Drawing.Size(44, 21);\r
+            this.text_bottom.TabIndex = 9;\r
+            // \r
+            // text_top\r
+            // \r
+            this.text_top.Enabled = false;\r
+            this.text_top.Location = new System.Drawing.Point(96, 101);\r
+            this.text_top.Maximum = new decimal(new int[] {\r
+            1080,\r
+            0,\r
+            0,\r
+            0});\r
+            this.text_top.Name = "text_top";\r
+            this.text_top.Size = new System.Drawing.Size(44, 21);\r
+            this.text_top.TabIndex = 6;\r
+            // \r
+            // text_left\r
+            // \r
+            this.text_left.Enabled = false;\r
+            this.text_left.Location = new System.Drawing.Point(45, 123);\r
+            this.text_left.Maximum = new decimal(new int[] {\r
+            1920,\r
+            0,\r
+            0,\r
+            0});\r
+            this.text_left.Name = "text_left";\r
+            this.text_left.Size = new System.Drawing.Size(44, 21);\r
+            this.text_left.TabIndex = 4;\r
+            // \r
+            // text_right\r
+            // \r
+            this.text_right.Enabled = false;\r
+            this.text_right.Location = new System.Drawing.Point(147, 123);\r
+            this.text_right.Maximum = new decimal(new int[] {\r
+            1920,\r
+            0,\r
+            0,\r
+            0});\r
+            this.text_right.Name = "text_right";\r
+            this.text_right.Size = new System.Drawing.Size(44, 21);\r
+            this.text_right.TabIndex = 7;\r
+            // \r
+            // label26\r
+            // \r
+            this.label26.AutoSize = true;\r
+            this.label26.BackColor = System.Drawing.Color.Transparent;\r
+            this.label26.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label26.Location = new System.Drawing.Point(311, 13);\r
+            this.label26.Name = "label26";\r
+            this.label26.Size = new System.Drawing.Size(34, 13);\r
+            this.label26.TabIndex = 11;\r
+            this.label26.Text = "Size";\r
+            // \r
+            // Label56\r
+            // \r
+            this.Label56.AutoSize = true;\r
+            this.Label56.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label56.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label56.ForeColor = System.Drawing.Color.Black;\r
+            this.Label56.Location = new System.Drawing.Point(477, 85);\r
+            this.Label56.Name = "Label56";\r
+            this.Label56.Size = new System.Drawing.Size(15, 13);\r
+            this.Label56.TabIndex = 18;\r
+            this.Label56.Text = "x";\r
+            // \r
+            // lbl_Aspect\r
+            // \r
+            this.lbl_Aspect.AutoSize = true;\r
+            this.lbl_Aspect.BackColor = System.Drawing.Color.Transparent;\r
+            this.lbl_Aspect.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_Aspect.Location = new System.Drawing.Point(405, 58);\r
+            this.lbl_Aspect.Name = "lbl_Aspect";\r
+            this.lbl_Aspect.Size = new System.Drawing.Size(72, 12);\r
+            this.lbl_Aspect.TabIndex = 15;\r
+            this.lbl_Aspect.Text = "Select a Title";\r
+            // \r
+            // Label91\r
+            // \r
+            this.Label91.AutoSize = true;\r
+            this.Label91.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label91.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label91.Location = new System.Drawing.Point(311, 57);\r
+            this.Label91.Name = "Label91";\r
+            this.Label91.Size = new System.Drawing.Size(83, 13);\r
+            this.Label91.TabIndex = 14;\r
+            this.Label91.Text = "Aspect Ratio:";\r
+            // \r
+            // Label55\r
+            // \r
+            this.Label55.AutoSize = true;\r
+            this.Label55.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label55.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label55.ForeColor = System.Drawing.Color.Black;\r
+            this.Label55.Location = new System.Drawing.Point(311, 84);\r
+            this.Label55.Name = "Label55";\r
+            this.Label55.Size = new System.Drawing.Size(85, 13);\r
+            this.Label55.TabIndex = 16;\r
+            this.Label55.Text = "Width/Height:";\r
+            // \r
+            // label24\r
+            // \r
+            this.label24.AutoSize = true;\r
+            this.label24.BackColor = System.Drawing.Color.Transparent;\r
+            this.label24.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label24.Location = new System.Drawing.Point(311, 142);\r
+            this.label24.Name = "label24";\r
+            this.label24.Size = new System.Drawing.Size(49, 13);\r
+            this.label24.TabIndex = 22;\r
+            this.label24.Text = "Filters";\r
+            // \r
+            // drp_deNoise\r
+            // \r
+            this.drp_deNoise.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drp_deNoise.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_deNoise.FormattingEnabled = true;\r
+            this.drp_deNoise.Items.AddRange(new object[] {\r
+            "None",\r
+            "Weak",\r
+            "Medium",\r
+            "Strong"});\r
+            this.drp_deNoise.Location = new System.Drawing.Point(413, 237);\r
+            this.drp_deNoise.Name = "drp_deNoise";\r
+            this.drp_deNoise.Size = new System.Drawing.Size(161, 21);\r
+            this.drp_deNoise.TabIndex = 29;\r
+            // \r
+            // label11\r
+            // \r
+            this.label11.AutoSize = true;\r
+            this.label11.BackColor = System.Drawing.Color.Transparent;\r
+            this.label11.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label11.Location = new System.Drawing.Point(311, 240);\r
+            this.label11.Name = "label11";\r
+            this.label11.Size = new System.Drawing.Size(58, 13);\r
+            this.label11.TabIndex = 28;\r
+            this.label11.Text = "Denoise:";\r
+            // \r
+            // check_detelecine\r
+            // \r
+            this.check_detelecine.AutoSize = true;\r
+            this.check_detelecine.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_detelecine.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_detelecine.Location = new System.Drawing.Point(314, 165);\r
+            this.check_detelecine.Name = "check_detelecine";\r
+            this.check_detelecine.Size = new System.Drawing.Size(86, 17);\r
+            this.check_detelecine.TabIndex = 23;\r
+            this.check_detelecine.Text = "Detelecine";\r
+            this.check_detelecine.UseVisualStyleBackColor = false;\r
+            // \r
+            // label4\r
+            // \r
+            this.label4.AutoSize = true;\r
+            this.label4.BackColor = System.Drawing.Color.Transparent;\r
+            this.label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label4.Location = new System.Drawing.Point(311, 212);\r
+            this.label4.Name = "label4";\r
+            this.label4.Size = new System.Drawing.Size(77, 13);\r
+            this.label4.TabIndex = 26;\r
+            this.label4.Text = "Deinterlace:";\r
+            // \r
+            // drp_deInterlace_option\r
+            // \r
+            this.drp_deInterlace_option.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drp_deInterlace_option.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_deInterlace_option.FormattingEnabled = true;\r
+            this.drp_deInterlace_option.Items.AddRange(new object[] {\r
+            "None",\r
+            "Fast",\r
+            "Slow",\r
+            "Slower"});\r
+            this.drp_deInterlace_option.Location = new System.Drawing.Point(413, 209);\r
+            this.drp_deInterlace_option.Name = "drp_deInterlace_option";\r
+            this.drp_deInterlace_option.Size = new System.Drawing.Size(161, 21);\r
+            this.drp_deInterlace_option.TabIndex = 27;\r
+            // \r
+            // Label1\r
+            // \r
+            this.Label1.AutoSize = true;\r
+            this.Label1.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label1.Location = new System.Drawing.Point(13, 13);\r
+            this.Label1.Name = "Label1";\r
+            this.Label1.Size = new System.Drawing.Size(37, 13);\r
+            this.Label1.TabIndex = 0;\r
+            this.Label1.Text = "Crop";\r
+            // \r
+            // Label53\r
+            // \r
+            this.Label53.AutoSize = true;\r
+            this.Label53.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label53.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label53.Location = new System.Drawing.Point(94, 171);\r
+            this.Label53.Name = "Label53";\r
+            this.Label53.Size = new System.Drawing.Size(48, 13);\r
+            this.Label53.TabIndex = 10;\r
+            this.Label53.Text = "Bottom";\r
+            // \r
+            // Label52\r
+            // \r
+            this.Label52.AutoSize = true;\r
+            this.Label52.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label52.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label52.Location = new System.Drawing.Point(103, 86);\r
+            this.Label52.Name = "Label52";\r
+            this.Label52.Size = new System.Drawing.Size(28, 13);\r
+            this.Label52.TabIndex = 5;\r
+            this.Label52.Text = "Top";\r
+            // \r
+            // Label51\r
+            // \r
+            this.Label51.AutoSize = true;\r
+            this.Label51.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label51.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label51.Location = new System.Drawing.Point(190, 125);\r
+            this.Label51.Name = "Label51";\r
+            this.Label51.Size = new System.Drawing.Size(36, 13);\r
+            this.Label51.TabIndex = 8;\r
+            this.Label51.Text = "Right";\r
+            // \r
+            // Label15\r
+            // \r
+            this.Label15.AutoSize = true;\r
+            this.Label15.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label15.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label15.Location = new System.Drawing.Point(13, 125);\r
+            this.Label15.Name = "Label15";\r
+            this.Label15.Size = new System.Drawing.Size(28, 13);\r
+            this.Label15.TabIndex = 3;\r
+            this.Label15.Text = "Left";\r
+            // \r
+            // Check_ChapterMarkers\r
+            // \r
+            this.Check_ChapterMarkers.AutoSize = true;\r
+            this.Check_ChapterMarkers.BackColor = System.Drawing.Color.Transparent;\r
+            this.Check_ChapterMarkers.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Check_ChapterMarkers.Location = new System.Drawing.Point(16, 32);\r
+            this.Check_ChapterMarkers.Name = "Check_ChapterMarkers";\r
+            this.Check_ChapterMarkers.Size = new System.Drawing.Size(164, 17);\r
+            this.Check_ChapterMarkers.TabIndex = 1;\r
+            this.Check_ChapterMarkers.Text = "Create chapter markers";\r
+            this.Check_ChapterMarkers.UseVisualStyleBackColor = false;\r
+            this.Check_ChapterMarkers.CheckedChanged += new System.EventHandler(this.Check_ChapterMarkers_CheckedChanged);\r
+            // \r
+            // advancedOptions\r
+            // \r
+            this.advancedOptions.Controls.Add(this.TabPage1);\r
+            this.advancedOptions.Controls.Add(this.TabPage3);\r
+            this.advancedOptions.Controls.Add(this.TabPage2);\r
+            this.advancedOptions.Controls.Add(this.tab_chapters);\r
+            this.advancedOptions.Controls.Add(this.h264Tab);\r
+            this.advancedOptions.Controls.Add(this.tabPage4);\r
+            this.advancedOptions.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.advancedOptions.Location = new System.Drawing.Point(12, 274);\r
+            this.advancedOptions.Name = "advancedOptions";\r
+            this.advancedOptions.SelectedIndex = 0;\r
+            this.advancedOptions.Size = new System.Drawing.Size(705, 342);\r
+            this.advancedOptions.TabIndex = 5;\r
+            this.advancedOptions.TabStop = false;\r
+            // \r
+            // tab_chapters\r
+            // \r
+            this.tab_chapters.BackColor = System.Drawing.Color.Transparent;\r
+            this.tab_chapters.Controls.Add(this.label31);\r
+            this.tab_chapters.Controls.Add(this.data_chpt);\r
+            this.tab_chapters.Controls.Add(this.Check_ChapterMarkers);\r
+            this.tab_chapters.Location = new System.Drawing.Point(4, 22);\r
+            this.tab_chapters.Name = "tab_chapters";\r
+            this.tab_chapters.Size = new System.Drawing.Size(697, 316);\r
+            this.tab_chapters.TabIndex = 6;\r
+            this.tab_chapters.Text = "Chapters";\r
+            // \r
+            // label31\r
+            // \r
+            this.label31.AutoSize = true;\r
+            this.label31.BackColor = System.Drawing.Color.Transparent;\r
+            this.label31.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label31.Location = new System.Drawing.Point(13, 13);\r
+            this.label31.Name = "label31";\r
+            this.label31.Size = new System.Drawing.Size(115, 13);\r
+            this.label31.TabIndex = 0;\r
+            this.label31.Text = "Chapter Markers";\r
+            // \r
+            // h264Tab\r
+            // \r
+            this.h264Tab.BackColor = System.Drawing.Color.Transparent;\r
+            this.h264Tab.Controls.Add(this.label43);\r
+            this.h264Tab.Controls.Add(this.btn_reset);\r
+            this.h264Tab.Controls.Add(this.rtf_x264Query);\r
+            this.h264Tab.Controls.Add(this.check_Cabac);\r
+            this.h264Tab.Controls.Add(this.check_noDCTDecimate);\r
+            this.h264Tab.Controls.Add(this.check_noFastPSkip);\r
+            this.h264Tab.Controls.Add(this.lbl_trellis);\r
+            this.h264Tab.Controls.Add(this.drop_trellis);\r
+            this.h264Tab.Controls.Add(this.drop_deblockBeta);\r
+            this.h264Tab.Controls.Add(this.label41);\r
+            this.h264Tab.Controls.Add(this.drop_deblockAlpha);\r
+            this.h264Tab.Controls.Add(this.panel3);\r
+            this.h264Tab.Controls.Add(this.panel1);\r
+            this.h264Tab.Controls.Add(this.panel2);\r
+            this.h264Tab.Controls.Add(this.check_8x8DCT);\r
+            this.h264Tab.Controls.Add(this.label45);\r
+            this.h264Tab.Controls.Add(this.drop_analysis);\r
+            this.h264Tab.Controls.Add(this.label48);\r
+            this.h264Tab.Controls.Add(this.drop_subpixelMotionEstimation);\r
+            this.h264Tab.Controls.Add(this.label49);\r
+            this.h264Tab.Controls.Add(this.drop_MotionEstimationRange);\r
+            this.h264Tab.Controls.Add(this.label54);\r
+            this.h264Tab.Controls.Add(this.drop_MotionEstimationMethod);\r
+            this.h264Tab.Controls.Add(this.check_pyrmidalBFrames);\r
+            this.h264Tab.Controls.Add(this.check_weightedBFrames);\r
+            this.h264Tab.Controls.Add(this.lbl_direct_prediction);\r
+            this.h264Tab.Controls.Add(this.drop_directPrediction);\r
+            this.h264Tab.Controls.Add(this.label62);\r
+            this.h264Tab.Controls.Add(this.drop_bFrames);\r
+            this.h264Tab.Controls.Add(this.label64);\r
+            this.h264Tab.Controls.Add(this.drop_refFrames);\r
+            this.h264Tab.Controls.Add(this.check_mixedReferences);\r
+            this.h264Tab.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.h264Tab.Location = new System.Drawing.Point(4, 22);\r
+            this.h264Tab.Name = "h264Tab";\r
+            this.h264Tab.Padding = new System.Windows.Forms.Padding(3);\r
+            this.h264Tab.Size = new System.Drawing.Size(697, 316);\r
+            this.h264Tab.TabIndex = 8;\r
+            this.h264Tab.Text = "Advanced";\r
+            // \r
+            // label43\r
+            // \r
+            this.label43.AutoSize = true;\r
+            this.label43.BackColor = System.Drawing.Color.Transparent;\r
+            this.label43.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label43.Location = new System.Drawing.Point(13, 13);\r
+            this.label43.Name = "label43";\r
+            this.label43.Size = new System.Drawing.Size(165, 13);\r
+            this.label43.TabIndex = 0;\r
+            this.label43.Text = "Advanced H.264 Options";\r
+            // \r
+            // btn_reset\r
+            // \r
+            this.btn_reset.Location = new System.Drawing.Point(13, 224);\r
+            this.btn_reset.Name = "btn_reset";\r
+            this.btn_reset.Size = new System.Drawing.Size(75, 23);\r
+            this.btn_reset.TabIndex = 41;\r
+            this.btn_reset.Text = "Reset All";\r
+            this.btn_reset.UseVisualStyleBackColor = true;\r
+            this.btn_reset.Click += new System.EventHandler(this.btn_reset_Click);\r
+            // \r
+            // rtf_x264Query\r
+            // \r
+            this.rtf_x264Query.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
+            this.rtf_x264Query.Location = new System.Drawing.Point(13, 253);\r
+            this.rtf_x264Query.Name = "rtf_x264Query";\r
+            this.rtf_x264Query.Size = new System.Drawing.Size(667, 43);\r
+            this.rtf_x264Query.TabIndex = 42;\r
+            this.rtf_x264Query.Text = "";\r
+            this.rtf_x264Query.LostFocus += new System.EventHandler(this.rtf_x264Query_TextChanged);\r
+            this.rtf_x264Query.TextChanged += new System.EventHandler(this.rtf_x264Query_TextChanged);\r
+            // \r
+            // lbl_trellis\r
+            // \r
+            this.lbl_trellis.AutoSize = true;\r
+            this.lbl_trellis.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_trellis.Location = new System.Drawing.Point(490, 169);\r
+            this.lbl_trellis.Name = "lbl_trellis";\r
+            this.lbl_trellis.Size = new System.Drawing.Size(41, 12);\r
+            this.lbl_trellis.TabIndex = 26;\r
+            this.lbl_trellis.Text = "Trellis:";\r
+            // \r
+            // label41\r
+            // \r
+            this.label41.AutoSize = true;\r
+            this.label41.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label41.Location = new System.Drawing.Point(466, 147);\r
+            this.label41.Name = "label41";\r
+            this.label41.Size = new System.Drawing.Size(65, 12);\r
+            this.label41.TabIndex = 25;\r
+            this.label41.Text = "Deblocking:";\r
+            // \r
+            // panel3\r
+            // \r
+            this.panel3.BackColor = System.Drawing.Color.Black;\r
+            this.panel3.Location = new System.Drawing.Point(396, 131);\r
+            this.panel3.Margin = new System.Windows.Forms.Padding(0);\r
+            this.panel3.Name = "panel3";\r
+            this.panel3.Size = new System.Drawing.Size(284, 1);\r
+            this.panel3.TabIndex = 24;\r
+            // \r
+            // panel1\r
+            // \r
+            this.panel1.BackColor = System.Drawing.Color.Black;\r
+            this.panel1.Location = new System.Drawing.Point(13, 84);\r
+            this.panel1.Margin = new System.Windows.Forms.Padding(0);\r
+            this.panel1.Name = "panel1";\r
+            this.panel1.Size = new System.Drawing.Size(284, 1);\r
+            this.panel1.TabIndex = 3;\r
+            // \r
+            // panel2\r
+            // \r
+            this.panel2.BackColor = System.Drawing.Color.Black;\r
+            this.panel2.Location = new System.Drawing.Point(396, 95);\r
+            this.panel2.Margin = new System.Windows.Forms.Padding(0);\r
+            this.panel2.Name = "panel2";\r
+            this.panel2.Size = new System.Drawing.Size(284, 1);\r
+            this.panel2.TabIndex = 21;\r
+            // \r
+            // label45\r
+            // \r
+            this.label45.AutoSize = true;\r
+            this.label45.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label45.Location = new System.Drawing.Point(478, 108);\r
+            this.label45.Name = "label45";\r
+            this.label45.Size = new System.Drawing.Size(53, 12);\r
+            this.label45.TabIndex = 22;\r
+            this.label45.Text = "Analysis:";\r
+            // \r
+            // label48\r
+            // \r
+            this.label48.AutoSize = true;\r
+            this.label48.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label48.Location = new System.Drawing.Point(385, 72);\r
+            this.label48.Name = "label48";\r
+            this.label48.Size = new System.Drawing.Size(146, 12);\r
+            this.label48.TabIndex = 20;\r
+            this.label48.Text = "Subpixel Motion Estimation:";\r
+            // \r
+            // label49\r
+            // \r
+            this.label49.AutoSize = true;\r
+            this.label49.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label49.Location = new System.Drawing.Point(397, 43);\r
+            this.label49.Name = "label49";\r
+            this.label49.Size = new System.Drawing.Size(134, 12);\r
+            this.label49.TabIndex = 19;\r
+            this.label49.Text = "Motion Estimation Range:";\r
+            // \r
+            // label54\r
+            // \r
+            this.label54.AutoSize = true;\r
+            this.label54.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label54.Location = new System.Drawing.Point(391, 14);\r
+            this.label54.Name = "label54";\r
+            this.label54.Size = new System.Drawing.Size(140, 12);\r
+            this.label54.TabIndex = 18;\r
+            this.label54.Text = "Motion Estimation Method:";\r
+            // \r
+            // lbl_direct_prediction\r
+            // \r
+            this.lbl_direct_prediction.AutoSize = true;\r
+            this.lbl_direct_prediction.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_direct_prediction.Location = new System.Drawing.Point(52, 121);\r
+            this.lbl_direct_prediction.Name = "lbl_direct_prediction";\r
+            this.lbl_direct_prediction.Size = new System.Drawing.Size(94, 12);\r
+            this.lbl_direct_prediction.TabIndex = 5;\r
+            this.lbl_direct_prediction.Text = "Direct Prediction:";\r
+            // \r
+            // label62\r
+            // \r
+            this.label62.AutoSize = true;\r
+            this.label62.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label62.Location = new System.Drawing.Point(88, 94);\r
+            this.label62.Name = "label62";\r
+            this.label62.Size = new System.Drawing.Size(58, 12);\r
+            this.label62.TabIndex = 4;\r
+            this.label62.Text = "B-Frames:";\r
+            // \r
+            // label64\r
+            // \r
+            this.label64.AutoSize = true;\r
+            this.label64.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label64.Location = new System.Drawing.Point(47, 40);\r
+            this.label64.Name = "label64";\r
+            this.label64.Size = new System.Drawing.Size(99, 12);\r
+            this.label64.TabIndex = 1;\r
+            this.label64.Text = "Reference Frames:";\r
+            // \r
+            // tabPage4\r
+            // \r
+            this.tabPage4.Controls.Add(this.btn_clear);\r
+            this.tabPage4.Controls.Add(this.label34);\r
+            this.tabPage4.Controls.Add(this.btn_generate_Query);\r
+            this.tabPage4.Controls.Add(this.label33);\r
+            this.tabPage4.Controls.Add(this.rtf_query);\r
+            this.tabPage4.Location = new System.Drawing.Point(4, 22);\r
+            this.tabPage4.Name = "tabPage4";\r
+            this.tabPage4.Size = new System.Drawing.Size(697, 316);\r
+            this.tabPage4.TabIndex = 7;\r
+            this.tabPage4.Text = "Query Editor";\r
+            // \r
+            // btn_clear\r
+            // \r
+            this.btn_clear.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_clear.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_clear.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_clear.Location = new System.Drawing.Point(602, 75);\r
+            this.btn_clear.Name = "btn_clear";\r
+            this.btn_clear.Size = new System.Drawing.Size(75, 22);\r
+            this.btn_clear.TabIndex = 4;\r
+            this.btn_clear.Text = "Clear";\r
+            this.btn_clear.UseVisualStyleBackColor = true;\r
+            this.btn_clear.Click += new System.EventHandler(this.btn_clear_Click);\r
+            // \r
+            // label34\r
+            // \r
+            this.label34.AutoSize = true;\r
+            this.label34.Location = new System.Drawing.Point(13, 36);\r
+            this.label34.Name = "label34";\r
+            this.label34.Size = new System.Drawing.Size(434, 26);\r
+            this.label34.TabIndex = 1;\r
+            this.label34.Text = "Here you can alter the query generated by this program.\r\nDon\'t forget to re-gener" +\r
+                "ate this query should you change any GUI options.";\r
+            // \r
+            // btn_generate_Query\r
+            // \r
+            this.btn_generate_Query.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_generate_Query.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_generate_Query.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_generate_Query.Location = new System.Drawing.Point(16, 75);\r
+            this.btn_generate_Query.Name = "btn_generate_Query";\r
+            this.btn_generate_Query.Size = new System.Drawing.Size(126, 22);\r
+            this.btn_generate_Query.TabIndex = 2;\r
+            this.btn_generate_Query.Text = "Generate Query";\r
+            this.btn_generate_Query.UseVisualStyleBackColor = true;\r
+            this.btn_generate_Query.Click += new System.EventHandler(this.btn_generate_Query_Click);\r
+            // \r
+            // label33\r
+            // \r
+            this.label33.AutoSize = true;\r
+            this.label33.BackColor = System.Drawing.Color.Transparent;\r
+            this.label33.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label33.Location = new System.Drawing.Point(13, 13);\r
+            this.label33.Name = "label33";\r
+            this.label33.Size = new System.Drawing.Size(89, 13);\r
+            this.label33.TabIndex = 0;\r
+            this.label33.Text = "Query Editor";\r
+            // \r
+            // rtf_query\r
+            // \r
+            this.rtf_query.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
+            this.rtf_query.Location = new System.Drawing.Point(16, 103);\r
+            this.rtf_query.Name = "rtf_query";\r
+            this.rtf_query.Size = new System.Drawing.Size(661, 182);\r
+            this.rtf_query.TabIndex = 5;\r
+            this.rtf_query.Text = "";\r
+            // \r
+            // groupBox_dest\r
+            // \r
+            this.groupBox_dest.Controls.Add(this.btn_destBrowse);\r
+            this.groupBox_dest.Controls.Add(this.Label3);\r
+            this.groupBox_dest.Controls.Add(this.text_destination);\r
+            this.groupBox_dest.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.groupBox_dest.ForeColor = System.Drawing.Color.Black;\r
+            this.groupBox_dest.Location = new System.Drawing.Point(12, 160);\r
+            this.groupBox_dest.Name = "groupBox_dest";\r
+            this.groupBox_dest.Size = new System.Drawing.Size(705, 50);\r
+            this.groupBox_dest.TabIndex = 3;\r
+            this.groupBox_dest.TabStop = false;\r
+            this.groupBox_dest.Text = "Destination";\r
+            // \r
+            // btn_destBrowse\r
+            // \r
+            this.btn_destBrowse.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_destBrowse.Location = new System.Drawing.Point(608, 17);\r
+            this.btn_destBrowse.Name = "btn_destBrowse";\r
+            this.btn_destBrowse.Size = new System.Drawing.Size(75, 23);\r
+            this.btn_destBrowse.TabIndex = 13;\r
+            this.btn_destBrowse.Text = "Browse";\r
+            this.btn_destBrowse.UseVisualStyleBackColor = true;\r
+            this.btn_destBrowse.Click += new System.EventHandler(this.btn_destBrowse_Click);\r
+            // \r
+            // groupBox2\r
+            // \r
+            this.groupBox2.Controls.Add(this.splitContainer1);\r
+            this.groupBox2.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.groupBox2.ForeColor = System.Drawing.Color.Black;\r
+            this.groupBox2.Location = new System.Drawing.Point(728, 70);\r
+            this.groupBox2.Name = "groupBox2";\r
+            this.groupBox2.Size = new System.Drawing.Size(245, 546);\r
+            this.groupBox2.TabIndex = 6;\r
+            this.groupBox2.TabStop = false;\r
+            this.groupBox2.Text = "Presets";\r
+            // \r
+            // splitContainer1\r
+            // \r
+            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.splitContainer1.Location = new System.Drawing.Point(3, 17);\r
+            this.splitContainer1.Name = "splitContainer1";\r
+            this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;\r
+            // \r
+            // splitContainer1.Panel1\r
+            // \r
+            this.splitContainer1.Panel1.Controls.Add(this.treeView_presets);\r
+            // \r
+            // splitContainer1.Panel2\r
+            // \r
+            this.splitContainer1.Panel2.Controls.Add(this.btn_addPreset);\r
+            this.splitContainer1.Panel2.Controls.Add(this.btn_removePreset);\r
+            this.splitContainer1.Panel2.Controls.Add(this.btn_setDefault);\r
+            this.splitContainer1.Size = new System.Drawing.Size(239, 526);\r
+            this.splitContainer1.SplitterDistance = 485;\r
+            this.splitContainer1.TabIndex = 1;\r
+            // \r
+            // treeView_presets\r
+            // \r
+            this.treeView_presets.ContextMenuStrip = this.presets_menu;\r
+            this.treeView_presets.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.treeView_presets.ForeColor = System.Drawing.Color.DarkBlue;\r
+            this.treeView_presets.FullRowSelect = true;\r
+            this.treeView_presets.HideSelection = false;\r
+            this.treeView_presets.ItemHeight = 21;\r
+            this.treeView_presets.Location = new System.Drawing.Point(0, 0);\r
+            this.treeView_presets.Name = "treeView_presets";\r
+            this.treeView_presets.ShowLines = false;\r
+            this.treeView_presets.Size = new System.Drawing.Size(239, 485);\r
+            this.treeView_presets.TabIndex = 0;\r
+            this.treeView_presets.MouseUp += new System.Windows.Forms.MouseEventHandler(this.treeview_presets_mouseUp);\r
+            this.treeView_presets.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_presets_AfterSelect);\r
+            this.treeView_presets.KeyUp += new System.Windows.Forms.KeyEventHandler(this.treeView_presets_deleteKey);\r
+            // \r
+            // presets_menu\r
+            // \r
+            this.presets_menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.pmnu_expandAll,\r
+            this.pmnu_collapse,\r
+            this.sep1,\r
+            this.pmnu_delete});\r
+            this.presets_menu.Name = "presets_menu";\r
+            this.presets_menu.Size = new System.Drawing.Size(146, 76);\r
+            // \r
+            // pmnu_expandAll\r
+            // \r
+            this.pmnu_expandAll.Name = "pmnu_expandAll";\r
+            this.pmnu_expandAll.Size = new System.Drawing.Size(145, 22);\r
+            this.pmnu_expandAll.Text = "Expand All";\r
+            this.pmnu_expandAll.Click += new System.EventHandler(this.pmnu_expandAll_Click);\r
+            // \r
+            // pmnu_collapse\r
+            // \r
+            this.pmnu_collapse.Name = "pmnu_collapse";\r
+            this.pmnu_collapse.Size = new System.Drawing.Size(145, 22);\r
+            this.pmnu_collapse.Text = "Collapse All";\r
+            this.pmnu_collapse.Click += new System.EventHandler(this.pmnu_collapse_Click);\r
+            // \r
+            // sep1\r
+            // \r
+            this.sep1.Name = "sep1";\r
+            this.sep1.Size = new System.Drawing.Size(142, 6);\r
+            // \r
+            // pmnu_delete\r
+            // \r
+            this.pmnu_delete.Name = "pmnu_delete";\r
+            this.pmnu_delete.Size = new System.Drawing.Size(145, 22);\r
+            this.pmnu_delete.Text = "Delete";\r
+            this.pmnu_delete.Click += new System.EventHandler(this.pmnu_delete_click);\r
+            // \r
+            // toolStrip1\r
+            // \r
+            this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;\r
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.btn_source,\r
+            this.toolStripSeparator10,\r
+            this.btn_start,\r
+            this.btn_add2Queue,\r
+            this.btn_showQueue,\r
+            this.toolStripSeparator4,\r
+            this.btn_ActivityWindow,\r
+            this.toolStripSeparator8,\r
+            this.btn_minimize});\r
+            this.toolStrip1.Location = new System.Drawing.Point(0, 24);\r
+            this.toolStrip1.Name = "toolStrip1";\r
+            this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;\r
+            this.toolStrip1.Size = new System.Drawing.Size(985, 39);\r
+            this.toolStrip1.TabIndex = 1;\r
+            this.toolStrip1.Text = "toolStrip1";\r
+            // \r
+            // btn_source\r
+            // \r
+            this.btn_source.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.btn_file_source,\r
+            this.btn_dvd_source,\r
+            this.toolStripSeparator1,\r
+            this.mnu_dvd_drive});\r
+            this.btn_source.Image = global::Handbrake.Properties.Resources.Movies;\r
+            this.btn_source.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.btn_source.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_source.Name = "btn_source";\r
+            this.btn_source.Size = new System.Drawing.Size(90, 36);\r
+            this.btn_source.Text = "Source";\r
+            this.btn_source.ToolTipText = "Open a new source file or folder.";\r
+            this.btn_source.Click += new System.EventHandler(this.btn_source_Click);\r
+            // \r
+            // btn_file_source\r
+            // \r
+            this.btn_file_source.Image = global::Handbrake.Properties.Resources.Movies_Small;\r
+            this.btn_file_source.Name = "btn_file_source";\r
+            this.btn_file_source.Size = new System.Drawing.Size(214, 22);\r
+            this.btn_file_source.Text = "Video File";\r
+            this.btn_file_source.Click += new System.EventHandler(this.btn_file_source_Click);\r
+            // \r
+            // btn_dvd_source\r
+            // \r
+            this.btn_dvd_source.Image = ((System.Drawing.Image)(resources.GetObject("btn_dvd_source.Image")));\r
+            this.btn_dvd_source.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_dvd_source.Name = "btn_dvd_source";\r
+            this.btn_dvd_source.Size = new System.Drawing.Size(214, 22);\r
+            this.btn_dvd_source.Text = "DVD/ VIDEO_TS Folder";\r
+            this.btn_dvd_source.Click += new System.EventHandler(this.btn_dvd_source_Click);\r
+            // \r
+            // toolStripSeparator1\r
+            // \r
+            this.toolStripSeparator1.Name = "toolStripSeparator1";\r
+            this.toolStripSeparator1.Size = new System.Drawing.Size(211, 6);\r
+            // \r
+            // mnu_dvd_drive\r
+            // \r
+            this.mnu_dvd_drive.Image = global::Handbrake.Properties.Resources.disc_small;\r
+            this.mnu_dvd_drive.Name = "mnu_dvd_drive";\r
+            this.mnu_dvd_drive.Size = new System.Drawing.Size(214, 22);\r
+            this.mnu_dvd_drive.Text = "[No DVD Drive Ready]";\r
+            this.mnu_dvd_drive.Visible = false;\r
+            this.mnu_dvd_drive.Click += new System.EventHandler(this.mnu_dvd_drive_Click);\r
+            // \r
+            // toolStripSeparator10\r
+            // \r
+            this.toolStripSeparator10.Name = "toolStripSeparator10";\r
+            this.toolStripSeparator10.Size = new System.Drawing.Size(6, 39);\r
+            // \r
+            // btn_start\r
+            // \r
+            this.btn_start.Image = global::Handbrake.Properties.Resources.Play;\r
+            this.btn_start.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.btn_start.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_start.Name = "btn_start";\r
+            this.btn_start.Size = new System.Drawing.Size(70, 36);\r
+            this.btn_start.Text = "Start";\r
+            this.btn_start.ToolTipText = "Start the encoding process";\r
+            this.btn_start.Click += new System.EventHandler(this.btn_start_Click);\r
+            // \r
+            // btn_add2Queue\r
+            // \r
+            this.btn_add2Queue.Image = global::Handbrake.Properties.Resources.AddToQueue;\r
+            this.btn_add2Queue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.btn_add2Queue.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_add2Queue.Name = "btn_add2Queue";\r
+            this.btn_add2Queue.Size = new System.Drawing.Size(122, 36);\r
+            this.btn_add2Queue.Text = "Add to Queue";\r
+            this.btn_add2Queue.ToolTipText = "Add a new item to the Queue";\r
+            this.btn_add2Queue.Click += new System.EventHandler(this.btn_add2Queue_Click);\r
+            // \r
+            // btn_showQueue\r
+            // \r
+            this.btn_showQueue.Image = global::Handbrake.Properties.Resources.Queue;\r
+            this.btn_showQueue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.btn_showQueue.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_showQueue.Name = "btn_showQueue";\r
+            this.btn_showQueue.Size = new System.Drawing.Size(115, 36);\r
+            this.btn_showQueue.Tag = "";\r
+            this.btn_showQueue.Text = "Show Queue";\r
+            this.btn_showQueue.Click += new System.EventHandler(this.btn_showQueue_Click);\r
+            // \r
+            // toolStripSeparator4\r
+            // \r
+            this.toolStripSeparator4.Name = "toolStripSeparator4";\r
+            this.toolStripSeparator4.Size = new System.Drawing.Size(6, 39);\r
+            // \r
+            // btn_ActivityWindow\r
+            // \r
+            this.btn_ActivityWindow.Image = global::Handbrake.Properties.Resources.ActivityWindow;\r
+            this.btn_ActivityWindow.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.btn_ActivityWindow.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_ActivityWindow.Name = "btn_ActivityWindow";\r
+            this.btn_ActivityWindow.Size = new System.Drawing.Size(132, 36);\r
+            this.btn_ActivityWindow.Text = "Activity Window";\r
+            this.btn_ActivityWindow.ToolTipText = "Displays the activity window which displays the log of the last completed or curr" +\r
+                "ently running encode.";\r
+            this.btn_ActivityWindow.Click += new System.EventHandler(this.btn_ActivityWindow_Click);\r
+            // \r
+            // toolStripSeparator8\r
+            // \r
+            this.toolStripSeparator8.Name = "toolStripSeparator8";\r
+            this.toolStripSeparator8.Size = new System.Drawing.Size(6, 39);\r
+            // \r
+            // btn_minimize\r
+            // \r
+            this.btn_minimize.Image = global::Handbrake.Properties.Resources.hb32;\r
+            this.btn_minimize.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_minimize.Name = "btn_minimize";\r
+            this.btn_minimize.Size = new System.Drawing.Size(162, 36);\r
+            this.btn_minimize.Text = "Minimize To System Tray";\r
+            this.btn_minimize.Click += new System.EventHandler(this.btn_minimize_Click);\r
+            // \r
+            // notifyIcon\r
+            // \r
+            this.notifyIcon.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info;\r
+            this.notifyIcon.BalloonTipText = "HandBrake Status Here";\r
+            this.notifyIcon.BalloonTipTitle = "HandBrake";\r
+            this.notifyIcon.ContextMenuStrip = notifyIconMenu;\r
+            this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));\r
+            this.notifyIcon.Text = "HandBrake";\r
+            this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseDoubleClick);\r
+            // \r
+            // StatusStrip\r
+            // \r
+            this.StatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.lbl_encode});\r
+            this.StatusStrip.Location = new System.Drawing.Point(0, 629);\r
+            this.StatusStrip.Name = "StatusStrip";\r
+            this.StatusStrip.Size = new System.Drawing.Size(985, 22);\r
+            this.StatusStrip.TabIndex = 7;\r
+            this.StatusStrip.Text = "statusStrip1";\r
+            // \r
+            // lbl_encode\r
+            // \r
+            this.lbl_encode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_encode.Name = "lbl_encode";\r
+            this.lbl_encode.Size = new System.Drawing.Size(31, 17);\r
+            this.lbl_encode.Text = "{0}";\r
+            // \r
+            // frmMain\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.ClientSize = new System.Drawing.Size(985, 651);\r
+            this.Controls.Add(this.GroupBox1);\r
+            this.Controls.Add(this.groupBox_dest);\r
+            this.Controls.Add(this.groupBox_output);\r
+            this.Controls.Add(this.groupBox2);\r
+            this.Controls.Add(this.toolStrip1);\r
+            this.Controls.Add(this.advancedOptions);\r
+            this.Controls.Add(this.frmMainMenu);\r
+            this.Controls.Add(this.StatusStrip);\r
+            this.DoubleBuffered = true;\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MinimumSize = new System.Drawing.Size(946, 668);\r
+            this.Name = "frmMain";\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
+            this.Text = "HandBrake";\r
+            notifyIconMenu.ResumeLayout(false);\r
+            ((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).EndInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.data_chpt)).EndInit();\r
+            this.frmMainMenu.ResumeLayout(false);\r
+            this.frmMainMenu.PerformLayout();\r
+            this.GroupBox1.ResumeLayout(false);\r
+            this.GroupBox1.PerformLayout();\r
+            this.groupBox_output.ResumeLayout(false);\r
+            this.groupBox_output.PerformLayout();\r
+            this.TabPage2.ResumeLayout(false);\r
+            this.TabPage2.PerformLayout();\r
+            ((System.ComponentModel.ISupportInitialize)(this.trackBar4)).EndInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.trackBar3)).EndInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.trackBar2)).EndInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();\r
+            this.TabPage3.ResumeLayout(false);\r
+            this.TabPage3.PerformLayout();\r
+            this.TabPage1.ResumeLayout(false);\r
+            this.TabPage1.PerformLayout();\r
+            ((System.ComponentModel.ISupportInitialize)(this.slider_deblock)).EndInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.text_bottom)).EndInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.text_top)).EndInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.text_left)).EndInit();\r
+            ((System.ComponentModel.ISupportInitialize)(this.text_right)).EndInit();\r
+            this.advancedOptions.ResumeLayout(false);\r
+            this.tab_chapters.ResumeLayout(false);\r
+            this.tab_chapters.PerformLayout();\r
+            this.h264Tab.ResumeLayout(false);\r
+            this.h264Tab.PerformLayout();\r
+            this.tabPage4.ResumeLayout(false);\r
+            this.tabPage4.PerformLayout();\r
+            this.groupBox_dest.ResumeLayout(false);\r
+            this.groupBox_dest.PerformLayout();\r
+            this.groupBox2.ResumeLayout(false);\r
+            this.splitContainer1.Panel1.ResumeLayout(false);\r
+            this.splitContainer1.Panel2.ResumeLayout(false);\r
+            this.splitContainer1.ResumeLayout(false);\r
+            this.presets_menu.ResumeLayout(false);\r
+            this.toolStrip1.ResumeLayout(false);\r
+            this.toolStrip1.PerformLayout();\r
+            this.StatusStrip.ResumeLayout(false);\r
+            this.StatusStrip.PerformLayout();\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        internal System.Windows.Forms.SaveFileDialog File_Save;\r
+        internal System.Windows.Forms.ToolTip ToolTip;\r
+        internal System.Windows.Forms.ToolStripMenuItem FileToolStripMenuItem;\r
+        internal System.Windows.Forms.ToolStripMenuItem mnu_open3;\r
+        internal System.Windows.Forms.ToolStripMenuItem mnu_exit;\r
+        internal System.Windows.Forms.ToolStripMenuItem ToolsToolStripMenuItem;\r
+        internal System.Windows.Forms.ToolStripMenuItem mnu_encode;\r
+        internal System.Windows.Forms.ToolStripSeparator ToolStripSeparator5;\r
+        internal System.Windows.Forms.ToolStripMenuItem mnu_options;\r
+        internal System.Windows.Forms.ToolStripMenuItem PresetsToolStripMenuItem;\r
+        internal System.Windows.Forms.ToolStripMenuItem mnu_presetReset;\r
+        internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem;\r
+        internal System.Windows.Forms.ToolStripSeparator ToolStripSeparator3;\r
+        internal System.Windows.Forms.ToolStripMenuItem mnu_about;\r
+        internal System.Windows.Forms.MenuStrip frmMainMenu;\r
+        internal System.Windows.Forms.GroupBox GroupBox1;\r
+        internal System.Windows.Forms.Label Label13;\r
+        internal System.Windows.Forms.ComboBox drop_chapterFinish;\r
+        internal System.Windows.Forms.ComboBox drop_chapterStart;\r
+        internal System.Windows.Forms.ComboBox drp_dvdtitle;\r
+        internal System.Windows.Forms.Label Label17;\r
+        internal System.Windows.Forms.TextBox text_source;\r
+        internal System.Windows.Forms.Label Label9;\r
+        internal System.Windows.Forms.Label Label10;\r
+        internal System.Windows.Forms.GroupBox groupBox_output;\r
+        internal System.Windows.Forms.Label Label3;\r
+        internal System.Windows.Forms.ComboBox drp_videoEncoder;\r
+        internal System.Windows.Forms.Label Label47;\r
+        internal System.Windows.Forms.TextBox text_destination;\r
+        internal System.Windows.Forms.TabPage TabPage2;\r
+        internal System.Windows.Forms.ComboBox drp_audmix_1;\r
+        internal System.Windows.Forms.ComboBox drp_track1Audio;\r
+        internal System.Windows.Forms.ComboBox drp_audbit_1;\r
+        internal System.Windows.Forms.Label Label32;\r
+        internal System.Windows.Forms.ComboBox drp_audsr_1;\r
+        internal System.Windows.Forms.TabPage TabPage3;\r
+        internal System.Windows.Forms.CheckBox check_largeFile;\r
+        internal System.Windows.Forms.CheckBox check_turbo;\r
+        internal System.Windows.Forms.Label Label22;\r
+        internal System.Windows.Forms.Label Label2;\r
+        internal System.Windows.Forms.Label SliderValue;\r
+        internal System.Windows.Forms.ComboBox drp_videoFramerate;\r
+        internal System.Windows.Forms.CheckBox check_2PassEncode;\r
+        internal System.Windows.Forms.TrackBar slider_videoQuality;\r
+        internal System.Windows.Forms.TextBox text_filesize;\r
+        internal System.Windows.Forms.Label Label40;\r
+        internal System.Windows.Forms.TextBox text_bitrate;\r
+        internal System.Windows.Forms.Label Label42;\r
+        internal System.Windows.Forms.TabPage TabPage1;\r
+        internal System.Windows.Forms.CheckBox Check_ChapterMarkers;\r
+        internal System.Windows.Forms.Label Label1;\r
+        internal System.Windows.Forms.Label Label53;\r
+        internal System.Windows.Forms.Label Label52;\r
+        internal System.Windows.Forms.Label Label51;\r
+        internal System.Windows.Forms.Label Label15;\r
+        internal System.Windows.Forms.TabControl advancedOptions;\r
+        internal System.Windows.Forms.Label Label46;\r
+        private System.Windows.Forms.GroupBox groupBox_dest;\r
+        internal System.Windows.Forms.ComboBox drp_subtitle;\r
+        internal System.Windows.Forms.Label Label19;\r
+        internal System.Windows.Forms.Label Label20;\r
+        internal System.Windows.Forms.CheckBox check_grayscale;\r
+        internal System.Windows.Forms.Label label24;\r
+        internal System.Windows.Forms.Label label11;\r
+        internal System.Windows.Forms.CheckBox check_detelecine;\r
+        internal System.Windows.Forms.Label label4;\r
+        internal System.Windows.Forms.ComboBox drp_deInterlace_option;\r
+        private System.Windows.Forms.GroupBox groupBox2;\r
+        internal System.Windows.Forms.Button btn_setDefault;\r
+        private System.Windows.Forms.ToolStripMenuItem mnu_SelectDefault;\r
+        private System.Windows.Forms.ToolStripMenuItem mnu_UpdateCheck;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;\r
+        private System.Windows.Forms.SaveFileDialog DVD_Save;\r
+        private System.Windows.Forms.OpenFileDialog File_Open;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;\r
+        internal System.Windows.Forms.CheckBox check_iPodAtom;\r
+        internal System.Windows.Forms.Label label26;\r
+        internal System.Windows.Forms.Label Label56;\r
+        internal System.Windows.Forms.Label lbl_Aspect;\r
+        internal System.Windows.Forms.Label Label91;\r
+        internal System.Windows.Forms.TextBox text_height;\r
+        internal System.Windows.Forms.Label Label55;\r
+        internal System.Windows.Forms.TextBox text_width;\r
+        internal System.Windows.Forms.Label label27;\r
+        internal System.Windows.Forms.ComboBox drp_track2Audio;\r
+        internal System.Windows.Forms.Label label28;\r
+        private System.Windows.Forms.TabPage tab_chapters;\r
+        internal System.Windows.Forms.Label label31;\r
+        internal System.Windows.Forms.NumericUpDown text_right;\r
+        internal System.Windows.Forms.NumericUpDown text_bottom;\r
+        internal System.Windows.Forms.NumericUpDown text_top;\r
+        internal System.Windows.Forms.NumericUpDown text_left;\r
+        internal System.Windows.Forms.CheckBox check_optimiseMP4;\r
+        internal System.Windows.Forms.CheckBox check_forced;\r
+        internal System.Windows.Forms.DataGridView data_chpt;\r
+        private System.Windows.Forms.TabPage tabPage4;\r
+        private System.Windows.Forms.Label label34;\r
+        internal System.Windows.Forms.Button btn_generate_Query;\r
+        internal System.Windows.Forms.Label label33;\r
+        internal System.Windows.Forms.Button btn_clear;\r
+        private System.Windows.Forms.ToolStrip toolStrip1;\r
+        private System.Windows.Forms.ToolStripButton btn_start;\r
+        private System.Windows.Forms.ToolStripButton btn_add2Queue;\r
+        private System.Windows.Forms.ToolStripButton btn_showQueue;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;\r
+        private System.Windows.Forms.ToolStripButton btn_ActivityWindow;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;\r
+        private System.Windows.Forms.ToolStripMenuItem mnu_handbrake_home;\r
+        internal System.Windows.Forms.Button btn_removePreset;\r
+        internal System.Windows.Forms.Button btn_addPreset;\r
+        internal System.Windows.Forms.Label label25;\r
+        internal System.Windows.Forms.Label label6;\r
+        internal System.Windows.Forms.ComboBox drp_anamorphic;\r
+        internal System.Windows.Forms.TabPage h264Tab;\r
+        internal System.Windows.Forms.RichTextBox rtf_x264Query;\r
+        internal System.Windows.Forms.Label label43;\r
+        internal System.Windows.Forms.Button btn_reset;\r
+        internal System.Windows.Forms.CheckBox check_Cabac;\r
+        internal System.Windows.Forms.CheckBox check_noDCTDecimate;\r
+        internal System.Windows.Forms.CheckBox check_noFastPSkip;\r
+        internal System.Windows.Forms.Label lbl_trellis;\r
+        internal System.Windows.Forms.ComboBox drop_trellis;\r
+        internal System.Windows.Forms.ComboBox drop_deblockBeta;\r
+        internal System.Windows.Forms.Label label41;\r
+        internal System.Windows.Forms.ComboBox drop_deblockAlpha;\r
+        internal System.Windows.Forms.Panel panel3;\r
+        internal System.Windows.Forms.Panel panel1;\r
+        internal System.Windows.Forms.Panel panel2;\r
+        internal System.Windows.Forms.CheckBox check_8x8DCT;\r
+        internal System.Windows.Forms.Label label45;\r
+        internal System.Windows.Forms.ComboBox drop_analysis;\r
+        internal System.Windows.Forms.Label label48;\r
+        internal System.Windows.Forms.ComboBox drop_subpixelMotionEstimation;\r
+        internal System.Windows.Forms.Label label49;\r
+        internal System.Windows.Forms.ComboBox drop_MotionEstimationRange;\r
+        internal System.Windows.Forms.Label label54;\r
+        internal System.Windows.Forms.ComboBox drop_MotionEstimationMethod;\r
+        internal System.Windows.Forms.CheckBox check_pyrmidalBFrames;\r
+        internal System.Windows.Forms.CheckBox check_weightedBFrames;\r
+        internal System.Windows.Forms.Label lbl_direct_prediction;\r
+        internal System.Windows.Forms.ComboBox drop_directPrediction;\r
+        internal System.Windows.Forms.Label label62;\r
+        internal System.Windows.Forms.ComboBox drop_bFrames;\r
+        internal System.Windows.Forms.Label label64;\r
+        internal System.Windows.Forms.ComboBox drop_refFrames;\r
+        internal System.Windows.Forms.CheckBox check_mixedReferences;\r
+        internal System.Windows.Forms.ComboBox drp_audmix_2;\r
+        internal System.Windows.Forms.Label label65;\r
+        internal System.Windows.Forms.Label label14;\r
+        internal System.Windows.Forms.ComboBox drp_audenc_2;\r
+        internal System.Windows.Forms.ComboBox drp_audenc_1;\r
+        internal System.Windows.Forms.Label label66;\r
+        internal System.Windows.Forms.ComboBox drp_audbit_2;\r
+        internal System.Windows.Forms.Label label67;\r
+        internal System.Windows.Forms.ComboBox drp_audsr_2;\r
+        internal System.Windows.Forms.Label label68;\r
+        private System.Windows.Forms.DataGridViewTextBoxColumn number;\r
+        private System.Windows.Forms.DataGridViewTextBoxColumn name;\r
+        private System.Windows.Forms.GroupBox groupBox3;\r
+        private System.Windows.Forms.GroupBox groupBox5;\r
+        private System.Windows.Forms.Button btn_destBrowse;\r
+        internal System.Windows.Forms.TrackBar trackBar1;\r
+        internal System.Windows.Forms.Label lbl_drc4;\r
+        internal System.Windows.Forms.Label lbl_drc3;\r
+        internal System.Windows.Forms.Label lbl_drc2;\r
+        internal System.Windows.Forms.TrackBar trackBar4;\r
+        internal System.Windows.Forms.ComboBox drp_audsr_4;\r
+        internal System.Windows.Forms.ComboBox drp_audbit_4;\r
+        internal System.Windows.Forms.ComboBox drp_audenc_4;\r
+        internal System.Windows.Forms.ComboBox drp_audmix_4;\r
+        internal System.Windows.Forms.ComboBox drp_track4Audio;\r
+        internal System.Windows.Forms.Label lbl_t4;\r
+        internal System.Windows.Forms.TrackBar trackBar3;\r
+        internal System.Windows.Forms.ComboBox drp_audsr_3;\r
+        internal System.Windows.Forms.ComboBox drp_audbit_3;\r
+        internal System.Windows.Forms.ComboBox drp_audenc_3;\r
+        internal System.Windows.Forms.ComboBox drp_audmix_3;\r
+        internal System.Windows.Forms.ComboBox drp_track3Audio;\r
+        internal System.Windows.Forms.Label lbl_t3;\r
+        internal System.Windows.Forms.TrackBar trackBar2;\r
+        internal System.Windows.Forms.Label label16;\r
+        internal System.Windows.Forms.Label lbl_drc1;\r
+        internal System.Windows.Forms.TreeView treeView_presets;\r
+        internal System.Windows.Forms.RichTextBox rtf_query;\r
+        private System.Windows.Forms.NotifyIcon notifyIcon;\r
+        private System.Windows.Forms.ToolStripButton btn_minimize;\r
+        private System.Windows.Forms.ToolStripMenuItem btn_restore;\r
+        internal System.Windows.Forms.Label lbl_src_res;\r
+        internal System.Windows.Forms.Label label7;\r
+        internal System.Windows.Forms.Label lbl_duration;\r
+        internal System.Windows.Forms.Label label_duration;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;\r
+        private System.Windows.Forms.ToolStripMenuItem btn_file_source;\r
+        private System.Windows.Forms.ToolStripMenuItem mnu_delete_preset;\r
+        private System.Windows.Forms.ToolStripMenuItem btn_new_preset;\r
+        private System.Windows.Forms.ToolStripMenuItem mnu_handbrake_forums;\r
+        private System.Windows.Forms.ToolStripMenuItem mnu_user_guide;\r
+        private System.Windows.Forms.ToolStripDropDownButton btn_source;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;\r
+        private System.Windows.Forms.ToolStripMenuItem btn_dvd_source;\r
+        internal System.Windows.Forms.ComboBox drop_format;\r
+        internal System.Windows.Forms.Label label5;\r
+        internal System.Windows.Forms.ToolStripMenuItem mnu_encodeLog;\r
+        private System.Windows.Forms.StatusStrip StatusStrip;\r
+        private System.Windows.Forms.ToolStripStatusLabel lbl_encode;\r
+        internal System.Windows.Forms.CheckBox check_decomb;\r
+        internal System.Windows.Forms.RadioButton check_customCrop;\r
+        internal System.Windows.Forms.RadioButton check_autoCrop;\r
+        internal System.Windows.Forms.Label lbl_deblockVal;\r
+        internal System.Windows.Forms.TrackBar slider_deblock;\r
+        internal System.Windows.Forms.ComboBox drp_deNoise;\r
+        internal System.Windows.Forms.Label label8;\r
+        internal System.Windows.Forms.OpenFileDialog ISO_Open;\r
+        internal System.Windows.Forms.FolderBrowserDialog DVD_Open;\r
+        internal System.Windows.Forms.ToolStripMenuItem mnu_dvd_drive;\r
+        private System.Windows.Forms.ContextMenuStrip presets_menu;\r
+        private System.Windows.Forms.ToolStripMenuItem pmnu_expandAll;\r
+        private System.Windows.Forms.ToolStripMenuItem pmnu_collapse;\r
+        private System.Windows.Forms.ToolStripSeparator sep1;\r
+        private System.Windows.Forms.ToolStripMenuItem pmnu_delete;\r
+        private System.Windows.Forms.SplitContainer splitContainer1;\r
+\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
new file mode 100644 (file)
index 0000000..1496646
--- /dev/null
@@ -0,0 +1,2111 @@
+/*  frmMain.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr/>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections;\r
+using System.Collections.Generic;\r
+using System.Drawing;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.IO;\r
+using System.Diagnostics;\r
+using System.Threading;\r
+using System.Runtime.InteropServices;\r
+using System.Globalization;\r
+using System.Text.RegularExpressions;\r
+\r
+namespace Handbrake\r
+{\r
+    public partial class frmMain : Form\r
+    {\r
+        // Declarations *******************************************************\r
+        // Objects which may be used by one or more other objects\r
+        Functions.Main hb_common_func = new Functions.Main();\r
+        Functions.Encode cliObj = new Functions.Encode();\r
+        Functions.Queue encodeQueue = new Functions.Queue();\r
+        Presets.PresetsHandler presetHandler = new Presets.PresetsHandler();\r
+        Parsing.Title selectedTitle;\r
+\r
+        // Objects belonging to this window only\r
+        PresetLoader presetLoader = new PresetLoader();\r
+        x264Panel x264PanelFunctions = new x264Panel();\r
+        QueryGenerator queryGen = new QueryGenerator();\r
+\r
+        internal Process hbProc;\r
+        private Parsing.DVD thisDVD;\r
+        private frmQueue queueWindow;\r
+        private delegate void updateStatusChanger();\r
+        private string lastAction = null;\r
+        public int maxWidth = 0;\r
+        public int maxHeight = 0;\r
+\r
+        // Applicaiton Startup ************************************************\r
+\r
+        #region Application Startup\r
+\r
+        public frmMain()\r
+        {\r
+            // Load the splash screen in this thread\r
+            Form splash = new frmSplashScreen();\r
+            splash.Show();\r
+\r
+            // Initialize the queue window.\r
+            queueWindow = new frmQueue(this);\r
+            //Create a label that can be updated from the parent thread.\r
+            Label lblStatus = new Label();\r
+            lblStatus.Size = new Size(250, 20);\r
+            lblStatus.Location = new Point(10, 280);\r
+            splash.Controls.Add(lblStatus);\r
+\r
+            InitializeComponent();\r
+\r
+            // Update the users config file with the CLI version data.\r
+            lblStatus.Text = "Setting Version Data ...";\r
+            Application.DoEvents();\r
+            ArrayList x = hb_common_func.getCliVersionData();\r
+            if (x != null)\r
+            {\r
+                try\r
+                {\r
+                    Properties.Settings.Default.hb_build = int.Parse(x[1].ToString());\r
+                    Properties.Settings.Default.hb_version = x[0].ToString();\r
+                }\r
+                catch (Exception)\r
+                {\r
+                    Properties.Settings.Default.hb_build = 0;\r
+                    Properties.Settings.Default.hb_version = "0";\r
+                }\r
+            }\r
+\r
+            // show the form, but leave disabled until preloading is complete then show the main form\r
+            this.Enabled = false;\r
+            this.Show();\r
+            Application.DoEvents(); // Forces frmMain to draw\r
+\r
+            // update the status\r
+            if (Properties.Settings.Default.updateStatus == "Checked")\r
+            {\r
+                lblStatus.Text = "Checking for updates ...";\r
+                Application.DoEvents();\r
+                Thread updateCheckThread = new Thread(startupUpdateCheck);\r
+                updateCheckThread.Start();\r
+            }\r
+\r
+            // Setup the GUI components\r
+            lblStatus.Text = "Setting up the GUI ...";\r
+            Application.DoEvents();\r
+            setupH264Panel();               // Initalize the H.264 Panel\r
+            loadPresetPanel();              // Load the Preset Panel\r
+            // Load the user's default settings or Normal Preset\r
+            if (Properties.Settings.Default.defaultSettings == "Checked")\r
+                loadUserDefaults();\r
+            else\r
+                loadNormalPreset();\r
+            // Expand the preset Nodes\r
+            treeView_presets.ExpandAll();\r
+            // Enabled GUI tooltip's if Required\r
+            if (Properties.Settings.Default.tooltipEnable == "Checked")\r
+                ToolTip.Active = true;\r
+            lbl_encode.Text = "";\r
+\r
+            //Finished Loading\r
+            lblStatus.Text = "Loading Complete!";\r
+            Application.DoEvents();\r
+\r
+            //Close the splash screen\r
+            splash.Close();\r
+            splash.Dispose();\r
+\r
+            // Turn the interface back to the user\r
+            this.Enabled = true;\r
+\r
+            // Some event Handlers. Used for minimize to taskbar\r
+            this.Resize += new EventHandler(frmMain_Resize);\r
+\r
+            // Queue Recovery\r
+            queueRecovery();\r
+        }\r
+\r
+        // Startup Functions\r
+        private void startupUpdateCheck()\r
+        {\r
+            try\r
+            {\r
+                if (this.InvokeRequired)\r
+                {\r
+                    this.BeginInvoke(new updateStatusChanger(startupUpdateCheck));\r
+                    return;\r
+                }\r
+\r
+                Boolean update = hb_common_func.updateCheck(false);\r
+                if (update == true)\r
+                {\r
+                    frmUpdater updateWindow = new frmUpdater();\r
+                    updateWindow.Show();\r
+                }\r
+            }\r
+            catch (Exception) { /* Do Nothing*/ }\r
+        }\r
+        private void setupH264Panel()\r
+        {\r
+            // Set the default settings of the x264 panel\r
+            drop_bFrames.Text = "Default (0)";\r
+            drop_refFrames.Text = "Default (1)";\r
+            drop_subpixelMotionEstimation.Text = "Default (4)";\r
+            drop_trellis.Text = "Default (0)";\r
+            drop_MotionEstimationMethod.Text = "Default (Hexagon)";\r
+            drop_MotionEstimationRange.Text = "Default (16)";\r
+            drop_directPrediction.Text = "Default (Spatial)";\r
+            drop_deblockAlpha.Text = "Default (0)";\r
+            drop_deblockBeta.Text = "Default (0)";\r
+            drop_analysis.Text = "Default (some)";\r
+            rtf_x264Query.Text = "";\r
+        }\r
+        private void loadUserDefaults()\r
+        {\r
+            // Try to load the users default settings.\r
+            string userDefaults = Properties.Settings.Default.defaultUserSettings;\r
+\r
+            if (userDefaults == "")\r
+                loadNormalPreset();\r
+            else\r
+            {\r
+                Functions.QueryParser presetQuery = Functions.QueryParser.Parse(userDefaults);\r
+                presetLoader.presetLoader(this, presetQuery, "User Defaults ");\r
+            }\r
+        }\r
+        private void queueRecovery()\r
+        {\r
+            if (hb_common_func.check_queue_recovery() == true)\r
+            {\r
+                DialogResult result = MessageBox.Show("HandBrake has detected unfinished items on the queue from the last time the application was launched. Would you like to recover these?", "Queue Recovery Possible", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
+\r
+                if (result == DialogResult.Yes)\r
+                    encodeQueue.recoverQueue("hb_queue_recovery.dat"); // Start Recovery\r
+                else\r
+                {\r
+                    // Remove the Queue recovery file if the user doesn't want to recovery the last queue.\r
+                    string queuePath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");\r
+                    if (File.Exists(queuePath))\r
+                        File.Delete(queuePath);\r
+                }\r
+            }\r
+        }\r
+\r
+        #endregion\r
+\r
+        // The Applications Main Menu and Menus *******************************\r
+\r
+        #region File Menu\r
+        private void mnu_exit_Click(object sender, EventArgs e)\r
+        {\r
+            Application.Exit();\r
+        }\r
+        #endregion\r
+\r
+        #region Tools Menu\r
+        private void mnu_encode_Click(object sender, EventArgs e)\r
+        {\r
+            queueWindow.setQueue(encodeQueue);\r
+            queueWindow.Show();\r
+        }\r
+        private void mnu_encodeLog_Click(object sender, EventArgs e)\r
+        {\r
+            String file = String.Empty;\r
+            if (lastAction == "scan")\r
+                file = "dvdinfo.dat";\r
+            else\r
+                file = "hb_encode_log.dat";\r
+\r
+            frmActivityWindow dvdInfoWindow = new frmActivityWindow(file, this, queueWindow);\r
+            dvdInfoWindow.Show();\r
+        }\r
+        private void mnu_options_Click(object sender, EventArgs e)\r
+        {\r
+            Form Options = new frmOptions(this);\r
+            Options.ShowDialog();\r
+        }\r
+        #endregion\r
+\r
+        #region Presets Menu\r
+        private void mnu_presetReset_Click(object sender, EventArgs e)\r
+        {\r
+            presetHandler.updateBuiltInPresets();\r
+            loadPresetPanel();\r
+            if (treeView_presets.Nodes.Count == 0)\r
+                MessageBox.Show("Unable to load the presets.dat file. Please select \"Update Built-in Presets\" from the Presets Menu \nMake sure you are running the program in Admin mode if running on Vista. See Windows FAQ for details!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+            else\r
+                MessageBox.Show("Presets have been updated!", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Information);\r
+\r
+            treeView_presets.ExpandAll();\r
+        }\r
+        private void mnu_delete_preset_Click(object sender, EventArgs e)\r
+        {\r
+            // Empty the preset file\r
+            string presetsFile = Application.StartupPath.ToString() + "\\presets.dat";\r
+            if (File.Exists(presetsFile))\r
+                File.Delete(presetsFile);\r
+\r
+            try\r
+            {\r
+                FileStream strm = new FileStream(presetsFile, FileMode.Create, FileAccess.Write);\r
+                strm.Close();\r
+                strm.Dispose();\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("An error has occured during the preset removal process.\n If you are using Windows Vista, you may need to run under Administrator Mode to complete this task. \n" + exc.ToString());\r
+            }\r
+\r
+            // Reload the preset panel\r
+            loadPresetPanel();\r
+        }\r
+        private void mnu_SelectDefault_Click(object sender, EventArgs e)\r
+        {\r
+            loadNormalPreset();\r
+        }\r
+        private void btn_new_preset_Click(object sender, EventArgs e)\r
+        {\r
+            // Remember each nodes expanded status so we can reload it\r
+            List<Boolean> nodeStatus = saveTreeViewState();\r
+            nodeStatus.Add(true);\r
+\r
+            Form preset = new frmAddPreset(this, queryGen.GenerateTheQuery(this), presetHandler);\r
+            preset.ShowDialog();\r
+\r
+            // Now reload the TreeView states\r
+            loadTreeViewStates(nodeStatus);\r
+        }\r
+        #endregion\r
+\r
+        #region Help Menu\r
+        private void mnu_handbrake_forums_Click(object sender, EventArgs e)\r
+        {\r
+            Process.Start("http://forum.handbrake.fr/");\r
+        }\r
+        private void mnu_user_guide_Click(object sender, EventArgs e)\r
+        {\r
+            Process.Start("http://trac.handbrake.fr/wiki/HandBrakeGuide");\r
+        }\r
+        private void mnu_handbrake_home_Click(object sender, EventArgs e)\r
+        {\r
+            Process.Start("http://handbrake.fr");\r
+        }\r
+        private void mnu_UpdateCheck_Click(object sender, EventArgs e)\r
+        {\r
+            Boolean update = hb_common_func.updateCheck(true);\r
+            if (update == true)\r
+            {\r
+                frmUpdater updateWindow = new frmUpdater();\r
+                updateWindow.Show();\r
+            }\r
+            else\r
+                MessageBox.Show("There are no new updates at this time.", "Update Check", MessageBoxButtons.OK, MessageBoxIcon.Information);\r
+        }\r
+        private void mnu_about_Click(object sender, EventArgs e)\r
+        {\r
+            Form About = new frmAbout();\r
+            About.ShowDialog();\r
+        }\r
+        #endregion\r
+\r
+        #region Preset Menu\r
+        private void pmnu_expandAll_Click(object sender, EventArgs e)\r
+        {\r
+            treeView_presets.ExpandAll();\r
+        }\r
+        private void pmnu_collapse_Click(object sender, EventArgs e)\r
+        {\r
+            treeView_presets.CollapseAll();\r
+        }\r
+        private void treeview_presets_mouseUp(object sender, MouseEventArgs e)\r
+        {\r
+            if (e.Button == MouseButtons.Right)\r
+                treeView_presets.SelectedNode = treeView_presets.GetNodeAt(e.Location);\r
+            treeView_presets.Select();\r
+        }\r
+        private void pmnu_delete_click(object sender, EventArgs e)\r
+        {\r
+            if (treeView_presets.SelectedNode != null)\r
+            {\r
+                presetHandler.remove(treeView_presets.SelectedNode.Text);\r
+\r
+                // Remember each nodes expanded status so we can reload it\r
+                List<Boolean> nodeStatus = saveTreeViewState();\r
+\r
+                // Now reload the preset panel\r
+                loadPresetPanel();\r
+\r
+                // Now reload the TreeView states\r
+                loadTreeViewStates(nodeStatus);\r
+            }\r
+            treeView_presets.Select();\r
+        }\r
+        #endregion\r
+\r
+        // MainWindow Components, Actions and Functions ***********************\r
+        #region Actions\r
+\r
+        // ToolBar\r
+        private void btn_source_Click(object sender, EventArgs e)\r
+        {\r
+            if (Properties.Settings.Default.drive_detection == "Checked")\r
+            {\r
+                mnu_dvd_drive.Visible = true;\r
+                Thread driveInfoThread = new Thread(getDriveInfoThread);\r
+                driveInfoThread.Start();\r
+            }\r
+            else\r
+                mnu_dvd_drive.Visible = false;\r
+        }\r
+        private void btn_start_Click(object sender, EventArgs e)\r
+        {\r
+            if (text_source.Text == string.Empty || text_source.Text == "Click 'Source' to continue" || text_destination.Text == string.Empty)\r
+                MessageBox.Show("No source OR destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+            else\r
+            {\r
+                // Set the last action to encode. \r
+                // This is used for tracking which file to load in the activity window\r
+                lastAction = "encode";\r
+\r
+                String query;\r
+                if (rtf_query.Text != "")\r
+                    query = rtf_query.Text;\r
+                else\r
+                    query = queryGen.GenerateTheQuery(this);\r
+\r
+                ThreadPool.QueueUserWorkItem(procMonitor, query);\r
+                lbl_encode.Visible = true;\r
+                lbl_encode.Text = "Encoding in Progress";\r
+\r
+                btn_start.Text = "Stop";\r
+                btn_start.ToolTipText = "Stop the encoding process. \nWarning: This may break your file. Press ctrl-c in the CLI window if you wish it to exit cleanly.";\r
+                btn_start.Image = Properties.Resources.stop;\r
+            }\r
+        }\r
+        private void btn_add2Queue_Click(object sender, EventArgs e)\r
+        {\r
+            if (text_source.Text == string.Empty || text_source.Text == "Click 'Source' to continue" || text_destination.Text == string.Empty)\r
+                MessageBox.Show("No source OR destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+            else\r
+            {\r
+\r
+                String query = queryGen.GenerateTheQuery(this);\r
+                if (rtf_query.Text != "")\r
+                    query = rtf_query.Text;\r
+\r
+                encodeQueue.add(query);\r
+                encodeQueue.write2disk("hb_queue_recovery.dat"); // Writes the queue to the recovery file, just incase the GUI crashes.\r
+\r
+                queueWindow.setQueue(encodeQueue);\r
+                queueWindow.Show();\r
+            }\r
+        }\r
+        private void btn_showQueue_Click(object sender, EventArgs e)\r
+        {\r
+            queueWindow.setQueue(encodeQueue);\r
+            queueWindow.Show();\r
+        }\r
+        private void btn_ActivityWindow_Click(object sender, EventArgs e)\r
+        {\r
+            String file = String.Empty;\r
+            if (lastAction == "scan")\r
+                file = "dvdinfo.dat";\r
+            else\r
+                file = "hb_encode_log.dat";\r
+\r
+            frmActivityWindow ActivityWindow = new frmActivityWindow(file, this, queueWindow);\r
+            ActivityWindow.Show();\r
+        }\r
+\r
+        //Source\r
+        private void btn_dvd_source_Click(object sender, EventArgs e)\r
+        {\r
+            // Enable the creation of chapter markers.\r
+            Check_ChapterMarkers.Enabled = true;\r
+\r
+            // Set the last action to scan. \r
+            // This is used for tracking which file to load in the activity window\r
+            lastAction = "scan";\r
+\r
+            String filename = "";\r
+            text_source.Text = "";\r
+\r
+            DVD_Open.ShowDialog();\r
+            filename = DVD_Open.SelectedPath;\r
+\r
+            if (filename.StartsWith("\\"))\r
+                MessageBox.Show("Sorry, HandBrake does not support UNC file paths. \nTry mounting the share as a network drive in My Computer", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+            else\r
+            {\r
+                if (filename != "")\r
+                {\r
+                    Form frmRD = new frmReadDVD(filename, this);\r
+                    text_source.Text = filename;\r
+                    lbl_encode.Text = "Scanning ...";\r
+                    frmRD.ShowDialog();\r
+                }\r
+                else\r
+                    text_source.Text = "Click 'Source' to continue";\r
+\r
+                // If there are no titles in the dropdown menu then the scan has obviously failed. Display an error message explaining to the user.\r
+                if (drp_dvdtitle.Items.Count == 0)\r
+                    MessageBox.Show("No Title(s) found. Please make sure you have selected a valid, non-copy protected source.\nYour Source may be copy protected, badly mastered or a format which HandBrake does not support. \nPlease refer to the Documentation and FAQ (see Help Menu).", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
+\r
+                lbl_encode.Text = "";\r
+            }\r
+        }\r
+        private void btn_file_source_Click(object sender, EventArgs e)\r
+        {\r
+            // Set the last action to scan. \r
+            // This is used for tracking which file to load in the activity window\r
+            lastAction = "scan";\r
+\r
+            String filename = "";\r
+            text_source.Text = "";\r
+\r
+            ISO_Open.ShowDialog();\r
+            filename = ISO_Open.FileName;\r
+\r
+            if (filename.StartsWith("\\"))\r
+                MessageBox.Show("Sorry, HandBrake does not support UNC file paths. \nTry mounting the share as a network drive in My Computer", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+            else\r
+            {\r
+                if (filename != "")\r
+                {\r
+                    Form frmRD = new frmReadDVD(filename, this);\r
+                    text_source.Text = filename;\r
+                    lbl_encode.Text = "Scanning ...";\r
+                    frmRD.ShowDialog();\r
+                }\r
+                else\r
+                    text_source.Text = "Click 'Source' to continue";\r
+\r
+                // If there are no titles in the dropdown menu then the scan has obviously failed. Display an error message explaining to the user.\r
+                if (drp_dvdtitle.Items.Count == 0)\r
+                    MessageBox.Show("No Title(s) found. Please make sure you have selected a valid, non-copy protected source.\nYour Source may be copy protected, badly mastered or a format which HandBrake does not support. \nPlease refer to the Documentation and FAQ (see Help Menu).", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
+\r
+                lbl_encode.Text = "";\r
+\r
+                // Enable the creation of chapter markers if the file is an image of a dvd.\r
+                if (filename.ToLower().Contains(".iso"))\r
+                    Check_ChapterMarkers.Enabled = true;\r
+                else\r
+                {\r
+                    Check_ChapterMarkers.Enabled = false;\r
+                    Check_ChapterMarkers.Checked = false;\r
+                    data_chpt.Rows.Clear();\r
+                }\r
+            }\r
+        }\r
+        private void mnu_dvd_drive_Click(object sender, EventArgs e)\r
+        {\r
+            // Enable the creation of chapter markers.\r
+            Check_ChapterMarkers.Enabled = true;\r
+\r
+            // Set the last action to scan. \r
+            // This is used for tracking which file to load in the activity window\r
+            lastAction = "scan";\r
+\r
+            String filename = "";\r
+            if (mnu_dvd_drive.Text.Contains("VIDEO_TS"))\r
+            {\r
+                string[] path = mnu_dvd_drive.Text.Split(' ');\r
+                filename = path[0];\r
+                lbl_encode.Text = "Scanning ...";\r
+                Form frmRD = new frmReadDVD(filename, this);\r
+                text_source.Text = filename;\r
+                frmRD.ShowDialog();\r
+            }\r
+\r
+            // If there are no titles in the dropdown menu then the scan has obviously failed. Display an error message explaining to the user.\r
+            if (drp_dvdtitle.Items.Count == 0)\r
+                MessageBox.Show("No Title(s) found. Please make sure you have selected a valid, non-copy protected source.\nYour Source may be copy protected, badly mastered or a format which HandBrake does not support. \nPlease refer to the Documentation and FAQ (see Help Menu).", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
+\r
+            lbl_encode.Text = "";\r
+        }\r
+\r
+        private void drp_dvdtitle_Click(object sender, EventArgs e)\r
+        {\r
+            if ((drp_dvdtitle.Items.Count == 1) && (drp_dvdtitle.Items[0].ToString() == "Automatic"))\r
+                MessageBox.Show("There are no titles to select. Please load a source file by clicking the 'Source' button above before trying to select a title.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);\r
+        }\r
+        private void drp_dvdtitle_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            // Reset some values on the form\r
+            lbl_Aspect.Text = "Select a Title";\r
+            //lbl_RecomendedCrop.Text = "Select a Title";\r
+            drop_chapterStart.Items.Clear();\r
+            drop_chapterFinish.Items.Clear();\r
+\r
+            // If the dropdown is set to automatic nothing else needs to be done.\r
+            // Otheriwse if its not, title data has to be loased from parsing.\r
+            if (drp_dvdtitle.Text != "Automatic")\r
+            {\r
+                selectedTitle = drp_dvdtitle.SelectedItem as Parsing.Title;\r
+\r
+                // Set the Aspect Ratio\r
+                lbl_Aspect.Text = selectedTitle.AspectRatio.ToString();\r
+                lbl_src_res.Text = selectedTitle.Resolution.Width + " x " + selectedTitle.Resolution.Height;\r
+                lbl_duration.Text = selectedTitle.Duration.ToString();\r
+\r
+                // Set the Recommended Cropping values\r
+                text_top.Text = selectedTitle.AutoCropDimensions[0].ToString();\r
+                text_bottom.Text = selectedTitle.AutoCropDimensions[1].ToString();\r
+                text_left.Text = selectedTitle.AutoCropDimensions[2].ToString();\r
+                text_right.Text = selectedTitle.AutoCropDimensions[3].ToString();\r
+\r
+                // Populate the Start chapter Dropdown\r
+                drop_chapterStart.Items.Clear();\r
+                drop_chapterStart.Items.AddRange(selectedTitle.Chapters.ToArray());\r
+                if (drop_chapterStart.Items.Count > 0)\r
+                    drop_chapterStart.Text = drop_chapterStart.Items[0].ToString();\r
+\r
+                // Populate the Final Chapter Dropdown\r
+                drop_chapterFinish.Items.Clear();\r
+                drop_chapterFinish.Items.AddRange(selectedTitle.Chapters.ToArray());\r
+                if (drop_chapterFinish.Items.Count > 0)\r
+                    drop_chapterFinish.Text = drop_chapterFinish.Items[drop_chapterFinish.Items.Count - 1].ToString();\r
+\r
+                // Populate the Audio Channels Dropdown\r
+                drp_track1Audio.Items.Clear();\r
+                drp_track1Audio.Items.Add("Automatic");\r
+                drp_track1Audio.Items.Add("None");\r
+                drp_track1Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray());\r
+                drp_track1Audio.SelectedIndex = 0;\r
+\r
+                drp_track2Audio.Items.Clear();\r
+                drp_track2Audio.Items.Add("None");\r
+                drp_track2Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray());\r
+                drp_track2Audio.SelectedIndex = 0;\r
+\r
+                drp_track3Audio.Items.Clear();\r
+                drp_track3Audio.Items.Add("None");\r
+                drp_track3Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray());\r
+                drp_track3Audio.SelectedIndex = 0;\r
+\r
+                drp_track4Audio.Items.Clear();\r
+                drp_track4Audio.Items.Add("None");\r
+                drp_track4Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray());\r
+                drp_track4Audio.SelectedIndex = 0;\r
+\r
+                // Populate the Subtitles dropdown\r
+                drp_subtitle.Items.Clear();\r
+                drp_subtitle.Items.Add("None");\r
+                drp_subtitle.Items.Add("Autoselect");\r
+                drp_subtitle.Items.AddRange(selectedTitle.Subtitles.ToArray());\r
+                if (drp_subtitle.Items.Count > 0)\r
+                    drp_subtitle.Text = drp_subtitle.Items[0].ToString();\r
+\r
+            }\r
+\r
+            // Run the autoName & chapterNaming functions\r
+            if (Properties.Settings.Default.autoNaming == "Checked")\r
+                text_destination.Text = hb_common_func.autoName(drp_dvdtitle, drop_chapterStart.Text, drop_chapterFinish.Text, text_source.Text, text_destination.Text, drop_format.SelectedIndex);\r
+\r
+            data_chpt.Rows.Clear();\r
+            DataGridView chapterGridView = hb_common_func.chapterNaming(data_chpt, drop_chapterStart.Text, drop_chapterFinish.Text);\r
+            if (chapterGridView != null)\r
+                data_chpt = chapterGridView;\r
+        }\r
+        private void drop_chapterStart_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            int c_start, c_end = 1;\r
+\r
+            if (drop_chapterFinish.Text == "Auto" && drop_chapterFinish.Items.Count != 0)\r
+                drop_chapterFinish.SelectedIndex = drop_chapterFinish.Items.Count - 1;\r
+\r
+            int.TryParse(drop_chapterStart.Text, out c_start);\r
+            int.TryParse(drop_chapterFinish.Text, out c_end);\r
+\r
+            if (c_end != 0)\r
+            {\r
+                if (c_start > c_end)\r
+                    drop_chapterFinish.Text = c_start.ToString();\r
+            }\r
+\r
+            lbl_duration.Text = hb_common_func.calculateDuration(drop_chapterStart.Text, drop_chapterFinish.Text, selectedTitle).ToString();\r
+\r
+            // Run the Autonaming function\r
+            if (Properties.Settings.Default.autoNaming == "Checked")\r
+                text_destination.Text = hb_common_func.autoName(drp_dvdtitle, drop_chapterStart.Text, drop_chapterFinish.Text, text_source.Text, text_destination.Text, drop_format.SelectedIndex);\r
+        }\r
+        private void drop_chapterFinish_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            int c_start, c_end = 1;\r
+\r
+            if (drop_chapterStart.Text == "Auto" && drop_chapterStart.Items.Count >= 1)\r
+                drop_chapterStart.SelectedIndex = 1;\r
+\r
+            int.TryParse(drop_chapterStart.Text, out c_start);\r
+            int.TryParse(drop_chapterFinish.Text, out c_end);\r
+\r
+            if (c_start != 0)\r
+            {\r
+                if (c_end < c_start)\r
+                    drop_chapterFinish.Text = c_start.ToString();\r
+            }\r
+\r
+            lbl_duration.Text = hb_common_func.calculateDuration(drop_chapterStart.Text, drop_chapterFinish.Text, selectedTitle).ToString();\r
+\r
+            // Run the Autonaming function\r
+            if (Properties.Settings.Default.autoNaming == "Checked")\r
+                text_destination.Text = hb_common_func.autoName(drp_dvdtitle, drop_chapterStart.Text, drop_chapterFinish.Text, text_source.Text, text_destination.Text, drop_format.SelectedIndex);\r
+        }\r
+\r
+        //Destination\r
+        private void btn_destBrowse_Click(object sender, EventArgs e)\r
+        {\r
+            // This removes the file extension from the filename box on the save file dialog.\r
+            // It's daft but some users don't realise that typing an extension overrides the dropdown extension selected.\r
+            DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", "").Replace(".m4v", "").Replace(".mkv", "").Replace(".ogm", "").Replace(".avi", "");\r
+\r
+            // Show the dialog and set the main form file path\r
+\r
+            if (text_destination.Text.EndsWith(".mp4"))\r
+                DVD_Save.FilterIndex = 1;\r
+            else if (text_destination.Text.EndsWith(".m4v"))\r
+                DVD_Save.FilterIndex = 2;\r
+            else if (text_destination.Text.EndsWith(".avi"))\r
+                DVD_Save.FilterIndex = 3;\r
+            else if (text_destination.Text.EndsWith(".ogm"))\r
+                DVD_Save.FilterIndex = 4;\r
+            else if (text_destination.Text.EndsWith(".mkv"))\r
+                DVD_Save.FilterIndex = 5;\r
+\r
+            if (DVD_Save.ShowDialog() == DialogResult.OK)\r
+            {\r
+                if (DVD_Save.FileName.StartsWith("\\"))\r
+                    MessageBox.Show("Sorry, HandBrake does not support UNC file paths. \nTry mounting the share as a network drive in My Computer", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+                else\r
+                {\r
+                    setAudioByContainer(DVD_Save.FileName);\r
+                    text_destination.Text = DVD_Save.FileName;\r
+\r
+                    // Quicktime requires .m4v file for chapter markers to work. If checked, change the extension to .m4v (mp4 and m4v are the same thing)\r
+                    if (Check_ChapterMarkers.Checked)\r
+                        text_destination.Text = text_destination.Text.Replace(".mp4", ".m4v");\r
+                }\r
+            }\r
+        }\r
+        private void text_destination_TextChanged(object sender, EventArgs e)\r
+        {\r
+            setAudioByContainer(text_destination.Text);\r
+            setVideoByContainer(text_destination.Text);\r
+            string path = text_destination.Text;\r
+            if (path.EndsWith(".mp4"))\r
+                drop_format.SelectedIndex = 0;\r
+            else if (path.EndsWith(".m4v"))\r
+                drop_format.SelectedIndex = 1;\r
+            else if (path.EndsWith(".mkv"))\r
+                drop_format.SelectedIndex = 2;\r
+            else if (path.EndsWith(".avi"))\r
+                drop_format.SelectedIndex = 3;\r
+            else if (path.EndsWith(".ogm"))\r
+                drop_format.SelectedIndex = 4;\r
+\r
+        }\r
+\r
+        // Output Settings\r
+        private void drop_format_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if (drop_format.SelectedIndex == 0)\r
+                setExtension(".mp4");\r
+            else if (drop_format.SelectedIndex == 1)\r
+                setExtension(".m4v");\r
+            else if (drop_format.SelectedIndex == 2)\r
+                setExtension(".mkv");\r
+            else if (drop_format.SelectedIndex == 3)\r
+                setExtension(".avi");\r
+            else if (drop_format.SelectedIndex == 4)\r
+                setExtension(".ogm");\r
+\r
+        }\r
+\r
+        //Video Tab\r
+        private void drp_videoEncoder_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if ((text_destination.Text.Contains(".mp4")) || (text_destination.Text.Contains(".m4v")))\r
+            {\r
+                check_largeFile.Enabled = true;\r
+                check_optimiseMP4.Enabled = true;\r
+                check_iPodAtom.Enabled = true;\r
+            }\r
+            else\r
+            {\r
+                check_largeFile.Enabled = false;\r
+                check_optimiseMP4.Enabled = false;\r
+                check_iPodAtom.Enabled = false;\r
+                check_largeFile.Checked = false;\r
+                check_optimiseMP4.Checked = false;\r
+                check_iPodAtom.Checked = false;\r
+            }\r
+\r
+\r
+            //Turn off some options which are H.264 only when the user selects a non h.264 encoder\r
+            if (drp_videoEncoder.Text.Contains("H.264"))\r
+            {\r
+                if (check_2PassEncode.CheckState == CheckState.Checked)\r
+                    check_turbo.Enabled = true;\r
+\r
+                h264Tab.Enabled = true;\r
+                if ((text_destination.Text.Contains(".mp4")) || (text_destination.Text.Contains(".m4v")))\r
+                    check_iPodAtom.Enabled = true;\r
+                else\r
+                    check_iPodAtom.Enabled = false;\r
+                if (!drp_anamorphic.Items.Contains("Loose"))\r
+                    drp_anamorphic.Items.Add("Loose");\r
+            }\r
+            else\r
+            {\r
+                check_turbo.CheckState = CheckState.Unchecked;\r
+                check_turbo.Enabled = false;\r
+                h264Tab.Enabled = false;\r
+                rtf_x264Query.Text = "";\r
+                check_iPodAtom.Enabled = false;\r
+                check_iPodAtom.Checked = false;\r
+                if (drp_anamorphic.Items.Count == 3)\r
+                    drp_anamorphic.Items.RemoveAt(2);\r
+            }\r
+\r
+        }\r
+        private void text_bitrate_TextChanged(object sender, EventArgs e)\r
+        {\r
+            text_filesize.Text = "";\r
+            slider_videoQuality.Value = 0;\r
+            SliderValue.Text = "0%";\r
+            check_2PassEncode.Enabled = true;\r
+        }\r
+        private void text_filesize_TextChanged(object sender, EventArgs e)\r
+        {\r
+            text_bitrate.Text = "";\r
+            slider_videoQuality.Value = 0;\r
+            SliderValue.Text = "0%";\r
+            check_2PassEncode.Enabled = true;\r
+        }\r
+        private void slider_videoQuality_Scroll(object sender, EventArgs e)\r
+        {\r
+            SliderValue.Text = slider_videoQuality.Value.ToString() + "%";\r
+            text_bitrate.Text = "";\r
+            text_filesize.Text = "";\r
+            check_2PassEncode.Enabled = false;\r
+            check_2PassEncode.CheckState = CheckState.Unchecked;\r
+        }\r
+        private void check_2PassEncode_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            if (check_2PassEncode.CheckState.ToString() == "Checked")\r
+            {\r
+                if (drp_videoEncoder.Text.Contains("H.264"))\r
+                    check_turbo.Enabled = true;\r
+            }\r
+            else\r
+            {\r
+                check_turbo.Enabled = false;\r
+                check_turbo.CheckState = CheckState.Unchecked;\r
+            }\r
+        }\r
+\r
+        //Picture Tab\r
+        private void text_width_TextChanged(object sender, EventArgs e)\r
+        {\r
+            maxWidth = 0;  // Reset max width so that it's not using the MaxWidth -X. Quick hack to allow -X for preset usage.\r
+\r
+            int width;\r
+            Boolean parsed = int.TryParse(text_width.Text, out width);\r
+            if (parsed != false)\r
+            {\r
+                if ((width % 16) != 0)\r
+                    text_width.BackColor = Color.LightCoral;\r
+                else\r
+                    text_width.BackColor = Color.LightGreen;\r
+\r
+\r
+                if (lbl_Aspect.Text != "Select a Title" && maxWidth != 0 && maxHeight != 0)\r
+                {\r
+                    if (drp_anamorphic.Text == "None")\r
+                    {\r
+                        int height = hb_common_func.cacluateNonAnamorphicHeight(width, text_top.Value, text_bottom.Value, text_left.Value, text_right.Value, selectedTitle);\r
+                        text_height.Text = height.ToString();\r
+                    }\r
+                }\r
+            }\r
+        }\r
+        private void text_height_TextChanged(object sender, EventArgs e)\r
+        {\r
+            maxHeight = 0;  // Reset max height so that it's not using the MaxHeight -Y. Quick hack to allow -Y for preset usage.\r
+\r
+            int height;\r
+            Boolean parsed = int.TryParse(text_height.Text, out height);\r
+            if (parsed != false)\r
+            {\r
+                if ((height % 16) != 0)\r
+                    text_height.BackColor = Color.LightCoral;\r
+                else\r
+                    text_height.BackColor = Color.LightGreen;\r
+            }\r
+        }\r
+        private void check_customCrop_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            text_left.Enabled = true;\r
+            text_right.Enabled = true;\r
+            text_top.Enabled = true;\r
+            text_bottom.Enabled = true;\r
+            if (selectedTitle != null)\r
+            {\r
+                text_top.Text = selectedTitle.AutoCropDimensions[0].ToString();\r
+                text_bottom.Text = selectedTitle.AutoCropDimensions[1].ToString();\r
+                text_left.Text = selectedTitle.AutoCropDimensions[2].ToString();\r
+                text_right.Text = selectedTitle.AutoCropDimensions[3].ToString();\r
+            }\r
+            else\r
+            {\r
+                text_left.Text = "0";\r
+                text_right.Text = "0";\r
+                text_top.Text = "0";\r
+                text_bottom.Text = "0";\r
+            }\r
+        }\r
+        private void check_autoCrop_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            text_left.Enabled = false;\r
+            text_right.Enabled = false;\r
+            text_top.Enabled = false;\r
+            text_bottom.Enabled = false;\r
+        }\r
+        private void drp_anamorphic_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if (drp_anamorphic.SelectedIndex == 1)\r
+            {\r
+                text_height.BackColor = Color.LightGray;\r
+                text_width.BackColor = Color.LightGray;\r
+                text_height.Text = "";\r
+                text_width.Text = "";\r
+                text_height.Enabled = false;\r
+                text_width.Enabled = false;\r
+            }\r
+\r
+            if (drp_anamorphic.SelectedIndex == 2)\r
+            {\r
+                text_height.Text = "";\r
+                text_height.Enabled = false;\r
+                text_height.BackColor = Color.LightGray;\r
+\r
+                text_width.Enabled = true;\r
+                text_width.BackColor = Color.White;\r
+            }\r
+\r
+            if (drp_anamorphic.SelectedIndex == 0)\r
+            {\r
+                text_height.BackColor = Color.White;\r
+                text_width.BackColor = Color.White;\r
+                text_height.Enabled = true;\r
+                text_width.Enabled = true;\r
+            }\r
+        }\r
+        private void slider_deblock_Scroll(object sender, EventArgs e)\r
+        {\r
+            if (slider_deblock.Value == 4)\r
+                lbl_deblockVal.Text = "Off";\r
+            else\r
+                lbl_deblockVal.Text = slider_deblock.Value.ToString();\r
+        }\r
+\r
+        // Audio Tab\r
+        private void drp_track2Audio_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if (drp_track2Audio.SelectedItem.Equals("None"))\r
+            {\r
+                drp_audbit_2.Enabled = false;\r
+                drp_audenc_2.Enabled = false;\r
+                drp_audsr_2.Enabled = false;\r
+                drp_audmix_2.Enabled = false;\r
+                trackBar2.Enabled = false;\r
+                drp_audbit_2.Text = "";\r
+                drp_audenc_2.Text = "";\r
+                drp_audsr_2.Text = "";\r
+                drp_audmix_2.Text = "Automatic";\r
+                trackBar2.Value = 0;\r
+\r
+                // Disable the 3rd Track.\r
+                drp_track3Audio.Enabled = false;\r
+                drp_track3Audio.Text = "None";\r
+                drp_audbit_3.Text = "";\r
+                drp_audenc_3.Text = "";\r
+                drp_audsr_3.Text = "";\r
+                drp_audmix_3.Text = "Automatic";\r
+                trackBar3.Value = 0;\r
+            }\r
+            else\r
+            {\r
+                drp_audbit_2.Enabled = true;\r
+                drp_audenc_2.Enabled = true;\r
+                drp_audsr_2.Enabled = true;\r
+                drp_audmix_2.Enabled = true;\r
+                trackBar2.Enabled = true;\r
+                drp_audbit_2.Text = "160";\r
+                drp_audenc_2.Text = "AAC";\r
+                drp_audsr_2.Text = "Auto";\r
+                drp_audmix_2.Text = "Automatic";\r
+\r
+                // Enable the 3rd Track.\r
+                drp_track3Audio.Enabled = true;\r
+                drp_audbit_3.Text = "";\r
+                drp_audenc_3.Text = "";\r
+                drp_audsr_3.Text = "";\r
+                drp_audmix_3.Text = "Automatic";\r
+            }\r
+        }\r
+        private void drp_track3Audio_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if (drp_track3Audio.SelectedItem.Equals("None"))\r
+            {\r
+                drp_audbit_3.Enabled = false;\r
+                drp_audenc_3.Enabled = false;\r
+                drp_audsr_3.Enabled = false;\r
+                drp_audmix_3.Enabled = false;\r
+                trackBar3.Enabled = false;\r
+                drp_audbit_3.Text = "";\r
+                drp_audenc_3.Text = "";\r
+                drp_audsr_3.Text = "";\r
+                drp_audmix_3.Text = "Automatic";\r
+                trackBar3.Value = 0;\r
+\r
+                // Disable the 4th Track.\r
+                drp_track4Audio.Enabled = false;\r
+                drp_track4Audio.Text = "None";\r
+                drp_audbit_4.Text = "";\r
+                drp_audenc_4.Text = "";\r
+                drp_audsr_4.Text = "";\r
+                drp_audmix_4.Text = "Automatic";\r
+\r
+            }\r
+            else\r
+            {\r
+                drp_audbit_3.Enabled = true;\r
+                drp_audenc_3.Enabled = true;\r
+                drp_audsr_3.Enabled = true;\r
+                drp_audmix_3.Enabled = true;\r
+                trackBar3.Enabled = true;\r
+                drp_audbit_3.Text = "160";\r
+                drp_audenc_3.Text = "AAC";\r
+                drp_audsr_3.Text = "Auto";\r
+                drp_audmix_3.Text = "Automatic";\r
+\r
+                // Enable the 4th Track.\r
+                drp_track4Audio.Enabled = true;\r
+                drp_audbit_4.Text = "";\r
+                drp_audenc_4.Text = "";\r
+                drp_audsr_4.Text = "";\r
+                drp_audmix_4.Text = "Automatic";\r
+            }\r
+\r
+        }\r
+        private void drp_track4Audio_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if (drp_track4Audio.SelectedItem.Equals("None"))\r
+            {\r
+                drp_audbit_4.Enabled = false;\r
+                drp_audenc_4.Enabled = false;\r
+                drp_audsr_4.Enabled = false;\r
+                drp_audmix_4.Enabled = false;\r
+                trackBar4.Enabled = false;\r
+                drp_audbit_4.Text = "";\r
+                drp_audenc_4.Text = "";\r
+                drp_audsr_4.Text = "";\r
+                drp_audmix_4.Text = "Automatic";\r
+                trackBar4.Value = 0;\r
+            }\r
+            else\r
+            {\r
+                drp_audbit_4.Enabled = true;\r
+                drp_audenc_4.Enabled = true;\r
+                drp_audsr_4.Enabled = true;\r
+                drp_audmix_4.Enabled = true;\r
+                trackBar4.Enabled = true;\r
+                drp_audbit_4.Text = "160";\r
+                drp_audenc_4.Text = "AAC";\r
+                drp_audsr_4.Text = "Auto";\r
+                drp_audmix_4.Text = "Automatic";\r
+            }\r
+        }\r
+\r
+        private void drp_audmix_1_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if ((drp_audenc_1.Text == "AAC") && (drp_audmix_1.Text == "6 Channel Discrete"))\r
+                setBitrateSelections384(drp_audbit_1);\r
+            else if ((drp_audenc_1.Text == "AAC") && (drp_audmix_1.Text != "6 Channel Discrete"))\r
+            {\r
+                setBitrateSelections160(drp_audbit_1);\r
+                drp_audbit_1.Text = "160";\r
+            }\r
+        }\r
+        private void drp_audmix_2_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if ((drp_audenc_2.Text == "AAC") && (drp_audmix_2.Text == "6 Channel Discrete"))\r
+                setBitrateSelections384(drp_audbit_2);\r
+            else if ((drp_audenc_2.Text == "AAC") && (drp_audmix_2.Text != "6 Channel Discrete"))\r
+            {\r
+                setBitrateSelections160(drp_audbit_2);\r
+                drp_audbit_2.Text = "160";\r
+            }\r
+        }\r
+        private void drp_audmix_3_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if ((drp_audenc_3.Text == "AAC") && (drp_audmix_3.Text == "6 Channel Discrete"))\r
+                setBitrateSelections384(drp_audbit_3);\r
+            else if ((drp_audenc_3.Text == "AAC") && (drp_audmix_3.Text != "6 Channel Discrete"))\r
+            {\r
+                setBitrateSelections160(drp_audbit_3);\r
+                drp_audbit_3.Text = "160";\r
+            }\r
+        }\r
+        private void drp_audmix_4_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if ((drp_audenc_4.Text == "AAC") && (drp_audmix_4.Text == "6 Channel Discrete"))\r
+                setBitrateSelections384(drp_audbit_4);\r
+            else if ((drp_audenc_4.Text == "AAC") && (drp_audmix_4.Text != "6 Channel Discrete"))\r
+            {\r
+                setBitrateSelections160(drp_audbit_4);\r
+                drp_audbit_4.Text = "160";\r
+            }\r
+        }\r
+\r
+        private void drp_audenc_1_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if (drp_audenc_1.Text == "AC3")\r
+            {\r
+                drp_audmix_1.Enabled = false;\r
+                drp_audbit_1.Enabled = false;\r
+                drp_audsr_1.Enabled = false;\r
+            }\r
+            else\r
+            {\r
+                drp_audmix_1.Enabled = true;\r
+                drp_audbit_1.Enabled = true;\r
+                drp_audsr_1.Enabled = true;\r
+\r
+                drp_audmix_1.Text = "Automatic";\r
+                drp_audbit_1.Text = "160";\r
+                drp_audsr_1.Text = "Auto";\r
+            }\r
+\r
+\r
+            if (drp_audenc_1.Text == "AAC")\r
+            {\r
+                drp_audmix_1.Items.Clear();\r
+                drp_audmix_1.Items.Add("Mono");\r
+                drp_audmix_1.Items.Add("Stereo");\r
+                drp_audmix_1.Items.Add("Dolby Surround");\r
+                drp_audmix_1.Items.Add("Dolby Pro Logic II");\r
+                drp_audmix_1.Items.Add("6 Channel Discrete");\r
+\r
+                setBitrateSelections160(drp_audbit_1);\r
+            }\r
+            else\r
+            {\r
+                drp_audmix_1.Items.Clear();\r
+                drp_audmix_1.Items.Add("Stereo");\r
+                drp_audmix_1.Items.Add("Dolby Surround");\r
+                drp_audmix_1.Items.Add("Dolby Pro Logic II");\r
+\r
+                setBitrateSelections320(drp_audbit_1);\r
+            }\r
+        }\r
+        private void drp_audenc_2_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if (drp_audenc_2.Text == "AC3")\r
+            {\r
+                drp_audmix_2.Enabled = false;\r
+                drp_audbit_2.Enabled = false;\r
+                drp_audsr_2.Enabled = false;\r
+\r
+                drp_audmix_2.Text = "Automatic";\r
+                drp_audbit_2.Text = "160";\r
+                drp_audsr_2.Text = "Auto";\r
+            }\r
+            else\r
+            {\r
+                // Just make sure not to re-enable the following boxes if the track2 is none\r
+                if (drp_track2Audio.Text != "None")\r
+                {\r
+                    drp_audmix_2.Enabled = true;\r
+                    drp_audbit_2.Enabled = true;\r
+                    drp_audsr_2.Enabled = true;\r
+\r
+                    drp_audmix_2.Text = "Automatic";\r
+                    drp_audbit_2.Text = "160";\r
+                    drp_audsr_2.Text = "Auto";\r
+                }\r
+            }\r
+\r
+            if (drp_audenc_2.Text == "AAC")\r
+            {\r
+                drp_audmix_2.Items.Clear();\r
+                drp_audmix_2.Items.Add("Mono");\r
+                drp_audmix_2.Items.Add("Stereo");\r
+                drp_audmix_2.Items.Add("Dolby Surround");\r
+                drp_audmix_2.Items.Add("Dolby Pro Logic II");\r
+                drp_audmix_2.Items.Add("6 Channel Discrete");\r
+\r
+                setBitrateSelections160(drp_audbit_2);\r
+            }\r
+            else\r
+            {\r
+                drp_audmix_2.Items.Clear();\r
+                drp_audmix_2.Items.Add("Stereo");\r
+                drp_audmix_2.Items.Add("Dolby Surround");\r
+                drp_audmix_2.Items.Add("Dolby Pro Logic II");\r
+\r
+                setBitrateSelections320(drp_audbit_2);\r
+            }\r
+        }\r
+        private void drp_audenc_3_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if (drp_audenc_3.Text == "AC3")\r
+            {\r
+                drp_audmix_3.Enabled = false;\r
+                drp_audbit_3.Enabled = false;\r
+                drp_audsr_3.Enabled = false;\r
+\r
+                drp_audmix_3.Text = "Automatic";\r
+                drp_audbit_3.Text = "160";\r
+                drp_audsr_3.Text = "Auto";\r
+            }\r
+            else\r
+            {\r
+                // Just make sure not to re-enable the following boxes if the track above is none\r
+                if (drp_track2Audio.Text != "None")\r
+                {\r
+                    drp_audmix_3.Enabled = true;\r
+                    drp_audbit_3.Enabled = true;\r
+                    drp_audsr_3.Enabled = true;\r
+\r
+                    drp_audmix_3.Text = "Automatic";\r
+                    drp_audbit_3.Text = "160";\r
+                    drp_audsr_3.Text = "Auto";\r
+                }\r
+            }\r
+\r
+\r
+            if (drp_audenc_3.Text == "AAC")\r
+            {\r
+                drp_audmix_3.Items.Clear();\r
+                drp_audmix_3.Items.Add("Mono");\r
+                drp_audmix_3.Items.Add("Stereo");\r
+                drp_audmix_3.Items.Add("Dolby Surround");\r
+                drp_audmix_3.Items.Add("Dolby Pro Logic II");\r
+                drp_audmix_3.Items.Add("6 Channel Discrete");\r
+\r
+                setBitrateSelections160(drp_audbit_3);\r
+            }\r
+            else\r
+            {\r
+                drp_audmix_3.Items.Clear();\r
+                drp_audmix_3.Items.Add("Stereo");\r
+                drp_audmix_3.Items.Add("Dolby Surround");\r
+                drp_audmix_3.Items.Add("Dolby Pro Logic II");\r
+\r
+                setBitrateSelections320(drp_audbit_3);\r
+            }\r
+        }\r
+        private void drp_audenc_4_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if (drp_audenc_4.Text == "AC3")\r
+            {\r
+                drp_audmix_4.Enabled = false;\r
+                drp_audbit_4.Enabled = false;\r
+                drp_audsr_4.Enabled = false;\r
+\r
+                drp_audmix_4.Text = "Automatic";\r
+                drp_audbit_4.Text = "160";\r
+                drp_audsr_4.Text = "Auto";\r
+            }\r
+            else\r
+            {\r
+                // Just make sure not to re-enable the following boxes if the track above is none\r
+                if (drp_track2Audio.Text != "None")\r
+                {\r
+                    drp_audmix_4.Enabled = true;\r
+                    drp_audbit_4.Enabled = true;\r
+                    drp_audsr_4.Enabled = true;\r
+\r
+                    drp_audmix_4.Text = "Automatic";\r
+                    drp_audbit_4.Text = "160";\r
+                    drp_audsr_4.Text = "Auto";\r
+                }\r
+            }\r
+\r
+\r
+            if (drp_audenc_4.Text == "AAC")\r
+            {\r
+                drp_audmix_4.Items.Clear();\r
+                drp_audmix_4.Items.Add("Mono");\r
+                drp_audmix_4.Items.Add("Stereo");\r
+                drp_audmix_4.Items.Add("Dolby Surround");\r
+                drp_audmix_4.Items.Add("Dolby Pro Logic II");\r
+                drp_audmix_4.Items.Add("6 Channel Discrete");\r
+\r
+                setBitrateSelections160(drp_audbit_4);\r
+            }\r
+            else\r
+            {\r
+                drp_audmix_4.Items.Clear();\r
+                drp_audmix_4.Items.Add("Stereo");\r
+                drp_audmix_4.Items.Add("Dolby Surround");\r
+                drp_audmix_4.Items.Add("Dolby Pro Logic II");\r
+\r
+                setBitrateSelections320(drp_audbit_4);\r
+            }\r
+        }\r
+\r
+        private void trackBar1_Scroll(object sender, EventArgs e)\r
+        {\r
+            double value = trackBar1.Value / 10.0;\r
+            value++;\r
+\r
+            lbl_drc1.Text = value.ToString();\r
+        }\r
+        private void trackBar2_Scroll(object sender, EventArgs e)\r
+        {\r
+            double value = trackBar2.Value / 10.0;\r
+            value++;\r
+\r
+            lbl_drc2.Text = value.ToString();\r
+        }\r
+        private void trackBar3_Scroll(object sender, EventArgs e)\r
+        {\r
+            double value = trackBar3.Value / 10.0;\r
+            value++;\r
+\r
+            lbl_drc3.Text = value.ToString();\r
+        }\r
+        private void trackBar4_Scroll(object sender, EventArgs e)\r
+        {\r
+            double value = trackBar4.Value / 10.0;\r
+            value++;\r
+\r
+            lbl_drc4.Text = value.ToString();\r
+        }\r
+\r
+        private void drp_subtitle_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            if (drp_subtitle.Text.Contains("None"))\r
+            {\r
+                check_forced.Enabled = false;\r
+                check_forced.Checked = false;\r
+            }\r
+            else\r
+                check_forced.Enabled = true;\r
+        }\r
+\r
+        // Chapter Marker Tab\r
+        private void Check_ChapterMarkers_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            if (Check_ChapterMarkers.Checked)\r
+            {\r
+                string destination = text_destination.Text;\r
+                destination = destination.Replace(".mp4", ".m4v");\r
+                text_destination.Text = destination;\r
+                data_chpt.Rows.Clear();\r
+                data_chpt.Enabled = true;\r
+                DataGridView chapterGridView = hb_common_func.chapterNaming(data_chpt, drop_chapterStart.Text, drop_chapterFinish.Text);\r
+                if (chapterGridView != null)\r
+                    data_chpt = chapterGridView;\r
+            }\r
+            else\r
+            {\r
+                string destination = text_destination.Text;\r
+                destination = destination.Replace(".m4v", ".mp4");\r
+                text_destination.Text = destination;\r
+                data_chpt.Rows.Clear();\r
+                data_chpt.Enabled = false;\r
+            }\r
+        }\r
+\r
+        // Advanced Tab\r
+        private void drop_refFrames_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("ref", this);\r
+        }\r
+        private void check_mixedReferences_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("mixed-refs", this);\r
+        }\r
+        private void drop_bFrames_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("bframes", this);\r
+        }\r
+        private void drop_directPrediction_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("direct", this);\r
+        }\r
+        private void check_weightedBFrames_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("weightb", this);\r
+        }\r
+        private void check_bFrameDistortion_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("brdo", this);\r
+        }\r
+        private void check_BidirectionalRefinement_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("bime", this);\r
+        }\r
+        private void check_pyrmidalBFrames_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("b-pyramid", this);\r
+        }\r
+        private void drop_MotionEstimationMethod_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("me", this);\r
+        }\r
+        private void drop_MotionEstimationRange_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("merange", this);\r
+        }\r
+        private void drop_subpixelMotionEstimation_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("subq", this);\r
+        }\r
+        private void drop_analysis_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("analyse", this);\r
+        }\r
+        private void check_8x8DCT_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("8x8dct", this);\r
+        }\r
+        private void drop_deblockAlpha_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("deblock", this);\r
+\r
+        }\r
+        private void drop_deblockBeta_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("deblock", this);\r
+\r
+        }\r
+        private void drop_trellis_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("trellis", this);\r
+        }\r
+        private void check_noFastPSkip_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("no-fast-pskip", this);\r
+        }\r
+        private void check_noDCTDecimate_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            x264PanelFunctions.on_x264_WidgetChange("no-dct-decimate", this);\r
+\r
+        }\r
+        private void check_Cabac_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+\r
+            x264PanelFunctions.on_x264_WidgetChange("cabac", this);\r
+        }\r
+\r
+        private void rtf_x264Query_TextChanged(object sender, EventArgs e)\r
+        {\r
+            if (rtf_x264Query.Text.EndsWith("\n"))\r
+            {\r
+                rtf_x264Query.Text = rtf_x264Query.Text.Replace("\n", "");\r
+                x264PanelFunctions.X264_StandardizeOptString(this);\r
+                x264PanelFunctions.X264_SetCurrentSettingsInPanel(this);\r
+\r
+                if (rtf_x264Query.Text == string.Empty)\r
+                    x264PanelFunctions.reset2Defaults(this);\r
+            }\r
+        }\r
+        private void btn_reset_Click(object sender, EventArgs e)\r
+        {\r
+            rtf_x264Query.Text = "";\r
+            x264PanelFunctions.reset2Defaults(this);\r
+        }\r
+\r
+        // Query Editor Tab\r
+        private void btn_generate_Query_Click(object sender, EventArgs e)\r
+        {\r
+            rtf_query.Text = queryGen.GenerateTheQuery(this);\r
+        }\r
+        private void btn_clear_Click(object sender, EventArgs e)\r
+        {\r
+            rtf_query.Clear();\r
+        }\r
+\r
+        // Presets\r
+        private void btn_addPreset_Click(object sender, EventArgs e)\r
+        {\r
+            // Remember each nodes expanded status so we can reload it\r
+            List<Boolean> nodeStatus = saveTreeViewState();\r
+            nodeStatus.Add(true);\r
+\r
+            // Now add the new preset\r
+            Form preset = new frmAddPreset(this, queryGen.GenerateTheQuery(this), presetHandler);\r
+            preset.ShowDialog();\r
+\r
+            // Now reload the TreeView states\r
+            loadTreeViewStates(nodeStatus);\r
+        }\r
+        private void btn_removePreset_Click(object sender, EventArgs e)\r
+        {\r
+            DialogResult result = MessageBox.Show("Are you sure you wish to delete the selected preset?", "Preset", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
+            if (result == DialogResult.Yes)\r
+            {\r
+                if (treeView_presets.SelectedNode != null)\r
+                    presetHandler.remove(treeView_presets.SelectedNode.Text);\r
+\r
+                // Remember each nodes expanded status so we can reload it\r
+                List<Boolean> nodeStatus = saveTreeViewState();\r
+\r
+                // Now reload the preset panel\r
+                loadPresetPanel();\r
+\r
+                // Now reload the TreeView states\r
+                loadTreeViewStates(nodeStatus);\r
+            }\r
+            treeView_presets.Select();\r
+        }\r
+        private void btn_setDefault_Click(object sender, EventArgs e)\r
+        {\r
+            String query = queryGen.GenerateTheQuery(this);\r
+            Properties.Settings.Default.defaultUserSettings = query;\r
+            // Save the new default Settings\r
+            Properties.Settings.Default.Save();\r
+            MessageBox.Show("New default settings saved.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);\r
+        }\r
+        private void treeView_presets_AfterSelect(object sender, TreeViewEventArgs e)\r
+        {\r
+            // Ok, so, we've selected a preset. Now we want to load it.\r
+            string presetName = treeView_presets.SelectedNode.Text;\r
+            string query = presetHandler.getCliForPreset(presetName);\r
+\r
+            if (query != null)\r
+            {\r
+                //Ok, Reset all the H264 widgets before changing the preset\r
+                x264PanelFunctions.reset2Defaults(this);\r
+\r
+                // Send the query from the file to the Query Parser class\r
+                Functions.QueryParser presetQuery = Functions.QueryParser.Parse(query);\r
+\r
+                // Now load the preset\r
+                presetLoader.presetLoader(this, presetQuery, presetName);\r
+\r
+                // The x264 widgets will need updated, so do this now:\r
+                x264PanelFunctions.X264_StandardizeOptString(this);\r
+                x264PanelFunctions.X264_SetCurrentSettingsInPanel(this);\r
+            }\r
+        }\r
+        private void treeView_presets_deleteKey(object sender, KeyEventArgs e)\r
+        {\r
+            if (e.KeyCode == Keys.Delete)\r
+            {\r
+                DialogResult result = MessageBox.Show("Are you sure you wish to delete the selected preset?", "Preset", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
+                if (result == DialogResult.Yes)\r
+                {\r
+                    if (treeView_presets.SelectedNode != null)\r
+                        presetHandler.remove(treeView_presets.SelectedNode.Text);\r
+\r
+                    // Remember each nodes expanded status so we can reload it\r
+                    List<Boolean> nodeStatus = new List<Boolean>();\r
+                    foreach (TreeNode node in treeView_presets.Nodes)\r
+                        nodeStatus.Add(node.IsExpanded);\r
+\r
+                    // Now reload the preset panel\r
+                    loadPresetPanel();\r
+\r
+                    // And finally, re-expand any of the nodes if required\r
+                    int i = 0;\r
+                    foreach (TreeNode node in treeView_presets.Nodes)\r
+                    {\r
+                        if (nodeStatus[i] == true)\r
+                            node.Expand();\r
+\r
+                        i++;\r
+                    }\r
+                }\r
+            }\r
+        }\r
+\r
+        #endregion\r
+\r
+        #region Preset Expand / Collaspe\r
+        private List<Boolean> saveTreeViewState()\r
+        {\r
+            // Remember each nodes expanded status so we can reload it\r
+            List<Boolean> nodeStatus = new List<Boolean>();\r
+            foreach (TreeNode node in treeView_presets.Nodes)\r
+            {\r
+                nodeStatus.Add(node.IsExpanded);\r
+                foreach (TreeNode subNode in node.Nodes)\r
+                    nodeStatus.Add(node.IsExpanded);\r
+            }\r
+            return nodeStatus;\r
+        }\r
+\r
+        private void loadTreeViewStates(List<Boolean> nodeStatus)\r
+        {\r
+            // And finally, re-expand any of the nodes if required\r
+            int i = 0;\r
+            foreach (TreeNode node in treeView_presets.Nodes)\r
+            {\r
+                if (nodeStatus[i] == true)\r
+                    node.Expand();\r
+\r
+                foreach (TreeNode subNode in node.Nodes)\r
+                {\r
+                    if (nodeStatus[i] == true)\r
+                        subNode.Expand();\r
+                }\r
+\r
+                i++;\r
+            }\r
+        }\r
+        #endregion\r
+\r
+        #region Functions\r
+        private void loadNormalPreset()\r
+        {\r
+            treeView_presets.Nodes.Find("Normal", true);\r
+\r
+            foreach (TreeNode treenode in treeView_presets.Nodes)\r
+            {\r
+                foreach (TreeNode node in treenode.Nodes)\r
+                {\r
+                    if (node.Text.ToString().Equals("Normal"))\r
+                        treeView_presets.SelectedNode = treeView_presets.Nodes[treenode.Index].Nodes[0];\r
+                }\r
+            }\r
+        }\r
+        /// <summary>\r
+        /// Take in a File destination and change it's file extension to a new Extension\r
+        /// </summary>\r
+        /// <param name="destination"></param>\r
+        /// <param name="newExtension"></param>\r
+        /// <returns>String of the new file path and extension</returns>\r
+        public void setExtension(string newExtension)\r
+        {\r
+            text_destination.Text = text_destination.Text.Replace(".mp4", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".m4v", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".mkv", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".avi", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".ogm", newExtension);\r
+        }\r
+        #endregion\r
+\r
+        #region Drive Detection\r
+        // Source Button Drive Detection\r
+        private delegate void ProgressUpdateHandler();\r
+        private void getDriveInfoThread()\r
+        {\r
+            try\r
+            {\r
+                if (this.InvokeRequired)\r
+                {\r
+                    this.BeginInvoke(new ProgressUpdateHandler(getDriveInfoThread));\r
+                    return;\r
+                }\r
+\r
+                Boolean foundDrive = false;\r
+                DriveInfo[] theCollectionOfDrives = DriveInfo.GetDrives();\r
+                foreach (DriveInfo curDrive in theCollectionOfDrives)\r
+                {\r
+                    if (curDrive.DriveType == DriveType.CDRom)\r
+                    {\r
+                        if (curDrive.IsReady)\r
+                        {\r
+                            if (File.Exists(curDrive.RootDirectory.ToString() + "VIDEO_TS\\VIDEO_TS.IFO"))\r
+                                mnu_dvd_drive.Text = curDrive.RootDirectory.ToString() + "VIDEO_TS (" + curDrive.VolumeLabel + ")";\r
+                            else\r
+                                mnu_dvd_drive.Text = "[No DVD Drive Ready]";\r
+\r
+                            foundDrive = true;\r
+\r
+                        }\r
+                    }\r
+                }\r
+\r
+                if (foundDrive == false)\r
+                    mnu_dvd_drive.Text = "[No DVD Drive Ready]";\r
+            }\r
+            catch (Exception)\r
+            {\r
+                mnu_dvd_drive.Text = "[No DVD Drive Ready / Found]";\r
+            }\r
+        }\r
+        #endregion\r
+\r
+        #region Audio Panel Stuff\r
+        public void setAudioByContainer(String path)\r
+        {\r
+            string oldval = "";\r
+\r
+            if ((path.EndsWith(".mp4")) || (path.EndsWith(".m4v")))\r
+            {\r
+                oldval = drp_audenc_1.Text;\r
+                drp_audenc_1.Items.Clear();\r
+                drp_audenc_1.Items.Add("AAC");\r
+                drp_audenc_1.Items.Add("AC3");\r
+                if ((oldval != "AAC") && (oldval != "AC3"))\r
+                    drp_audenc_1.SelectedIndex = 0;\r
+\r
+                oldval = drp_audenc_2.Text;\r
+                drp_audenc_2.Items.Clear();\r
+                drp_audenc_2.Items.Add("AAC");\r
+                drp_audenc_2.Items.Add("AC3");\r
+                if (drp_audenc_2.Enabled)\r
+                {\r
+                    if ((oldval != "AAC") && (oldval != "AC3"))\r
+                        drp_audenc_2.SelectedIndex = 0;\r
+                }\r
+\r
+                oldval = drp_audenc_3.Text;\r
+                drp_audenc_3.Items.Clear();\r
+                drp_audenc_3.Items.Add("AAC");\r
+                drp_audenc_3.Items.Add("AC3");\r
+                if (drp_audenc_3.Enabled)\r
+                {\r
+                    if ((oldval != "AAC") && (oldval != "AC3"))\r
+                        drp_audenc_3.SelectedIndex = 0;\r
+                }\r
+\r
+                oldval = drp_audenc_4.Text;\r
+                drp_audenc_4.Items.Clear();\r
+                drp_audenc_4.Items.Add("AAC");\r
+                drp_audenc_4.Items.Add("AC3");\r
+                if (drp_audenc_4.Enabled)\r
+                {\r
+                    if ((oldval != "AAC") && (oldval != "AC3"))\r
+                        drp_audenc_4.SelectedIndex = 0;\r
+                }\r
+            }\r
+            else if (path.EndsWith(".avi"))\r
+            {\r
+                oldval = drp_audenc_1.Text;\r
+                drp_audenc_1.Items.Clear();\r
+                drp_audenc_1.Items.Add("MP3");\r
+                drp_audenc_1.Items.Add("AC3");\r
+                if ((oldval != "MP3") && (oldval != "AC3"))\r
+                    drp_audenc_1.SelectedIndex = 0;\r
+\r
+                oldval = drp_audenc_2.Text;\r
+                drp_audenc_2.Items.Clear();\r
+                drp_audenc_2.Items.Add("MP3");\r
+                drp_audenc_2.Items.Add("AC3");\r
+                if (drp_audenc_2.Enabled)\r
+                {\r
+                    if ((oldval != "MP3") && (oldval != "AC3"))\r
+                        drp_audenc_2.SelectedIndex = 0;\r
+                }\r
+\r
+\r
+                oldval = drp_audenc_3.Text;\r
+                drp_audenc_3.Items.Clear();\r
+                drp_audenc_3.Items.Add("MP3");\r
+                drp_audenc_3.Items.Add("AC3");\r
+                if (drp_audenc_3.Enabled)\r
+                {\r
+                    if ((oldval != "MP3") && (oldval != "AC3"))\r
+                        drp_audenc_3.SelectedIndex = 0;\r
+                }\r
+\r
+                oldval = drp_audenc_4.Text;\r
+                drp_audenc_4.Items.Clear();\r
+                drp_audenc_4.Items.Add("MP3");\r
+                drp_audenc_4.Items.Add("AC3");\r
+                if (drp_audenc_4.Enabled)\r
+                {\r
+                    if ((oldval != "MP3") && (oldval != "AC3"))\r
+                        drp_audenc_4.SelectedIndex = 0;\r
+                }\r
+            }\r
+            else if (path.EndsWith(".ogm"))\r
+            {\r
+                drp_audenc_1.Items.Clear();\r
+                drp_audenc_1.Items.Add("Vorbis");\r
+                drp_audenc_1.SelectedIndex = 0;\r
+\r
+                drp_audenc_2.Items.Clear();\r
+                drp_audenc_2.Items.Add("Vorbis");\r
+                if (drp_audenc_2.Enabled)\r
+                    drp_audenc_2.SelectedIndex = 0;\r
+\r
+                drp_audenc_3.Items.Clear();\r
+                drp_audenc_3.Items.Add("Vorbis");\r
+                if (drp_audenc_3.Enabled)\r
+                    drp_audenc_3.SelectedIndex = 0;\r
+\r
+                drp_audenc_4.Items.Clear();\r
+                drp_audenc_4.Items.Add("Vorbis");\r
+                if (drp_audenc_4.Enabled)\r
+                    drp_audenc_4.SelectedIndex = 0;\r
+            }\r
+            else if (path.EndsWith(".mkv"))\r
+            {\r
+                drp_audenc_1.Items.Clear();\r
+                drp_audenc_1.Items.Add("AAC");\r
+                drp_audenc_1.Items.Add("MP3");\r
+                drp_audenc_1.Items.Add("AC3");\r
+                drp_audenc_1.Items.Add("Vorbis");\r
+                if (drp_audenc_1.Text == string.Empty)\r
+                    drp_audenc_1.SelectedIndex = 0;\r
+\r
+\r
+                drp_audenc_2.Items.Clear();\r
+                drp_audenc_2.Items.Add("AAC");\r
+                drp_audenc_2.Items.Add("MP3");\r
+                drp_audenc_2.Items.Add("AC3");\r
+                drp_audenc_2.Items.Add("Vorbis");\r
+                if (drp_audenc_2.Enabled)\r
+                {\r
+                    if (drp_audenc_2.Text == string.Empty)\r
+                        drp_audenc_2.SelectedIndex = 0;\r
+                }\r
+\r
+                drp_audenc_3.Items.Clear();\r
+                drp_audenc_3.Items.Add("AAC");\r
+                drp_audenc_3.Items.Add("MP3");\r
+                drp_audenc_3.Items.Add("AC3");\r
+                drp_audenc_3.Items.Add("Vorbis");\r
+                if (drp_audenc_3.Enabled)\r
+                {\r
+                    if (drp_audenc_3.Text == string.Empty)\r
+                        drp_audenc_3.SelectedIndex = 0;\r
+                }\r
+\r
+                drp_audenc_4.Items.Clear();\r
+                drp_audenc_4.Items.Add("AAC");\r
+                drp_audenc_4.Items.Add("MP3");\r
+                drp_audenc_4.Items.Add("AC3");\r
+                drp_audenc_4.Items.Add("Vorbis");\r
+                if (drp_audenc_4.Enabled)\r
+                {\r
+                    if (drp_audenc_4.Text == string.Empty)\r
+                        drp_audenc_4.SelectedIndex = 0;\r
+                }\r
+            }\r
+        }\r
+        public void setVideoByContainer(String path)\r
+        {\r
+            string oldval = "";\r
+\r
+            if ((path.EndsWith(".mp4")) || (path.EndsWith(".m4v")))\r
+            {\r
+                oldval = drp_videoEncoder.Text;\r
+                drp_videoEncoder.Items.Clear();\r
+                drp_videoEncoder.Items.Add("MPEG-4 (FFmpeg)");\r
+                drp_videoEncoder.Items.Add("MPEG-4 (XviD)");\r
+                drp_videoEncoder.Items.Add("H.264 (x264)");\r
+                if (oldval == "VP3 (Theora)")\r
+                    drp_videoEncoder.SelectedIndex = 2;\r
+                else\r
+                    drp_videoEncoder.Text = oldval;\r
+\r
+            }\r
+            else if (path.EndsWith(".avi"))\r
+            {\r
+                oldval = drp_videoEncoder.Text;\r
+                drp_videoEncoder.Items.Clear();\r
+                drp_videoEncoder.Items.Add("MPEG-4 (FFmpeg)");\r
+                drp_videoEncoder.Items.Add("MPEG-4 (XviD)");\r
+                drp_videoEncoder.Items.Add("H.264 (x264)");\r
+                if (oldval == "VP3 (Theora)")\r
+                    drp_videoEncoder.SelectedIndex = 2;\r
+                else\r
+                    drp_videoEncoder.Text = oldval;\r
+            }\r
+            else if (path.EndsWith(".ogm"))\r
+            {\r
+                oldval = drp_videoEncoder.Text;\r
+                drp_videoEncoder.Items.Clear();\r
+                drp_videoEncoder.Items.Add("MPEG-4 (FFmpeg)");\r
+                drp_videoEncoder.Items.Add("MPEG-4 (XviD)");\r
+                drp_videoEncoder.Items.Add("VP3 (Theora)");\r
+                if (oldval == "H.264 (x264)")\r
+                    drp_videoEncoder.SelectedIndex = 2;\r
+                else\r
+                    drp_videoEncoder.Text = oldval;\r
+            }\r
+            else if (path.EndsWith(".mkv"))\r
+            {\r
+                oldval = drp_videoEncoder.Text;\r
+                drp_videoEncoder.Items.Clear();\r
+                drp_videoEncoder.Items.Add("MPEG-4 (FFmpeg)");\r
+                drp_videoEncoder.Items.Add("MPEG-4 (XviD)");\r
+                drp_videoEncoder.Items.Add("H.264 (x264)");\r
+                drp_videoEncoder.Items.Add("VP3 (Theora)");\r
+                drp_videoEncoder.Text = oldval;\r
+            }\r
+        }\r
+        public void setBitrateSelections384(ComboBox dropDown)\r
+        {\r
+            dropDown.Items.Clear();\r
+            dropDown.Items.Add("32");\r
+            dropDown.Items.Add("40");\r
+            dropDown.Items.Add("48");\r
+            dropDown.Items.Add("56");\r
+            dropDown.Items.Add("64");\r
+            dropDown.Items.Add("80");\r
+            dropDown.Items.Add("86");\r
+            dropDown.Items.Add("112");\r
+            dropDown.Items.Add("128");\r
+            dropDown.Items.Add("160");\r
+            dropDown.Items.Add("192");\r
+            dropDown.Items.Add("224");\r
+            dropDown.Items.Add("256");\r
+            dropDown.Items.Add("320");\r
+            dropDown.Items.Add("384");\r
+        }\r
+        public void setBitrateSelections320(ComboBox dropDown)\r
+        {\r
+            dropDown.Items.Clear();\r
+            dropDown.Items.Add("32");\r
+            dropDown.Items.Add("40");\r
+            dropDown.Items.Add("48");\r
+            dropDown.Items.Add("56");\r
+            dropDown.Items.Add("64");\r
+            dropDown.Items.Add("80");\r
+            dropDown.Items.Add("86");\r
+            dropDown.Items.Add("112");\r
+            dropDown.Items.Add("128");\r
+            dropDown.Items.Add("160");\r
+            dropDown.Items.Add("192");\r
+            dropDown.Items.Add("224");\r
+            dropDown.Items.Add("256");\r
+            dropDown.Items.Add("320");\r
+        }\r
+        public void setBitrateSelections160(ComboBox dropDown)\r
+        {\r
+            dropDown.Items.Clear();\r
+            dropDown.Items.Add("32");\r
+            dropDown.Items.Add("40");\r
+            dropDown.Items.Add("48");\r
+            dropDown.Items.Add("56");\r
+            dropDown.Items.Add("64");\r
+            dropDown.Items.Add("80");\r
+            dropDown.Items.Add("86");\r
+            dropDown.Items.Add("112");\r
+            dropDown.Items.Add("128");\r
+            dropDown.Items.Add("160");\r
+        }\r
+        #endregion\r
+\r
+        #region Encoding\r
+\r
+        // Declarations\r
+        private delegate void UpdateUIHandler();\r
+\r
+        // Encoding Functions\r
+        private void procMonitor(object state)\r
+        {\r
+            // Make sure we are not already encoding and if we are then display an error.\r
+            if (hbProc != null)\r
+                hbProc.CloseMainWindow();\r
+            else\r
+            {\r
+                hbProc = cliObj.runCli(this, (string)state);\r
+                hbProc.WaitForExit();\r
+                setEncodeLabelFinished();\r
+                hbProc = null;\r
+\r
+                // If the window is minimized, display the notification in a popup.\r
+                if (FormWindowState.Minimized == this.WindowState)\r
+                {\r
+                    notifyIcon.BalloonTipText = lbl_encode.Text;\r
+                    notifyIcon.ShowBalloonTip(500);\r
+                }\r
+\r
+                // After the encode is done, we may want to shutdown, suspend etc.\r
+                cliObj.addCLIQueryToLog((string)state);\r
+                cliObj.copyLog((string)state); // Make a copy of the log in the users desired location if necessary\r
+                cliObj.afterEncodeAction();\r
+            }\r
+        }\r
+        private void setEncodeLabelFinished()\r
+        {\r
+            if (this.InvokeRequired)\r
+            {\r
+                this.BeginInvoke(new UpdateUIHandler(setEncodeLabelFinished));\r
+                return;\r
+            }\r
+            lbl_encode.Text = "Encoding Finished";\r
+            btn_start.Text = "Start";\r
+            btn_start.ToolTipText = "Start the encoding process";\r
+            btn_start.Image = Properties.Resources.Play;\r
+        }\r
+\r
+        #endregion\r
+\r
+        #region Public Methods\r
+\r
+        /// <summary>\r
+        /// Is the mainWindow currently monitoring an encoding session\r
+        /// </summary>\r
+        /// <returns>boolean</returns>\r
+        public Boolean isEncoding()\r
+        {\r
+            if (hbProc == null)\r
+                return false;\r
+            else\r
+                return true;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Action can be "encode" or "scan"\r
+        /// Set the last action varible in the main window.\r
+        /// This is used to control which log file is displayed when the Activity window is displayed.\r
+        /// </summary>\r
+        /// <param name="last">String</param>\r
+        public void setLastAction(string last)\r
+        {\r
+            this.lastAction = last;\r
+        }\r
+\r
+        /// <summary>\r
+        /// DVD parseing. Pass in a parsed DVD.\r
+        /// </summary>\r
+        /// <param name="dvd"></param>\r
+        public void setStreamReader(Parsing.DVD dvd)\r
+        {\r
+            this.thisDVD = dvd;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Reload the preset panel display\r
+        /// </summary>\r
+        public void loadPresetPanel()\r
+        {\r
+            presetHandler.loadPresetData();\r
+\r
+            treeView_presets.Nodes.Clear();\r
+\r
+            List<Presets.Preset> presetNameList = new List<Presets.Preset>();\r
+            List<string> presetNames = new List<string>();\r
+            TreeNode preset_treeview = new TreeNode();\r
+\r
+            TreeNode rootNode = new TreeNode();\r
+            TreeNode rootNodeTwo = new TreeNode();\r
+            TreeNode childNode = new TreeNode();\r
+            int workingLevel = 0;\r
+            string previousCategory = String.Empty;\r
+            string currentCategory = String.Empty;\r
+\r
+            presetNameList = presetHandler.getBuildInPresets();\r
+            if (presetNameList.Count != 0)\r
+            {\r
+                foreach (Presets.Preset preset in presetNameList)\r
+                {\r
+                    // Handle Root Nodes\r
+\r
+                    // First Case - No presets have been read yet so setup the root category\r
+                    if (preset.Level == 1 && currentCategory == String.Empty)\r
+                    {\r
+                        rootNode = new TreeNode(preset.Category);\r
+                        workingLevel = preset.Level;\r
+                        currentCategory = preset.Category;\r
+                        previousCategory = preset.Category;\r
+                    }\r
+\r
+                    // Second Case - This is the first sub child node.\r
+                    if (preset.Level == 2 && workingLevel == 1 && currentCategory != preset.Category)\r
+                    {\r
+                        rootNodeTwo = new TreeNode(preset.Category);\r
+                        workingLevel = preset.Level;\r
+                        currentCategory = preset.Category;\r
+                        rootNode.Nodes.Add(rootNodeTwo);\r
+                    }\r
+\r
+                    // Third Case - Any presets the sub presets detected in the above if statment.\r
+                    if (preset.Level == 1 && workingLevel == 2)\r
+                    {\r
+                        workingLevel = preset.Level;\r
+                        currentCategory = preset.Category;\r
+                    }\r
+\r
+                    // Fourth Case - We've finished this root node and are onto the next root node.\r
+                    if (preset.Level == 1 && workingLevel == 1 && previousCategory != preset.Category)\r
+                    {\r
+                        treeView_presets.Nodes.Add(rootNode); // Add the finished node\r
+\r
+                        rootNode = new TreeNode(preset.Category);\r
+                        workingLevel = preset.Level;\r
+                        currentCategory = preset.Category;\r
+                        previousCategory = preset.Category;\r
+                    }\r
+\r
+                    // Handle Child Nodes\r
+                    // Add First level child nodes to the current root node\r
+                    if (preset.Level == 1 && workingLevel == 1 && currentCategory == preset.Category)\r
+                    {\r
+                        childNode = new TreeNode(preset.Name);\r
+                        rootNode.Nodes.Add(childNode);\r
+                    }\r
+\r
+                    // Add Second level child nodes to the current sub root node\r
+                    if (preset.Level == 2 && workingLevel == 2 && currentCategory == preset.Category)\r
+                    {\r
+                        childNode = new TreeNode(preset.Name);\r
+                        rootNodeTwo.Nodes.Add(childNode);\r
+                    }\r
+                }\r
+\r
+                // Add the final root node which does not get added above.\r
+                treeView_presets.Nodes.Add(rootNode);\r
+            }\r
+\r
+\r
+            // User Presets\r
+            presetNames = presetHandler.getUserPresetNames();\r
+            foreach (string preset in presetNames)\r
+            {\r
+                preset_treeview = new TreeNode(preset);\r
+                preset_treeview.ForeColor = Color.Black;\r
+\r
+                // Now Fill Out List View with Items\r
+                treeView_presets.Nodes.Add(preset_treeview);\r
+            }\r
+        }\r
+\r
+        #endregion\r
+\r
+        #region Taskbar Tray Icon\r
+        private void frmMain_Resize(object sender, EventArgs e)\r
+        {\r
+            if (FormWindowState.Minimized == this.WindowState)\r
+            {\r
+                notifyIcon.Visible = true;\r
+                if (lbl_encode.Text != "")\r
+                    notifyIcon.BalloonTipText = lbl_encode.Text;\r
+                else\r
+                    notifyIcon.BalloonTipText = "Not Encoding";\r
+                notifyIcon.ShowBalloonTip(500);\r
+                this.Hide();\r
+            }\r
+            else if (FormWindowState.Normal == this.WindowState)\r
+                notifyIcon.Visible = false;\r
+        }\r
+        private void notifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)\r
+        {\r
+            this.Visible = true;\r
+            this.Activate();\r
+            this.WindowState = FormWindowState.Normal;\r
+            notifyIcon.Visible = false;\r
+        }\r
+        private void btn_minimize_Click(object sender, EventArgs e)\r
+        {\r
+            this.WindowState = FormWindowState.Minimized;\r
+        }\r
+        private void btn_restore_Click(object sender, EventArgs e)\r
+        {\r
+            this.Visible = true;\r
+            this.Activate();\r
+            this.WindowState = FormWindowState.Normal;\r
+            notifyIcon.Visible = false;\r
+        }\r
+        #endregion\r
+\r
+        // This is the END of the road ------------------------------------------------------------------------------\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx
new file mode 100644 (file)
index 0000000..1ae5e66
--- /dev/null
@@ -0,0 +1,1048 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <metadata name="Label38.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+    <value>False</value>\r
+  </metadata>\r
+  <metadata name="notifyIconMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>977, 15</value>\r
+  </metadata>\r
+  <metadata name="notifyIconMenu.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+    <value>False</value>\r
+  </metadata>\r
+  <metadata name="DVD_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>556, 15</value>\r
+  </metadata>\r
+  <metadata name="File_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>664, 15</value>\r
+  </metadata>\r
+  <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>18, 15</value>\r
+  </metadata>\r
+  <data name="drp_subtitle.ToolTip" xml:space="preserve">\r
+    <value>Select the subtitle language you require from this dropdown.\r
+ - or -\r
+Autoselect: Scan for subtitles in an extra 1st pass, and choose\r
+the one that's only used 10 percent of the time or less. \r
+This should locate subtitles for short foreign language segments. \r
+Best used in conjunction with forced subtitles.</value>\r
+  </data>\r
+  <metadata name="number.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+    <value>True</value>\r
+  </metadata>\r
+  <metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+    <value>True</value>\r
+  </metadata>\r
+  <data name="data_chpt.ToolTip" xml:space="preserve">\r
+    <value>Here you can name each chapter that the encoded video will contain.\r
+Make sure you have selected a "Title" from the "Source" box above otherwise \r
+the list will not be populated with the correct amount of chapters.\r
+Note: Do not change any of the chapter numbers!</value>\r
+  </data>\r
+  <data name="check_Cabac.ToolTip" xml:space="preserve">\r
+    <value>CABAC, or context adaptive binary arithmetic coding, is used by x264 to reduce the bitrate needed for a given quality by 15%. \r
+This makes it very cool and very useful, and it should be left on whenever possible. However, it is incompatible with the iPod 5.5G, and makes the AppleTV struggle. \r
+So turn it off for those. CABAC is a kind of entropy coding, which means that it compresses data by making shorthand symbols to represent long streams of data. \r
+The "entropy" part means that the symbols it uses the most often are the smallest. \r
+When you disable CABAC, another entropy coding scheme gets enabled, called CAVLC (context adaptive variable-length coding). \r
+CAVLC is a lot less efficient, which is why it needs 15% more bitrate to achieve the same quality as CABAC.</value>\r
+  </data>\r
+  <data name="drop_deblockBeta.ToolTip" xml:space="preserve">\r
+    <value>x264 includes an in-loop deblocking filter. \r
+What this means is that blocky compression artifacts are smoothed away when you play back the video. \r
+It has two settings: strength and threshold, just like a simple filter in Photoshop. \r
+Strength controls the amount of deblocking applied to the whole frame. \r
+If you drop down below 0, you reduce the amount of blurring.\r
+Go too negative, and you'll get an effect somewhat like oversharpening an image. \r
+Go into positive values, and the image may become too soft. \r
+Threshold controls how sensitive the filter is to whether something in a block is detail that needs to be preserved: lower numbers blur details less. \r
+The default deblocking values are 0 and 0. This does not mean zero deblocking. \r
+It means x264 will apply the regular deblocking strength and thresholds the codec authors have selected as working the best in most cases. \r
+While many, many people stick with the default deblocking values of 0,0, other people disagree. \r
+Some prefer a slightly less blurred image for live action material, and use values like -2,-1 or -2,-2. Others will raise it to 1,1 or even 3,3 for animation. \r
+While the values for each setting extend from -6 to 6, the consensus is that going below -3 or above 3 is worthless.\r
+</value>\r
+  </data>\r
+  <data name="drop_deblockAlpha.ToolTip" xml:space="preserve">\r
+    <value>x264 includes an in-loop deblocking filter. \r
+What this means is that blocky compression artifacts are smoothed away when you play back the video. \r
+It has two settings: strength and threshold, just like a simple filter in Photoshop. \r
+Strength controls the amount of deblocking applied to the whole frame. \r
+If you drop down below 0, you reduce the amount of blurring.\r
+Go too negative, and you'll get an effect somewhat like oversharpening an image. \r
+Go into positive values, and the image may become too soft. \r
+Threshold controls how sensitive the filter is to whether something in a block is detail that needs to be preserved: lower numbers blur details less. \r
+The default deblocking values are 0 and 0. This does not mean zero deblocking. \r
+It means x264 will apply the regular deblocking strength and thresholds the codec authors have selected as working the best in most cases. \r
+While many, many people stick with the default deblocking values of 0,0, other people disagree. \r
+Some prefer a slightly less blurred image for live action material, and use values like -2,-1 or -2,-2. Others will raise it to 1,1 or even 3,3 for animation. \r
+While the values for each setting extend from -6 to 6, the consensus is that going below -3 or above 3 is worthless.</value>\r
+  </data>\r
+  <data name="check_8x8DCT.ToolTip" xml:space="preserve">\r
+    <value>When Analysis is set to "all," checking this box lets x264 break key frames down into 8x8 blocks of pixels for analysis. \r
+This is a high profile feature of H.264, which makes it less compatible. It should slightly decrease bitrate or improve quality.</value>\r
+  </data>\r
+  <data name="drop_analysis.ToolTip" xml:space="preserve">\r
+    <value>Analysis controls how finely x264 divides up a frame to capture detail. \r
+Full macroblocks are 16x16 pixels, but x264 can go down all the way to 4x4 blocks if it judges it necessary. \r
+By default it only breaks up key frames that much. \r
+To give x264 the freedom to make the best decisions for all frames, use "all" analysis. \r
+If you want to create a high profile H.264 video (which is less compatible with the world at large than main profile), \r
+also check the "8x8 DCT blocks" box to add yet another block size for analysis.</value>\r
+  </data>\r
+  <data name="drop_subpixelMotionEstimation.ToolTip" xml:space="preserve">\r
+    <value>This setting is finer-grained than the motion estimation settings above. \r
+Instead of dealing with whole pixels, it deals with fractional pixels. 4, HandBrake's default, means looking at quarter pixels (qpel). \r
+Higher levels increase quality by dividing the pixel more, but take longer to encode. \r
+Using 6 or 7 turns unlocks the ability to turn on more advanced features like B-Frame rate distortion.</value>\r
+  </data>\r
+  <data name="drop_MotionEstimationRange.ToolTip" xml:space="preserve">\r
+    <value>This range is the radius, in pixels, x264 should use for motion estimation searches. \r
+It only has an effect when you use Uneven Multi-Hexagonal or Exhaustive searching. \r
+24, 32, and 64 are good values.</value>\r
+  </data>\r
+  <data name="drop_MotionEstimationMethod.ToolTip" xml:space="preserve">\r
+    <value>This sets the shape of the area x264 searches when estimating motion. \r
+Your choices are a diamond, a hexagon, a more complex hexagonal shape, or searching the entire frame. \r
+You are best off using Uneven Multi-Hexagonal searching.</value>\r
+  </data>\r
+  <data name="check_pyrmidalBFrames.ToolTip" xml:space="preserve">\r
+    <value>B-frame pyramids are a High Profile feature. \r
+This means that if you enable it, YOUR VIDEO WILL NOT PLAY IN QUICKTIME. \r
+Pyramidal B-frames mean that B-frames don't just reference surrounding reference frames â€” \r
+ instead, it also treats a previous B-frame as a reference, improving quality/lowering bitrate at the expense of complexity. \r
+Logically, to reference an earlier B-frame, you must tell x264 to use at least 2 B-frames.</value>\r
+  </data>\r
+  <data name="check_weightedBFrames.ToolTip" xml:space="preserve">\r
+    <value>With weighted B-frame prediction enabled, x264 will consider how far away the previous and next P-frames are, \r
+before deciding to make a frame a B-frame. \r
+The effect is that x264 will use fewer B-frames when they'd look bad â€” when it can't accurately predict motion. \r
+Obviously, this only works when you tell x264 to use more than 1 B-frame.  </value>\r
+  </data>\r
+  <data name="drop_directPrediction.ToolTip" xml:space="preserve">\r
+    <value>Direct prediction tells x264 what method to use when guessing motion for certain parts of a B-frame. \r
+It can either look at other parts of the current frame (spatial) or compare against the preceding frame (temporal). \r
+You're best off setting this to automatic, so x264 decides which method is best on its own. \r
+Don't select none assuming it will be faster; instead it will take longer and look worse. \r
+If you're going to choose between spatial and temporal, spatial is usually better. </value>\r
+  </data>\r
+  <metadata name="DVD_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>232, 15</value>\r
+  </metadata>\r
+  <metadata name="File_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>450, 15</value>\r
+  </metadata>\r
+  <metadata name="ISO_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>343, 15</value>\r
+  </metadata>\r
+  <metadata name="frmMainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>106, 15</value>\r
+  </metadata>\r
+  <metadata name="presets_menu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>1224, 15</value>\r
+  </metadata>\r
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>767, 15</value>\r
+  </metadata>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="btn_dvd_source.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAlpJREFUOE+tk21I\r
+        k1EYhif0oyA0sqIQCix/+GcQFFH9CCmiUBTLLEjShJofVBgL2fxoU9Pp5ubUlS5rU9f8rCyjsA+pUCRC\r
+        TR1ppmVFUSlmhq78unrnQF1KGHTg/nEOz30993PO+7qJFrmUeiv2n+Mij+XLRLLYULdF2pxlEVIDcw0p\r
+        AsyxD5fmI/rQ94pqi26eOlsfuZj+7BgSm01QdA4ih7m73Yx9qGpavwatjPebqCzOprPt8YKQgzFagqL0\r
+        BEjyEFWVaBkdLHMxT34uYNwWR9nVTEoL0zHlp2DMSeaSRk6eKt4VWm5WM/rVPNN5SjDTLQebZEHNA1wr\r
+        UvHjk3E6tsNcV62e1r3KLGqtKm6WplNpSsVqVFJsOM8VfSKFWjkGtcyZptSYzvC7XByx3zQoqCnTMvlG\r
+        CX1prnornPUmQJcUXsbSVhGK5bIOkcmQyveeTHiv4VZ5Nk33Nc6iuSO8CIfmECYa/bE/8ON1iRipJNh5\r
+        F0V6Bd86lfQ1JlFj1TDVq4COKCegLVIwHmGiKRB7/V6G7+5koHozymgfYRy5E1CgTWKgXcZ1i5qWp0KS\r
+        rjgBcAJawph6FszYk/2M1O1isGYLX8p9ab6wgqP+3rMvYciS01GfzA1LFvQkQ6sQ9/khxhoCGHnox1Dt\r
+        NvorxXw0b8Km8UQh2cip6GOzgNyMeKqKM7HdjqFZJ5pRk2YJ9aql3EnxoCJxNaZ4Ly6e3UDY3O6OEXRp\r
+        59ApTpIhiyDh9GHORAZyPHQPB/ZtZ/cOMVvFPvh6e7F+3SrWrHRnraf7Xz/xf/rJ/kvxb84I3U1y+9/W\r
+        AAAAAElFTkSuQmCC\r
+</value>\r
+  </data>\r
+  <metadata name="notifyIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>871, 15</value>\r
+  </metadata>\r
+  <data name="notifyIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
+        IACoJQAAHh0AACAgAAABACAAqBAAAMZCAAAQEAAAAQAgAGgEAABuUwAAKAAAADAAAABgAAAAAQAIAAAA\r
+        AACACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAD///8A/wAAAAD/AAAAAIAAgICAAICAAAAAgAAAAICAAIAA\r
+        AACAAIAAgP//ACAgIADg4OAAIAAAAAAgAABg4CAAQOBAAGBgYAAgYAAAQKDgAAAAIABAwCAAIEAAAECg\r
+        AABg4AAAIGCAAECAoABgoMAAYECgAGDAAABgICAAoKCgAOAAAAAgIAAAAGAAAEDgAABgAAAAIAAgAEAg\r
+        IAAgQGAAIIDAAADg4ABgAGAAgOD/ACCA/wCgAAAAQGAAACCAAAAAoAAAYCAAAAAgIAAgIEAAYGBAAEBg\r
+        YAAAIIAAAGCAAGCAgABAAKAAAICgAACgoACAoKAAIKDAAECgwAAAAOAAQADgAADA4ABgwOAAIODgAADg\r
+        AADA4AAAAEAgAKDgIAAA4EAAYABAAABAYACAAGAAgCBgAGAggABA4KAAAECgAGBAwADgIOAAIEDgAACA\r
+        4ADgoOAAYAD/ACBg/wAAoP8A4KD/AGD//wAICAgACAAAAAgIAAAAAJgACAAIAAAACAAACAAACBAQACA4\r
+        SAAgYIgAOHCIADhw+AAIGAAAEBAIACg4QAAwYHgAAACIACA4QAAoQFAAKFh4AHh4eAAwaIAAIGiQADh4\r
+        mAAACAgAEAgIABAYGAAgGBgASEhIABhIYAAoUGAAIFBoAChQaAAoWGgAMFhoAChoiAAweJgAKHioACiA\r
+        sAAIEAAACAgQAAgQGAAQGCAAGCAoABhAUAAoSFgAaGhoABhQcAAgWHAAKFhwADhgcAAYWIAAOGiAAIiI\r
+        iAAoaJAAKHCYACh4oAA4gKAAMICoAKioqAAwmNAAEDgAAChYAAAweAAAMIgQAAgYGAAYGBgACBggABAg\r
+        KAAgKCgAKCgoACAwOAA4ODgAKDhIADBQWABYWFgAGEhoADBYcAAYUHgAGFh4ACBYeAAoYHgAKGCAABhY\r
+        iAAgaJgAKICoACiIuAC4uLgAMJDIADiw6AAQCAAAABgAAAggAAAAOAAAMGgAABgQCAAwgAgAEAgQABgQ\r
+        EAAwmBgAGBggAAgYKAAAICgACCAoABgoMAAgKDAAGDBAABg4QAAYOFAAEEBYACBIWAAwSFgAOEhYACBI\r
+        YAAQSGgAOFhoABhIcAAoUHAAQFhwACBgeABAaIAAIGiIADBwiABAcIgAGGCQADhwkABYeJAACBCgAChw\r
+        oAAweKAAKIC4ACiQwAAwmMgAOKjgADBg6ABAsOgAELD4AAgoAAAIMAAAGDAAABhIAAAYUAAAKHgAAACY\r
+        AAAwmAAAAMgAABAACAAIEAgAEBgIABA4CAAYOAgAMHgIABAYEAAYGBAAIBgQACh4EAAwmBAAEBAYABgg\r
+        GAAoIBgAGCAgAAgIKAAgICgAGAgwAAggMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAn2KfdXV1XAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoo2+QIJCJb28Sd3em\r
+        nQAAAFuKqW0aqsd6Y5/DXAAAAAAAAAAAAAAAAAAAAAAAAAB3kAWQkG8SpqaJb28gsncAbIeSroyii21x\r
+        kczIwwAAAAAAAAAAAAAAAAAAAAAAAABoo4mJkLKylm9vb5BvdwwAcZO/fox7z2NjqsOss2MAWwAAAAAA\r
+        AAAAAAAAAAAAAAAAvaGmo5ANlgUFEiBvo1xjq3p6qMTJroBkxXt9cGzFnAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAL2ylgV3vQAAAGOvxMXXq41uh6yVjxqp1YhknwAAAAAAAAAAAAAAAAAAAAAAAAAAAABvsolbAAAA\r
+        +5KneouS2Kx4pZF9ndywsXuvkocAAAAAAAAAAAAAAAAAAAAAAAAAAAB3sncAAAAAdayHca95bH9+cKmv\r
+        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\r
+        eAAoaIgAMICoAChggAAACAgAEAgIABgYGAAoUGgAKFhwAChwkAAIGAgACBAQABAgKAAQKDgAIEhgACBQ\r
+        aAAAAHgAIFh4AChgeAAAeHgAeHh4AChogAAwaIAAIGCIADBoiAA4cIgAIGiQADhwkAAoeKgAKICwAAgQ\r
+        AAAIIAAACAAIABhICAAICBAAMIgQABAYGAAYICgAGCgwAEhISAAwSFgAGFBoAChYaAAICHgAOGiAACh4\r
+        oAAweKAAGAAAAAAIAAAAGAAACBgAABAoAAAYUAAAKGAAAChoAAAAeAAAAAAIAAgQCAAQEAgAGP8IACAY\r
+        EAAIEBgAMJAYABggIAAAACgACBAoACgwMAAAKDgAEDA4ADg4OAAoOEAAGDhIACA4SAAAQEgAMEBIAEhQ\r
+        UAAISFgAIEhYAChIWAAwUFgAIEhoAEhYaAAYUHAAMFhwABhYeAAoWHgAIFiAAEhwgACIiIgAGGCQAAAA\r
+        mAAgcJgAKHCYADB4mACYmJgAACjIAEBw+ACo//8ASAAAAFgAAABoAAAAeAAAABAIAABICAAAGCgAAAA4\r
+        AAAYOAAACEAAAAhIAAAoUAAAAFgAACBYAAAAaAAAIGgAADB4AAAAiAAAMIgAAGiIAACAmAAAGAAIADAI\r
+        CABgCAgAEBgIAAggCAAQIAgAECgIAAgwCAAQMAgAODAIABA4CAAYOAgAEEAIABhACAAgQAgAIFAIAChg\r
+        CAAwgAgAMJAIADCoCAAACBAAGBAQABggEAAoIBAAKGAQAChoEAAgeBAAKHgQAEh4EAAY+BAACAAYAAAI\r
+        GAAICBgAEAgYAAAQGAAQEBgAABgYAAgYGAAYMBgAKHgYADCYGAAwoBgAMKgYAGj/GABgCCAACBAgAAgY\r
+        IAAQGCAAGBggACggIABIcCAACAAoABAAKAAAECgAEBAoAAggKAAACDAASAgwAAgQMAAIKDAAECgwAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAARxBSUlJHAAAAAABYWFlY8kYAAAAAAAAAAAAAAAAAAJFgqqRLSzAwBXMAkKJbW1pdSVmE\r
+        AAAAAAAAAAAAAAAAEJdLqhpgYKQFkf9NmVRanHVJVZRQAAAAAAAAAAAAAAAAUY6RO6qXMHNYW5MxdFpm\r
+        TVtPSpAAAAAAAAAAAAAAAAAAAAAFpIYAAFSeW09PU15KU05MaEkAAAAAAAAAAAAAAAAAAEtgAAAAk55j\r
+        ml5Mp2haXUqpW3IAAAAAAAAAAAAAAAAAS0sAAEpJoE5PpZpMZVWnMZyZVQAAAAAAAAAAAAAAAABLMAAA\r
+        cqCeSnppZGZKWzFNaV2ecAAAAAAAAAAAAAAAAEtLAACLVF6iZHROp2eiW1paeWnxAAAAAAAAAAAAAABI\r
+        GmAAAElJSmh6SWNVSk5hZqJ1VXUAAAAAAAAAAAAAlpmjeJAAk12eZXZ5p3WndnZpaUlbZgAAAAAAAAAA\r
+        m2lFRTw8PDZeWV1OlE0xeWlNeVVdZmmZUAAAAAAAjzYKRaysRUVFRa02SXSnYaFNTUxpTFSoTmKTAAAA\r
+        AI8KOkSrrKysrKxErDullF6fVWhiVakLaVWbVZoAAAAAqK2sRKZEqyCsRKummKBZT0xPTHppZVMLqVN4\r
+        cQAAAAA6O6sYGKYYGKsYphgELjejY09KTTZNaWdMNpkAAAAA+zc6XFxcd3d3XASmXEw6PZZiZ6g2ZUw2\r
+        T2QLnwAAAAAdoTtcLcV3pndfLi2jraMtcmNkT05np0xnaXhUAAAAAAD5NKL87xgYd1+eLZ06+1wAVE6o\r
+        p2cKZ2WjjgAAAAAAAAAQo67EcuZuj5jkACue9gAAkTEKeJfbioptRgAAAAAAAACIr0dLVwBXmEeL5Qg4\r
+        AAAAAOnqwNbVb9O5AAAAAAAAAP38RmDae3tfkDqIX0UAAABq3W9v6+2BtssAAAAAAAD9q6v7AFl1dV9f\r
+        mpgIXwAAAABrtG9v7O2BagAAAACSF52fL/AAAAAAAHUAAAAAAAAAAACC1NS+3s/ZzAAAAJ03MjqjdJ0A\r
+        AAC3FIMUtwAAAAAAzr27goK5awAAAAAAWaNgGho3dAAAyr+/v4ODtQAAAMmAAM+2zxMTawAAAAAAAK6z\r
+        kZ1xAAC1un3HVwAAAAAAAAAAawB/ftAAAAAAAABCNUIAAAAAAAAAAF8AAAAAAAAAAEcAAGpGAAAAAAAA\r
+        AEKsEQAAAAAAAAAAlZUAAAAAAAAAAAAAAEgAAAAAAAAAAC3hAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAA\r
+        AAD///////////4BwH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAA\r
+        AAHgAAAB4AAAAeAAAAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9\r
+        /s/j/P/v8///7ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AFEl\r
+        swBJDW0ABEMwAAJHSQAFDwIAXl9ZAHJtagBwfYQAQVNqAAFtAAAAZgAAAz0CABQ/AQAXQwAAGkAAAA8g\r
+        AQAhSJQAM1SRABw6fgAFVk0ADE48AAplaQAgWgIAMYcMACl7CwAOJwMAAAMtABwPNwAhIQAABxACAA9S\r
+        UAAnQUgAAISfACRoDAAxmwQAK4MHABMpAAA8P1kATBMbACQSVwAKL1EADS5CADFMVQABIF4AJ3CGADB2\r
+        kAAzdlEAMnY1ABMnEwBARooAVVq5ABgATwAWBn0ABh56AAULaQBOeKYAT3WSACpNZwAucpgAMHifADFx\r
+        nwA1b5YAMF93AEBalgBvjecADCLAAAkPpQAbJr4AFiLGAAAJjgAzbIEANGh8AClhgAAzfKEAMHWWADJz\r
+        kwAsW3MAQ4mvADyY9AAtgf8AIpr/ACuk/wBdk9UAG0tkACladQAqbI4AK3GUAC5vjwArbpEALWJ7ACdl\r
+        aAAOaoQAJJ20ABx0gQAeTF8AJ116ACViggAgZosAJmeJAChvlAAhZIgAH1ZyAHVmYwAaPVMAJ19+ACto\r
+        hgAmaIwAKGB9ACFdfAAgY4YAGU5qAFtgYQAYQVgAIVx7ACtrjgAtZYIAJmKAACNhgQAmX3wAIUpdAHp6\r
+        ewARN0wAH1R0ACdXcgApXnoAJ2B+ACligQAdSmAAKiopAGZlZQCRkZEAbm9vAFFSUwAWO08AJFRuACFP\r
+        agAhUm0AHD9RAAMKDgA3NjUAWlpaADk5OQA3NzcAPDk3AAYSGQAVNUgAFjFAAA8jLwABAgQAVQAAAP//\r
+        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\r
+</value>\r
+  </data>\r
+  <metadata name="StatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>1113, 15</value>\r
+  </metadata>\r
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+    <value>56</value>\r
+  </metadata>\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
+        IACoJQAAHh0AACAgAAABACAAqBAAAMZCAAAQEAAAAQAgAGgEAABuUwAAKAAAADAAAABgAAAAAQAIAAAA\r
+        AACACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAD///8A/wAAAAD/AAAAAIAAgICAAICAAAAAgAAAAICAAIAA\r
+        AACAAIAAgP//ACAgIADg4OAAIAAAAAAgAABg4CAAQOBAAGBgYAAgYAAAQKDgAAAAIABAwCAAIEAAAECg\r
+        AABg4AAAIGCAAECAoABgoMAAYECgAGDAAABgICAAoKCgAOAAAAAgIAAAAGAAAEDgAABgAAAAIAAgAEAg\r
+        IAAgQGAAIIDAAADg4ABgAGAAgOD/ACCA/wCgAAAAQGAAACCAAAAAoAAAYCAAAAAgIAAgIEAAYGBAAEBg\r
+        YAAAIIAAAGCAAGCAgABAAKAAAICgAACgoACAoKAAIKDAAECgwAAAAOAAQADgAADA4ABgwOAAIODgAADg\r
+        AADA4AAAAEAgAKDgIAAA4EAAYABAAABAYACAAGAAgCBgAGAggABA4KAAAECgAGBAwADgIOAAIEDgAACA\r
+        4ADgoOAAYAD/ACBg/wAAoP8A4KD/AGD//wAICAgACAAAAAgIAAAAAJgACAAIAAAACAAACAAACBAQACA4\r
+        SAAgYIgAOHCIADhw+AAIGAAAEBAIACg4QAAwYHgAAACIACA4QAAoQFAAKFh4AHh4eAAwaIAAIGiQADh4\r
+        mAAACAgAEAgIABAYGAAgGBgASEhIABhIYAAoUGAAIFBoAChQaAAoWGgAMFhoAChoiAAweJgAKHioACiA\r
+        sAAIEAAACAgQAAgQGAAQGCAAGCAoABhAUAAoSFgAaGhoABhQcAAgWHAAKFhwADhgcAAYWIAAOGiAAIiI\r
+        iAAoaJAAKHCYACh4oAA4gKAAMICoAKioqAAwmNAAEDgAAChYAAAweAAAMIgQAAgYGAAYGBgACBggABAg\r
+        KAAgKCgAKCgoACAwOAA4ODgAKDhIADBQWABYWFgAGEhoADBYcAAYUHgAGFh4ACBYeAAoYHgAKGCAABhY\r
+        iAAgaJgAKICoACiIuAC4uLgAMJDIADiw6AAQCAAAABgAAAggAAAAOAAAMGgAABgQCAAwgAgAEAgQABgQ\r
+        EAAwmBgAGBggAAgYKAAAICgACCAoABgoMAAgKDAAGDBAABg4QAAYOFAAEEBYACBIWAAwSFgAOEhYACBI\r
+        YAAQSGgAOFhoABhIcAAoUHAAQFhwACBgeABAaIAAIGiIADBwiABAcIgAGGCQADhwkABYeJAACBCgAChw\r
+        oAAweKAAKIC4ACiQwAAwmMgAOKjgADBg6ABAsOgAELD4AAgoAAAIMAAAGDAAABhIAAAYUAAAKHgAAACY\r
+        AAAwmAAAAMgAABAACAAIEAgAEBgIABA4CAAYOAgAMHgIABAYEAAYGBAAIBgQACh4EAAwmBAAEBAYABgg\r
+        GAAoIBgAGCAgAAgIKAAgICgAGAgwAAggMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAn2KfdXV1XAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoo2+QIJCJb28Sd3em\r
+        nQAAAFuKqW0aqsd6Y5/DXAAAAAAAAAAAAAAAAAAAAAAAAAB3kAWQkG8SpqaJb28gsncAbIeSroyii21x\r
+        kczIwwAAAAAAAAAAAAAAAAAAAAAAAABoo4mJkLKylm9vb5BvdwwAcZO/fox7z2NjqsOss2MAWwAAAAAA\r
+        AAAAAAAAAAAAAAAAvaGmo5ANlgUFEiBvo1xjq3p6qMTJroBkxXt9cGzFnAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAL2ylgV3vQAAAGOvxMXXq41uh6yVjxqp1YhknwAAAAAAAAAAAAAAAAAAAAAAAAAAAABvsolbAAAA\r
+        +5KneouS2Kx4pZF9ndywsXuvkocAAAAAAAAAAAAAAAAAAAAAAAAAAAB3sncAAAAAdayHca95bH9+cKmv\r
+        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\r
+        eAAoaIgAMICoAChggAAACAgAEAgIABgYGAAoUGgAKFhwAChwkAAIGAgACBAQABAgKAAQKDgAIEhgACBQ\r
+        aAAAAHgAIFh4AChgeAAAeHgAeHh4AChogAAwaIAAIGCIADBoiAA4cIgAIGiQADhwkAAoeKgAKICwAAgQ\r
+        AAAIIAAACAAIABhICAAICBAAMIgQABAYGAAYICgAGCgwAEhISAAwSFgAGFBoAChYaAAICHgAOGiAACh4\r
+        oAAweKAAGAAAAAAIAAAAGAAACBgAABAoAAAYUAAAKGAAAChoAAAAeAAAAAAIAAgQCAAQEAgAGP8IACAY\r
+        EAAIEBgAMJAYABggIAAAACgACBAoACgwMAAAKDgAEDA4ADg4OAAoOEAAGDhIACA4SAAAQEgAMEBIAEhQ\r
+        UAAISFgAIEhYAChIWAAwUFgAIEhoAEhYaAAYUHAAMFhwABhYeAAoWHgAIFiAAEhwgACIiIgAGGCQAAAA\r
+        mAAgcJgAKHCYADB4mACYmJgAACjIAEBw+ACo//8ASAAAAFgAAABoAAAAeAAAABAIAABICAAAGCgAAAA4\r
+        AAAYOAAACEAAAAhIAAAoUAAAAFgAACBYAAAAaAAAIGgAADB4AAAAiAAAMIgAAGiIAACAmAAAGAAIADAI\r
+        CABgCAgAEBgIAAggCAAQIAgAECgIAAgwCAAQMAgAODAIABA4CAAYOAgAEEAIABhACAAgQAgAIFAIAChg\r
+        CAAwgAgAMJAIADCoCAAACBAAGBAQABggEAAoIBAAKGAQAChoEAAgeBAAKHgQAEh4EAAY+BAACAAYAAAI\r
+        GAAICBgAEAgYAAAQGAAQEBgAABgYAAgYGAAYMBgAKHgYADCYGAAwoBgAMKgYAGj/GABgCCAACBAgAAgY\r
+        IAAQGCAAGBggACggIABIcCAACAAoABAAKAAAECgAEBAoAAggKAAACDAASAgwAAgQMAAIKDAAECgwAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAARxBSUlJHAAAAAABYWFlY8kYAAAAAAAAAAAAAAAAAAJFgqqRLSzAwBXMAkKJbW1pdSVmE\r
+        AAAAAAAAAAAAAAAAEJdLqhpgYKQFkf9NmVRanHVJVZRQAAAAAAAAAAAAAAAAUY6RO6qXMHNYW5MxdFpm\r
+        TVtPSpAAAAAAAAAAAAAAAAAAAAAFpIYAAFSeW09PU15KU05MaEkAAAAAAAAAAAAAAAAAAEtgAAAAk55j\r
+        ml5Mp2haXUqpW3IAAAAAAAAAAAAAAAAAS0sAAEpJoE5PpZpMZVWnMZyZVQAAAAAAAAAAAAAAAABLMAAA\r
+        cqCeSnppZGZKWzFNaV2ecAAAAAAAAAAAAAAAAEtLAACLVF6iZHROp2eiW1paeWnxAAAAAAAAAAAAAABI\r
+        GmAAAElJSmh6SWNVSk5hZqJ1VXUAAAAAAAAAAAAAlpmjeJAAk12eZXZ5p3WndnZpaUlbZgAAAAAAAAAA\r
+        m2lFRTw8PDZeWV1OlE0xeWlNeVVdZmmZUAAAAAAAjzYKRaysRUVFRa02SXSnYaFNTUxpTFSoTmKTAAAA\r
+        AI8KOkSrrKysrKxErDullF6fVWhiVakLaVWbVZoAAAAAqK2sRKZEqyCsRKummKBZT0xPTHppZVMLqVN4\r
+        cQAAAAA6O6sYGKYYGKsYphgELjejY09KTTZNaWdMNpkAAAAA+zc6XFxcd3d3XASmXEw6PZZiZ6g2ZUw2\r
+        T2QLnwAAAAAdoTtcLcV3pndfLi2jraMtcmNkT05np0xnaXhUAAAAAAD5NKL87xgYd1+eLZ06+1wAVE6o\r
+        p2cKZ2WjjgAAAAAAAAAQo67EcuZuj5jkACue9gAAkTEKeJfbioptRgAAAAAAAACIr0dLVwBXmEeL5Qg4\r
+        AAAAAOnqwNbVb9O5AAAAAAAAAP38RmDae3tfkDqIX0UAAABq3W9v6+2BtssAAAAAAAD9q6v7AFl1dV9f\r
+        mpgIXwAAAABrtG9v7O2BagAAAACSF52fL/AAAAAAAHUAAAAAAAAAAACC1NS+3s/ZzAAAAJ03MjqjdJ0A\r
+        AAC3FIMUtwAAAAAAzr27goK5awAAAAAAWaNgGho3dAAAyr+/v4ODtQAAAMmAAM+2zxMTawAAAAAAAK6z\r
+        kZ1xAAC1un3HVwAAAAAAAAAAawB/ftAAAAAAAABCNUIAAAAAAAAAAF8AAAAAAAAAAEcAAGpGAAAAAAAA\r
+        AEKsEQAAAAAAAAAAlZUAAAAAAAAAAAAAAEgAAAAAAAAAAC3hAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAA\r
+        AAD///////////4BwH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAA\r
+        AAHgAAAB4AAAAeAAAAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9\r
+        /s/j/P/v8///7ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AFEl\r
+        swBJDW0ABEMwAAJHSQAFDwIAXl9ZAHJtagBwfYQAQVNqAAFtAAAAZgAAAz0CABQ/AQAXQwAAGkAAAA8g\r
+        AQAhSJQAM1SRABw6fgAFVk0ADE48AAplaQAgWgIAMYcMACl7CwAOJwMAAAMtABwPNwAhIQAABxACAA9S\r
+        UAAnQUgAAISfACRoDAAxmwQAK4MHABMpAAA8P1kATBMbACQSVwAKL1EADS5CADFMVQABIF4AJ3CGADB2\r
+        kAAzdlEAMnY1ABMnEwBARooAVVq5ABgATwAWBn0ABh56AAULaQBOeKYAT3WSACpNZwAucpgAMHifADFx\r
+        nwA1b5YAMF93AEBalgBvjecADCLAAAkPpQAbJr4AFiLGAAAJjgAzbIEANGh8AClhgAAzfKEAMHWWADJz\r
+        kwAsW3MAQ4mvADyY9AAtgf8AIpr/ACuk/wBdk9UAG0tkACladQAqbI4AK3GUAC5vjwArbpEALWJ7ACdl\r
+        aAAOaoQAJJ20ABx0gQAeTF8AJ116ACViggAgZosAJmeJAChvlAAhZIgAH1ZyAHVmYwAaPVMAJ19+ACto\r
+        hgAmaIwAKGB9ACFdfAAgY4YAGU5qAFtgYQAYQVgAIVx7ACtrjgAtZYIAJmKAACNhgQAmX3wAIUpdAHp6\r
+        ewARN0wAH1R0ACdXcgApXnoAJ2B+ACligQAdSmAAKiopAGZlZQCRkZEAbm9vAFFSUwAWO08AJFRuACFP\r
+        agAhUm0AHD9RAAMKDgA3NjUAWlpaADk5OQA3NzcAPDk3AAYSGQAVNUgAFjFAAA8jLwABAgQAVQAAAP//\r
+        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\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/win/C#/frmMain/PresetLoader.cs b/win/C#/frmMain/PresetLoader.cs
new file mode 100644 (file)
index 0000000..f91194e
--- /dev/null
@@ -0,0 +1,369 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.Drawing;\r
+\r
+namespace Handbrake\r
+{\r
+    class PresetLoader\r
+    {\r
+        /// <summary>\r
+        /// This function takes in a Query which has been parsed by QueryParser and\r
+        /// set's all the GUI widgets correctly.\r
+        /// </summary>\r
+        /// <param name="mainWindow"></param>\r
+        /// <param name="presetQuery">The Parsed CLI Query</param>\r
+        /// <param name="name">Name of the preset</param>\r
+        public void presetLoader(frmMain mainWindow, Functions.QueryParser presetQuery, string name)\r
+        {\r
+            // ---------------------------\r
+            // Setup the GUI\r
+            // ---------------------------\r
+\r
+            // Source tab\r
+            #region source\r
+            // Reset some vaules to stock first to prevent errors.\r
+            mainWindow.check_iPodAtom.CheckState = CheckState.Unchecked;\r
+\r
+            // Now load all the new settings onto the main window\r
+            mainWindow.drp_dvdtitle.Text = "Automatic";\r
+            mainWindow.drop_chapterStart.Text = "Auto";\r
+            mainWindow.drop_chapterFinish.Text = "Auto";\r
+\r
+            if (presetQuery.Format != null)\r
+            {\r
+                string destination = mainWindow.text_destination.Text;\r
+                destination = destination.Replace(".mp4", "." + presetQuery.Format);\r
+                destination = destination.Replace(".m4v", "." + presetQuery.Format);\r
+                destination = destination.Replace(".avi", "." + presetQuery.Format);\r
+                destination = destination.Replace(".mkv", "." + presetQuery.Format);\r
+                destination = destination.Replace(".ogm", "." + presetQuery.Format);\r
+                mainWindow.text_destination.Text = destination;\r
+            }\r
+\r
+            #endregion\r
+\r
+            // Destination tab\r
+            #region destination\r
+\r
+            mainWindow.drp_videoEncoder.Text = presetQuery.VideoEncoder;\r
+\r
+            if (presetQuery.Format != null)\r
+            {\r
+                if (presetQuery.Format == "mp4")\r
+                    mainWindow.drop_format.SelectedIndex = 0;\r
+                else if (presetQuery.Format == "m4v")\r
+                    mainWindow.drop_format.SelectedIndex = 1;\r
+                else if (presetQuery.Format == "mkv")\r
+                    mainWindow.drop_format.SelectedIndex = 2;\r
+                else if (presetQuery.Format == "avi")\r
+                    mainWindow.drop_format.SelectedIndex = 3;\r
+                else if (presetQuery.Format == "ogm")\r
+                    mainWindow.drop_format.SelectedIndex = 4;\r
+            }\r
+\r
+            if (presetQuery.IpodAtom == true)\r
+                mainWindow.check_iPodAtom.CheckState = CheckState.Checked;\r
+            else\r
+                mainWindow.check_iPodAtom.CheckState = CheckState.Unchecked;\r
+\r
+            if (presetQuery.OptimizeMP4 == true)\r
+                mainWindow.check_optimiseMP4.CheckState = CheckState.Checked;\r
+            else\r
+                mainWindow.check_optimiseMP4.CheckState = CheckState.Unchecked;\r
+\r
+            #endregion\r
+\r
+            // Picture Settings Tab\r
+            #region Picture\r
+            mainWindow.check_autoCrop.Checked = true;\r
+            mainWindow.drp_deInterlace_option.Text = presetQuery.DeInterlace;\r
+            mainWindow.drp_deNoise.Text = presetQuery.DeNoise;\r
+\r
+            if (presetQuery.Decomb == true)\r
+                mainWindow.check_decomb.CheckState = CheckState.Checked;\r
+            else\r
+                mainWindow.check_decomb.CheckState = CheckState.Unchecked;\r
+\r
+            if (presetQuery.DeTelecine == true)\r
+                mainWindow.check_detelecine.CheckState = CheckState.Checked;\r
+            else\r
+                mainWindow.check_detelecine.CheckState = CheckState.Unchecked;\r
+\r
+            if (presetQuery.DeBlock != 0)\r
+            {\r
+                mainWindow.slider_deblock.Value = presetQuery.DeBlock;\r
+                mainWindow.lbl_deblockVal.Text = presetQuery.DeBlock.ToString();\r
+            }\r
+            else\r
+            {\r
+                mainWindow.slider_deblock.Value = 4;\r
+                mainWindow.lbl_deblockVal.Text = "Off";\r
+            }\r
+\r
+            if (presetQuery.Anamorphic == true)\r
+                mainWindow.drp_anamorphic.SelectedIndex = 1;\r
+            else\r
+                mainWindow.drp_anamorphic.SelectedIndex = 0;\r
+\r
+            if (presetQuery.LooseAnamorphic == true)\r
+                mainWindow.drp_anamorphic.SelectedIndex = 2;\r
+            else\r
+            {\r
+                if (presetQuery.Anamorphic != true)\r
+                    mainWindow.drp_anamorphic.SelectedIndex = 0;\r
+            }\r
+\r
+            if (presetQuery.Width != 0)\r
+                mainWindow.text_width.Text = presetQuery.Width.ToString();\r
+            else\r
+            {\r
+                mainWindow.text_width.Text = "";\r
+            }\r
+\r
+            if (presetQuery.Height != 0)\r
+                mainWindow.text_height.Text = presetQuery.Height.ToString();\r
+            else\r
+            {\r
+                mainWindow.text_height.Text = "";\r
+            }\r
+\r
+            // Set the public max width and max height varibles in frmMain\r
+            // These are used by the query generator to determine if it should use -X or -w  / -Y or -h\r
+            if (presetQuery.MaxWidth != 0)\r
+            {\r
+                mainWindow.text_width.Text = presetQuery.MaxWidth.ToString();\r
+                mainWindow.maxWidth = presetQuery.MaxWidth;\r
+            }\r
+\r
+            if (presetQuery.MaxHeight != 0)\r
+            {\r
+                mainWindow.text_height.Text = presetQuery.MaxHeight.ToString();\r
+                mainWindow.maxHeight = presetQuery.MaxHeight;\r
+            }\r
+              \r
+\r
+            #endregion\r
+\r
+            // Video Settings Tab\r
+            #region video\r
+            mainWindow.text_bitrate.Text = presetQuery.AverageVideoBitrate;\r
+            mainWindow.text_filesize.Text = presetQuery.VideoTargetSize;\r
+            mainWindow.slider_videoQuality.Value = presetQuery.VideoQuality;\r
+            if (mainWindow.slider_videoQuality.Value != 0)\r
+            {\r
+                int ql = presetQuery.VideoQuality;\r
+                mainWindow.SliderValue.Text = ql.ToString() + "%";\r
+            }\r
+\r
+            if (presetQuery.TwoPass == true)\r
+                mainWindow.check_2PassEncode.CheckState = CheckState.Checked;\r
+            else\r
+                mainWindow.check_2PassEncode.CheckState = CheckState.Unchecked;\r
+\r
+            if (presetQuery.Grayscale == true)\r
+                mainWindow.check_grayscale.CheckState = CheckState.Checked;\r
+            else\r
+                mainWindow.check_grayscale.CheckState = CheckState.Unchecked;\r
+\r
+            mainWindow.drp_videoFramerate.Text = presetQuery.VideoFramerate;\r
+\r
+            if (presetQuery.TurboFirstPass == true)\r
+                mainWindow.check_turbo.CheckState = CheckState.Checked;\r
+            else\r
+                mainWindow.check_turbo.CheckState = CheckState.Unchecked;\r
+\r
+            if (presetQuery.LargeMP4 == true)\r
+                mainWindow.check_largeFile.CheckState = CheckState.Checked;\r
+            else\r
+            {\r
+                mainWindow.check_largeFile.CheckState = CheckState.Unchecked;\r
+                mainWindow.check_largeFile.BackColor = Color.Transparent;\r
+            }\r
+            #endregion\r
+\r
+            // Chapter Markers Tab\r
+            #region Chapter Markers\r
+\r
+            if (presetQuery.ChapterMarkers == true)\r
+            {\r
+                mainWindow.Check_ChapterMarkers.CheckState = CheckState.Checked;\r
+                mainWindow.Check_ChapterMarkers.Enabled = true;\r
+            }\r
+            else\r
+                mainWindow.Check_ChapterMarkers.CheckState = CheckState.Unchecked;\r
+\r
+            #endregion\r
+\r
+            // Audio Settings Tab\r
+            #region Audio\r
+\r
+            // Handle Track 1\r
+            mainWindow.drp_track1Audio.Text = "Automatic";\r
+\r
+            // Handle Track 2\r
+            if (presetQuery.AudioEncoder2 != null)  // Fix for loading in built in presets. Where 2 encoders but no tracks in the preset.\r
+            {\r
+                mainWindow.drp_track2Audio.Enabled = true;\r
+                mainWindow.drp_audsr_2.Enabled = true;\r
+                mainWindow.drp_audmix_2.Enabled = true;\r
+                mainWindow.drp_audenc_2.Enabled = true;\r
+                mainWindow.drp_audbit_2.Enabled = true;\r
+                mainWindow.drp_audsr_2.Text = "48";\r
+                mainWindow.drp_track2Audio.Text = "Automatic";\r
+            }\r
+            else if (presetQuery.AudioTrack2 == "None")\r
+            {\r
+                mainWindow.drp_track2Audio.Text = "None";\r
+                mainWindow.drp_track2Audio.SelectedIndex = 0;\r
+                mainWindow.drp_audsr_2.Enabled = false;\r
+                mainWindow.drp_audmix_2.Enabled = false;\r
+                mainWindow.drp_audenc_2.Enabled = false;\r
+                mainWindow.drp_audbit_2.Enabled = false;\r
+            }\r
+            else\r
+            {\r
+                mainWindow.drp_track2Audio.Text = presetQuery.AudioTrack2;\r
+                mainWindow.drp_audsr_2.Enabled = true;\r
+                mainWindow.drp_audmix_2.Enabled = true;\r
+                mainWindow.drp_audenc_2.Enabled = true;\r
+                mainWindow.drp_audbit_2.Enabled = true;\r
+            }\r
+\r
+            // Handle Track 3\r
+            if (presetQuery.AudioTrack3 == "None")\r
+            {\r
+                mainWindow.drp_track3Audio.SelectedIndex = 0;\r
+                mainWindow.drp_audsr_3.Enabled = false;\r
+                mainWindow.drp_audmix_3.Enabled = false;\r
+                mainWindow.drp_audenc_3.Enabled = false;\r
+                mainWindow.drp_audbit_3.Enabled = false;\r
+                mainWindow.trackBar3.Enabled = false;\r
+\r
+                mainWindow.drp_track3Audio.Text = "None";\r
+                mainWindow.drp_audsr_3.Text = "";\r
+                mainWindow.drp_audmix_3.Text = "Automatic";\r
+                mainWindow.drp_audenc_3.Text = "";\r
+                mainWindow.drp_audbit_3.Text = "";\r
+                mainWindow.trackBar3.Value = 0;\r
+\r
+            }\r
+            else\r
+            {\r
+                mainWindow.drp_track3Audio.Text = presetQuery.AudioTrack3;\r
+                mainWindow.drp_audsr_3.Enabled = true;\r
+                mainWindow.drp_audmix_3.Enabled = true;\r
+                mainWindow.drp_audenc_3.Enabled = true;\r
+                mainWindow.drp_audbit_3.Enabled = true;\r
+                mainWindow.trackBar3.Enabled = true;\r
+            }\r
+\r
+            // Handle Track 4\r
+            if (presetQuery.AudioTrack4 == "None")\r
+            {\r
+                mainWindow.drp_track4Audio.SelectedIndex = 0;\r
+                mainWindow.drp_audsr_4.Enabled = false;\r
+                mainWindow.drp_audmix_4.Enabled = false;\r
+                mainWindow.drp_audenc_4.Enabled = false;\r
+                mainWindow.drp_audbit_4.Enabled = false;\r
+                mainWindow.trackBar4.Enabled = false;\r
+\r
+                mainWindow.drp_track4Audio.Text = "None";\r
+                mainWindow.drp_audsr_4.Text = "";\r
+                mainWindow.drp_audmix_4.Text = "Automatic";\r
+                mainWindow.drp_audenc_4.Text = "";\r
+                mainWindow.drp_audbit_4.Text = "";\r
+                mainWindow.trackBar4.Value = 0;\r
+            }\r
+            else\r
+            {\r
+                mainWindow.drp_track4Audio.Text = presetQuery.AudioTrack4;\r
+                mainWindow.drp_audsr_4.Enabled = true;\r
+                mainWindow.drp_audmix_4.Enabled = true;\r
+                mainWindow.drp_audenc_4.Enabled = true;\r
+                mainWindow.drp_audbit_4.Enabled = true;\r
+                mainWindow.trackBar4.Enabled = true;\r
+            }\r
+\r
+            // Now lets start setting stuff\r
+            if (presetQuery.AudioEncoder1 != null)\r
+                mainWindow.drp_audenc_1.Text = presetQuery.AudioEncoder1;\r
+            mainWindow.drp_audenc_2.Text = presetQuery.AudioEncoder2;\r
+            mainWindow.drp_audenc_3.Text = presetQuery.AudioEncoder3;\r
+            mainWindow.drp_audenc_4.Text = presetQuery.AudioEncoder4;\r
+\r
+            mainWindow.drp_audmix_1.Text = presetQuery.AudioTrackMix1;\r
+            mainWindow.drp_audmix_2.Text = presetQuery.AudioTrackMix2;\r
+            mainWindow.drp_audmix_3.Text = presetQuery.AudioTrackMix3;\r
+            mainWindow.drp_audmix_4.Text = presetQuery.AudioTrackMix4;\r
+\r
+            if (presetQuery.AudioBitrate1 != null)\r
+                mainWindow.drp_audbit_1.Text = presetQuery.AudioBitrate1;\r
+            mainWindow.drp_audbit_2.Text = presetQuery.AudioBitrate2;\r
+            mainWindow.drp_audbit_3.Text = presetQuery.AudioBitrate4;\r
+            mainWindow.drp_audbit_3.Text = presetQuery.AudioBitrate4;\r
+\r
+            if (presetQuery.AudioSamplerate1 != null)\r
+                mainWindow.drp_audsr_1.Text = presetQuery.AudioSamplerate1;\r
+            mainWindow.drp_audsr_2.Text = presetQuery.AudioSamplerate2;\r
+            mainWindow.drp_audsr_3.Text = presetQuery.AudioSamplerate3;\r
+            mainWindow.drp_audsr_4.Text = presetQuery.AudioSamplerate4;\r
+\r
+            // Dynamic Range Compression (Should be a float but we use double for ease)\r
+            double value = 0;\r
+            double actualValue = 0;\r
+\r
+            value = presetQuery.DRC1;\r
+            if (value > 0)\r
+                value = value - 10;\r
+            mainWindow.trackBar1.Value = int.Parse(value.ToString());\r
+            actualValue = presetQuery.DRC1 / 10;\r
+            mainWindow.lbl_drc1.Text = actualValue.ToString();\r
+\r
+            value = presetQuery.DRC2;\r
+            if (value > 0)\r
+                value = value - 10;\r
+            mainWindow.trackBar2.Value = int.Parse(value.ToString());\r
+            actualValue = presetQuery.DRC2 / 10;\r
+            mainWindow.lbl_drc2.Text = actualValue.ToString();\r
+\r
+            value = presetQuery.DRC3;\r
+            if (value > 0)\r
+                value = value - 10;\r
+            mainWindow.trackBar3.Value = int.Parse(value.ToString());\r
+            actualValue = presetQuery.DRC3 / 10;\r
+            mainWindow.lbl_drc3.Text = actualValue.ToString();\r
+\r
+            value = presetQuery.DRC4;\r
+            if (value > 0)\r
+                value = value - 10;\r
+            mainWindow.trackBar4.Value = int.Parse(value.ToString());\r
+            actualValue = presetQuery.DRC4 / 10;\r
+            mainWindow.lbl_drc4.Text = actualValue.ToString();\r
+\r
+\r
+            // Subtitle Stuff\r
+            mainWindow.drp_subtitle.Text = presetQuery.Subtitles;\r
+\r
+            if (presetQuery.ForcedSubtitles == true)\r
+            {\r
+                mainWindow.check_forced.CheckState = CheckState.Checked;\r
+                mainWindow.check_forced.Enabled = true;\r
+            }\r
+            else\r
+                mainWindow.check_forced.CheckState = CheckState.Unchecked;\r
+\r
+\r
+            #endregion\r
+\r
+            // H264 Tab & Preset Name\r
+            #region other\r
+            mainWindow.rtf_x264Query.Text = presetQuery.H264Query;\r
+\r
+            // Set the preset name\r
+            mainWindow.groupBox_output.Text = "Output Settings (Preset: " + name + ")";\r
+            #endregion\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/frmMain/QueryGenerator.cs b/win/C#/frmMain/QueryGenerator.cs
new file mode 100644 (file)
index 0000000..a2cb50e
--- /dev/null
@@ -0,0 +1,609 @@
+using System;\r
+using System.Collections;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.Globalization;\r
+using System.IO;\r
+\r
+namespace Handbrake\r
+{\r
+    class QueryGenerator\r
+    {\r
+        /// <summary>\r
+        /// Generates a CLI query based on the GUI widgets.\r
+        /// </summary>\r
+        /// <param name="mainWindow"></param>\r
+        /// <returns>The CLI String</returns>\r
+        public string GenerateTheQuery(frmMain mainWindow)\r
+        {\r
+            // Source tab\r
+            string query = "";\r
+\r
+            if ((mainWindow.text_source.Text != "") && (mainWindow.text_source.Text.Trim() != "Click 'Source' to continue"))\r
+                query = " -i " + '"' + mainWindow.text_source.Text + '"';\r
+\r
+            if (mainWindow.drp_dvdtitle.Text != "Automatic")\r
+            {\r
+                string[] titleInfo = mainWindow.drp_dvdtitle.Text.Split(' ');\r
+                query += " -t " + titleInfo[0];\r
+            }\r
+\r
+            if (mainWindow.drop_chapterFinish.Text == mainWindow.drop_chapterStart.Text && mainWindow.drop_chapterStart.Text != "Auto")\r
+                query += " -c " + mainWindow.drop_chapterStart.Text;\r
+            else if (mainWindow.drop_chapterStart.Text == "Auto" && mainWindow.drop_chapterFinish.Text != "Auto")\r
+                query += " -c " + "0-" + mainWindow.drop_chapterFinish.Text;\r
+            else if (mainWindow.drop_chapterStart.Text != "Auto" && mainWindow.drop_chapterFinish.Text != "Auto")\r
+                query += " -c " + mainWindow.drop_chapterStart.Text + "-" + mainWindow.drop_chapterFinish.Text;\r
+\r
+            // Destination tab\r
+            if (mainWindow.text_destination.Text != "")\r
+                query += " -o " + '"' + mainWindow.text_destination.Text + '"';\r
+\r
+            query += generateTabbedComponentsQuery(mainWindow);\r
+            return query;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Generates a CLI query for the preview function.\r
+        /// This basically forces a shortened version of the encdode.\r
+        /// </summary>\r
+        /// <param name="mainWindow"></param>\r
+        /// <returns>Returns a CLI query String.</returns>\r
+        public string GeneratePreviewQuery(frmMain mainWindow)\r
+        {\r
+            // Source tab\r
+            string query = "";\r
+\r
+            if ((mainWindow.text_source.Text != "") && (mainWindow.text_source.Text.Trim() != "Click 'Source' to continue"))\r
+                query = " -i " + '"' + mainWindow.text_source.Text + '"';\r
+\r
+            if (mainWindow.drp_dvdtitle.Text != "Automatic")\r
+            {\r
+                string[] titleInfo = mainWindow.drp_dvdtitle.Text.Split(' ');\r
+                query += " -t " + titleInfo[0];\r
+            }\r
+\r
+            query += " -c 2";\r
+\r
+            // Destination tab\r
+            if (mainWindow.text_destination.Text != "")\r
+                query += " -o " + '"' + mainWindow.text_destination.Text.Replace(".m", "_sample.m").Replace(".avi", "_sample.avi").Replace(".ogm", "_sample.ogm") + '"';\r
+\r
+            query += generateTabbedComponentsQuery(mainWindow);\r
+            return query;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Generates part of the CLI query, for the tabbed components only.\r
+        /// </summary>\r
+        /// <param name="mainWindow"></param>\r
+        /// <param name="source"></param>\r
+        /// <returns></returns>\r
+        public string generateTabbedComponentsQuery(frmMain mainWindow)\r
+        {\r
+            string query = "";\r
+\r
+            // The Output Settings box above the tabbed section.\r
+            #region Output Settings Box\r
+            query += " -f " + mainWindow.drop_format.Text.ToLower().Replace(" file", "");\r
+\r
+            // These are output settings features\r
+            if (mainWindow.check_largeFile.Checked)\r
+                query += " -4 ";\r
+\r
+            if (mainWindow.check_iPodAtom.Checked)\r
+                query += " -I ";\r
+\r
+            if (mainWindow.check_optimiseMP4.Checked)\r
+                query += " -O ";\r
+            #endregion\r
+\r
+            // Picture Settings Tab\r
+            #region Picture Settings Tab\r
+\r
+            // Use MaxWidth for built-in presets and width for user settings.\r
+            if (mainWindow.maxWidth == 0)\r
+            {\r
+\r
+                if (mainWindow.text_width.Text != "")\r
+                    query += " -w " + mainWindow.text_width.Text;\r
+            }\r
+            else\r
+            {\r
+                if (mainWindow.text_width.Text != "")\r
+                    query += " -X " + mainWindow.text_width.Text;\r
+            }\r
+\r
+            // Use MaxHeight for built-in presets and height for user settings.\r
+            if (mainWindow.maxHeight == 0)\r
+            {\r
+                if (mainWindow.text_height.Text != "")\r
+                    query += " -l " + mainWindow.text_height.Text;\r
+            }\r
+            else\r
+            {\r
+                if (mainWindow.text_height.Text != "")\r
+                    query += " -Y " + mainWindow.text_height.Text;\r
+            }\r
+\r
+            string cropTop = mainWindow.text_top.Text;\r
+            string cropBottom = mainWindow.text_bottom.Text;\r
+            string cropLeft = mainWindow.text_left.Text;\r
+            string cropRight = mainWindow.text_right.Text;\r
+\r
+            if (mainWindow.check_customCrop.Checked)\r
+            {\r
+                if (mainWindow.text_top.Text == string.Empty)\r
+                    cropTop = "0";\r
+                if (mainWindow.text_bottom.Text == string.Empty)\r
+                    cropBottom = "0";\r
+                if (mainWindow.text_left.Text == string.Empty)\r
+                    cropLeft = "0";\r
+                if (mainWindow.text_right.Text == string.Empty)\r
+                    cropRight = "0";\r
+\r
+                query += " --crop " + cropTop + ":" + cropBottom + ":" + cropLeft + ":" + cropRight;\r
+            }\r
+\r
+            switch (mainWindow.drp_deInterlace_option.Text)\r
+            {\r
+                case "None":\r
+                    query += "";\r
+                    break;\r
+                case "Fast":\r
+                    query += " --deinterlace=\"fast\"";\r
+                    break;\r
+                case "Slow":\r
+                    query += " --deinterlace=\"slow\"";\r
+                    break;\r
+                case "Slower":\r
+                    query += " --deinterlace=\"slower\"";\r
+                    break;\r
+                case "Slowest":\r
+                    query += " --deinterlace=\"slowest\"";\r
+                    break;\r
+                default:\r
+                    query += "";\r
+                    break;\r
+            }\r
+\r
+            if (mainWindow.check_decomb.Checked)\r
+            {\r
+                string decombValue = Properties.Settings.Default.decomb;\r
+                if (decombValue != "" && decombValue != Properties.Settings.Default.default_decomb)\r
+                    query += " --decomb=\"" + decombValue + "\"";\r
+                else\r
+                    query += " --decomb ";\r
+            }\r
+\r
+            if (mainWindow.drp_anamorphic.SelectedIndex == 1)\r
+                query += " -p ";\r
+            else if (mainWindow.drp_anamorphic.SelectedIndex == 2)\r
+                query += " -P ";\r
+\r
+            if (mainWindow.slider_deblock.Value != 4)\r
+                query += " --deblock=" + mainWindow.slider_deblock.Value;\r
+\r
+            if (mainWindow.check_detelecine.Checked)\r
+                query += " --detelecine";\r
+            #endregion\r
+\r
+            // Video Settings Tab\r
+            #region Video Settings Tab\r
+\r
+            switch (mainWindow.drp_videoEncoder.Text)\r
+            {\r
+                case "MPEG-4 (FFmpeg)":\r
+                    query += " -e ffmpeg";\r
+                    break;\r
+                case "MPEG-4 (XviD)":\r
+                    query += " -e xvid";\r
+                    break;\r
+                case "H.264 (x264)":\r
+                    query += " -e x264";\r
+                    break;\r
+                case "VP3 (Theora)":\r
+                    query += " -e theora";\r
+                    break;\r
+                default:\r
+                    query += " -e x264";\r
+                    break;\r
+            }\r
+\r
+            if (mainWindow.check_grayscale.Checked)\r
+                query += " -g ";\r
+\r
+            // Video Settings\r
+            if (mainWindow.text_bitrate.Text != "")\r
+                query += " -b " + mainWindow.text_bitrate.Text;\r
+\r
+            if (mainWindow.text_filesize.Text != "")\r
+                query += " -S " + mainWindow.text_filesize.Text;\r
+\r
+            // Video Quality Setting\r
+            double videoQuality = mainWindow.slider_videoQuality.Value;\r
+            if (videoQuality != 0)\r
+            {\r
+                videoQuality = videoQuality / 100;\r
+                query += " -q " + videoQuality.ToString(new CultureInfo("en-US"));\r
+            }\r
+\r
+            if (mainWindow.check_2PassEncode.Checked)\r
+                query += " -2 ";\r
+\r
+            if (mainWindow.check_turbo.Checked)\r
+                query += " -T ";\r
+\r
+            if (mainWindow.drp_videoFramerate.Text != "Same as source")\r
+                query += " -r " + mainWindow.drp_videoFramerate.Text;\r
+\r
+            switch (mainWindow.drp_deNoise.Text)\r
+            {\r
+                case "None":\r
+                    query += "";\r
+                    break;\r
+                case "Weak":\r
+                    query += " --denoise=\"weak\"";\r
+                    break;\r
+                case "Medium":\r
+                    query += " --denoise=\"medium\"";\r
+                    break;\r
+                case "Strong":\r
+                    query += " --denoise=\"strong\"";\r
+                    break;\r
+                default:\r
+                    query += "";\r
+                    break;\r
+            }\r
+            #endregion\r
+\r
+            // Audio Settings Tab\r
+            #region Audio Settings Tab\r
+            // Track 1\r
+            string track1 = mainWindow.drp_track1Audio.Text;\r
+            string aencoder1 = mainWindow.drp_audenc_1.Text;\r
+            string audioBitrate1 = mainWindow.drp_audbit_1.Text;\r
+            string audioSampleRate1 = mainWindow.drp_audsr_1.Text;\r
+            string Mixdown1 = mainWindow.drp_audmix_1.Text;\r
+            string drc1 = mainWindow.trackBar1.Value.ToString();\r
+\r
+            // Track 2\r
+            string track2 = mainWindow.drp_track2Audio.Text;\r
+            string aencoder2 = mainWindow.drp_audenc_2.Text;\r
+            string audioBitrate2 = mainWindow.drp_audbit_2.Text;\r
+            string audioSampleRate2 = mainWindow.drp_audsr_2.Text;\r
+            string Mixdown2 = mainWindow.drp_audmix_2.Text;\r
+            string drc2 = mainWindow.trackBar2.Value.ToString();\r
+\r
+            // Track 3\r
+            string track3 = mainWindow.drp_track3Audio.Text;\r
+            string aencoder3 = mainWindow.drp_audenc_3.Text;\r
+            string audioBitrate3 = mainWindow.drp_audbit_3.Text;\r
+            string audioSampleRate3 = mainWindow.drp_audsr_3.Text;\r
+            string Mixdown3 = mainWindow.drp_audmix_3.Text;\r
+            string drc3 = mainWindow.trackBar3.Value.ToString();\r
+\r
+            // Track 4\r
+            string track4 = mainWindow.drp_track4Audio.Text;\r
+            string aencoder4 = mainWindow.drp_audenc_4.Text;\r
+            string audioBitrate4 = mainWindow.drp_audbit_4.Text;\r
+            string audioSampleRate4 = mainWindow.drp_audsr_4.Text;\r
+            string Mixdown4 = mainWindow.drp_audmix_4.Text;\r
+            string drc4 = mainWindow.trackBar4.Value.ToString();\r
+\r
+            //\r
+            // Audio Track Selections\r
+            //\r
+            if (track1 == "Automatic")\r
+                query += " -a 1";\r
+            else if (track1 != "None")\r
+            {\r
+                string[] tempSub = track1.Split(' ');\r
+                query += " -a " + tempSub[0];\r
+            }\r
+\r
+            if (track2 == "Automatic")\r
+                query += ",1";\r
+            else if (track2 != "None")\r
+            {\r
+                string[] tempSub;\r
+                tempSub = track2.Split(' ');\r
+\r
+                if (track1 == "None")\r
+                    query += " -a none," + tempSub[0];\r
+                else\r
+                    query += "," + tempSub[0];\r
+            }\r
+\r
+            if (track3 != "None")\r
+            {\r
+                string[] tempSub;\r
+                tempSub = track3.Split(' ');\r
+                query += "," + tempSub[0];\r
+            }\r
+\r
+            if (track4 != "None")\r
+            {\r
+                string[] tempSub;\r
+                tempSub = track4.Split(' ');\r
+                query += "," + tempSub[0];\r
+            }\r
+\r
+            //\r
+            // Audio Encoder\r
+            //\r
+            if (aencoder1 != "")\r
+                query += " -E " + getAudioEncoder(aencoder1);\r
+\r
+            if (aencoder2 != "")\r
+            {\r
+                if (aencoder1 == string.Empty)\r
+                    query += " -E faac," + getAudioEncoder(aencoder2);\r
+                else\r
+                    query += "," + getAudioEncoder(aencoder2);\r
+            }\r
+\r
+            if (aencoder3 != "")\r
+                query += "," + getAudioEncoder(aencoder3);\r
+\r
+            if (aencoder4 != "")\r
+                query += "," + getAudioEncoder(aencoder4);\r
+\r
+            //\r
+            // Audio Bitrate Selections\r
+            //\r
+            if (audioBitrate1 != "")\r
+                query += " -B " + audioBitrate1;\r
+\r
+            if (audioBitrate2 != "")\r
+            {\r
+                if (audioBitrate1 == string.Empty)\r
+                    query += " -B 160," + audioBitrate2;\r
+                else\r
+                    query += "," + audioBitrate2;\r
+            }\r
+\r
+            if (audioBitrate3 != "")\r
+                query += "," + audioBitrate3;\r
+\r
+            if (audioBitrate4 != "")\r
+                query += "," + audioBitrate4;\r
+\r
+\r
+            //Audio Sample Rate   - audioSampleRate\r
+            if (audioSampleRate1 != "")\r
+                query += " -R " + audioSampleRate1.Replace("Auto", "0");\r
+\r
+            if (audioSampleRate2 != "")\r
+            {\r
+                if (audioSampleRate1 == string.Empty)\r
+                    query += " -R 0," + audioSampleRate2.Replace("Auto", "0");\r
+                else\r
+                    query += "," + audioSampleRate2.Replace("Auto", "0");\r
+            }\r
+            else\r
+            {\r
+                // All this is a hack, because when AppleTV is selected, there is no sample rate selected. so just add a 48\r
+                // It should probably be setup later so the GUI widget has the value 48 in it.\r
+\r
+                if ((track2 != "") && (track2 != "None"))\r
+                {\r
+                    if (audioSampleRate1 == string.Empty)\r
+                        query += " -R 0,0";\r
+                    else\r
+                        query += ",0";\r
+                }\r
+            }\r
+\r
+            if (audioSampleRate3 != "")\r
+                query += "," + audioSampleRate3.Replace("Auto", "0");\r
+\r
+            if (audioSampleRate4 != "")\r
+                query += "," + audioSampleRate4.Replace("Auto", "0");\r
+\r
+            //\r
+            // Audio Mixdown Selections\r
+            //\r
+\r
+            if (Mixdown1 != "")\r
+                query += " -6 " + getMixDown(Mixdown1);\r
+            else\r
+                query += " -6 dpl2";\r
+\r
+            if (Mixdown2 != "" && track2 != "None")\r
+                query += "," + getMixDown(Mixdown2);\r
+\r
+            if (Mixdown3 != "" && track3 != "None" && track2 != "None")\r
+                query += "," + getMixDown(Mixdown3);\r
+\r
+            if (Mixdown4 != "" && track4 != "None" && track3 != "None")\r
+                query += "," + getMixDown(Mixdown4);\r
+\r
+\r
+            //\r
+            // DRC\r
+            //\r
+            double value = 0;\r
+\r
+            value = mainWindow.trackBar1.Value / 10.0;\r
+            value++;\r
+\r
+            if (value > 1.0)\r
+                query += " -D " + value;\r
+            else\r
+                query += " -D 1";\r
+\r
+            value = mainWindow.trackBar2.Value / 10.0;\r
+            value++;\r
+            if (track2 != "None" && drc2 != "0")\r
+                query += "," + value;\r
+            else if (track2 != "None" && drc2 == "0")\r
+                query += ",1";\r
+\r
+            value = mainWindow.trackBar3.Value / 10.0;\r
+            value++;\r
+            if (track3 != "None" && drc3 != "0")\r
+                query += "," + value;\r
+            else if (track3 != "None" && drc3 == "0")\r
+                query += ",1";\r
+\r
+            value = mainWindow.trackBar4.Value / 10.0;\r
+            value++;\r
+            if (track4 != "None" && drc4 != "0")\r
+                query += "," + value;\r
+            else if (track4 != "None" && drc4 == "0")\r
+                query += ",1";\r
+\r
+            // Subtitles\r
+            string subtitles = mainWindow.drp_subtitle.Text;\r
+            if (subtitles == "Autoselect")\r
+                query += " -U ";\r
+            else if (subtitles != "" && subtitles != "None")\r
+            {\r
+                string[] tempSub;\r
+                tempSub = subtitles.Split(' ');\r
+                query += " -s " + tempSub[0];\r
+            }\r
+\r
+            if (mainWindow.check_forced.Checked)\r
+                query += " -F ";\r
+\r
+            #endregion\r
+\r
+            // Chapter Markers Tab\r
+            #region Chapter Markers\r
+\r
+            // Attach Source name and dvd title to the start of the chapters.csv filename.\r
+            // This is for the queue. It allows different chapter name files for each title.\r
+            string source_name = mainWindow.text_source.Text;\r
+            string[] sourceName = source_name.Split('\\');\r
+            source_name = sourceName[sourceName.Length - 1];\r
+            source_name = source_name.Replace("\"", "");\r
+\r
+            string source_title = mainWindow.drp_dvdtitle.Text;\r
+            string[] titlesplit = source_title.Split(' ');\r
+            source_title = titlesplit[0];\r
+\r
+            if (mainWindow.Check_ChapterMarkers.Checked)\r
+            {\r
+                if ((source_name.Trim() != "Click 'Source' to continue") && (source_name.Trim() != ""))\r
+                {\r
+                    string path = "";\r
+                    if (source_title != "Automatic")\r
+                        path = Path.Combine(Path.GetTempPath(), source_name + "-" + source_title + "-chapters.csv");\r
+                    else\r
+                        path = Path.Combine(Path.GetTempPath(), source_name + "-chapters.csv");\r
+\r
+                    if (chapterCSVSave(mainWindow, path) == false)\r
+                        query += " -m ";\r
+                    else\r
+                        query += " --markers=" + "\"" + path + "\"";\r
+                }\r
+                else\r
+                    query += " -m";\r
+            }\r
+            #endregion\r
+\r
+            // H264 Tab\r
+            #region  H264 Tab\r
+            if (mainWindow.rtf_x264Query.Text != "")\r
+                query += " -x " + mainWindow.rtf_x264Query.Text;\r
+            #endregion\r
+\r
+            // Other\r
+            #region Processors / Other\r
+            string processors = Properties.Settings.Default.Processors;\r
+            if (processors != "Automatic")\r
+                query += " -C " + processors + " ";\r
+\r
+            query += " -v ";\r
+            #endregion\r
+\r
+            return query;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get the CLI equive of the audio mixdown from the widget name.\r
+        /// </summary>\r
+        /// <param name="selectedAudio"></param>\r
+        /// <returns></returns>\r
+        /// \r
+        private string getMixDown(string selectedAudio)\r
+        {\r
+            switch (selectedAudio)\r
+            {\r
+                case "Automatic":\r
+                    return "dpl2";\r
+                case "Mono":\r
+                    return "mono";\r
+                case "Stereo":\r
+                    return "stereo";\r
+                case "Dolby Surround":\r
+                    return "dpl1";\r
+                case "Dolby Pro Logic II":\r
+                    return "dpl2";\r
+                case "6 Channel Discrete":\r
+                    return "6ch";\r
+                default:\r
+                    return "dpl2";\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get the CLI equiv of the audio encoder from the widget name.\r
+        /// </summary>\r
+        /// <param name="selectedEncoder"></param>\r
+        /// <returns></returns>\r
+        /// \r
+        private string getAudioEncoder(string selectedEncoder)\r
+        {\r
+            switch (selectedEncoder)\r
+            {\r
+                case "AAC":\r
+                    return "faac";\r
+                case "MP3":\r
+                    return "lame";\r
+                case "Vorbis":\r
+                    return "vorbis";\r
+                case "AC3":\r
+                    return "ac3";\r
+                default:\r
+                    return "";\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// This function saves the data in the chapters tab, dataGridView into a CSV file called chapters.csv\r
+        /// in a directory specified by file_path_name\r
+        /// </summary>\r
+        /// <param name="mainWindow"></param>\r
+        /// <param name="file_path_name"></param>\r
+        /// <returns></returns>\r
+        private Boolean chapterCSVSave(frmMain mainWindow, string file_path_name)\r
+        {\r
+            try\r
+            {\r
+                StringBuilder csv = new StringBuilder();\r
+\r
+                foreach (DataGridViewRow row in mainWindow.data_chpt.Rows)\r
+                {\r
+                    csv.Append(row.Cells[0].Value.ToString());\r
+                    csv.Append(",");\r
+                    csv.Append(row.Cells[1].Value.ToString());\r
+                    csv.Append(Environment.NewLine);\r
+                }\r
+                StreamWriter file = new StreamWriter(file_path_name);\r
+                file.Write(csv.ToString());\r
+                file.Close();\r
+                file.Dispose();\r
+                return true;\r
+\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("Unable to save Chapter Makrers file! \nChapter marker names will NOT be saved in your encode \n\n" + exc.ToString(), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+                return false;\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/frmMain/x264Panel.cs b/win/C#/frmMain/x264Panel.cs
new file mode 100644 (file)
index 0000000..1358066
--- /dev/null
@@ -0,0 +1,808 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+\r
+namespace Handbrake\r
+{\r
+    class x264Panel\r
+    {\r
+        /// <summary>\r
+        /// Reset all components to defaults and clears the x264 rtf box\r
+        /// </summary>\r
+        public void reset2Defaults(frmMain mainWindow)\r
+        {\r
+            mainWindow.check_8x8DCT.CheckState = CheckState.Unchecked;\r
+            mainWindow.check_Cabac.CheckState = CheckState.Checked;\r
+            mainWindow.check_mixedReferences.CheckState = CheckState.Unchecked;\r
+            mainWindow.check_noDCTDecimate.CheckState = CheckState.Unchecked;\r
+            mainWindow.check_noFastPSkip.CheckState = CheckState.Unchecked;\r
+            mainWindow.check_pyrmidalBFrames.CheckState = CheckState.Unchecked;\r
+            mainWindow.check_weightedBFrames.CheckState = CheckState.Unchecked;\r
+            mainWindow.drop_analysis.SelectedIndex = 0;\r
+            mainWindow.drop_bFrames.SelectedIndex = 0;\r
+            mainWindow.drop_deblockAlpha.SelectedIndex = 0;\r
+            mainWindow.drop_deblockBeta.SelectedIndex = 0;\r
+            mainWindow.drop_directPrediction.SelectedIndex = 0;\r
+            mainWindow.drop_MotionEstimationMethod.SelectedIndex = 0;\r
+            mainWindow.drop_MotionEstimationRange.SelectedIndex = 0;\r
+            mainWindow.drop_refFrames.SelectedIndex = 0;\r
+            mainWindow.drop_subpixelMotionEstimation.SelectedIndex = 0;\r
+            mainWindow.drop_trellis.SelectedIndex = 0;\r
+\r
+            mainWindow.rtf_x264Query.Text = "";\r
+        }\r
+\r
+        /// <summary>\r
+        /// Update GUI componets from the current x264 rtf string\r
+        /// </summary>\r
+        public void X264_SetCurrentSettingsInPanel(frmMain mainWindow)\r
+        {\r
+            /* Set widgets depending on the opt string in field */\r
+            String thisOpt; // The separated option such as "bframes=3"\r
+            String optName = ""; // The option name such as "bframes"\r
+            String optValue = "";// The option value such as "3"\r
+            String[] currentOptsArray;\r
+\r
+            //Set currentOptString to the contents of the text box.\r
+            String currentOptString = mainWindow.rtf_x264Query.Text.Replace("\n", "");\r
+\r
+            /*verify there is an opt string to process */\r
+            if (currentOptString.Contains("="))\r
+            {\r
+                /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/\r
+                currentOptsArray = currentOptString.Split(':');\r
+\r
+                /*iterate through the array and get <opts> and <values*/\r
+                int loopcounter;\r
+                int currentOptsArrayCount = currentOptsArray.Length;\r
+\r
+\r
+                /*iterate through the array and get <opts> and <values*/\r
+                for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++)\r
+                {\r
+\r
+                    thisOpt = currentOptsArray[loopcounter];\r
+                    String[] splitOptRange = thisOpt.Split('=');\r
+\r
+                    if (thisOpt.Contains("="))\r
+                    {\r
+                        optName = splitOptRange[0];\r
+                        optValue = splitOptRange[1];\r
+\r
+                        /*Run through the available widgets for x264 opts and set them, as you add widgets, \r
+                            they need to be added here. This should be moved to its own method probably*/\r
+\r
+                        /*bframes NSPopUpButton*/\r
+                        if (optName.Equals("bframes"))\r
+                            mainWindow.drop_bFrames.SelectedItem = optValue;\r
+\r
+                        /*ref NSPopUpButton*/\r
+                        else if (optName.Equals("ref"))\r
+                            mainWindow.drop_refFrames.SelectedItem = optValue;\r
+\r
+                        /*No Fast PSkip NSPopUpButton*/\r
+                        else if (optName.Equals("no-fast-pskip"))\r
+                            mainWindow.check_noFastPSkip.CheckState = CheckState.Checked;\r
+\r
+                        /*No Dict Decimate NSPopUpButton*/\r
+                        else if (optName.Equals("no-dct-decimate"))\r
+                            mainWindow.check_noDCTDecimate.CheckState = CheckState.Checked;\r
+\r
+                        /*Sub Me NSPopUpButton*/\r
+                        else if (optName.Equals("subq"))\r
+                            mainWindow.drop_subpixelMotionEstimation.SelectedItem = optValue;\r
+\r
+                        /*Trellis NSPopUpButton*/\r
+                        else if (optName.Equals("trellis"))\r
+                            mainWindow.drop_trellis.SelectedItem = optValue;\r
+\r
+                        /*Mixed Refs NSButton*/\r
+                        else if (optName.Equals("mixed-refs"))\r
+                            mainWindow.check_mixedReferences.CheckState = CheckState.Checked;\r
+\r
+                        /*Motion Estimation NSPopUpButton*/\r
+                        else if (optName.Equals("me"))\r
+                        {\r
+                            if (optValue.Equals("dia"))\r
+                                mainWindow.drop_MotionEstimationMethod.SelectedItem = "Diamond";\r
+                            else if (optValue.Equals("hex"))\r
+                                mainWindow.drop_MotionEstimationMethod.SelectedItem = "Hexagon";\r
+                            else if (optValue.Equals("umh"))\r
+                                mainWindow.drop_MotionEstimationMethod.SelectedItem = "Uneven Multi-Hexagon";\r
+                            else if (optValue.Equals("esa"))\r
+                                mainWindow.drop_MotionEstimationMethod.SelectedItem = "Exhaustive";\r
+\r
+                        }\r
+                        /*ME Range NSPopUpButton*/\r
+                        else if (optName.Equals("merange"))\r
+                            mainWindow.drop_MotionEstimationRange.SelectedItem = optValue;\r
+\r
+                        /*Weighted B-Frames NSPopUpButton*/\r
+                        else if (optName.Equals("weightb"))\r
+                            mainWindow.check_weightedBFrames.CheckState = CheckState.Checked;\r
+\r
+                        /*B Pyramid NSPopUpButton*/\r
+                        else if (optName.Equals("b-pyramid"))\r
+                            mainWindow.check_pyrmidalBFrames.CheckState = CheckState.Checked;\r
+\r
+                        /*Direct B-frame Prediction NSPopUpButton*/\r
+                        else if (optName.Equals("direct"))\r
+                        {\r
+                            if (optValue == "auto")\r
+                                optValue = "Automatic";\r
+\r
+                            if (optValue != "")\r
+                            {\r
+                                Char[] letters = optValue.ToCharArray();\r
+                                letters[0] = Char.ToUpper(letters[0]);\r
+                                optValue = new string(letters);\r
+                            }\r
+\r
+                            mainWindow.drop_directPrediction.SelectedItem = optValue;\r
+                        }\r
+\r
+                        /*Deblocking NSPopUpButtons*/\r
+                        else if (optName.Equals("deblock"))\r
+                        {\r
+                            string alphaDeblock = "";\r
+                            string betaDeblock = "";\r
+\r
+                            string[] splitDeblock = optValue.Split(',');\r
+                            alphaDeblock = splitDeblock[0];\r
+                            betaDeblock = splitDeblock[1];\r
+\r
+                            if (alphaDeblock.Equals("0") && betaDeblock.Replace("\n", "").Equals("0"))\r
+                            {\r
+                                mainWindow.drop_deblockAlpha.SelectedItem = "Default (0)";\r
+                                mainWindow.drop_deblockBeta.SelectedItem = "Default (0)";\r
+                            }\r
+                            else\r
+                            {\r
+                                if (!alphaDeblock.Equals("0"))\r
+                                    mainWindow.drop_deblockAlpha.SelectedItem = alphaDeblock;\r
+                                else\r
+                                    mainWindow.drop_deblockAlpha.SelectedItem = "0";\r
+\r
+                                if (!betaDeblock.Replace("\n", "").Equals("0"))\r
+                                    mainWindow.drop_deblockBeta.SelectedItem = betaDeblock.Replace("\n", "");\r
+                                else\r
+                                    mainWindow.drop_deblockBeta.SelectedItem = "0";\r
+                            }\r
+                        }\r
+                        /* Analysis NSPopUpButton */\r
+                        else if (optName.Equals("analyse"))\r
+                        {\r
+\r
+                            if (optValue.Equals("p8x8,b8x8,i8x8,i4x4"))\r
+                                mainWindow.drop_analysis.SelectedItem = "Default (some)";\r
+                            if (optValue.Equals("none"))\r
+                                mainWindow.drop_analysis.SelectedItem = "None";\r
+                            if (optValue.Equals("all"))\r
+                                mainWindow.drop_analysis.SelectedItem = "All";\r
+                        }\r
+                        /* 8x8 DCT NSButton */\r
+                        else if (optName.Equals("8x8dct"))\r
+                            mainWindow.check_8x8DCT.CheckState = CheckState.Checked;\r
+\r
+                        /* CABAC NSButton */\r
+                        else if (optName.Equals("cabac"))\r
+                            mainWindow.check_Cabac.CheckState = CheckState.Unchecked;\r
+                    }\r
+                }\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Iterate over every x264 option, standardize it, write the full string to the x264 rtf box\r
+        /// </summary>\r
+        public void X264_StandardizeOptString(frmMain mainWindow)\r
+        {\r
+            /* Set widgets depending on the opt string in field */\r
+            String thisOpt; // The separated option such as "bframes=3"\r
+            String optName = ""; // The option name such as "bframes"\r
+            String optValue = "";// The option value such as "3"\r
+            String changedOptString = "";\r
+            String[] currentOptsArray;\r
+\r
+            /*First, we get an opt string to process */\r
+            String currentOptString = mainWindow.rtf_x264Query.Text;\r
+\r
+            /*verify there is an opt string to process */\r
+            if (currentOptString.Contains("="))\r
+            {\r
+                /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/\r
+                currentOptsArray = currentOptString.Split(':');\r
+\r
+                /*iterate through the array and get <opts> and <values*/\r
+                //NSEnumerator * enumerator = [currentOptsArray objectEnumerator];\r
+                int loopcounter;\r
+                int currentOptsArrayCount = currentOptsArray.Length;\r
+                for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++)\r
+                {\r
+                    thisOpt = currentOptsArray[loopcounter];\r
+                    if (currentOptsArray[currentOptsArrayCount - 1] == string.Empty)\r
+                        break;\r
+\r
+                    String[] splitOptRange = thisOpt.Split('=');\r
+                    if (thisOpt != "")\r
+                    {\r
+                        if (thisOpt.Contains("="))\r
+                        {\r
+                            optName = splitOptRange[0];\r
+                            optValue = splitOptRange[1];\r
+\r
+                            /* Standardize the names here depending on whats in the string */\r
+                            optName = X264_StandardizeOptNames(optName);\r
+                            thisOpt = optName + "=" + optValue;\r
+                        }\r
+                        else // No value given so we use a default of "1"\r
+                        {\r
+                            optName = thisOpt;\r
+                            /* Standardize the names here depending on whats in the string */\r
+                            optName = X264_StandardizeOptNames(optName);\r
+                            thisOpt = optName + "=1";\r
+                        }\r
+                    }\r
+\r
+                    /* Construct New String for opts here */\r
+                    if (thisOpt == string.Empty)\r
+                        changedOptString = changedOptString + thisOpt;\r
+                    else\r
+                    {\r
+                        if (changedOptString == string.Empty)\r
+                            changedOptString = thisOpt;\r
+                        else\r
+                            changedOptString = changedOptString + ":" + thisOpt;\r
+                    }\r
+                }\r
+            }\r
+\r
+            /* Change the option string to reflect the new standardized option string */\r
+            if (changedOptString != "")\r
+                mainWindow.rtf_x264Query.Text = changedOptString;\r
+        }\r
+        /*\r
+         * Take a single option and standardize it. Returns as a String\r
+         * Input: String. - Single X264 Option. Name only\r
+         * Output: String - Single X264 Option. Name only. Changed to standard format\r
+         */\r
+        private string X264_StandardizeOptNames(String cleanOptNameString)\r
+        {\r
+            String input = cleanOptNameString;\r
+\r
+            if (input.Equals("ref") || input.Equals("frameref"))\r
+                cleanOptNameString = "ref";\r
+\r
+            /*No Fast PSkip nofast_pskip*/\r
+            if (input.Equals("no-fast-pskip") || input.Equals("no_fast_pskip") || input.Equals("nofast_pskip"))\r
+                cleanOptNameString = "no-fast-pskip";\r
+\r
+            /*No Dict Decimate*/\r
+            if (input.Equals("no-dct-decimate") || input.Equals("no_dct_decimate") || input.Equals("nodct_decimate"))\r
+                cleanOptNameString = "no-dct-decimate";\r
+\r
+            /*Subme*/\r
+            if (input.Equals("subme"))\r
+                cleanOptNameString = "subq";\r
+\r
+            /*ME Range*/\r
+            if (input.Equals("me-range") || input.Equals("me_range"))\r
+                cleanOptNameString = "merange";\r
+\r
+            /*WeightB*/\r
+            if (input.Equals("weight-b") || input.Equals("weight_b"))\r
+                cleanOptNameString = "weightb";\r
+\r
+            /*B Pyramid*/\r
+            if (input.Equals("b_pyramid"))\r
+                cleanOptNameString = "b-pyramid";\r
+\r
+            /*Direct Prediction*/\r
+            if (input.Equals("direct-pred") || input.Equals("direct_pred"))\r
+                cleanOptNameString = "direct";\r
+\r
+            /*Deblocking*/\r
+            if (input.Equals("filter"))\r
+                cleanOptNameString = "deblock";\r
+\r
+            /*Analysis*/\r
+            if (input.Equals("partitions"))\r
+                cleanOptNameString = "analyse";\r
+\r
+            return cleanOptNameString;\r
+        }\r
+\r
+        /// <summary>\r
+        /// This function will update the X264 Query when one of the GUI widgets changes.\r
+        /// </summary>\r
+        public void on_x264_WidgetChange(string sender, frmMain mainWindow)\r
+        {\r
+            animate(mainWindow, sender);\r
+            String optNameToChange = sender;\r
+            String currentOptString = mainWindow.rtf_x264Query.Text;\r
+\r
+            /*First, we create a pattern to check for ":"optNameToChange"=" to modify the option if the name falls after\r
+                the first character of the opt string (hence the ":") */\r
+            String checkOptNameToChange = ":" + optNameToChange + "=";\r
+            String checkOptNameToChangeBegin = optNameToChange + "=";\r
+\r
+            // IF the current H264 Option String Contains Multiple Items or Just 1 Item\r
+            if ((currentOptString.Contains(checkOptNameToChange)) || (currentOptString.StartsWith(checkOptNameToChangeBegin)))\r
+                hasOptions(currentOptString, optNameToChange, mainWindow);\r
+            else // IF there is no options in the rich text box!\r
+                hasNoOptions(optNameToChange, mainWindow);\r
+        }\r
+        /*\r
+         * Used by on_x264_WidgetChange()\r
+         ** hasOptions - Called when the current x264 option string contains multiple (or a single) item(s) in it seperated by :\r
+         * it updates the current option that the widget corrosponds to, if it is already in thes string.\r
+         ** hasNoOptions - Add's an option to the x264 query string.\r
+         * Handles 2 cases.  1 Where rtf_x264Query.Text is empty, and one where there is an option with no value,\r
+         * e.g no-fast-pskip\r
+         */\r
+        private void hasOptions(string currentOptString, string optNameToChange, frmMain mainWindow)\r
+        {\r
+            String thisOpt;             // The separated option such as "bframes=3"\r
+            String optName = "";        // The option name such as "bframes"\r
+            String optValue = "";       // The option value such as "3"\r
+            String[] currentOptsArray;\r
+\r
+            /* Create new empty opt string*/\r
+            String changedOptString = "";\r
+\r
+            /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/\r
+            currentOptsArray = currentOptString.Split(':');\r
+\r
+            /*iterate through the array and get <opts> and <values*/\r
+            for (int loopcounter = 0; loopcounter < currentOptsArray.Length; loopcounter++)\r
+            {\r
+                thisOpt = currentOptsArray[loopcounter];\r
+\r
+                if (thisOpt.Contains("="))\r
+                {\r
+                    string[] splitOptRange = thisOpt.Split('=');\r
+\r
+                    optName = splitOptRange[0];     // e.g bframes\r
+                    optValue = splitOptRange[1];    // e.g 2\r
+\r
+                    /* \r
+                     * Run through the available widgets for x264 opts and set them, as you add widgets,\r
+                     * they need to be added here. This should be moved to its own method probably\r
+                     * If the optNameToChange is found, appropriately change the value or delete it if\r
+                     * "unspecified" is set.\r
+                     */\r
+                    if (optName.Equals(optNameToChange))\r
+                    {\r
+                        if (optNameToChange.Equals("deblock"))\r
+                        {\r
+                            String da = mainWindow.drop_deblockAlpha.SelectedItem.ToString();\r
+                            String db = mainWindow.drop_deblockBeta.SelectedItem.ToString();\r
+\r
+                            if (((da.Contains("Default")) && (db.Contains("Default"))) || ((da.Contains("0")) && (db.Contains("0"))))\r
+                            {\r
+                                mainWindow.drop_deblockBeta.SelectedItem = "Default (0)";\r
+                                mainWindow.drop_deblockAlpha.SelectedItem = "Default (0)";\r
+                                thisOpt = "";\r
+                            }\r
+                            else if ((!da.Contains("Default")) && (db.Contains("Default")))\r
+                            {\r
+                                mainWindow.drop_deblockBeta.SelectedItem = "0";\r
+                                thisOpt = "deblock=" + da + ",0";\r
+                            }\r
+                            else if ((da.Contains("Default")) && (!db.Contains("Default")))\r
+                            {\r
+                                mainWindow.drop_deblockAlpha.SelectedItem = "0";\r
+                                thisOpt = "deblock=0," + db;\r
+                            }\r
+                            else if ((!da.Contains("Default")) && (!db.Contains("Default")))\r
+                                thisOpt = "deblock=" + da + "," + db;\r
+                        }\r
+\r
+                        else if (optNameToChange.Equals("mixed-refs"))\r
+                        {\r
+                            if (mainWindow.check_mixedReferences.CheckState == CheckState.Checked)\r
+                                thisOpt = "mixed-refs=1";\r
+                            else\r
+                                thisOpt = "";\r
+                        }\r
+                        else if (optNameToChange.Equals("weightb"))\r
+                        {\r
+                            if (mainWindow.check_weightedBFrames.CheckState == CheckState.Checked)\r
+                                thisOpt = "weightb=1";\r
+                            else\r
+                                thisOpt = "";\r
+                        }\r
+                        else if (optNameToChange.Equals("b-pyramid"))\r
+                        {\r
+                            if (mainWindow.check_pyrmidalBFrames.CheckState == CheckState.Checked)\r
+                                thisOpt = "b-pyramid=1";\r
+                            else\r
+                                thisOpt = "";\r
+                        }\r
+                        else if (optNameToChange.Equals("no-fast-pskip"))\r
+                        {\r
+                            if (mainWindow.check_noFastPSkip.CheckState == CheckState.Checked)\r
+                                thisOpt = "no-fast-pskip=1";\r
+                            else\r
+                                thisOpt = "";\r
+                        }\r
+                        else if (optNameToChange.Equals("no-dct-decimate"))\r
+                        {\r
+                            if (mainWindow.check_noDCTDecimate.CheckState == CheckState.Checked)\r
+                                thisOpt = "no-dct-decimate=1";\r
+                            else\r
+                                thisOpt = "";\r
+                        }\r
+                        else if (optNameToChange.Equals("8x8dct"))\r
+                        {\r
+                            if (mainWindow.check_8x8DCT.CheckState == CheckState.Checked)\r
+                                thisOpt = "8x8dct=1";\r
+                            else\r
+                                thisOpt = "";\r
+                        }\r
+                        else if (optNameToChange.Equals("cabac"))\r
+                        {\r
+                            if (mainWindow.check_Cabac.CheckState == CheckState.Checked)\r
+                                thisOpt = "";\r
+                            else\r
+                                thisOpt = "cabac=0";\r
+                        }\r
+                        else if (optNameToChange.Equals("me"))\r
+                        {\r
+                            switch (mainWindow.drop_MotionEstimationMethod.SelectedIndex)\r
+                            {\r
+                                case 1:\r
+                                    thisOpt = "me=dia";\r
+                                    break;\r
+\r
+                                case 2:\r
+                                    thisOpt = "me=hex";\r
+                                    break;\r
+\r
+                                case 3:\r
+                                    thisOpt = "me=umh";\r
+                                    break;\r
+\r
+                                case 4:\r
+                                    thisOpt = "me=esa";\r
+                                    break;\r
+\r
+                                default:\r
+                                    thisOpt = "";\r
+                                    break;\r
+                            }\r
+                        }\r
+                        else if (optNameToChange.Equals("direct"))\r
+                        {\r
+                            switch (mainWindow.drop_directPrediction.SelectedIndex)\r
+                            {\r
+                                case 1:\r
+                                    thisOpt = "direct=none";\r
+                                    break;\r
+\r
+                                case 2:\r
+                                    thisOpt = "direct=spatial";\r
+                                    break;\r
+\r
+                                case 3:\r
+                                    thisOpt = "direct=temporal";\r
+                                    break;\r
+\r
+                                case 4:\r
+                                    thisOpt = "direct=auto";\r
+                                    break;\r
+\r
+                                default:\r
+                                    thisOpt = "";\r
+                                    break;\r
+                            }\r
+                        }\r
+                        else if (optNameToChange.Equals("analyse"))\r
+                        {\r
+                            switch (mainWindow.drop_analysis.SelectedIndex)\r
+                            {\r
+                                case 1:\r
+                                    thisOpt = "analyse=none";\r
+                                    break;\r
+\r
+                                case 2:\r
+                                    thisOpt = "analyse=all";\r
+                                    break;\r
+\r
+                                default:\r
+                                    thisOpt = "";\r
+                                    break;\r
+                            }\r
+                        }\r
+                        else if (optNameToChange.Equals("merange"))\r
+                        {\r
+                            if (!mainWindow.drop_MotionEstimationRange.SelectedItem.ToString().Contains("Default"))\r
+                                thisOpt = "merange=" + mainWindow.drop_MotionEstimationRange.SelectedItem.ToString();\r
+                            else\r
+                                thisOpt = "";\r
+                        }\r
+                        else if (optNameToChange.Equals("ref"))\r
+                        {\r
+                            if (!mainWindow.drop_refFrames.SelectedItem.ToString().Contains("Default"))\r
+                                thisOpt = "ref=" + mainWindow.drop_refFrames.SelectedItem.ToString();\r
+                            else\r
+                                thisOpt = "";\r
+                        }\r
+                        else if (optNameToChange.Equals("bframes"))\r
+                        {\r
+                            String value = mainWindow.drop_bFrames.SelectedItem.ToString();\r
+                            if (!mainWindow.drop_bFrames.SelectedItem.ToString().Contains("Default"))\r
+                                thisOpt = "bframes=" + value;\r
+                            else\r
+                                thisOpt = "";\r
+                        }\r
+                        else if (optNameToChange.Equals("subq"))\r
+                        {\r
+                            String value = mainWindow.drop_subpixelMotionEstimation.SelectedItem.ToString();\r
+                            if (!mainWindow.drop_subpixelMotionEstimation.SelectedItem.ToString().Contains("Default"))\r
+                                thisOpt = "subq=" + value;\r
+                            else\r
+                                thisOpt = "";\r
+                        }\r
+                        else if (optNameToChange.Equals("trellis"))\r
+                        {\r
+                            String value = mainWindow.drop_trellis.SelectedItem.ToString();\r
+                            if (!mainWindow.drop_trellis.SelectedItem.ToString().Contains("Default"))\r
+                                thisOpt = "trellis=" + value;\r
+                            else\r
+                                thisOpt = "";\r
+                        }\r
+\r
+                    }\r
+                }\r
+\r
+                /* Construct New String for opts here */\r
+                if (!thisOpt.Equals(""))\r
+                {\r
+                    if (changedOptString.Equals(""))\r
+                        changedOptString = thisOpt;\r
+                    else\r
+                        changedOptString = changedOptString + ":" + thisOpt;\r
+                }\r
+            }\r
+\r
+            /* Change the option string to reflect the new mod settings */\r
+            mainWindow.rtf_x264Query.Text = changedOptString;\r
+        }\r
+        private void hasNoOptions(string optNameToChange, frmMain mainWindow)\r
+        {\r
+            string query = "";\r
+            string colon = "";\r
+            if (mainWindow.rtf_x264Query.Text != "")\r
+                colon = ":";\r
+\r
+            query = mainWindow.rtf_x264Query.Text;\r
+            if (optNameToChange.Equals("me"))\r
+            {\r
+                switch (mainWindow.drop_MotionEstimationMethod.SelectedIndex)\r
+                {\r
+                    case 1:\r
+                        query = query + colon + "me=dia";\r
+                        break;\r
+\r
+                    case 2:\r
+                        query = query + colon + "me=hex";\r
+                        break;\r
+\r
+                    case 3:\r
+                        query = query + colon + "me=umh";\r
+                        break;\r
+\r
+                    case 4:\r
+                        query = query + colon + "me=esa";\r
+                        break;\r
+\r
+                    default:\r
+                        break;\r
+                }\r
+            }\r
+            else if (optNameToChange.Equals("direct"))\r
+            {\r
+                switch (mainWindow.drop_directPrediction.SelectedIndex)\r
+                {\r
+                    case 1:\r
+                        query = query + colon + "direct=none";\r
+                        break;\r
+\r
+                    case 2:\r
+                        query = query + colon + "direct=spatial";\r
+                        break;\r
+\r
+                    case 3:\r
+                        query = query + colon + "direct=temporal";\r
+                        break;\r
+\r
+                    case 4:\r
+                        query = query + colon + "direct=auto";\r
+                        break;\r
+\r
+                    default:\r
+                        break;\r
+                }\r
+            }\r
+            else if (optNameToChange.Equals("analyse"))\r
+            {\r
+                switch (mainWindow.drop_analysis.SelectedIndex)\r
+                {\r
+                    case 1:\r
+                        query = query + colon + "analyse=none";\r
+                        break;\r
+\r
+                    case 2:\r
+                        query = query + colon + "analyse=all";\r
+                        break;\r
+\r
+                    default:\r
+                        break;\r
+                }\r
+            }\r
+            else if (optNameToChange.Equals("merange"))\r
+            {\r
+                int value = mainWindow.drop_MotionEstimationRange.SelectedIndex + 3;\r
+                query = query + colon + "merange=" + value.ToString();\r
+            }\r
+            else if (optNameToChange.Equals("deblock"))\r
+            {\r
+                String da = mainWindow.drop_deblockAlpha.SelectedItem.ToString();\r
+                String db = mainWindow.drop_deblockBeta.Text.ToString();\r
+\r
+                if (((da.Contains("Default")) && (db.Contains("Default"))) || ((da.Contains("0")) && (db.Contains("0"))))\r
+                {\r
+                    mainWindow.drop_deblockBeta.SelectedItem = "Default (0)";\r
+                    mainWindow.drop_deblockAlpha.SelectedItem = "Default (0)";\r
+                }\r
+                else\r
+                {\r
+                    if (db.Contains("Default"))\r
+                        db = "0";\r
+\r
+                    if (da.Contains("Default"))\r
+                        da = "0";\r
+\r
+                    query = query + colon + "deblock=" + da + "," + db;\r
+                }\r
+            }\r
+            else if (optNameToChange.Equals("mixed-refs"))\r
+            {\r
+                if (mainWindow.check_mixedReferences.CheckState == CheckState.Checked)\r
+                    query = query + colon + "mixed-refs=1";\r
+            }\r
+            else if (optNameToChange.Equals("weightb"))\r
+            {\r
+                if (mainWindow.check_weightedBFrames.CheckState == CheckState.Checked)\r
+                    query = query + colon + "weightb=1";\r
+            }\r
+            else if (optNameToChange.Equals("b-pyramid"))\r
+            {\r
+                if (mainWindow.check_pyrmidalBFrames.CheckState == CheckState.Checked)\r
+                    query = query + colon + "b-pyramid=1";\r
+            }\r
+            else if (optNameToChange.Equals("no-fast-pskip"))\r
+            {\r
+                if (mainWindow.check_noFastPSkip.CheckState == CheckState.Checked)\r
+                    query = query + colon + "no-fast-pskip=1";\r
+            }\r
+            else if (optNameToChange.Equals("no-dct-decimate"))\r
+            {\r
+                if (mainWindow.check_noDCTDecimate.CheckState == CheckState.Checked)\r
+                    query = query + colon + "no-dct-decimate=1";\r
+            }\r
+            else if (optNameToChange.Equals("8x8dct"))\r
+            {\r
+                if (mainWindow.check_8x8DCT.CheckState == CheckState.Checked)\r
+                    query = query + colon + "8x8dct=1";\r
+            }\r
+            else if (optNameToChange.Equals("cabac"))\r
+            {\r
+                if (mainWindow.check_Cabac.CheckState != CheckState.Checked)\r
+                    query = query + colon + "cabac=0";\r
+            }\r
+            else if (optNameToChange.Equals("ref"))\r
+            {\r
+                if (!mainWindow.drop_refFrames.SelectedItem.ToString().Contains("Default"))\r
+                    query = query + colon + "ref=" + mainWindow.drop_refFrames.SelectedItem.ToString();\r
+            }\r
+            else if (optNameToChange.Equals("bframes"))\r
+            {\r
+                String value = mainWindow.drop_bFrames.SelectedItem.ToString();\r
+                if (!mainWindow.drop_bFrames.SelectedItem.ToString().Contains("Default"))\r
+                    query = query + colon + "bframes=" + value;\r
+            }\r
+            else if (optNameToChange.Equals("subq"))\r
+            {\r
+                String value = mainWindow.drop_subpixelMotionEstimation.SelectedItem.ToString();\r
+                if (!mainWindow.drop_subpixelMotionEstimation.SelectedItem.ToString().Contains("Default"))\r
+                    query = query + colon + "subq=" + value;\r
+            }\r
+            else if (optNameToChange.Equals("trellis"))\r
+            {\r
+                if (!mainWindow.drop_trellis.SelectedItem.ToString().Contains("Default"))\r
+                    query = query + colon + "trellis=" + mainWindow.drop_trellis.SelectedItem.ToString();\r
+            }\r
+\r
+            mainWindow.rtf_x264Query.Text = query;\r
+        }\r
+        private void animate(frmMain mainWindow, string sender)\r
+        {\r
+            /* Lots of situations to cover.\r
+               - B-frames (when 0 turn of b-frame specific stuff, when < 2 disable b-pyramid)\r
+               - CABAC (when 0 turn off trellis)\r
+               - analysis (if none, turn off 8x8dct)\r
+               - refs (under 2, disable mixed-refs)\r
+            */\r
+            if (mainWindow.drop_bFrames.SelectedIndex < 2)\r
+            {\r
+                /* If the b-frame widget is at 0 or 1, the user has chosen\r
+                   not to use b-frames at all. So disable the options\r
+                   that can only be used when b-frames are enabled.        */\r
+                mainWindow.check_weightedBFrames.Visible = false;\r
+                mainWindow.check_pyrmidalBFrames.Visible = false;\r
+                mainWindow.drop_directPrediction.Visible = false;\r
+                mainWindow.lbl_direct_prediction.Visible = false;\r
+\r
+                mainWindow.check_weightedBFrames.CheckState = CheckState.Unchecked;\r
+                mainWindow.check_pyrmidalBFrames.CheckState = CheckState.Unchecked;\r
+                mainWindow.drop_directPrediction.SelectedIndex = 0;\r
+            }\r
+            else if (mainWindow.drop_bFrames.SelectedIndex == 2)\r
+            {\r
+                /* Only 1 b-frame? Disable b-pyramid. */\r
+                mainWindow.check_pyrmidalBFrames.Visible = false;\r
+                mainWindow.check_pyrmidalBFrames.CheckState = CheckState.Unchecked;\r
+\r
+                mainWindow.check_weightedBFrames.Visible = true;\r
+                mainWindow.drop_directPrediction.Visible = true;\r
+                mainWindow.lbl_direct_prediction.Visible = true;\r
+                \r
+            }\r
+            else\r
+            {\r
+                mainWindow.check_weightedBFrames.Visible = true;\r
+                mainWindow.check_pyrmidalBFrames.Visible = true;\r
+                mainWindow.drop_directPrediction.Visible = true;\r
+                mainWindow.lbl_direct_prediction.Visible = true;\r
+            }\r
+\r
+            if (mainWindow.check_Cabac.Checked == false)\r
+            {\r
+                /* Without CABAC entropy coding, trellis doesn't run. */\r
+                mainWindow.drop_trellis.Visible = false;\r
+                mainWindow.drop_trellis.SelectedIndex = 0;\r
+                mainWindow.lbl_trellis.Visible = false;\r
+            }\r
+            else\r
+            {\r
+                mainWindow.drop_trellis.Visible = true;\r
+                mainWindow.lbl_trellis.Visible = true;\r
+            }\r
+\r
+            if (mainWindow.drop_analysis.SelectedIndex == 1)\r
+            {\r
+                /* No analysis? Disable 8x8dct */\r
+                mainWindow.check_8x8DCT.Visible = false;\r
+                if (sender != "8x8dct")\r
+                    mainWindow.check_8x8DCT.CheckState = CheckState.Unchecked;\r
+            }\r
+            else\r
+                mainWindow.check_8x8DCT.Visible = true;\r
+\r
+            if (mainWindow.drop_refFrames.SelectedIndex < 3)\r
+            {\r
+                mainWindow.check_mixedReferences.Visible = false;\r
+                if (sender != "mixed-refs")\r
+                    mainWindow.check_mixedReferences.CheckState = CheckState.Unchecked;\r
+            }\r
+            else\r
+            {\r
+                mainWindow.check_mixedReferences.Visible = true;\r
+            }\r
+        }\r
+\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs
new file mode 100644 (file)
index 0000000..91bd684
--- /dev/null
@@ -0,0 +1,692 @@
+/*  frmOptions.Designer.cs \r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace Handbrake\r
+{\r
+    partial class frmOptions\r
+    {\r
+        /// <summary>\r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows Form Designer generated code\r
+\r
+        /// <summary>\r
+        /// Required method for Designer support - do not modify\r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            this.components = new System.ComponentModel.Container();\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmOptions));\r
+            this.btn_close = new System.Windows.Forms.Button();\r
+            this.drp_completeOption = new System.Windows.Forms.ComboBox();\r
+            this.tab_options = new System.Windows.Forms.TabControl();\r
+            this.tab_general = new System.Windows.Forms.TabPage();\r
+            this.label7 = new System.Windows.Forms.Label();\r
+            this.label5 = new System.Windows.Forms.Label();\r
+            this.txt_autoNameFormat = new System.Windows.Forms.TextBox();\r
+            this.btn_browse = new System.Windows.Forms.Button();\r
+            this.label10 = new System.Windows.Forms.Label();\r
+            this.text_an_path = new System.Windows.Forms.TextBox();\r
+            this.check_autoNaming = new System.Windows.Forms.CheckBox();\r
+            this.label13 = new System.Windows.Forms.Label();\r
+            this.check_tooltip = new System.Windows.Forms.CheckBox();\r
+            this.check_updateCheck = new System.Windows.Forms.CheckBox();\r
+            this.check_userDefaultSettings = new System.Windows.Forms.CheckBox();\r
+            this.label1 = new System.Windows.Forms.Label();\r
+            this.label2 = new System.Windows.Forms.Label();\r
+            this.tab_picture = new System.Windows.Forms.TabPage();\r
+            this.txt_decomb = new System.Windows.Forms.TextBox();\r
+            this.label3 = new System.Windows.Forms.Label();\r
+            this.tab_cli = new System.Windows.Forms.TabPage();\r
+            this.label15 = new System.Windows.Forms.Label();\r
+            this.check_saveLogWithVideo = new System.Windows.Forms.CheckBox();\r
+            this.btn_saveLog = new System.Windows.Forms.Button();\r
+            this.label14 = new System.Windows.Forms.Label();\r
+            this.text_logPath = new System.Windows.Forms.TextBox();\r
+            this.check_keepLogs = new System.Windows.Forms.CheckBox();\r
+            this.label9 = new System.Windows.Forms.Label();\r
+            this.check_cli_minimized = new System.Windows.Forms.CheckBox();\r
+            this.label12 = new System.Windows.Forms.Label();\r
+            this.drp_Priority = new System.Windows.Forms.ComboBox();\r
+            this.Label11 = new System.Windows.Forms.Label();\r
+            this.drp_processors = new System.Windows.Forms.ComboBox();\r
+            this.Label4 = new System.Windows.Forms.Label();\r
+            this.tab_advanced = new System.Windows.Forms.TabPage();\r
+            this.lbl_appcastUnstable = new System.Windows.Forms.Label();\r
+            this.check_snapshot = new System.Windows.Forms.CheckBox();\r
+            this.btn_drive_detect = new System.Windows.Forms.CheckBox();\r
+            this.label6 = new System.Windows.Forms.Label();\r
+            this.label8 = new System.Windows.Forms.Label();\r
+            this.pictureBox2 = new System.Windows.Forms.PictureBox();\r
+            this.pathFinder = new System.Windows.Forms.FolderBrowserDialog();\r
+            this.ToolTip = new System.Windows.Forms.ToolTip(this.components);\r
+            this.tab_options.SuspendLayout();\r
+            this.tab_general.SuspendLayout();\r
+            this.tab_picture.SuspendLayout();\r
+            this.tab_cli.SuspendLayout();\r
+            this.tab_advanced.SuspendLayout();\r
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();\r
+            this.SuspendLayout();\r
+            // \r
+            // btn_close\r
+            // \r
+            this.btn_close.BackColor = System.Drawing.SystemColors.ControlLight;\r
+            this.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_close.Location = new System.Drawing.Point(430, 346);\r
+            this.btn_close.Name = "btn_close";\r
+            this.btn_close.Size = new System.Drawing.Size(72, 22);\r
+            this.btn_close.TabIndex = 53;\r
+            this.btn_close.Text = "Close";\r
+            this.btn_close.UseVisualStyleBackColor = true;\r
+            this.btn_close.Click += new System.EventHandler(this.btn_close_Click);\r
+            // \r
+            // drp_completeOption\r
+            // \r
+            this.drp_completeOption.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drp_completeOption.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_completeOption.FormattingEnabled = true;\r
+            this.drp_completeOption.Items.AddRange(new object[] {\r
+            "Do Nothing",\r
+            "Shutdown",\r
+            "Suspend",\r
+            "Hibernate",\r
+            "Lock System",\r
+            "Log Off",\r
+            "Quit HandBrake"});\r
+            this.drp_completeOption.Location = new System.Drawing.Point(114, 100);\r
+            this.drp_completeOption.Name = "drp_completeOption";\r
+            this.drp_completeOption.Size = new System.Drawing.Size(166, 21);\r
+            this.drp_completeOption.TabIndex = 43;\r
+            this.ToolTip.SetToolTip(this.drp_completeOption, "Performs an action when an encode or queue has completed.");\r
+            this.drp_completeOption.SelectedIndexChanged += new System.EventHandler(this.drp_completeOption_SelectedIndexChanged);\r
+            // \r
+            // tab_options\r
+            // \r
+            this.tab_options.Controls.Add(this.tab_general);\r
+            this.tab_options.Controls.Add(this.tab_picture);\r
+            this.tab_options.Controls.Add(this.tab_cli);\r
+            this.tab_options.Controls.Add(this.tab_advanced);\r
+            this.tab_options.Location = new System.Drawing.Point(12, 55);\r
+            this.tab_options.Name = "tab_options";\r
+            this.tab_options.SelectedIndex = 0;\r
+            this.tab_options.Size = new System.Drawing.Size(490, 285);\r
+            this.tab_options.TabIndex = 58;\r
+            // \r
+            // tab_general\r
+            // \r
+            this.tab_general.Controls.Add(this.label7);\r
+            this.tab_general.Controls.Add(this.label5);\r
+            this.tab_general.Controls.Add(this.txt_autoNameFormat);\r
+            this.tab_general.Controls.Add(this.btn_browse);\r
+            this.tab_general.Controls.Add(this.label10);\r
+            this.tab_general.Controls.Add(this.text_an_path);\r
+            this.tab_general.Controls.Add(this.check_autoNaming);\r
+            this.tab_general.Controls.Add(this.label13);\r
+            this.tab_general.Controls.Add(this.check_tooltip);\r
+            this.tab_general.Controls.Add(this.check_updateCheck);\r
+            this.tab_general.Controls.Add(this.check_userDefaultSettings);\r
+            this.tab_general.Controls.Add(this.label1);\r
+            this.tab_general.Controls.Add(this.label2);\r
+            this.tab_general.Controls.Add(this.drp_completeOption);\r
+            this.tab_general.Location = new System.Drawing.Point(4, 22);\r
+            this.tab_general.Name = "tab_general";\r
+            this.tab_general.Size = new System.Drawing.Size(482, 259);\r
+            this.tab_general.TabIndex = 3;\r
+            this.tab_general.Text = "General";\r
+            this.tab_general.UseVisualStyleBackColor = true;\r
+            // \r
+            // label7\r
+            // \r
+            this.label7.AutoSize = true;\r
+            this.label7.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label7.Location = new System.Drawing.Point(197, 222);\r
+            this.label7.Name = "label7";\r
+            this.label7.Size = new System.Drawing.Size(242, 12);\r
+            this.label7.TabIndex = 81;\r
+            this.label7.Text = "Available Options: {source} {title} {chapters}";\r
+            // \r
+            // label5\r
+            // \r
+            this.label5.AutoSize = true;\r
+            this.label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label5.Location = new System.Drawing.Point(111, 201);\r
+            this.label5.Name = "label5";\r
+            this.label5.Size = new System.Drawing.Size(52, 13);\r
+            this.label5.TabIndex = 80;\r
+            this.label5.Text = "Format:";\r
+            // \r
+            // txt_autoNameFormat\r
+            // \r
+            this.txt_autoNameFormat.Location = new System.Drawing.Point(199, 198);\r
+            this.txt_autoNameFormat.Name = "txt_autoNameFormat";\r
+            this.txt_autoNameFormat.Size = new System.Drawing.Size(255, 21);\r
+            this.txt_autoNameFormat.TabIndex = 79;\r
+            this.ToolTip.SetToolTip(this.txt_autoNameFormat, "Define the format of the automatically named file.\r\ne.g  {source}_{title}_some-te" +\r
+                    "xt\r\n{source} {title} {chapters} will be automatically substituted for the input " +\r
+                    "sources values.");\r
+            this.txt_autoNameFormat.TextChanged += new System.EventHandler(this.txt_autoNameFormat_TextChanged);\r
+            // \r
+            // btn_browse\r
+            // \r
+            this.btn_browse.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_browse.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_browse.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_browse.Location = new System.Drawing.Point(386, 171);\r
+            this.btn_browse.Name = "btn_browse";\r
+            this.btn_browse.Size = new System.Drawing.Size(68, 22);\r
+            this.btn_browse.TabIndex = 78;\r
+            this.btn_browse.Text = "Browse";\r
+            this.btn_browse.UseVisualStyleBackColor = true;\r
+            this.btn_browse.Click += new System.EventHandler(this.btn_browse_Click);\r
+            // \r
+            // label10\r
+            // \r
+            this.label10.AutoSize = true;\r
+            this.label10.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label10.Location = new System.Drawing.Point(111, 174);\r
+            this.label10.Name = "label10";\r
+            this.label10.Size = new System.Drawing.Size(82, 13);\r
+            this.label10.TabIndex = 77;\r
+            this.label10.Text = "Default Path:";\r
+            // \r
+            // text_an_path\r
+            // \r
+            this.text_an_path.Location = new System.Drawing.Point(199, 171);\r
+            this.text_an_path.Name = "text_an_path";\r
+            this.text_an_path.Size = new System.Drawing.Size(181, 21);\r
+            this.text_an_path.TabIndex = 76;\r
+            this.ToolTip.SetToolTip(this.text_an_path, "The default location where auto named files are stored.");\r
+            this.text_an_path.TextChanged += new System.EventHandler(this.text_an_path_TextChanged);\r
+            // \r
+            // check_autoNaming\r
+            // \r
+            this.check_autoNaming.AutoSize = true;\r
+            this.check_autoNaming.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_autoNaming.Location = new System.Drawing.Point(114, 148);\r
+            this.check_autoNaming.Name = "check_autoNaming";\r
+            this.check_autoNaming.Size = new System.Drawing.Size(206, 17);\r
+            this.check_autoNaming.TabIndex = 72;\r
+            this.check_autoNaming.Text = "Automatically name output files";\r
+            this.ToolTip.SetToolTip(this.check_autoNaming, "Automatically name output files");\r
+            this.check_autoNaming.UseVisualStyleBackColor = true;\r
+            this.check_autoNaming.CheckedChanged += new System.EventHandler(this.check_autoNaming_CheckedChanged);\r
+            // \r
+            // label13\r
+            // \r
+            this.label13.AutoSize = true;\r
+            this.label13.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label13.Location = new System.Drawing.Point(10, 149);\r
+            this.label13.Name = "label13";\r
+            this.label13.Size = new System.Drawing.Size(86, 13);\r
+            this.label13.TabIndex = 71;\r
+            this.label13.Text = "Output files:";\r
+            // \r
+            // check_tooltip\r
+            // \r
+            this.check_tooltip.AutoSize = true;\r
+            this.check_tooltip.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_tooltip.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_tooltip.Location = new System.Drawing.Point(114, 41);\r
+            this.check_tooltip.Name = "check_tooltip";\r
+            this.check_tooltip.Size = new System.Drawing.Size(135, 17);\r
+            this.check_tooltip.TabIndex = 70;\r
+            this.check_tooltip.Text = "Enable GUI tooltips";\r
+            this.ToolTip.SetToolTip(this.check_tooltip, "Enable the built in tooltips for gui controls.");\r
+            this.check_tooltip.UseVisualStyleBackColor = false;\r
+            this.check_tooltip.CheckedChanged += new System.EventHandler(this.check_tooltip_CheckedChanged);\r
+            // \r
+            // check_updateCheck\r
+            // \r
+            this.check_updateCheck.AutoSize = true;\r
+            this.check_updateCheck.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_updateCheck.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_updateCheck.Location = new System.Drawing.Point(114, 18);\r
+            this.check_updateCheck.Name = "check_updateCheck";\r
+            this.check_updateCheck.Size = new System.Drawing.Size(131, 17);\r
+            this.check_updateCheck.TabIndex = 68;\r
+            this.check_updateCheck.Text = "Check for updates";\r
+            this.ToolTip.SetToolTip(this.check_updateCheck, "Enables the built in update checker. This check is performed when the application" +\r
+                    " starts.");\r
+            this.check_updateCheck.UseVisualStyleBackColor = false;\r
+            this.check_updateCheck.CheckedChanged += new System.EventHandler(this.check_updateCheck_CheckedChanged);\r
+            // \r
+            // check_userDefaultSettings\r
+            // \r
+            this.check_userDefaultSettings.AutoSize = true;\r
+            this.check_userDefaultSettings.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_userDefaultSettings.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_userDefaultSettings.Location = new System.Drawing.Point(114, 64);\r
+            this.check_userDefaultSettings.Name = "check_userDefaultSettings";\r
+            this.check_userDefaultSettings.Size = new System.Drawing.Size(166, 17);\r
+            this.check_userDefaultSettings.TabIndex = 69;\r
+            this.check_userDefaultSettings.Text = "Load my default settings";\r
+            this.ToolTip.SetToolTip(this.check_userDefaultSettings, "Loads the users default settings rather than the Normal preset.");\r
+            this.check_userDefaultSettings.UseVisualStyleBackColor = false;\r
+            this.check_userDefaultSettings.CheckedChanged += new System.EventHandler(this.check_userDefaultSettings_CheckedChanged);\r
+            // \r
+            // label1\r
+            // \r
+            this.label1.AutoSize = true;\r
+            this.label1.BackColor = System.Drawing.Color.Transparent;\r
+            this.label1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label1.Location = new System.Drawing.Point(21, 19);\r
+            this.label1.Name = "label1";\r
+            this.label1.Size = new System.Drawing.Size(75, 13);\r
+            this.label1.TabIndex = 67;\r
+            this.label1.Text = "At Launch:";\r
+            // \r
+            // label2\r
+            // \r
+            this.label2.AutoSize = true;\r
+            this.label2.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label2.Location = new System.Drawing.Point(12, 103);\r
+            this.label2.Name = "label2";\r
+            this.label2.Size = new System.Drawing.Size(84, 13);\r
+            this.label2.TabIndex = 54;\r
+            this.label2.Text = "When Done:";\r
+            // \r
+            // tab_picture\r
+            // \r
+            this.tab_picture.Controls.Add(this.txt_decomb);\r
+            this.tab_picture.Controls.Add(this.label3);\r
+            this.tab_picture.Location = new System.Drawing.Point(4, 22);\r
+            this.tab_picture.Name = "tab_picture";\r
+            this.tab_picture.Size = new System.Drawing.Size(482, 259);\r
+            this.tab_picture.TabIndex = 5;\r
+            this.tab_picture.Text = "Picture";\r
+            this.tab_picture.UseVisualStyleBackColor = true;\r
+            // \r
+            // txt_decomb\r
+            // \r
+            this.txt_decomb.Location = new System.Drawing.Point(90, 16);\r
+            this.txt_decomb.Name = "txt_decomb";\r
+            this.txt_decomb.Size = new System.Drawing.Size(181, 21);\r
+            this.txt_decomb.TabIndex = 78;\r
+            this.ToolTip.SetToolTip(this.txt_decomb, "Default: 4:10:15:9:10:35:9");\r
+            this.txt_decomb.TextChanged += new System.EventHandler(this.txt_decomb_TextChanged);\r
+            // \r
+            // label3\r
+            // \r
+            this.label3.AutoSize = true;\r
+            this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label3.Location = new System.Drawing.Point(21, 19);\r
+            this.label3.Name = "label3";\r
+            this.label3.Size = new System.Drawing.Size(63, 13);\r
+            this.label3.TabIndex = 77;\r
+            this.label3.Text = "Decomb:";\r
+            // \r
+            // tab_cli\r
+            // \r
+            this.tab_cli.Controls.Add(this.label15);\r
+            this.tab_cli.Controls.Add(this.check_saveLogWithVideo);\r
+            this.tab_cli.Controls.Add(this.btn_saveLog);\r
+            this.tab_cli.Controls.Add(this.label14);\r
+            this.tab_cli.Controls.Add(this.text_logPath);\r
+            this.tab_cli.Controls.Add(this.check_keepLogs);\r
+            this.tab_cli.Controls.Add(this.label9);\r
+            this.tab_cli.Controls.Add(this.check_cli_minimized);\r
+            this.tab_cli.Controls.Add(this.label12);\r
+            this.tab_cli.Controls.Add(this.drp_Priority);\r
+            this.tab_cli.Controls.Add(this.Label11);\r
+            this.tab_cli.Controls.Add(this.drp_processors);\r
+            this.tab_cli.Controls.Add(this.Label4);\r
+            this.tab_cli.Location = new System.Drawing.Point(4, 22);\r
+            this.tab_cli.Name = "tab_cli";\r
+            this.tab_cli.Size = new System.Drawing.Size(482, 259);\r
+            this.tab_cli.TabIndex = 2;\r
+            this.tab_cli.Text = "CLI";\r
+            this.tab_cli.UseVisualStyleBackColor = true;\r
+            // \r
+            // label15\r
+            // \r
+            this.label15.AutoSize = true;\r
+            this.label15.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label15.Location = new System.Drawing.Point(195, 197);\r
+            this.label15.Name = "label15";\r
+            this.label15.Size = new System.Drawing.Size(24, 13);\r
+            this.label15.TabIndex = 84;\r
+            this.label15.Text = "OR";\r
+            // \r
+            // check_saveLogWithVideo\r
+            // \r
+            this.check_saveLogWithVideo.AutoSize = true;\r
+            this.check_saveLogWithVideo.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_saveLogWithVideo.Location = new System.Drawing.Point(71, 177);\r
+            this.check_saveLogWithVideo.Name = "check_saveLogWithVideo";\r
+            this.check_saveLogWithVideo.Size = new System.Drawing.Size(349, 17);\r
+            this.check_saveLogWithVideo.TabIndex = 83;\r
+            this.check_saveLogWithVideo.Text = "Put individual encode logs in the same location as movie";\r
+            this.ToolTip.SetToolTip(this.check_saveLogWithVideo, "Place a copy of the encode log in the same folder as the encoded movie.");\r
+            this.check_saveLogWithVideo.UseVisualStyleBackColor = true;\r
+            this.check_saveLogWithVideo.CheckedChanged += new System.EventHandler(this.check_saveLogWithVideo_CheckedChanged);\r
+            // \r
+            // btn_saveLog\r
+            // \r
+            this.btn_saveLog.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_saveLog.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_saveLog.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_saveLog.Location = new System.Drawing.Point(343, 218);\r
+            this.btn_saveLog.Name = "btn_saveLog";\r
+            this.btn_saveLog.Size = new System.Drawing.Size(68, 22);\r
+            this.btn_saveLog.TabIndex = 82;\r
+            this.btn_saveLog.Text = "Browse";\r
+            this.btn_saveLog.UseVisualStyleBackColor = true;\r
+            this.btn_saveLog.Click += new System.EventHandler(this.btn_saveLog_Click);\r
+            // \r
+            // label14\r
+            // \r
+            this.label14.AutoSize = true;\r
+            this.label14.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label14.Location = new System.Drawing.Point(68, 221);\r
+            this.label14.Name = "label14";\r
+            this.label14.Size = new System.Drawing.Size(61, 13);\r
+            this.label14.TabIndex = 81;\r
+            this.label14.Text = "Log Path:";\r
+            // \r
+            // text_logPath\r
+            // \r
+            this.text_logPath.Location = new System.Drawing.Point(135, 218);\r
+            this.text_logPath.Name = "text_logPath";\r
+            this.text_logPath.Size = new System.Drawing.Size(202, 21);\r
+            this.text_logPath.TabIndex = 80;\r
+            this.ToolTip.SetToolTip(this.text_logPath, "The default location where auto named files are stored.");\r
+            this.text_logPath.TextChanged += new System.EventHandler(this.text_logPath_TextChanged);\r
+            // \r
+            // check_keepLogs\r
+            // \r
+            this.check_keepLogs.AutoSize = true;\r
+            this.check_keepLogs.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_keepLogs.Location = new System.Drawing.Point(71, 135);\r
+            this.check_keepLogs.Name = "check_keepLogs";\r
+            this.check_keepLogs.Size = new System.Drawing.Size(185, 17);\r
+            this.check_keepLogs.TabIndex = 79;\r
+            this.check_keepLogs.Text = "Keep individual encode logs";\r
+            this.ToolTip.SetToolTip(this.check_keepLogs, "Save encode logs to a file after the encode has completed.");\r
+            this.check_keepLogs.UseVisualStyleBackColor = true;\r
+            this.check_keepLogs.CheckedChanged += new System.EventHandler(this.check_keepLogs_CheckedChanged);\r
+            // \r
+            // label9\r
+            // \r
+            this.label9.AutoSize = true;\r
+            this.label9.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label9.Location = new System.Drawing.Point(12, 136);\r
+            this.label9.Name = "label9";\r
+            this.label9.Size = new System.Drawing.Size(41, 13);\r
+            this.label9.TabIndex = 77;\r
+            this.label9.Text = "Logs:";\r
+            // \r
+            // check_cli_minimized\r
+            // \r
+            this.check_cli_minimized.AutoSize = true;\r
+            this.check_cli_minimized.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_cli_minimized.Location = new System.Drawing.Point(71, 18);\r
+            this.check_cli_minimized.Name = "check_cli_minimized";\r
+            this.check_cli_minimized.Size = new System.Drawing.Size(155, 17);\r
+            this.check_cli_minimized.TabIndex = 76;\r
+            this.check_cli_minimized.Text = "Use window minimized";\r
+            this.ToolTip.SetToolTip(this.check_cli_minimized, "Starts a CLI window minimized.");\r
+            this.check_cli_minimized.UseVisualStyleBackColor = true;\r
+            this.check_cli_minimized.CheckedChanged += new System.EventHandler(this.check_cli_minimized_CheckedChanged);\r
+            // \r
+            // label12\r
+            // \r
+            this.label12.AutoSize = true;\r
+            this.label12.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label12.Location = new System.Drawing.Point(21, 19);\r
+            this.label12.Name = "label12";\r
+            this.label12.Size = new System.Drawing.Size(32, 13);\r
+            this.label12.TabIndex = 75;\r
+            this.label12.Text = "CLI:";\r
+            // \r
+            // drp_Priority\r
+            // \r
+            this.drp_Priority.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drp_Priority.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_Priority.FormattingEnabled = true;\r
+            this.drp_Priority.Items.AddRange(new object[] {\r
+            "Realtime",\r
+            "High",\r
+            "Above Normal",\r
+            "Normal",\r
+            "Below Normal",\r
+            "Low"});\r
+            this.drp_Priority.Location = new System.Drawing.Point(177, 72);\r
+            this.drp_Priority.Name = "drp_Priority";\r
+            this.drp_Priority.Size = new System.Drawing.Size(111, 21);\r
+            this.drp_Priority.TabIndex = 43;\r
+            this.ToolTip.SetToolTip(this.drp_Priority, "Set the application priority level for the CLI. \r\nIt\'s best to leave this on Belo" +\r
+                    "w Normal if you wish to use your system whilst encoding with HandBrake.\r\n");\r
+            this.drp_Priority.SelectedIndexChanged += new System.EventHandler(this.drp_Priority_SelectedIndexChanged);\r
+            // \r
+            // Label11\r
+            // \r
+            this.Label11.AutoSize = true;\r
+            this.Label11.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label11.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label11.Location = new System.Drawing.Point(68, 48);\r
+            this.Label11.Name = "Label11";\r
+            this.Label11.Size = new System.Drawing.Size(103, 13);\r
+            this.Label11.TabIndex = 40;\r
+            this.Label11.Text = "Processor cores:";\r
+            // \r
+            // drp_processors\r
+            // \r
+            this.drp_processors.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drp_processors.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_processors.FormattingEnabled = true;\r
+            this.drp_processors.Items.AddRange(new object[] {\r
+            "Automatic",\r
+            "1",\r
+            "2",\r
+            "3",\r
+            "4",\r
+            "5",\r
+            "6",\r
+            "7",\r
+            "8"});\r
+            this.drp_processors.Location = new System.Drawing.Point(177, 45);\r
+            this.drp_processors.Name = "drp_processors";\r
+            this.drp_processors.Size = new System.Drawing.Size(111, 21);\r
+            this.drp_processors.TabIndex = 41;\r
+            this.ToolTip.SetToolTip(this.drp_processors, "The number of processor\'s / processor cores. Unless your having problems, leave o" +\r
+                    "n Automatic.");\r
+            this.drp_processors.SelectedIndexChanged += new System.EventHandler(this.drp_processors_SelectedIndexChanged);\r
+            // \r
+            // Label4\r
+            // \r
+            this.Label4.AutoSize = true;\r
+            this.Label4.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label4.Location = new System.Drawing.Point(68, 75);\r
+            this.Label4.Name = "Label4";\r
+            this.Label4.Size = new System.Drawing.Size(84, 13);\r
+            this.Label4.TabIndex = 42;\r
+            this.Label4.Text = "Priority level:";\r
+            // \r
+            // tab_advanced\r
+            // \r
+            this.tab_advanced.Controls.Add(this.lbl_appcastUnstable);\r
+            this.tab_advanced.Controls.Add(this.check_snapshot);\r
+            this.tab_advanced.Controls.Add(this.btn_drive_detect);\r
+            this.tab_advanced.Controls.Add(this.label6);\r
+            this.tab_advanced.Location = new System.Drawing.Point(4, 22);\r
+            this.tab_advanced.Name = "tab_advanced";\r
+            this.tab_advanced.Padding = new System.Windows.Forms.Padding(3);\r
+            this.tab_advanced.Size = new System.Drawing.Size(482, 259);\r
+            this.tab_advanced.TabIndex = 4;\r
+            this.tab_advanced.Text = "Advanced";\r
+            this.tab_advanced.UseVisualStyleBackColor = true;\r
+            // \r
+            // lbl_appcastUnstable\r
+            // \r
+            this.lbl_appcastUnstable.AutoSize = true;\r
+            this.lbl_appcastUnstable.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_appcastUnstable.Location = new System.Drawing.Point(6, 42);\r
+            this.lbl_appcastUnstable.Name = "lbl_appcastUnstable";\r
+            this.lbl_appcastUnstable.Size = new System.Drawing.Size(64, 13);\r
+            this.lbl_appcastUnstable.TabIndex = 81;\r
+            this.lbl_appcastUnstable.Text = "Updates:";\r
+            // \r
+            // check_snapshot\r
+            // \r
+            this.check_snapshot.AutoSize = true;\r
+            this.check_snapshot.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_snapshot.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_snapshot.Location = new System.Drawing.Point(76, 41);\r
+            this.check_snapshot.Name = "check_snapshot";\r
+            this.check_snapshot.Size = new System.Drawing.Size(273, 17);\r
+            this.check_snapshot.TabIndex = 80;\r
+            this.check_snapshot.Text = "Check for unstable development snapshots";\r
+            this.ToolTip.SetToolTip(this.check_snapshot, "Enables the built in update checker to check for the latest development snapshot " +\r
+                    "builds.\r\nWarning: These are considered unstable builds and are not supported!");\r
+            this.check_snapshot.UseVisualStyleBackColor = false;\r
+            this.check_snapshot.CheckedChanged += new System.EventHandler(this.check_snapshot_CheckedChanged);\r
+            // \r
+            // btn_drive_detect\r
+            // \r
+            this.btn_drive_detect.AutoSize = true;\r
+            this.btn_drive_detect.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_drive_detect.Location = new System.Drawing.Point(76, 18);\r
+            this.btn_drive_detect.Name = "btn_drive_detect";\r
+            this.btn_drive_detect.Size = new System.Drawing.Size(383, 17);\r
+            this.btn_drive_detect.TabIndex = 72;\r
+            this.btn_drive_detect.Text = "Enable Drive Detection in the \"Source\" button dropdown menu";\r
+            this.ToolTip.SetToolTip(this.btn_drive_detect, "Enables the Source button\'s ability to detect DVD\'s.\r\nIf this option is enabled, " +\r
+                    "DVD\'s will be listed in the source menu.");\r
+            this.btn_drive_detect.UseVisualStyleBackColor = true;\r
+            this.btn_drive_detect.CheckedChanged += new System.EventHandler(this.btn_drive_detect_CheckedChanged);\r
+            // \r
+            // label6\r
+            // \r
+            this.label6.AutoSize = true;\r
+            this.label6.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label6.Location = new System.Drawing.Point(35, 19);\r
+            this.label6.Name = "label6";\r
+            this.label6.Size = new System.Drawing.Size(35, 13);\r
+            this.label6.TabIndex = 71;\r
+            this.label6.Text = "GUI:";\r
+            // \r
+            // label8\r
+            // \r
+            this.label8.AutoSize = true;\r
+            this.label8.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label8.Location = new System.Drawing.Point(50, 24);\r
+            this.label8.Name = "label8";\r
+            this.label8.Size = new System.Drawing.Size(131, 13);\r
+            this.label8.TabIndex = 61;\r
+            this.label8.Text = "HandBrake Options";\r
+            // \r
+            // pictureBox2\r
+            // \r
+            this.pictureBox2.Image = global::Handbrake.Properties.Resources.General_Preferences;\r
+            this.pictureBox2.Location = new System.Drawing.Point(12, 12);\r
+            this.pictureBox2.Name = "pictureBox2";\r
+            this.pictureBox2.Size = new System.Drawing.Size(32, 32);\r
+            this.pictureBox2.TabIndex = 60;\r
+            this.pictureBox2.TabStop = false;\r
+            // \r
+            // ToolTip\r
+            // \r
+            this.ToolTip.Active = false;\r
+            this.ToolTip.AutomaticDelay = 1000;\r
+            this.ToolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;\r
+            this.ToolTip.ToolTipTitle = "Tooltip";\r
+            // \r
+            // frmOptions\r
+            // \r
+            this.ClientSize = new System.Drawing.Size(514, 375);\r
+            this.Controls.Add(this.label8);\r
+            this.Controls.Add(this.pictureBox2);\r
+            this.Controls.Add(this.tab_options);\r
+            this.Controls.Add(this.btn_close);\r
+            this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MaximizeBox = false;\r
+            this.MinimizeBox = false;\r
+            this.Name = "frmOptions";\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\r
+            this.Text = "Options";\r
+            this.tab_options.ResumeLayout(false);\r
+            this.tab_general.ResumeLayout(false);\r
+            this.tab_general.PerformLayout();\r
+            this.tab_picture.ResumeLayout(false);\r
+            this.tab_picture.PerformLayout();\r
+            this.tab_cli.ResumeLayout(false);\r
+            this.tab_cli.PerformLayout();\r
+            this.tab_advanced.ResumeLayout(false);\r
+            this.tab_advanced.PerformLayout();\r
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        internal System.Windows.Forms.Button btn_close;\r
+        internal System.Windows.Forms.ComboBox drp_completeOption;\r
+        private System.Windows.Forms.TabControl tab_options;\r
+        private System.Windows.Forms.Label label2;\r
+        private System.Windows.Forms.TabPage tab_cli;\r
+        private System.Windows.Forms.Label label8;\r
+        private System.Windows.Forms.PictureBox pictureBox2;\r
+        private System.Windows.Forms.TabPage tab_general;\r
+        private System.Windows.Forms.FolderBrowserDialog pathFinder;\r
+        internal System.Windows.Forms.ComboBox drp_Priority;\r
+        internal System.Windows.Forms.Label Label11;\r
+        internal System.Windows.Forms.Label Label4;\r
+        internal System.Windows.Forms.ComboBox drp_processors;\r
+        internal System.Windows.Forms.CheckBox check_tooltip;\r
+        internal System.Windows.Forms.CheckBox check_updateCheck;\r
+        internal System.Windows.Forms.CheckBox check_userDefaultSettings;\r
+        private System.Windows.Forms.Label label1;\r
+        private System.Windows.Forms.TabPage tab_advanced;\r
+        internal System.Windows.Forms.CheckBox btn_drive_detect;\r
+        private System.Windows.Forms.Label label6;\r
+        private System.Windows.Forms.Label label13;\r
+        internal System.Windows.Forms.Button btn_browse;\r
+        internal System.Windows.Forms.Label label10;\r
+        private System.Windows.Forms.TextBox text_an_path;\r
+        internal System.Windows.Forms.CheckBox check_autoNaming;\r
+        internal System.Windows.Forms.CheckBox check_cli_minimized;\r
+        private System.Windows.Forms.Label label12;\r
+        internal System.Windows.Forms.ToolTip ToolTip;\r
+        private System.Windows.Forms.Label lbl_appcastUnstable;\r
+        internal System.Windows.Forms.CheckBox check_snapshot;\r
+        private System.Windows.Forms.TabPage tab_picture;\r
+        private System.Windows.Forms.TextBox txt_decomb;\r
+        private System.Windows.Forms.Label label3;\r
+        internal System.Windows.Forms.Label label5;\r
+        private System.Windows.Forms.TextBox txt_autoNameFormat;\r
+        private System.Windows.Forms.Label label7;\r
+        private System.Windows.Forms.Label label9;\r
+        internal System.Windows.Forms.Label label15;\r
+        internal System.Windows.Forms.Button btn_saveLog;\r
+        internal System.Windows.Forms.Label label14;\r
+        private System.Windows.Forms.TextBox text_logPath;\r
+        internal System.Windows.Forms.CheckBox check_keepLogs;\r
+        internal System.Windows.Forms.CheckBox check_saveLogWithVideo;\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs
new file mode 100644 (file)
index 0000000..4e6d698
--- /dev/null
@@ -0,0 +1,244 @@
+/*  frmOptions.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+\r
+namespace Handbrake\r
+{\r
+    public partial class frmOptions : Form\r
+    {\r
+        private frmMain mainWindow;\r
+        /// <summary>\r
+        /// When the form loads, Initialise all the setting components with their correct values\r
+        /// </summary>\r
+        public frmOptions(frmMain window)\r
+        {\r
+            InitializeComponent();\r
+            mainWindow = window;\r
+\r
+            // #############################\r
+            // General\r
+            // #############################\r
+\r
+            // Enable Tooltips.\r
+            if (Properties.Settings.Default.tooltipEnable == "Checked")\r
+            {\r
+                check_tooltip.CheckState = CheckState.Checked;\r
+                ToolTip.Active = true;\r
+            }\r
+\r
+            // Setup Widgets to match settings.\r
+            if (Properties.Settings.Default.updateStatus == "Checked")\r
+                check_updateCheck.CheckState = CheckState.Checked;\r
+\r
+            // enable loading of default user settings.\r
+            if (Properties.Settings.Default.defaultSettings == "Checked")\r
+                check_userDefaultSettings.CheckState = CheckState.Checked;\r
+\r
+            // On Encode Completeion Action\r
+            drp_completeOption.Text = Properties.Settings.Default.CompletionOption;\r
+            \r
+            // Enable auto naming feature.\r
+            if (Properties.Settings.Default.autoNaming == "Checked")\r
+                check_autoNaming.CheckState = CheckState.Checked;\r
+\r
+            // Store the auto name path\r
+            text_an_path.Text = Properties.Settings.Default.autoNamePath;\r
+            if (text_an_path.Text == string.Empty)\r
+                text_an_path.Text = "Click 'Browse' to set the default location";\r
+\r
+            // Store auto name format\r
+            txt_autoNameFormat.Text = Properties.Settings.Default.autoNameFormat;\r
+\r
+            // #############################\r
+            // Picture Tab\r
+            // #############################\r
+\r
+            // Store decomb value string\r
+            txt_decomb.Text = Properties.Settings.Default.decomb;\r
+\r
+            // #############################\r
+            // CLI\r
+            // #############################\r
+\r
+            // Enable Start CLI minimized\r
+            if (Properties.Settings.Default.cli_minimized == "Checked")\r
+                check_cli_minimized.CheckState = CheckState.Checked;\r
+\r
+            // Number of processor cores\r
+            drp_processors.Text = Properties.Settings.Default.Processors;\r
+\r
+            // Priority level for encodes\r
+            drp_Priority.Text = Properties.Settings.Default.processPriority;\r
+\r
+            // Save individual log files\r
+            if (Properties.Settings.Default.saveLog == "Checked")\r
+                check_keepLogs.CheckState = CheckState.Checked;\r
+\r
+            // Save logs in the same directory as encoded files\r
+            if (Properties.Settings.Default.saveLogWithVideo == "Checked")\r
+                check_saveLogWithVideo.CheckState = CheckState.Checked;\r
+\r
+            // The saved log path\r
+            text_logPath.Text = Properties.Settings.Default.saveLogPath;\r
+\r
+\r
+            // #############################\r
+            // Advanced\r
+            // #############################\r
+\r
+            // Unstable Snapshot checking should only be visible for stable builds.\r
+            if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))\r
+            {\r
+                lbl_appcastUnstable.Visible = false;\r
+                check_snapshot.Visible = false;\r
+            }\r
+\r
+            // Enable snapshot updating\r
+            if (Properties.Settings.Default.checkSnapshot == "Checked")\r
+                check_snapshot.CheckState = CheckState.Checked;\r
+\r
+            // Enable GUI DVD Drive detection code\r
+            if (Properties.Settings.Default.drive_detection == "Checked")\r
+                btn_drive_detect.CheckState = CheckState.Checked;\r
+\r
+        }\r
+\r
+        #region General\r
+        private void check_updateCheck_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.updateStatus = check_updateCheck.CheckState.ToString();\r
+        }\r
+\r
+        private void check_userDefaultSettings_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.defaultSettings = check_userDefaultSettings.CheckState.ToString();\r
+        }\r
+\r
+        private void check_tooltip_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.tooltipEnable = check_tooltip.CheckState.ToString();\r
+            if (check_tooltip.Checked)\r
+            {\r
+                ToolTip.Active = true;\r
+                mainWindow.ToolTip.Active = true;\r
+            }\r
+            else\r
+            {\r
+                ToolTip.Active = false;\r
+                mainWindow.ToolTip.Active = false;\r
+            }\r
+        }\r
+        private void drp_completeOption_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.CompletionOption = drp_completeOption.Text;\r
+        }\r
+\r
+        private void check_autoNaming_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.autoNaming = check_autoNaming.CheckState.ToString();\r
+        }\r
+\r
+        private void txt_autoNameFormat_TextChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.autoNameFormat = txt_autoNameFormat.Text;\r
+        }\r
+\r
+        private void btn_browse_Click(object sender, EventArgs e)\r
+        {\r
+            pathFinder.ShowDialog();\r
+            text_an_path.Text = pathFinder.SelectedPath;\r
+        }\r
+\r
+        private void text_an_path_TextChanged(object sender, EventArgs e)\r
+        {\r
+            if (text_an_path.Text == string.Empty)\r
+            {\r
+                Properties.Settings.Default.autoNamePath = "";\r
+                text_an_path.Text = "Click 'Browse' to set the default location";\r
+            }\r
+            else\r
+                Properties.Settings.Default.autoNamePath = text_an_path.Text;\r
+        }\r
+        #endregion\r
+\r
+        #region Picture\r
+        private void txt_decomb_TextChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.decomb = txt_decomb.Text;\r
+        }\r
+        #endregion\r
+\r
+        #region CLI\r
+        private void check_cli_minimized_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.cli_minimized = check_cli_minimized.CheckState.ToString();\r
+        }\r
+\r
+        private void drp_processors_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.Processors = drp_processors.Text;\r
+        }\r
+\r
+        private void drp_Priority_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.processPriority = drp_Priority.Text;\r
+        }\r
+\r
+        private void check_keepLogs_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.saveLog = check_keepLogs.CheckState.ToString();\r
+        }\r
+\r
+        private void check_saveLogWithVideo_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.saveLogWithVideo = check_saveLogWithVideo.CheckState.ToString();\r
+            if (check_saveLogWithVideo.Checked == true)\r
+                text_logPath.Text = "";\r
+        }\r
+\r
+        private void btn_saveLog_Click(object sender, EventArgs e)\r
+        {\r
+            pathFinder.SelectedPath = String.Empty;\r
+            pathFinder.ShowDialog();\r
+            if (pathFinder.SelectedPath != string.Empty)\r
+                text_logPath.Text = pathFinder.SelectedPath;\r
+        }\r
+\r
+        private void text_logPath_TextChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.saveLogPath = text_logPath.Text;\r
+            if (text_logPath.Text != String.Empty)\r
+                check_saveLogWithVideo.Checked = false;\r
+        }\r
+\r
+        #endregion\r
+\r
+        #region Advanced\r
+        private void btn_drive_detect_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.drive_detection = btn_drive_detect.CheckState.ToString();\r
+        }\r
+\r
+        private void check_snapshot_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.checkSnapshot = check_snapshot.CheckState.ToString();\r
+        }\r
+        #endregion\r
+\r
+        private void btn_close_Click(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.Save(); // Small hack for Vista. Seems to work fine on XP without this\r
+            this.Close();\r
+        }\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmOptions.resx b/win/C#/frmOptions.resx
new file mode 100644 (file)
index 0000000..74bf186
--- /dev/null
@@ -0,0 +1,506 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>132, 18</value>\r
+  </metadata>\r
+  <metadata name="pathFinder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>17, 17</value>\r
+  </metadata>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
+        IACoJQAAHh0AACAgAAABACAAqBAAAMZCAAAQEAAAAQAgAGgEAABuUwAAKAAAADAAAABgAAAAAQAIAAAA\r
+        AACACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAD///8A/wAAAAD/AAAAAIAAgICAAICAAAAAgAAAAICAAIAA\r
+        AACAAIAAgP//ACAgIADg4OAAIAAAAAAgAABg4CAAQOBAAGBgYAAgYAAAQKDgAAAAIABAwCAAIEAAAECg\r
+        AABg4AAAIGCAAECAoABgoMAAYECgAGDAAABgICAAoKCgAOAAAAAgIAAAAGAAAEDgAABgAAAAIAAgAEAg\r
+        IAAgQGAAIIDAAADg4ABgAGAAgOD/ACCA/wCgAAAAQGAAACCAAAAAoAAAYCAAAAAgIAAgIEAAYGBAAEBg\r
+        YAAAIIAAAGCAAGCAgABAAKAAAICgAACgoACAoKAAIKDAAECgwAAAAOAAQADgAADA4ABgwOAAIODgAADg\r
+        AADA4AAAAEAgAKDgIAAA4EAAYABAAABAYACAAGAAgCBgAGAggABA4KAAAECgAGBAwADgIOAAIEDgAACA\r
+        4ADgoOAAYAD/ACBg/wAAoP8A4KD/AGD//wAICAgACAAAAAgIAAAAAJgACAAIAAAACAAACAAACBAQACA4\r
+        SAAgYIgAOHCIADhw+AAIGAAAEBAIACg4QAAwYHgAAACIACA4QAAoQFAAKFh4AHh4eAAwaIAAIGiQADh4\r
+        mAAACAgAEAgIABAYGAAgGBgASEhIABhIYAAoUGAAIFBoAChQaAAoWGgAMFhoAChoiAAweJgAKHioACiA\r
+        sAAIEAAACAgQAAgQGAAQGCAAGCAoABhAUAAoSFgAaGhoABhQcAAgWHAAKFhwADhgcAAYWIAAOGiAAIiI\r
+        iAAoaJAAKHCYACh4oAA4gKAAMICoAKioqAAwmNAAEDgAAChYAAAweAAAMIgQAAgYGAAYGBgACBggABAg\r
+        KAAgKCgAKCgoACAwOAA4ODgAKDhIADBQWABYWFgAGEhoADBYcAAYUHgAGFh4ACBYeAAoYHgAKGCAABhY\r
+        iAAgaJgAKICoACiIuAC4uLgAMJDIADiw6AAQCAAAABgAAAggAAAAOAAAMGgAABgQCAAwgAgAEAgQABgQ\r
+        EAAwmBgAGBggAAgYKAAAICgACCAoABgoMAAgKDAAGDBAABg4QAAYOFAAEEBYACBIWAAwSFgAOEhYACBI\r
+        YAAQSGgAOFhoABhIcAAoUHAAQFhwACBgeABAaIAAIGiIADBwiABAcIgAGGCQADhwkABYeJAACBCgAChw\r
+        oAAweKAAKIC4ACiQwAAwmMgAOKjgADBg6ABAsOgAELD4AAgoAAAIMAAAGDAAABhIAAAYUAAAKHgAAACY\r
+        AAAwmAAAAMgAABAACAAIEAgAEBgIABA4CAAYOAgAMHgIABAYEAAYGBAAIBgQACh4EAAwmBAAEBAYABgg\r
+        GAAoIBgAGCAgAAgIKAAgICgAGAgwAAggMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAn2KfdXV1XAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoo2+QIJCJb28Sd3em\r
+        nQAAAFuKqW0aqsd6Y5/DXAAAAAAAAAAAAAAAAAAAAAAAAAB3kAWQkG8SpqaJb28gsncAbIeSroyii21x\r
+        kczIwwAAAAAAAAAAAAAAAAAAAAAAAABoo4mJkLKylm9vb5BvdwwAcZO/fox7z2NjqsOss2MAWwAAAAAA\r
+        AAAAAAAAAAAAAAAAvaGmo5ANlgUFEiBvo1xjq3p6qMTJroBkxXt9cGzFnAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAL2ylgV3vQAAAGOvxMXXq41uh6yVjxqp1YhknwAAAAAAAAAAAAAAAAAAAAAAAAAAAABvsolbAAAA\r
+        +5KneouS2Kx4pZF9ndywsXuvkocAAAAAAAAAAAAAAAAAAAAAAAAAAAB3sncAAAAAdayHca95bH9+cKmv\r
+        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\r
+        eAAoaIgAMICoAChggAAACAgAEAgIABgYGAAoUGgAKFhwAChwkAAIGAgACBAQABAgKAAQKDgAIEhgACBQ\r
+        aAAAAHgAIFh4AChgeAAAeHgAeHh4AChogAAwaIAAIGCIADBoiAA4cIgAIGiQADhwkAAoeKgAKICwAAgQ\r
+        AAAIIAAACAAIABhICAAICBAAMIgQABAYGAAYICgAGCgwAEhISAAwSFgAGFBoAChYaAAICHgAOGiAACh4\r
+        oAAweKAAGAAAAAAIAAAAGAAACBgAABAoAAAYUAAAKGAAAChoAAAAeAAAAAAIAAgQCAAQEAgAGP8IACAY\r
+        EAAIEBgAMJAYABggIAAAACgACBAoACgwMAAAKDgAEDA4ADg4OAAoOEAAGDhIACA4SAAAQEgAMEBIAEhQ\r
+        UAAISFgAIEhYAChIWAAwUFgAIEhoAEhYaAAYUHAAMFhwABhYeAAoWHgAIFiAAEhwgACIiIgAGGCQAAAA\r
+        mAAgcJgAKHCYADB4mACYmJgAACjIAEBw+ACo//8ASAAAAFgAAABoAAAAeAAAABAIAABICAAAGCgAAAA4\r
+        AAAYOAAACEAAAAhIAAAoUAAAAFgAACBYAAAAaAAAIGgAADB4AAAAiAAAMIgAAGiIAACAmAAAGAAIADAI\r
+        CABgCAgAEBgIAAggCAAQIAgAECgIAAgwCAAQMAgAODAIABA4CAAYOAgAEEAIABhACAAgQAgAIFAIAChg\r
+        CAAwgAgAMJAIADCoCAAACBAAGBAQABggEAAoIBAAKGAQAChoEAAgeBAAKHgQAEh4EAAY+BAACAAYAAAI\r
+        GAAICBgAEAgYAAAQGAAQEBgAABgYAAgYGAAYMBgAKHgYADCYGAAwoBgAMKgYAGj/GABgCCAACBAgAAgY\r
+        IAAQGCAAGBggACggIABIcCAACAAoABAAKAAAECgAEBAoAAggKAAACDAASAgwAAgQMAAIKDAAECgwAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAARxBSUlJHAAAAAABYWFlY8kYAAAAAAAAAAAAAAAAAAJFgqqRLSzAwBXMAkKJbW1pdSVmE\r
+        AAAAAAAAAAAAAAAAEJdLqhpgYKQFkf9NmVRanHVJVZRQAAAAAAAAAAAAAAAAUY6RO6qXMHNYW5MxdFpm\r
+        TVtPSpAAAAAAAAAAAAAAAAAAAAAFpIYAAFSeW09PU15KU05MaEkAAAAAAAAAAAAAAAAAAEtgAAAAk55j\r
+        ml5Mp2haXUqpW3IAAAAAAAAAAAAAAAAAS0sAAEpJoE5PpZpMZVWnMZyZVQAAAAAAAAAAAAAAAABLMAAA\r
+        cqCeSnppZGZKWzFNaV2ecAAAAAAAAAAAAAAAAEtLAACLVF6iZHROp2eiW1paeWnxAAAAAAAAAAAAAABI\r
+        GmAAAElJSmh6SWNVSk5hZqJ1VXUAAAAAAAAAAAAAlpmjeJAAk12eZXZ5p3WndnZpaUlbZgAAAAAAAAAA\r
+        m2lFRTw8PDZeWV1OlE0xeWlNeVVdZmmZUAAAAAAAjzYKRaysRUVFRa02SXSnYaFNTUxpTFSoTmKTAAAA\r
+        AI8KOkSrrKysrKxErDullF6fVWhiVakLaVWbVZoAAAAAqK2sRKZEqyCsRKummKBZT0xPTHppZVMLqVN4\r
+        cQAAAAA6O6sYGKYYGKsYphgELjejY09KTTZNaWdMNpkAAAAA+zc6XFxcd3d3XASmXEw6PZZiZ6g2ZUw2\r
+        T2QLnwAAAAAdoTtcLcV3pndfLi2jraMtcmNkT05np0xnaXhUAAAAAAD5NKL87xgYd1+eLZ06+1wAVE6o\r
+        p2cKZ2WjjgAAAAAAAAAQo67EcuZuj5jkACue9gAAkTEKeJfbioptRgAAAAAAAACIr0dLVwBXmEeL5Qg4\r
+        AAAAAOnqwNbVb9O5AAAAAAAAAP38RmDae3tfkDqIX0UAAABq3W9v6+2BtssAAAAAAAD9q6v7AFl1dV9f\r
+        mpgIXwAAAABrtG9v7O2BagAAAACSF52fL/AAAAAAAHUAAAAAAAAAAACC1NS+3s/ZzAAAAJ03MjqjdJ0A\r
+        AAC3FIMUtwAAAAAAzr27goK5awAAAAAAWaNgGho3dAAAyr+/v4ODtQAAAMmAAM+2zxMTawAAAAAAAK6z\r
+        kZ1xAAC1un3HVwAAAAAAAAAAawB/ftAAAAAAAABCNUIAAAAAAAAAAF8AAAAAAAAAAEcAAGpGAAAAAAAA\r
+        AEKsEQAAAAAAAAAAlZUAAAAAAAAAAAAAAEgAAAAAAAAAAC3hAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAA\r
+        AAD///////////4BwH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAA\r
+        AAHgAAAB4AAAAeAAAAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9\r
+        /s/j/P/v8///7ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AFEl\r
+        swBJDW0ABEMwAAJHSQAFDwIAXl9ZAHJtagBwfYQAQVNqAAFtAAAAZgAAAz0CABQ/AQAXQwAAGkAAAA8g\r
+        AQAhSJQAM1SRABw6fgAFVk0ADE48AAplaQAgWgIAMYcMACl7CwAOJwMAAAMtABwPNwAhIQAABxACAA9S\r
+        UAAnQUgAAISfACRoDAAxmwQAK4MHABMpAAA8P1kATBMbACQSVwAKL1EADS5CADFMVQABIF4AJ3CGADB2\r
+        kAAzdlEAMnY1ABMnEwBARooAVVq5ABgATwAWBn0ABh56AAULaQBOeKYAT3WSACpNZwAucpgAMHifADFx\r
+        nwA1b5YAMF93AEBalgBvjecADCLAAAkPpQAbJr4AFiLGAAAJjgAzbIEANGh8AClhgAAzfKEAMHWWADJz\r
+        kwAsW3MAQ4mvADyY9AAtgf8AIpr/ACuk/wBdk9UAG0tkACladQAqbI4AK3GUAC5vjwArbpEALWJ7ACdl\r
+        aAAOaoQAJJ20ABx0gQAeTF8AJ116ACViggAgZosAJmeJAChvlAAhZIgAH1ZyAHVmYwAaPVMAJ19+ACto\r
+        hgAmaIwAKGB9ACFdfAAgY4YAGU5qAFtgYQAYQVgAIVx7ACtrjgAtZYIAJmKAACNhgQAmX3wAIUpdAHp6\r
+        ewARN0wAH1R0ACdXcgApXnoAJ2B+ACligQAdSmAAKiopAGZlZQCRkZEAbm9vAFFSUwAWO08AJFRuACFP\r
+        agAhUm0AHD9RAAMKDgA3NjUAWlpaADk5OQA3NzcAPDk3AAYSGQAVNUgAFjFAAA8jLwABAgQAVQAAAP//\r
+        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\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/win/C#/frmQueue.Designer.cs b/win/C#/frmQueue.Designer.cs
new file mode 100644 (file)
index 0000000..b3bf743
--- /dev/null
@@ -0,0 +1,465 @@
+/*  frmQueue.Designer.cs \r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace Handbrake\r
+{\r
+    partial class frmQueue\r
+    {\r
+        /// <summary>\r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows Form Designer generated code\r
+\r
+        /// <summary>\r
+        /// Required method for Designer support - do not modify\r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            this.components = new System.ComponentModel.Container();\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmQueue));\r
+            this.btn_down = new System.Windows.Forms.Button();\r
+            this.btn_up = new System.Windows.Forms.Button();\r
+            this.btn_delete = new System.Windows.Forms.Button();\r
+            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);\r
+            this.label4 = new System.Windows.Forms.Label();\r
+            this.lbl_chapt = new System.Windows.Forms.Label();\r
+            this.lbl_title = new System.Windows.Forms.Label();\r
+            this.lbl_aEnc = new System.Windows.Forms.Label();\r
+            this.lbl_vEnc = new System.Windows.Forms.Label();\r
+            this.lbl_dest = new System.Windows.Forms.Label();\r
+            this.lbl_source = new System.Windows.Forms.Label();\r
+            this.label1 = new System.Windows.Forms.Label();\r
+            this.label3 = new System.Windows.Forms.Label();\r
+            this.toolStrip1 = new System.Windows.Forms.ToolStrip();\r
+            this.btn_encode = new System.Windows.Forms.ToolStripButton();\r
+            this.btn_stop = new System.Windows.Forms.ToolStripButton();\r
+            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.drop_button_queue = new System.Windows.Forms.ToolStripDropDownButton();\r
+            this.mnu_batch = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_import = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.mnu_export = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.SaveFile = new System.Windows.Forms.SaveFileDialog();\r
+            this.list_queue = new System.Windows.Forms.ListView();\r
+            this.Title = new System.Windows.Forms.ColumnHeader();\r
+            this.Chapters = new System.Windows.Forms.ColumnHeader();\r
+            this.Source = new System.Windows.Forms.ColumnHeader();\r
+            this.Destination = new System.Windows.Forms.ColumnHeader();\r
+            this.EncoderVideo = new System.Windows.Forms.ColumnHeader();\r
+            this.Audio = new System.Windows.Forms.ColumnHeader();\r
+            this.statusStrip1 = new System.Windows.Forms.StatusStrip();\r
+            this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();\r
+            this.progressBar = new System.Windows.Forms.ToolStripProgressBar();\r
+            this.lbl_progressValue = new System.Windows.Forms.ToolStripStatusLabel();\r
+            this.OpenFile = new System.Windows.Forms.OpenFileDialog();\r
+            this.lbl_encodesPending = new System.Windows.Forms.ToolStripStatusLabel();\r
+            this.toolStrip1.SuspendLayout();\r
+            this.statusStrip1.SuspendLayout();\r
+            this.SuspendLayout();\r
+            // \r
+            // btn_down\r
+            // \r
+            this.btn_down.BackColor = System.Drawing.SystemColors.ControlLight;\r
+            this.btn_down.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_down.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_down.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_down.Location = new System.Drawing.Point(613, 110);\r
+            this.btn_down.Name = "btn_down";\r
+            this.btn_down.Size = new System.Drawing.Size(75, 22);\r
+            this.btn_down.TabIndex = 33;\r
+            this.btn_down.TabStop = false;\r
+            this.btn_down.Text = "Down";\r
+            this.toolTip1.SetToolTip(this.btn_down, "Move the selected item down 1 place in the queue");\r
+            this.btn_down.UseVisualStyleBackColor = true;\r
+            this.btn_down.Click += new System.EventHandler(this.btn_down_Click);\r
+            // \r
+            // btn_up\r
+            // \r
+            this.btn_up.BackColor = System.Drawing.SystemColors.ControlLight;\r
+            this.btn_up.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_up.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_up.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_up.Location = new System.Drawing.Point(543, 110);\r
+            this.btn_up.Name = "btn_up";\r
+            this.btn_up.Size = new System.Drawing.Size(64, 22);\r
+            this.btn_up.TabIndex = 32;\r
+            this.btn_up.TabStop = false;\r
+            this.btn_up.Text = "Up";\r
+            this.toolTip1.SetToolTip(this.btn_up, "Move the selected item up 1 place in the queue.");\r
+            this.btn_up.UseVisualStyleBackColor = true;\r
+            this.btn_up.Click += new System.EventHandler(this.btn_up_Click);\r
+            // \r
+            // btn_delete\r
+            // \r
+            this.btn_delete.BackColor = System.Drawing.SystemColors.ControlLight;\r
+            this.btn_delete.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_delete.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_delete.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_delete.Location = new System.Drawing.Point(695, 110);\r
+            this.btn_delete.Name = "btn_delete";\r
+            this.btn_delete.Size = new System.Drawing.Size(75, 22);\r
+            this.btn_delete.TabIndex = 31;\r
+            this.btn_delete.TabStop = false;\r
+            this.btn_delete.Text = "Delete";\r
+            this.toolTip1.SetToolTip(this.btn_delete, "Remove the selected item from the queue");\r
+            this.btn_delete.UseVisualStyleBackColor = true;\r
+            this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click);\r
+            // \r
+            // label4\r
+            // \r
+            this.label4.AutoSize = true;\r
+            this.label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label4.Location = new System.Drawing.Point(225, 98);\r
+            this.label4.Name = "label4";\r
+            this.label4.Size = new System.Drawing.Size(47, 26);\r
+            this.label4.TabIndex = 70;\r
+            this.label4.Text = "Video:\r\nAudo:";\r
+            // \r
+            // lbl_chapt\r
+            // \r
+            this.lbl_chapt.AutoSize = true;\r
+            this.lbl_chapt.Location = new System.Drawing.Point(158, 110);\r
+            this.lbl_chapt.Name = "lbl_chapt";\r
+            this.lbl_chapt.Size = new System.Drawing.Size(12, 13);\r
+            this.lbl_chapt.TabIndex = 69;\r
+            this.lbl_chapt.Text = "-";\r
+            // \r
+            // lbl_title\r
+            // \r
+            this.lbl_title.AccessibleRole = System.Windows.Forms.AccessibleRole.None;\r
+            this.lbl_title.AutoSize = true;\r
+            this.lbl_title.Location = new System.Drawing.Point(158, 97);\r
+            this.lbl_title.Name = "lbl_title";\r
+            this.lbl_title.Size = new System.Drawing.Size(12, 13);\r
+            this.lbl_title.TabIndex = 68;\r
+            this.lbl_title.Text = "-";\r
+            // \r
+            // lbl_aEnc\r
+            // \r
+            this.lbl_aEnc.AutoSize = true;\r
+            this.lbl_aEnc.Location = new System.Drawing.Point(286, 111);\r
+            this.lbl_aEnc.Name = "lbl_aEnc";\r
+            this.lbl_aEnc.Size = new System.Drawing.Size(12, 13);\r
+            this.lbl_aEnc.TabIndex = 67;\r
+            this.lbl_aEnc.Text = "-";\r
+            // \r
+            // lbl_vEnc\r
+            // \r
+            this.lbl_vEnc.AutoSize = true;\r
+            this.lbl_vEnc.Location = new System.Drawing.Point(286, 98);\r
+            this.lbl_vEnc.Name = "lbl_vEnc";\r
+            this.lbl_vEnc.Size = new System.Drawing.Size(12, 13);\r
+            this.lbl_vEnc.TabIndex = 66;\r
+            this.lbl_vEnc.Text = "-";\r
+            // \r
+            // lbl_dest\r
+            // \r
+            this.lbl_dest.AutoSize = true;\r
+            this.lbl_dest.Location = new System.Drawing.Point(158, 85);\r
+            this.lbl_dest.Name = "lbl_dest";\r
+            this.lbl_dest.Size = new System.Drawing.Size(12, 13);\r
+            this.lbl_dest.TabIndex = 65;\r
+            this.lbl_dest.Text = "-";\r
+            this.lbl_dest.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\r
+            // \r
+            // lbl_source\r
+            // \r
+            this.lbl_source.AutoSize = true;\r
+            this.lbl_source.Location = new System.Drawing.Point(158, 72);\r
+            this.lbl_source.Name = "lbl_source";\r
+            this.lbl_source.Size = new System.Drawing.Size(12, 13);\r
+            this.lbl_source.TabIndex = 64;\r
+            this.lbl_source.Text = "-";\r
+            // \r
+            // label1\r
+            // \r
+            this.label1.AutoSize = true;\r
+            this.label1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label1.Location = new System.Drawing.Point(12, 72);\r
+            this.label1.Name = "label1";\r
+            this.label1.Size = new System.Drawing.Size(99, 52);\r
+            this.label1.TabIndex = 63;\r
+            this.label1.Text = "Source:\r\nDestination:\r\nDVD Title:\r\nDVD Chapters:";\r
+            // \r
+            // label3\r
+            // \r
+            this.label3.AutoSize = true;\r
+            this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label3.Location = new System.Drawing.Point(12, 50);\r
+            this.label3.Name = "label3";\r
+            this.label3.Size = new System.Drawing.Size(82, 13);\r
+            this.label3.TabIndex = 62;\r
+            this.label3.Text = "Current Job";\r
+            // \r
+            // toolStrip1\r
+            // \r
+            this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;\r
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.btn_encode,\r
+            this.btn_stop,\r
+            this.toolStripSeparator1,\r
+            this.drop_button_queue});\r
+            this.toolStrip1.Location = new System.Drawing.Point(0, 0);\r
+            this.toolStrip1.Name = "toolStrip1";\r
+            this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;\r
+            this.toolStrip1.Size = new System.Drawing.Size(779, 39);\r
+            this.toolStrip1.TabIndex = 71;\r
+            this.toolStrip1.Text = "toolStrip1";\r
+            // \r
+            // btn_encode\r
+            // \r
+            this.btn_encode.Image = global::Handbrake.Properties.Resources.Play;\r
+            this.btn_encode.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.btn_encode.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_encode.Name = "btn_encode";\r
+            this.btn_encode.Size = new System.Drawing.Size(84, 36);\r
+            this.btn_encode.Text = "Encode";\r
+            this.btn_encode.Click += new System.EventHandler(this.btn_encode_Click);\r
+            // \r
+            // btn_stop\r
+            // \r
+            this.btn_stop.Image = global::Handbrake.Properties.Resources.Pause;\r
+            this.btn_stop.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.btn_stop.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_stop.Name = "btn_stop";\r
+            this.btn_stop.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;\r
+            this.btn_stop.Size = new System.Drawing.Size(75, 36);\r
+            this.btn_stop.Text = "Pause";\r
+            this.btn_stop.Visible = false;\r
+            this.btn_stop.Click += new System.EventHandler(this.btn_stop_Click);\r
+            // \r
+            // toolStripSeparator1\r
+            // \r
+            this.toolStripSeparator1.Name = "toolStripSeparator1";\r
+            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 39);\r
+            // \r
+            // drop_button_queue\r
+            // \r
+            this.drop_button_queue.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.mnu_batch,\r
+            this.mnu_import,\r
+            this.mnu_export});\r
+            this.drop_button_queue.Image = global::Handbrake.Properties.Resources.ActivityWindow;\r
+            this.drop_button_queue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.drop_button_queue.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.drop_button_queue.Name = "drop_button_queue";\r
+            this.drop_button_queue.Size = new System.Drawing.Size(89, 36);\r
+            this.drop_button_queue.Text = "Queue";\r
+            // \r
+            // mnu_batch\r
+            // \r
+            this.mnu_batch.Image = global::Handbrake.Properties.Resources.Output_Small;\r
+            this.mnu_batch.Name = "mnu_batch";\r
+            this.mnu_batch.Size = new System.Drawing.Size(207, 22);\r
+            this.mnu_batch.Text = "Generate Batch Script";\r
+            this.mnu_batch.Click += new System.EventHandler(this.mnu_batch_Click);\r
+            // \r
+            // mnu_import\r
+            // \r
+            this.mnu_import.Image = global::Handbrake.Properties.Resources.folder;\r
+            this.mnu_import.Name = "mnu_import";\r
+            this.mnu_import.Size = new System.Drawing.Size(207, 22);\r
+            this.mnu_import.Text = "Import Queue";\r
+            this.mnu_import.Click += new System.EventHandler(this.mnu_import_Click);\r
+            // \r
+            // mnu_export\r
+            // \r
+            this.mnu_export.Image = global::Handbrake.Properties.Resources.save;\r
+            this.mnu_export.Name = "mnu_export";\r
+            this.mnu_export.Size = new System.Drawing.Size(207, 22);\r
+            this.mnu_export.Text = "Export Queue";\r
+            this.mnu_export.Click += new System.EventHandler(this.mnu_export_Click);\r
+            // \r
+            // SaveFile\r
+            // \r
+            this.SaveFile.Filter = "Batch|.bat";\r
+            // \r
+            // list_queue\r
+            // \r
+            this.list_queue.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {\r
+            this.Title,\r
+            this.Chapters,\r
+            this.Source,\r
+            this.Destination,\r
+            this.EncoderVideo,\r
+            this.Audio});\r
+            this.list_queue.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.list_queue.FullRowSelect = true;\r
+            this.list_queue.GridLines = true;\r
+            this.list_queue.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;\r
+            this.list_queue.Location = new System.Drawing.Point(15, 138);\r
+            this.list_queue.MultiSelect = false;\r
+            this.list_queue.Name = "list_queue";\r
+            this.list_queue.Size = new System.Drawing.Size(755, 202);\r
+            this.list_queue.TabIndex = 72;\r
+            this.list_queue.UseCompatibleStateImageBehavior = false;\r
+            this.list_queue.View = System.Windows.Forms.View.Details;\r
+            this.list_queue.KeyUp += new System.Windows.Forms.KeyEventHandler(this.list_queue_deleteKey);\r
+            // \r
+            // Title\r
+            // \r
+            this.Title.Text = "Title";\r
+            this.Title.Width = 39;\r
+            // \r
+            // Chapters\r
+            // \r
+            this.Chapters.Text = "Chapters";\r
+            this.Chapters.Width = 71;\r
+            // \r
+            // Source\r
+            // \r
+            this.Source.Text = "Source";\r
+            this.Source.Width = 219;\r
+            // \r
+            // Destination\r
+            // \r
+            this.Destination.Text = "Destination";\r
+            this.Destination.Width = 215;\r
+            // \r
+            // EncoderVideo\r
+            // \r
+            this.EncoderVideo.Text = "Video Encoder";\r
+            this.EncoderVideo.Width = 110;\r
+            // \r
+            // Audio\r
+            // \r
+            this.Audio.Text = "Audio Encoder";\r
+            this.Audio.Width = 94;\r
+            // \r
+            // statusStrip1\r
+            // \r
+            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.lbl_encodesPending,\r
+            this.toolStripStatusLabel1,\r
+            this.progressBar,\r
+            this.lbl_progressValue});\r
+            this.statusStrip1.Location = new System.Drawing.Point(0, 359);\r
+            this.statusStrip1.Name = "statusStrip1";\r
+            this.statusStrip1.Size = new System.Drawing.Size(779, 31);\r
+            this.statusStrip1.TabIndex = 73;\r
+            this.statusStrip1.Text = "statusStrip1";\r
+            // \r
+            // toolStripStatusLabel1\r
+            // \r
+            this.toolStripStatusLabel1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;\r
+            this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";\r
+            this.toolStripStatusLabel1.Size = new System.Drawing.Size(57, 26);\r
+            this.toolStripStatusLabel1.Text = "Progress:";\r
+            // \r
+            // progressBar\r
+            // \r
+            this.progressBar.Name = "progressBar";\r
+            this.progressBar.Size = new System.Drawing.Size(500, 25);\r
+            this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;\r
+            // \r
+            // lbl_progressValue\r
+            // \r
+            this.lbl_progressValue.Name = "lbl_progressValue";\r
+            this.lbl_progressValue.Size = new System.Drawing.Size(34, 26);\r
+            this.lbl_progressValue.Text = " 0 %";\r
+            // \r
+            // OpenFile\r
+            // \r
+            this.OpenFile.Filter = "HandBrake Queue|*.queue";\r
+            // \r
+            // lbl_encodesPending\r
+            // \r
+            this.lbl_encodesPending.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;\r
+            this.lbl_encodesPending.Margin = new System.Windows.Forms.Padding(0, 3, 10, 2);\r
+            this.lbl_encodesPending.Name = "lbl_encodesPending";\r
+            this.lbl_encodesPending.Size = new System.Drawing.Size(122, 26);\r
+            this.lbl_encodesPending.Text = "0 encode(s) pending";\r
+            // \r
+            // frmQueue\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.ClientSize = new System.Drawing.Size(779, 390);\r
+            this.Controls.Add(this.statusStrip1);\r
+            this.Controls.Add(this.list_queue);\r
+            this.Controls.Add(this.btn_down);\r
+            this.Controls.Add(this.btn_up);\r
+            this.Controls.Add(this.toolStrip1);\r
+            this.Controls.Add(this.label4);\r
+            this.Controls.Add(this.lbl_dest);\r
+            this.Controls.Add(this.btn_delete);\r
+            this.Controls.Add(this.lbl_vEnc);\r
+            this.Controls.Add(this.lbl_chapt);\r
+            this.Controls.Add(this.lbl_source);\r
+            this.Controls.Add(this.label3);\r
+            this.Controls.Add(this.lbl_aEnc);\r
+            this.Controls.Add(this.lbl_title);\r
+            this.Controls.Add(this.label1);\r
+            this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MaximizeBox = false;\r
+            this.MinimumSize = new System.Drawing.Size(787, 417);\r
+            this.Name = "frmQueue";\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
+            this.Text = "Encode Queue";\r
+            this.toolStrip1.ResumeLayout(false);\r
+            this.toolStrip1.PerformLayout();\r
+            this.statusStrip1.ResumeLayout(false);\r
+            this.statusStrip1.PerformLayout();\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        internal System.Windows.Forms.Button btn_down;\r
+        internal System.Windows.Forms.Button btn_up;\r
+        internal System.Windows.Forms.Button btn_delete;\r
+        private System.Windows.Forms.ToolTip toolTip1;\r
+        private System.Windows.Forms.Label label4;\r
+        private System.Windows.Forms.Label lbl_chapt;\r
+        private System.Windows.Forms.Label lbl_title;\r
+        private System.Windows.Forms.Label lbl_aEnc;\r
+        private System.Windows.Forms.Label lbl_vEnc;\r
+        private System.Windows.Forms.Label lbl_dest;\r
+        private System.Windows.Forms.Label lbl_source;\r
+        private System.Windows.Forms.Label label1;\r
+        private System.Windows.Forms.Label label3;\r
+        private System.Windows.Forms.ToolStrip toolStrip1;\r
+        private System.Windows.Forms.ToolStripButton btn_encode;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;\r
+        private System.Windows.Forms.ToolStripButton btn_stop;\r
+        private System.Windows.Forms.SaveFileDialog SaveFile;\r
+        private System.Windows.Forms.ListView list_queue;\r
+        private System.Windows.Forms.ColumnHeader Title;\r
+        private System.Windows.Forms.ColumnHeader Chapters;\r
+        private System.Windows.Forms.ColumnHeader Source;\r
+        private System.Windows.Forms.ColumnHeader Destination;\r
+        private System.Windows.Forms.ColumnHeader EncoderVideo;\r
+        private System.Windows.Forms.ColumnHeader Audio;\r
+        private System.Windows.Forms.StatusStrip statusStrip1;\r
+        private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;\r
+        private System.Windows.Forms.ToolStripProgressBar progressBar;\r
+        private System.Windows.Forms.ToolStripStatusLabel lbl_progressValue;\r
+        private System.Windows.Forms.ToolStripDropDownButton drop_button_queue;\r
+        private System.Windows.Forms.ToolStripMenuItem mnu_batch;\r
+        private System.Windows.Forms.ToolStripMenuItem mnu_import;\r
+        private System.Windows.Forms.ToolStripMenuItem mnu_export;\r
+        private System.Windows.Forms.OpenFileDialog OpenFile;\r
+        private System.Windows.Forms.ToolStripStatusLabel lbl_encodesPending;\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
new file mode 100644 (file)
index 0000000..88acf24
--- /dev/null
@@ -0,0 +1,398 @@
+/*  frmQueue.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Collections;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.Threading;\r
+using System.Diagnostics;\r
+using System.Runtime.InteropServices;\r
+using System.IO;\r
+\r
+namespace Handbrake\r
+{\r
+    public partial class frmQueue : Form\r
+    {\r
+        private delegate void ProgressUpdateHandler();\r
+        private delegate void setEncoding();\r
+        Functions.Encode cliObj = new Functions.Encode();\r
+        Boolean cancel = false;\r
+        Process hbProc = null;\r
+        Functions.Queue queue;\r
+        frmMain mainWindow = null;\r
+\r
+        public frmQueue(frmMain main)\r
+        {\r
+            InitializeComponent();\r
+            mainWindow = main;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Initializes the Queue list with the Arraylist from the Queue class\r
+        /// </summary>\r
+        /// <param name="qw"></param>\r
+        public void setQueue(Functions.Queue qw)\r
+        {\r
+            queue = qw;\r
+            redrawQueue();\r
+            lbl_encodesPending.Text = list_queue.Items.Count + " encode(s) pending";\r
+        }\r
+\r
+        /// <summary>\r
+        /// Returns if there is currently an item being encoded by the queue\r
+        /// </summary>\r
+        /// <returns>Boolean true if encoding</returns>\r
+        public Boolean isEncoding()\r
+        {\r
+            if (hbProc == null)\r
+                return false;\r
+            else\r
+                return true;\r
+        }\r
+\r
+        // Redraw's the queue with the latest data from the Queue class\r
+        private void redrawQueue()\r
+        {\r
+            list_queue.Items.Clear();\r
+            ArrayList theQueue = queue.getQueue();\r
+            foreach (ArrayList queue_item in theQueue)\r
+            {\r
+                string q_item = queue_item[1].ToString();\r
+                Functions.QueryParser parsed = Functions.QueryParser.Parse(q_item);\r
+\r
+                // Get the DVD Title\r
+                string title = "";\r
+                if (parsed.DVDTitle == 0)\r
+                    title = "Auto";\r
+                else\r
+                    title = parsed.DVDTitle.ToString();\r
+\r
+                // Get the DVD Chapters\r
+                string chapters = "";\r
+                if (parsed.DVDChapterStart == 0)\r
+                    chapters = "Auto";\r
+                else\r
+                {\r
+                    chapters = parsed.DVDChapterStart.ToString();\r
+                    if (parsed.DVDChapterFinish != 0)\r
+                        chapters = chapters + " - " + parsed.DVDChapterFinish;\r
+                }\r
+\r
+                ListViewItem item = new ListViewItem();\r
+                item.Text = title; // Title\r
+                item.SubItems.Add(chapters); // Chapters\r
+                item.SubItems.Add(parsed.Source); // Source\r
+                item.SubItems.Add(parsed.Destination); // Destination\r
+                item.SubItems.Add(parsed.VideoEncoder); // Video\r
+                item.SubItems.Add(parsed.AudioEncoder1); // Audio\r
+\r
+                list_queue.Items.Add(item);\r
+            }\r
+        }\r
+\r
+        // Initializes the encode process\r
+        private void btn_encode_Click(object sender, EventArgs e)\r
+        {\r
+            mainWindow.setLastAction("encode");\r
+            \r
+            if (queue.count() != 0)\r
+            {\r
+                btn_encode.Enabled = false;\r
+            }\r
+            cancel = false;\r
+\r
+            // Start the encode\r
+            try\r
+            {\r
+                if (queue.count() != 0)\r
+                {\r
+                    // Setup or reset some values\r
+                    btn_stop.Visible = true;\r
+                    progressBar.Value = 0;\r
+                    lbl_progressValue.Text = "0 %";\r
+                    progressBar.Step = 100 / queue.count();\r
+                    Thread theQ = new Thread(startProc);\r
+                    theQ.IsBackground = true;\r
+                    theQ.Start();\r
+                }\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show(exc.ToString());\r
+            }\r
+        }\r
+\r
+        // Starts the encoding process\r
+        private void startProc(object state)\r
+        {\r
+            try\r
+            {\r
+                // Run through each item on the queue\r
+                while (queue.count() != 0)\r
+                {\r
+                    string query = queue.getNextItemForEncoding();\r
+                    queue.write2disk("hb_queue_recovery.dat"); // Update the queue recovery file\r
+\r
+                    setEncValue();\r
+                    updateUIElements();\r
+\r
+                    hbProc = cliObj.runCli(this, query);\r
+\r
+                    hbProc.WaitForExit();\r
+                    cliObj.addCLIQueryToLog(query);\r
+                    cliObj.copyLog(query);\r
+\r
+                    hbProc.Close();\r
+                    hbProc.Dispose();\r
+                    hbProc = null;\r
+                    query = "";\r
+\r
+                    if (cancel == true)\r
+                    {\r
+                        break;\r
+                    }\r
+                }\r
+\r
+                resetQueue();\r
+\r
+                // After the encode is done, we may want to shutdown, suspend etc.\r
+                cliObj.afterEncodeAction();\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show(exc.ToString());\r
+            }\r
+        }\r
+\r
+        // Reset's the window to the default state.\r
+        private void resetQueue()\r
+        {\r
+            try\r
+            {\r
+                if (this.InvokeRequired)\r
+                {\r
+                    this.BeginInvoke(new ProgressUpdateHandler(resetQueue));\r
+                    return;\r
+\r
+                }\r
+                btn_stop.Visible = false;\r
+                btn_encode.Enabled = true;\r
+\r
+                if (cancel == true)\r
+                {\r
+                    lbl_progressValue.Text = "Encode Queue Cancelled!";\r
+                }\r
+                else\r
+                {\r
+                    lbl_progressValue.Text = "Encode Queue Completed!";\r
+                }\r
+\r
+                progressBar.Value = 0;\r
+\r
+                lbl_source.Text = "-";\r
+                lbl_dest.Text = "-";\r
+                lbl_vEnc.Text = "-";\r
+                lbl_aEnc.Text = "-";\r
+                lbl_title.Text = "-";\r
+                lbl_chapt.Text = "-";\r
+\r
+                lbl_encodesPending.Text = list_queue.Items.Count + " encode(s) pending";\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show(exc.ToString());\r
+            }\r
+        }\r
+\r
+        // Stop's the queue from continuing. \r
+        private void btn_stop_Click(object sender, EventArgs e)\r
+        {\r
+            cancel = true;\r
+            btn_stop.Visible = false;\r
+            btn_encode.Enabled = true;\r
+            MessageBox.Show("No further items on the queue will start. The current encode process will continue until it is finished. \nClick 'Encode Video' when you wish to continue encoding the queue.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+        }\r
+\r
+        // Updates the progress bar and progress label for a new status.\r
+        private void updateUIElements()\r
+        {\r
+            try\r
+            {\r
+                if (this.InvokeRequired)\r
+                {\r
+                    this.BeginInvoke(new ProgressUpdateHandler(updateUIElements));\r
+                    return;\r
+                }\r
+\r
+                redrawQueue();\r
+\r
+                progressBar.PerformStep();\r
+                lbl_progressValue.Text = string.Format("{0} %", progressBar.Value);\r
+                lbl_encodesPending.Text = list_queue.Items.Count + " encode(s) pending";\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show(exc.ToString());\r
+            }\r
+        }\r
+\r
+        // Set's the information lables about the current encode.\r
+        private void setEncValue()\r
+        {\r
+            try\r
+            {\r
+                if (this.InvokeRequired)\r
+                {\r
+                    this.BeginInvoke(new setEncoding(setEncValue));\r
+                }\r
+\r
+                // found query is a global varible\r
+                Functions.QueryParser parsed = Functions.QueryParser.Parse(queue.getLastQuery());\r
+                lbl_source.Text = parsed.Source;\r
+                lbl_dest.Text = parsed.Destination;\r
+\r
+\r
+                if (parsed.DVDTitle == 0)\r
+                    lbl_title.Text = "Auto";\r
+                else\r
+                    lbl_title.Text = parsed.DVDTitle.ToString();\r
+\r
+                string chapters = "";\r
+                if (parsed.DVDChapterStart == 0)\r
+                {\r
+                    lbl_chapt.Text = "Auto";\r
+                }\r
+                else\r
+                {\r
+                    chapters = parsed.DVDChapterStart.ToString();\r
+                    if (parsed.DVDChapterFinish != 0)\r
+                        chapters = chapters + " - " + parsed.DVDChapterFinish;\r
+                    lbl_chapt.Text = chapters;\r
+                }\r
+\r
+                lbl_vEnc.Text = parsed.VideoEncoder;\r
+                lbl_aEnc.Text = parsed.AudioEncoder1;\r
+            }\r
+            catch (Exception)\r
+            {\r
+                // Do Nothing\r
+            }\r
+        }\r
+\r
+        // Move an item up the Queue\r
+        private void btn_up_Click(object sender, EventArgs e)\r
+        {\r
+            if (list_queue.SelectedIndices.Count != 0)\r
+            {\r
+                int selected = list_queue.SelectedIndices[0];\r
+\r
+                queue.moveUp(selected);\r
+                queue.write2disk("hb_queue_recovery.dat"); // Update the queue recovery file\r
+                redrawQueue();\r
+\r
+                if (selected - 1 > 0) \r
+                    list_queue.Items[selected -1].Selected = true;\r
+\r
+                list_queue.Select();\r
+            }\r
+        }\r
+\r
+        // Move an item down the Queue\r
+        private void btn_down_Click(object sender, EventArgs e)\r
+        {\r
+            if (list_queue.SelectedIndices.Count != 0)\r
+            {\r
+                int selected = list_queue.SelectedIndices[0];\r
+\r
+                queue.moveDown(list_queue.SelectedIndices[0]);\r
+                queue.write2disk("hb_queue_recovery.dat"); // Update the queue recovery file\r
+                redrawQueue();\r
+\r
+                if (selected +1 < list_queue.Items.Count) \r
+                    list_queue.Items[selected + 1].Selected = true;\r
+\r
+                list_queue.Select();\r
+            }\r
+        }\r
+\r
+        // Remove an item from the queue\r
+        private void btn_delete_Click(object sender, EventArgs e)\r
+        {\r
+            if (list_queue.SelectedIndices.Count != 0)\r
+            {\r
+                queue.remove(list_queue.SelectedIndices[0]);\r
+                queue.write2disk("hb_queue_recovery.dat"); // Update the queue recovery file\r
+                redrawQueue();\r
+                lbl_encodesPending.Text = list_queue.Items.Count + " encode(s) pending";\r
+            }\r
+        }\r
+\r
+        // Generate a Saveable batch script on the users request\r
+        private void mnu_batch_Click(object sender, EventArgs e)\r
+        {\r
+            SaveFile.FileName = "";\r
+            SaveFile.Filter = "Batch|.bat";\r
+            SaveFile.ShowDialog();\r
+            if (SaveFile.FileName != String.Empty)\r
+                queue.writeBatchScript(SaveFile.FileName);\r
+        }\r
+\r
+        // Export the HandBrake Queue to a file.\r
+        private void mnu_export_Click(object sender, EventArgs e)\r
+        {\r
+            SaveFile.FileName = "";\r
+            SaveFile.Filter = "HandBrake Queue|*.queue";\r
+            SaveFile.ShowDialog();\r
+            if (SaveFile.FileName != String.Empty)\r
+                queue.write2disk(SaveFile.FileName);\r
+        }\r
+\r
+        // Import an exported queue\r
+        private void mnu_import_Click(object sender, EventArgs e)\r
+        {\r
+            OpenFile.FileName = "";\r
+            OpenFile.ShowDialog();\r
+            if (OpenFile.FileName != String.Empty)\r
+                queue.recoverQueue(OpenFile.FileName);\r
+            redrawQueue();\r
+        }\r
+\r
+        // Delete a selected item on the queue, if the delete key is pressed.\r
+        private void list_queue_deleteKey(object sender, KeyEventArgs e)\r
+        {\r
+            if (e.KeyCode == Keys.Delete)\r
+            {\r
+                if (list_queue.SelectedIndices.Count != 0)\r
+                {\r
+                    queue.remove(list_queue.SelectedIndices[0]);\r
+                    queue.write2disk("hb_queue_recovery.dat"); // Update the queue recovery file\r
+                    redrawQueue();\r
+                }\r
+            }\r
+        }\r
+\r
+        // Hide's the window from the users view.\r
+        private void btn_Close_Click(object sender, EventArgs e)\r
+        {\r
+            this.Hide();\r
+        }\r
+\r
+        // Hide's the window when the user tries to "x" out of the window instead of closing it.\r
+        protected override void OnClosing(CancelEventArgs e)\r
+        {\r
+            e.Cancel = true;\r
+            this.Hide();\r
+            base.OnClosing(e);\r
+        }\r
+\r
+\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmQueue.resx b/win/C#/frmQueue.resx
new file mode 100644 (file)
index 0000000..2575392
--- /dev/null
@@ -0,0 +1,518 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>17, 17</value>\r
+  </metadata>\r
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>93, 17</value>\r
+  </metadata>\r
+  <metadata name="SaveFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>176, 17</value>\r
+  </metadata>\r
+  <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>324, 17</value>\r
+  </metadata>\r
+  <metadata name="OpenFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>252, 17</value>\r
+  </metadata>\r
+  <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+    <value>True</value>\r
+  </metadata>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
+        IACoJQAAHh0AACAgAAABACAAqBAAAMZCAAAQEAAAAQAgAGgEAABuUwAAKAAAADAAAABgAAAAAQAIAAAA\r
+        AACACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAD///8A/wAAAAD/AAAAAIAAgICAAICAAAAAgAAAAICAAIAA\r
+        AACAAIAAgP//ACAgIADg4OAAIAAAAAAgAABg4CAAQOBAAGBgYAAgYAAAQKDgAAAAIABAwCAAIEAAAECg\r
+        AABg4AAAIGCAAECAoABgoMAAYECgAGDAAABgICAAoKCgAOAAAAAgIAAAAGAAAEDgAABgAAAAIAAgAEAg\r
+        IAAgQGAAIIDAAADg4ABgAGAAgOD/ACCA/wCgAAAAQGAAACCAAAAAoAAAYCAAAAAgIAAgIEAAYGBAAEBg\r
+        YAAAIIAAAGCAAGCAgABAAKAAAICgAACgoACAoKAAIKDAAECgwAAAAOAAQADgAADA4ABgwOAAIODgAADg\r
+        AADA4AAAAEAgAKDgIAAA4EAAYABAAABAYACAAGAAgCBgAGAggABA4KAAAECgAGBAwADgIOAAIEDgAACA\r
+        4ADgoOAAYAD/ACBg/wAAoP8A4KD/AGD//wAICAgACAAAAAgIAAAAAJgACAAIAAAACAAACAAACBAQACA4\r
+        SAAgYIgAOHCIADhw+AAIGAAAEBAIACg4QAAwYHgAAACIACA4QAAoQFAAKFh4AHh4eAAwaIAAIGiQADh4\r
+        mAAACAgAEAgIABAYGAAgGBgASEhIABhIYAAoUGAAIFBoAChQaAAoWGgAMFhoAChoiAAweJgAKHioACiA\r
+        sAAIEAAACAgQAAgQGAAQGCAAGCAoABhAUAAoSFgAaGhoABhQcAAgWHAAKFhwADhgcAAYWIAAOGiAAIiI\r
+        iAAoaJAAKHCYACh4oAA4gKAAMICoAKioqAAwmNAAEDgAAChYAAAweAAAMIgQAAgYGAAYGBgACBggABAg\r
+        KAAgKCgAKCgoACAwOAA4ODgAKDhIADBQWABYWFgAGEhoADBYcAAYUHgAGFh4ACBYeAAoYHgAKGCAABhY\r
+        iAAgaJgAKICoACiIuAC4uLgAMJDIADiw6AAQCAAAABgAAAggAAAAOAAAMGgAABgQCAAwgAgAEAgQABgQ\r
+        EAAwmBgAGBggAAgYKAAAICgACCAoABgoMAAgKDAAGDBAABg4QAAYOFAAEEBYACBIWAAwSFgAOEhYACBI\r
+        YAAQSGgAOFhoABhIcAAoUHAAQFhwACBgeABAaIAAIGiIADBwiABAcIgAGGCQADhwkABYeJAACBCgAChw\r
+        oAAweKAAKIC4ACiQwAAwmMgAOKjgADBg6ABAsOgAELD4AAgoAAAIMAAAGDAAABhIAAAYUAAAKHgAAACY\r
+        AAAwmAAAAMgAABAACAAIEAgAEBgIABA4CAAYOAgAMHgIABAYEAAYGBAAIBgQACh4EAAwmBAAEBAYABgg\r
+        GAAoIBgAGCAgAAgIKAAgICgAGAgwAAggMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAn2KfdXV1XAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoo2+QIJCJb28Sd3em\r
+        nQAAAFuKqW0aqsd6Y5/DXAAAAAAAAAAAAAAAAAAAAAAAAAB3kAWQkG8SpqaJb28gsncAbIeSroyii21x\r
+        kczIwwAAAAAAAAAAAAAAAAAAAAAAAABoo4mJkLKylm9vb5BvdwwAcZO/fox7z2NjqsOss2MAWwAAAAAA\r
+        AAAAAAAAAAAAAAAAvaGmo5ANlgUFEiBvo1xjq3p6qMTJroBkxXt9cGzFnAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAL2ylgV3vQAAAGOvxMXXq41uh6yVjxqp1YhknwAAAAAAAAAAAAAAAAAAAAAAAAAAAABvsolbAAAA\r
+        +5KneouS2Kx4pZF9ndywsXuvkocAAAAAAAAAAAAAAAAAAAAAAAAAAAB3sncAAAAAdayHca95bH9+cKmv\r
+        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\r
+        eAAoaIgAMICoAChggAAACAgAEAgIABgYGAAoUGgAKFhwAChwkAAIGAgACBAQABAgKAAQKDgAIEhgACBQ\r
+        aAAAAHgAIFh4AChgeAAAeHgAeHh4AChogAAwaIAAIGCIADBoiAA4cIgAIGiQADhwkAAoeKgAKICwAAgQ\r
+        AAAIIAAACAAIABhICAAICBAAMIgQABAYGAAYICgAGCgwAEhISAAwSFgAGFBoAChYaAAICHgAOGiAACh4\r
+        oAAweKAAGAAAAAAIAAAAGAAACBgAABAoAAAYUAAAKGAAAChoAAAAeAAAAAAIAAgQCAAQEAgAGP8IACAY\r
+        EAAIEBgAMJAYABggIAAAACgACBAoACgwMAAAKDgAEDA4ADg4OAAoOEAAGDhIACA4SAAAQEgAMEBIAEhQ\r
+        UAAISFgAIEhYAChIWAAwUFgAIEhoAEhYaAAYUHAAMFhwABhYeAAoWHgAIFiAAEhwgACIiIgAGGCQAAAA\r
+        mAAgcJgAKHCYADB4mACYmJgAACjIAEBw+ACo//8ASAAAAFgAAABoAAAAeAAAABAIAABICAAAGCgAAAA4\r
+        AAAYOAAACEAAAAhIAAAoUAAAAFgAACBYAAAAaAAAIGgAADB4AAAAiAAAMIgAAGiIAACAmAAAGAAIADAI\r
+        CABgCAgAEBgIAAggCAAQIAgAECgIAAgwCAAQMAgAODAIABA4CAAYOAgAEEAIABhACAAgQAgAIFAIAChg\r
+        CAAwgAgAMJAIADCoCAAACBAAGBAQABggEAAoIBAAKGAQAChoEAAgeBAAKHgQAEh4EAAY+BAACAAYAAAI\r
+        GAAICBgAEAgYAAAQGAAQEBgAABgYAAgYGAAYMBgAKHgYADCYGAAwoBgAMKgYAGj/GABgCCAACBAgAAgY\r
+        IAAQGCAAGBggACggIABIcCAACAAoABAAKAAAECgAEBAoAAggKAAACDAASAgwAAgQMAAIKDAAECgwAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAARxBSUlJHAAAAAABYWFlY8kYAAAAAAAAAAAAAAAAAAJFgqqRLSzAwBXMAkKJbW1pdSVmE\r
+        AAAAAAAAAAAAAAAAEJdLqhpgYKQFkf9NmVRanHVJVZRQAAAAAAAAAAAAAAAAUY6RO6qXMHNYW5MxdFpm\r
+        TVtPSpAAAAAAAAAAAAAAAAAAAAAFpIYAAFSeW09PU15KU05MaEkAAAAAAAAAAAAAAAAAAEtgAAAAk55j\r
+        ml5Mp2haXUqpW3IAAAAAAAAAAAAAAAAAS0sAAEpJoE5PpZpMZVWnMZyZVQAAAAAAAAAAAAAAAABLMAAA\r
+        cqCeSnppZGZKWzFNaV2ecAAAAAAAAAAAAAAAAEtLAACLVF6iZHROp2eiW1paeWnxAAAAAAAAAAAAAABI\r
+        GmAAAElJSmh6SWNVSk5hZqJ1VXUAAAAAAAAAAAAAlpmjeJAAk12eZXZ5p3WndnZpaUlbZgAAAAAAAAAA\r
+        m2lFRTw8PDZeWV1OlE0xeWlNeVVdZmmZUAAAAAAAjzYKRaysRUVFRa02SXSnYaFNTUxpTFSoTmKTAAAA\r
+        AI8KOkSrrKysrKxErDullF6fVWhiVakLaVWbVZoAAAAAqK2sRKZEqyCsRKummKBZT0xPTHppZVMLqVN4\r
+        cQAAAAA6O6sYGKYYGKsYphgELjejY09KTTZNaWdMNpkAAAAA+zc6XFxcd3d3XASmXEw6PZZiZ6g2ZUw2\r
+        T2QLnwAAAAAdoTtcLcV3pndfLi2jraMtcmNkT05np0xnaXhUAAAAAAD5NKL87xgYd1+eLZ06+1wAVE6o\r
+        p2cKZ2WjjgAAAAAAAAAQo67EcuZuj5jkACue9gAAkTEKeJfbioptRgAAAAAAAACIr0dLVwBXmEeL5Qg4\r
+        AAAAAOnqwNbVb9O5AAAAAAAAAP38RmDae3tfkDqIX0UAAABq3W9v6+2BtssAAAAAAAD9q6v7AFl1dV9f\r
+        mpgIXwAAAABrtG9v7O2BagAAAACSF52fL/AAAAAAAHUAAAAAAAAAAACC1NS+3s/ZzAAAAJ03MjqjdJ0A\r
+        AAC3FIMUtwAAAAAAzr27goK5awAAAAAAWaNgGho3dAAAyr+/v4ODtQAAAMmAAM+2zxMTawAAAAAAAK6z\r
+        kZ1xAAC1un3HVwAAAAAAAAAAawB/ftAAAAAAAABCNUIAAAAAAAAAAF8AAAAAAAAAAEcAAGpGAAAAAAAA\r
+        AEKsEQAAAAAAAAAAlZUAAAAAAAAAAAAAAEgAAAAAAAAAAC3hAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAA\r
+        AAD///////////4BwH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAA\r
+        AAHgAAAB4AAAAeAAAAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9\r
+        /s/j/P/v8///7ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AFEl\r
+        swBJDW0ABEMwAAJHSQAFDwIAXl9ZAHJtagBwfYQAQVNqAAFtAAAAZgAAAz0CABQ/AQAXQwAAGkAAAA8g\r
+        AQAhSJQAM1SRABw6fgAFVk0ADE48AAplaQAgWgIAMYcMACl7CwAOJwMAAAMtABwPNwAhIQAABxACAA9S\r
+        UAAnQUgAAISfACRoDAAxmwQAK4MHABMpAAA8P1kATBMbACQSVwAKL1EADS5CADFMVQABIF4AJ3CGADB2\r
+        kAAzdlEAMnY1ABMnEwBARooAVVq5ABgATwAWBn0ABh56AAULaQBOeKYAT3WSACpNZwAucpgAMHifADFx\r
+        nwA1b5YAMF93AEBalgBvjecADCLAAAkPpQAbJr4AFiLGAAAJjgAzbIEANGh8AClhgAAzfKEAMHWWADJz\r
+        kwAsW3MAQ4mvADyY9AAtgf8AIpr/ACuk/wBdk9UAG0tkACladQAqbI4AK3GUAC5vjwArbpEALWJ7ACdl\r
+        aAAOaoQAJJ20ABx0gQAeTF8AJ116ACViggAgZosAJmeJAChvlAAhZIgAH1ZyAHVmYwAaPVMAJ19+ACto\r
+        hgAmaIwAKGB9ACFdfAAgY4YAGU5qAFtgYQAYQVgAIVx7ACtrjgAtZYIAJmKAACNhgQAmX3wAIUpdAHp6\r
+        ewARN0wAH1R0ACdXcgApXnoAJ2B+ACligQAdSmAAKiopAGZlZQCRkZEAbm9vAFFSUwAWO08AJFRuACFP\r
+        agAhUm0AHD9RAAMKDgA3NjUAWlpaADk5OQA3NzcAPDk3AAYSGQAVNUgAFjFAAA8jLwABAgQAVQAAAP//\r
+        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\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/win/C#/frmReadDVD.Designer.cs b/win/C#/frmReadDVD.Designer.cs
new file mode 100644 (file)
index 0000000..6d8eb32
--- /dev/null
@@ -0,0 +1,121 @@
+/*  frmReadDVD.Designer.cs \r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace Handbrake\r
+{\r
+    partial class frmReadDVD\r
+    {\r
+        /// <summary>\r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows Form Designer generated code\r
+\r
+        /// <summary>\r
+        /// Required method for Designer support - do not modify\r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmReadDVD));\r
+            this.Label3 = new System.Windows.Forms.Label();\r
+            this.lbl_status = new System.Windows.Forms.Label();\r
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();\r
+            this.btn_cancel = new System.Windows.Forms.Button();\r
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();\r
+            this.SuspendLayout();\r
+            // \r
+            // Label3\r
+            // \r
+            this.Label3.AutoSize = true;\r
+            this.Label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Label3.Location = new System.Drawing.Point(68, 19);\r
+            this.Label3.Name = "Label3";\r
+            this.Label3.Size = new System.Drawing.Size(230, 26);\r
+            this.Label3.TabIndex = 27;\r
+            this.Label3.Text = "The CLI is about to read your source...\r\nThis process can take up to 1 minute.";\r
+            // \r
+            // lbl_status\r
+            // \r
+            this.lbl_status.AutoSize = true;\r
+            this.lbl_status.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_status.Location = new System.Drawing.Point(68, 51);\r
+            this.lbl_status.Name = "lbl_status";\r
+            this.lbl_status.Size = new System.Drawing.Size(178, 13);\r
+            this.lbl_status.TabIndex = 31;\r
+            this.lbl_status.Text = "Processing.... Please Wait!";\r
+            this.lbl_status.Visible = false;\r
+            // \r
+            // pictureBox1\r
+            // \r
+            this.pictureBox1.Image = global::Handbrake.Properties.Resources.Movies;\r
+            this.pictureBox1.Location = new System.Drawing.Point(12, 12);\r
+            this.pictureBox1.Name = "pictureBox1";\r
+            this.pictureBox1.Size = new System.Drawing.Size(33, 33);\r
+            this.pictureBox1.TabIndex = 32;\r
+            this.pictureBox1.TabStop = false;\r
+            // \r
+            // btn_cancel\r
+            // \r
+            this.btn_cancel.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_cancel.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_cancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_cancel.Location = new System.Drawing.Point(323, 51);\r
+            this.btn_cancel.Name = "btn_cancel";\r
+            this.btn_cancel.Size = new System.Drawing.Size(58, 22);\r
+            this.btn_cancel.TabIndex = 33;\r
+            this.btn_cancel.TabStop = false;\r
+            this.btn_cancel.Text = "Cancel";\r
+            this.btn_cancel.UseVisualStyleBackColor = true;\r
+            this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);\r
+            // \r
+            // frmReadDVD\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.ClientSize = new System.Drawing.Size(393, 83);\r
+            this.ControlBox = false;\r
+            this.Controls.Add(this.btn_cancel);\r
+            this.Controls.Add(this.pictureBox1);\r
+            this.Controls.Add(this.lbl_status);\r
+            this.Controls.Add(this.Label3);\r
+            this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MaximizeBox = false;\r
+            this.MaximumSize = new System.Drawing.Size(538, 113);\r
+            this.Name = "frmReadDVD";\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\r
+            this.Text = "Reading Source...";\r
+            this.TopMost = true;\r
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        internal System.Windows.Forms.Label Label3;\r
+        internal System.Windows.Forms.Label lbl_status;\r
+        private System.Windows.Forms.PictureBox pictureBox1;\r
+        internal System.Windows.Forms.Button btn_cancel;\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs
new file mode 100644 (file)
index 0000000..4763934
--- /dev/null
@@ -0,0 +1,171 @@
+/*  frmReadDVD.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.IO;\r
+using System.Threading;\r
+using System.Diagnostics;\r
+using System.Collections;\r
+\r
+\r
+namespace Handbrake\r
+{\r
+    public partial class frmReadDVD : Form\r
+    {\r
+        private string inputFile;\r
+        private frmMain mainWindow;\r
+        private Parsing.DVD thisDvd;\r
+        private delegate void UpdateUIHandler();\r
+        Process hbproc;\r
+        Functions.Main hb_common_func = new Functions.Main();\r
+        Functions.Encode process = new Functions.Encode();\r
+\r
+        public frmReadDVD(string inputFile, frmMain parent)\r
+        {\r
+            InitializeComponent();\r
+            this.inputFile = inputFile;\r
+            this.mainWindow = parent;\r
+            startScan();\r
+        }\r
+\r
+        private void startScan()\r
+        {\r
+            try\r
+            {\r
+                lbl_status.Visible = true;\r
+                ThreadPool.QueueUserWorkItem(startProc);\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("frmReadDVD.cs - startScan " + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+            }\r
+        }\r
+\r
+        private void startProc(object state)\r
+        {\r
+            try\r
+            {\r
+                string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");\r
+                string dvdInfoPath = Path.Combine(Path.GetTempPath(), "dvdinfo.dat");\r
+\r
+                // Make we don't pick up a stale hb_encode_log.dat (and that we have rights to the file)\r
+                if (File.Exists(dvdInfoPath))\r
+                    File.Delete(dvdInfoPath);\r
+\r
+                string strCmdLine = String.Format(@"cmd /c """"{0}"" -i ""{1}"" -t0 -v >""{2}"" 2>&1""", handbrakeCLIPath, inputFile, dvdInfoPath);\r
+\r
+                ProcessStartInfo hbParseDvd = new ProcessStartInfo("CMD.exe", strCmdLine);\r
+                hbParseDvd.WindowStyle = ProcessWindowStyle.Hidden;\r
+\r
+                using (hbproc = Process.Start(hbParseDvd))\r
+                {\r
+                    hbproc.WaitForExit();\r
+                }\r
+\r
+                if (!File.Exists(dvdInfoPath))\r
+                {\r
+                    throw new Exception("Unable to retrieve the DVD Info. dvdinfo.dat is missing. \nExpected location of dvdinfo.dat: \n" + dvdInfoPath);\r
+                }\r
+\r
+                using (StreamReader sr = new StreamReader(dvdInfoPath))\r
+                {\r
+                    thisDvd = Parsing.DVD.Parse(sr);\r
+                    sr.Close();\r
+                    sr.Dispose();\r
+                }\r
+\r
+                updateUIElements();\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("frmReadDVD.cs - startProc() " + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                closeWindowAfterError();\r
+            }\r
+        }\r
+\r
+        private void updateUIElements()\r
+        {\r
+            try\r
+            {\r
+                if (this.InvokeRequired)\r
+                {\r
+                    this.BeginInvoke(new UpdateUIHandler(updateUIElements));\r
+                    return;\r
+                }\r
+                // Now pass this streamreader to frmMain so that it can be used there.\r
+                mainWindow.setStreamReader(thisDvd);\r
+\r
+                mainWindow.drp_dvdtitle.Items.Clear();\r
+                if (thisDvd.Titles.Count != 0)\r
+                    mainWindow.drp_dvdtitle.Items.AddRange(thisDvd.Titles.ToArray());\r
+                mainWindow.drp_dvdtitle.Text = "Automatic";\r
+                mainWindow.drop_chapterFinish.Text = "Auto";\r
+                mainWindow.drop_chapterStart.Text = "Auto";\r
+\r
+                // Now select the longest title\r
+                if (thisDvd.Titles.Count != 0)\r
+                    mainWindow.drp_dvdtitle.SelectedItem = hb_common_func.selectLongestTitle(mainWindow.drp_dvdtitle);\r
+\r
+                this.Close();\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("frmReadDVD.cs - updateUIElements " + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                this.Close();\r
+            }\r
+        }\r
+\r
+        private void closeWindowAfterError()\r
+        {\r
+            try\r
+            {\r
+                if (this.InvokeRequired)\r
+                {\r
+                    this.BeginInvoke(new UpdateUIHandler(closeWindowAfterError));\r
+                    return;\r
+                }\r
+                this.Close();\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("frmReadDVD.cs - closeWindowAfterError - Unable to recover from a serious error. \nYou may need to restart HandBrake. \n\n Error Information: \n " + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+            }\r
+        }\r
+\r
+        private void btn_cancel_Click(object sender, EventArgs e)\r
+        {\r
+            // This may seem like a long way of killing HandBrakeCLI, but for whatever reason,\r
+            // hbproc.kill/close just won't do the trick.\r
+            try\r
+            {\r
+                string AppName = "HandBrakeCLI";\r
+\r
+                AppName = AppName.ToUpper();\r
+\r
+                System.Diagnostics.Process[] prs = System.Diagnostics.Process.GetProcesses();\r
+                foreach (System.Diagnostics.Process proces in prs)\r
+                {\r
+                    if (proces.ProcessName.ToUpper() == AppName)\r
+                    {\r
+                        proces.Refresh();\r
+                        if (!proces.HasExited)\r
+                            proces.Kill();\r
+                    }\r
+                }\r
+            }\r
+            catch (Exception ex)\r
+            {\r
+                MessageBox.Show("Unable to kill HandBrakeCLI.exe \nYou may need to manually kill HandBrakeCLI.exe using the Windows Task Manager if it does not close automatically within the next few minutes. \n\nError Information: \n" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+            }\r
+        }\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmReadDVD.resx b/win/C#/frmReadDVD.resx
new file mode 100644 (file)
index 0000000..37f9290
--- /dev/null
@@ -0,0 +1,500 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
+        IACoJQAAHh0AACAgAAABACAAqBAAAMZCAAAQEAAAAQAgAGgEAABuUwAAKAAAADAAAABgAAAAAQAIAAAA\r
+        AACACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAD///8A/wAAAAD/AAAAAIAAgICAAICAAAAAgAAAAICAAIAA\r
+        AACAAIAAgP//ACAgIADg4OAAIAAAAAAgAABg4CAAQOBAAGBgYAAgYAAAQKDgAAAAIABAwCAAIEAAAECg\r
+        AABg4AAAIGCAAECAoABgoMAAYECgAGDAAABgICAAoKCgAOAAAAAgIAAAAGAAAEDgAABgAAAAIAAgAEAg\r
+        IAAgQGAAIIDAAADg4ABgAGAAgOD/ACCA/wCgAAAAQGAAACCAAAAAoAAAYCAAAAAgIAAgIEAAYGBAAEBg\r
+        YAAAIIAAAGCAAGCAgABAAKAAAICgAACgoACAoKAAIKDAAECgwAAAAOAAQADgAADA4ABgwOAAIODgAADg\r
+        AADA4AAAAEAgAKDgIAAA4EAAYABAAABAYACAAGAAgCBgAGAggABA4KAAAECgAGBAwADgIOAAIEDgAACA\r
+        4ADgoOAAYAD/ACBg/wAAoP8A4KD/AGD//wAICAgACAAAAAgIAAAAAJgACAAIAAAACAAACAAACBAQACA4\r
+        SAAgYIgAOHCIADhw+AAIGAAAEBAIACg4QAAwYHgAAACIACA4QAAoQFAAKFh4AHh4eAAwaIAAIGiQADh4\r
+        mAAACAgAEAgIABAYGAAgGBgASEhIABhIYAAoUGAAIFBoAChQaAAoWGgAMFhoAChoiAAweJgAKHioACiA\r
+        sAAIEAAACAgQAAgQGAAQGCAAGCAoABhAUAAoSFgAaGhoABhQcAAgWHAAKFhwADhgcAAYWIAAOGiAAIiI\r
+        iAAoaJAAKHCYACh4oAA4gKAAMICoAKioqAAwmNAAEDgAAChYAAAweAAAMIgQAAgYGAAYGBgACBggABAg\r
+        KAAgKCgAKCgoACAwOAA4ODgAKDhIADBQWABYWFgAGEhoADBYcAAYUHgAGFh4ACBYeAAoYHgAKGCAABhY\r
+        iAAgaJgAKICoACiIuAC4uLgAMJDIADiw6AAQCAAAABgAAAggAAAAOAAAMGgAABgQCAAwgAgAEAgQABgQ\r
+        EAAwmBgAGBggAAgYKAAAICgACCAoABgoMAAgKDAAGDBAABg4QAAYOFAAEEBYACBIWAAwSFgAOEhYACBI\r
+        YAAQSGgAOFhoABhIcAAoUHAAQFhwACBgeABAaIAAIGiIADBwiABAcIgAGGCQADhwkABYeJAACBCgAChw\r
+        oAAweKAAKIC4ACiQwAAwmMgAOKjgADBg6ABAsOgAELD4AAgoAAAIMAAAGDAAABhIAAAYUAAAKHgAAACY\r
+        AAAwmAAAAMgAABAACAAIEAgAEBgIABA4CAAYOAgAMHgIABAYEAAYGBAAIBgQACh4EAAwmBAAEBAYABgg\r
+        GAAoIBgAGCAgAAgIKAAgICgAGAgwAAggMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAn2KfdXV1XAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoo2+QIJCJb28Sd3em\r
+        nQAAAFuKqW0aqsd6Y5/DXAAAAAAAAAAAAAAAAAAAAAAAAAB3kAWQkG8SpqaJb28gsncAbIeSroyii21x\r
+        kczIwwAAAAAAAAAAAAAAAAAAAAAAAABoo4mJkLKylm9vb5BvdwwAcZO/fox7z2NjqsOss2MAWwAAAAAA\r
+        AAAAAAAAAAAAAAAAvaGmo5ANlgUFEiBvo1xjq3p6qMTJroBkxXt9cGzFnAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAL2ylgV3vQAAAGOvxMXXq41uh6yVjxqp1YhknwAAAAAAAAAAAAAAAAAAAAAAAAAAAABvsolbAAAA\r
+        +5KneouS2Kx4pZF9ndywsXuvkocAAAAAAAAAAAAAAAAAAAAAAAAAAAB3sncAAAAAdayHca95bH9+cKmv\r
+        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\r
+        eAAoaIgAMICoAChggAAACAgAEAgIABgYGAAoUGgAKFhwAChwkAAIGAgACBAQABAgKAAQKDgAIEhgACBQ\r
+        aAAAAHgAIFh4AChgeAAAeHgAeHh4AChogAAwaIAAIGCIADBoiAA4cIgAIGiQADhwkAAoeKgAKICwAAgQ\r
+        AAAIIAAACAAIABhICAAICBAAMIgQABAYGAAYICgAGCgwAEhISAAwSFgAGFBoAChYaAAICHgAOGiAACh4\r
+        oAAweKAAGAAAAAAIAAAAGAAACBgAABAoAAAYUAAAKGAAAChoAAAAeAAAAAAIAAgQCAAQEAgAGP8IACAY\r
+        EAAIEBgAMJAYABggIAAAACgACBAoACgwMAAAKDgAEDA4ADg4OAAoOEAAGDhIACA4SAAAQEgAMEBIAEhQ\r
+        UAAISFgAIEhYAChIWAAwUFgAIEhoAEhYaAAYUHAAMFhwABhYeAAoWHgAIFiAAEhwgACIiIgAGGCQAAAA\r
+        mAAgcJgAKHCYADB4mACYmJgAACjIAEBw+ACo//8ASAAAAFgAAABoAAAAeAAAABAIAABICAAAGCgAAAA4\r
+        AAAYOAAACEAAAAhIAAAoUAAAAFgAACBYAAAAaAAAIGgAADB4AAAAiAAAMIgAAGiIAACAmAAAGAAIADAI\r
+        CABgCAgAEBgIAAggCAAQIAgAECgIAAgwCAAQMAgAODAIABA4CAAYOAgAEEAIABhACAAgQAgAIFAIAChg\r
+        CAAwgAgAMJAIADCoCAAACBAAGBAQABggEAAoIBAAKGAQAChoEAAgeBAAKHgQAEh4EAAY+BAACAAYAAAI\r
+        GAAICBgAEAgYAAAQGAAQEBgAABgYAAgYGAAYMBgAKHgYADCYGAAwoBgAMKgYAGj/GABgCCAACBAgAAgY\r
+        IAAQGCAAGBggACggIABIcCAACAAoABAAKAAAECgAEBAoAAggKAAACDAASAgwAAgQMAAIKDAAECgwAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAARxBSUlJHAAAAAABYWFlY8kYAAAAAAAAAAAAAAAAAAJFgqqRLSzAwBXMAkKJbW1pdSVmE\r
+        AAAAAAAAAAAAAAAAEJdLqhpgYKQFkf9NmVRanHVJVZRQAAAAAAAAAAAAAAAAUY6RO6qXMHNYW5MxdFpm\r
+        TVtPSpAAAAAAAAAAAAAAAAAAAAAFpIYAAFSeW09PU15KU05MaEkAAAAAAAAAAAAAAAAAAEtgAAAAk55j\r
+        ml5Mp2haXUqpW3IAAAAAAAAAAAAAAAAAS0sAAEpJoE5PpZpMZVWnMZyZVQAAAAAAAAAAAAAAAABLMAAA\r
+        cqCeSnppZGZKWzFNaV2ecAAAAAAAAAAAAAAAAEtLAACLVF6iZHROp2eiW1paeWnxAAAAAAAAAAAAAABI\r
+        GmAAAElJSmh6SWNVSk5hZqJ1VXUAAAAAAAAAAAAAlpmjeJAAk12eZXZ5p3WndnZpaUlbZgAAAAAAAAAA\r
+        m2lFRTw8PDZeWV1OlE0xeWlNeVVdZmmZUAAAAAAAjzYKRaysRUVFRa02SXSnYaFNTUxpTFSoTmKTAAAA\r
+        AI8KOkSrrKysrKxErDullF6fVWhiVakLaVWbVZoAAAAAqK2sRKZEqyCsRKummKBZT0xPTHppZVMLqVN4\r
+        cQAAAAA6O6sYGKYYGKsYphgELjejY09KTTZNaWdMNpkAAAAA+zc6XFxcd3d3XASmXEw6PZZiZ6g2ZUw2\r
+        T2QLnwAAAAAdoTtcLcV3pndfLi2jraMtcmNkT05np0xnaXhUAAAAAAD5NKL87xgYd1+eLZ06+1wAVE6o\r
+        p2cKZ2WjjgAAAAAAAAAQo67EcuZuj5jkACue9gAAkTEKeJfbioptRgAAAAAAAACIr0dLVwBXmEeL5Qg4\r
+        AAAAAOnqwNbVb9O5AAAAAAAAAP38RmDae3tfkDqIX0UAAABq3W9v6+2BtssAAAAAAAD9q6v7AFl1dV9f\r
+        mpgIXwAAAABrtG9v7O2BagAAAACSF52fL/AAAAAAAHUAAAAAAAAAAACC1NS+3s/ZzAAAAJ03MjqjdJ0A\r
+        AAC3FIMUtwAAAAAAzr27goK5awAAAAAAWaNgGho3dAAAyr+/v4ODtQAAAMmAAM+2zxMTawAAAAAAAK6z\r
+        kZ1xAAC1un3HVwAAAAAAAAAAawB/ftAAAAAAAABCNUIAAAAAAAAAAF8AAAAAAAAAAEcAAGpGAAAAAAAA\r
+        AEKsEQAAAAAAAAAAlZUAAAAAAAAAAAAAAEgAAAAAAAAAAC3hAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAA\r
+        AAD///////////4BwH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAA\r
+        AAHgAAAB4AAAAeAAAAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9\r
+        /s/j/P/v8///7ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AFEl\r
+        swBJDW0ABEMwAAJHSQAFDwIAXl9ZAHJtagBwfYQAQVNqAAFtAAAAZgAAAz0CABQ/AQAXQwAAGkAAAA8g\r
+        AQAhSJQAM1SRABw6fgAFVk0ADE48AAplaQAgWgIAMYcMACl7CwAOJwMAAAMtABwPNwAhIQAABxACAA9S\r
+        UAAnQUgAAISfACRoDAAxmwQAK4MHABMpAAA8P1kATBMbACQSVwAKL1EADS5CADFMVQABIF4AJ3CGADB2\r
+        kAAzdlEAMnY1ABMnEwBARooAVVq5ABgATwAWBn0ABh56AAULaQBOeKYAT3WSACpNZwAucpgAMHifADFx\r
+        nwA1b5YAMF93AEBalgBvjecADCLAAAkPpQAbJr4AFiLGAAAJjgAzbIEANGh8AClhgAAzfKEAMHWWADJz\r
+        kwAsW3MAQ4mvADyY9AAtgf8AIpr/ACuk/wBdk9UAG0tkACladQAqbI4AK3GUAC5vjwArbpEALWJ7ACdl\r
+        aAAOaoQAJJ20ABx0gQAeTF8AJ116ACViggAgZosAJmeJAChvlAAhZIgAH1ZyAHVmYwAaPVMAJ19+ACto\r
+        hgAmaIwAKGB9ACFdfAAgY4YAGU5qAFtgYQAYQVgAIVx7ACtrjgAtZYIAJmKAACNhgQAmX3wAIUpdAHp6\r
+        ewARN0wAH1R0ACdXcgApXnoAJ2B+ACligQAdSmAAKiopAGZlZQCRkZEAbm9vAFFSUwAWO08AJFRuACFP\r
+        agAhUm0AHD9RAAMKDgA3NjUAWlpaADk5OQA3NzcAPDk3AAYSGQAVNUgAFjFAAA8jLwABAgQAVQAAAP//\r
+        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\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/win/C#/frmSplashScreen.Designer.cs b/win/C#/frmSplashScreen.Designer.cs
new file mode 100644 (file)
index 0000000..51891e4
--- /dev/null
@@ -0,0 +1,63 @@
+/*  frmSplashScreen.Designer.cs \r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace Handbrake\r
+{\r
+    partial class frmSplashScreen\r
+    {\r
+        /// <summary>\r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows Form Designer generated code\r
+\r
+        /// <summary>\r
+        /// Required method for Designer support - do not modify\r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSplashScreen));\r
+            this.SuspendLayout();\r
+            // \r
+            // frmSplashScreen\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.BackColor = System.Drawing.Color.White;\r
+            this.BackgroundImage = global::Handbrake.Properties.Resources.SplashScreen;\r
+            this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;\r
+            this.ClientSize = new System.Drawing.Size(496, 303);\r
+            this.ControlBox = false;\r
+            this.Font = new System.Drawing.Font("Corbel", 8.25F);\r
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.Name = "frmSplashScreen";\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
+            this.Text = "SplashScreen";\r
+            this.TopMost = true;\r
+            this.ResumeLayout(false);\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmSplashScreen.cs b/win/C#/frmSplashScreen.cs
new file mode 100644 (file)
index 0000000..6525072
--- /dev/null
@@ -0,0 +1,25 @@
+/*  frmSplashScreen.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using System.Threading;\r
+\r
+namespace Handbrake\r
+{\r
+    public partial class frmSplashScreen : Form\r
+    {\r
+        public frmSplashScreen()\r
+        {\r
+            InitializeComponent();\r
+        }\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmSplashScreen.resx b/win/C#/frmSplashScreen.resx
new file mode 100644 (file)
index 0000000..37f9290
--- /dev/null
@@ -0,0 +1,500 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
+        IACoJQAAHh0AACAgAAABACAAqBAAAMZCAAAQEAAAAQAgAGgEAABuUwAAKAAAADAAAABgAAAAAQAIAAAA\r
+        AACACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAD///8A/wAAAAD/AAAAAIAAgICAAICAAAAAgAAAAICAAIAA\r
+        AACAAIAAgP//ACAgIADg4OAAIAAAAAAgAABg4CAAQOBAAGBgYAAgYAAAQKDgAAAAIABAwCAAIEAAAECg\r
+        AABg4AAAIGCAAECAoABgoMAAYECgAGDAAABgICAAoKCgAOAAAAAgIAAAAGAAAEDgAABgAAAAIAAgAEAg\r
+        IAAgQGAAIIDAAADg4ABgAGAAgOD/ACCA/wCgAAAAQGAAACCAAAAAoAAAYCAAAAAgIAAgIEAAYGBAAEBg\r
+        YAAAIIAAAGCAAGCAgABAAKAAAICgAACgoACAoKAAIKDAAECgwAAAAOAAQADgAADA4ABgwOAAIODgAADg\r
+        AADA4AAAAEAgAKDgIAAA4EAAYABAAABAYACAAGAAgCBgAGAggABA4KAAAECgAGBAwADgIOAAIEDgAACA\r
+        4ADgoOAAYAD/ACBg/wAAoP8A4KD/AGD//wAICAgACAAAAAgIAAAAAJgACAAIAAAACAAACAAACBAQACA4\r
+        SAAgYIgAOHCIADhw+AAIGAAAEBAIACg4QAAwYHgAAACIACA4QAAoQFAAKFh4AHh4eAAwaIAAIGiQADh4\r
+        mAAACAgAEAgIABAYGAAgGBgASEhIABhIYAAoUGAAIFBoAChQaAAoWGgAMFhoAChoiAAweJgAKHioACiA\r
+        sAAIEAAACAgQAAgQGAAQGCAAGCAoABhAUAAoSFgAaGhoABhQcAAgWHAAKFhwADhgcAAYWIAAOGiAAIiI\r
+        iAAoaJAAKHCYACh4oAA4gKAAMICoAKioqAAwmNAAEDgAAChYAAAweAAAMIgQAAgYGAAYGBgACBggABAg\r
+        KAAgKCgAKCgoACAwOAA4ODgAKDhIADBQWABYWFgAGEhoADBYcAAYUHgAGFh4ACBYeAAoYHgAKGCAABhY\r
+        iAAgaJgAKICoACiIuAC4uLgAMJDIADiw6AAQCAAAABgAAAggAAAAOAAAMGgAABgQCAAwgAgAEAgQABgQ\r
+        EAAwmBgAGBggAAgYKAAAICgACCAoABgoMAAgKDAAGDBAABg4QAAYOFAAEEBYACBIWAAwSFgAOEhYACBI\r
+        YAAQSGgAOFhoABhIcAAoUHAAQFhwACBgeABAaIAAIGiIADBwiABAcIgAGGCQADhwkABYeJAACBCgAChw\r
+        oAAweKAAKIC4ACiQwAAwmMgAOKjgADBg6ABAsOgAELD4AAgoAAAIMAAAGDAAABhIAAAYUAAAKHgAAACY\r
+        AAAwmAAAAMgAABAACAAIEAgAEBgIABA4CAAYOAgAMHgIABAYEAAYGBAAIBgQACh4EAAwmBAAEBAYABgg\r
+        GAAoIBgAGCAgAAgIKAAgICgAGAgwAAggMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAn2KfdXV1XAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoo2+QIJCJb28Sd3em\r
+        nQAAAFuKqW0aqsd6Y5/DXAAAAAAAAAAAAAAAAAAAAAAAAAB3kAWQkG8SpqaJb28gsncAbIeSroyii21x\r
+        kczIwwAAAAAAAAAAAAAAAAAAAAAAAABoo4mJkLKylm9vb5BvdwwAcZO/fox7z2NjqsOss2MAWwAAAAAA\r
+        AAAAAAAAAAAAAAAAvaGmo5ANlgUFEiBvo1xjq3p6qMTJroBkxXt9cGzFnAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAL2ylgV3vQAAAGOvxMXXq41uh6yVjxqp1YhknwAAAAAAAAAAAAAAAAAAAAAAAAAAAABvsolbAAAA\r
+        +5KneouS2Kx4pZF9ndywsXuvkocAAAAAAAAAAAAAAAAAAAAAAAAAAAB3sncAAAAAdayHca95bH9+cKmv\r
+        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\r
+        eAAoaIgAMICoAChggAAACAgAEAgIABgYGAAoUGgAKFhwAChwkAAIGAgACBAQABAgKAAQKDgAIEhgACBQ\r
+        aAAAAHgAIFh4AChgeAAAeHgAeHh4AChogAAwaIAAIGCIADBoiAA4cIgAIGiQADhwkAAoeKgAKICwAAgQ\r
+        AAAIIAAACAAIABhICAAICBAAMIgQABAYGAAYICgAGCgwAEhISAAwSFgAGFBoAChYaAAICHgAOGiAACh4\r
+        oAAweKAAGAAAAAAIAAAAGAAACBgAABAoAAAYUAAAKGAAAChoAAAAeAAAAAAIAAgQCAAQEAgAGP8IACAY\r
+        EAAIEBgAMJAYABggIAAAACgACBAoACgwMAAAKDgAEDA4ADg4OAAoOEAAGDhIACA4SAAAQEgAMEBIAEhQ\r
+        UAAISFgAIEhYAChIWAAwUFgAIEhoAEhYaAAYUHAAMFhwABhYeAAoWHgAIFiAAEhwgACIiIgAGGCQAAAA\r
+        mAAgcJgAKHCYADB4mACYmJgAACjIAEBw+ACo//8ASAAAAFgAAABoAAAAeAAAABAIAABICAAAGCgAAAA4\r
+        AAAYOAAACEAAAAhIAAAoUAAAAFgAACBYAAAAaAAAIGgAADB4AAAAiAAAMIgAAGiIAACAmAAAGAAIADAI\r
+        CABgCAgAEBgIAAggCAAQIAgAECgIAAgwCAAQMAgAODAIABA4CAAYOAgAEEAIABhACAAgQAgAIFAIAChg\r
+        CAAwgAgAMJAIADCoCAAACBAAGBAQABggEAAoIBAAKGAQAChoEAAgeBAAKHgQAEh4EAAY+BAACAAYAAAI\r
+        GAAICBgAEAgYAAAQGAAQEBgAABgYAAgYGAAYMBgAKHgYADCYGAAwoBgAMKgYAGj/GABgCCAACBAgAAgY\r
+        IAAQGCAAGBggACggIABIcCAACAAoABAAKAAAECgAEBAoAAggKAAACDAASAgwAAgQMAAIKDAAECgwAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAARxBSUlJHAAAAAABYWFlY8kYAAAAAAAAAAAAAAAAAAJFgqqRLSzAwBXMAkKJbW1pdSVmE\r
+        AAAAAAAAAAAAAAAAEJdLqhpgYKQFkf9NmVRanHVJVZRQAAAAAAAAAAAAAAAAUY6RO6qXMHNYW5MxdFpm\r
+        TVtPSpAAAAAAAAAAAAAAAAAAAAAFpIYAAFSeW09PU15KU05MaEkAAAAAAAAAAAAAAAAAAEtgAAAAk55j\r
+        ml5Mp2haXUqpW3IAAAAAAAAAAAAAAAAAS0sAAEpJoE5PpZpMZVWnMZyZVQAAAAAAAAAAAAAAAABLMAAA\r
+        cqCeSnppZGZKWzFNaV2ecAAAAAAAAAAAAAAAAEtLAACLVF6iZHROp2eiW1paeWnxAAAAAAAAAAAAAABI\r
+        GmAAAElJSmh6SWNVSk5hZqJ1VXUAAAAAAAAAAAAAlpmjeJAAk12eZXZ5p3WndnZpaUlbZgAAAAAAAAAA\r
+        m2lFRTw8PDZeWV1OlE0xeWlNeVVdZmmZUAAAAAAAjzYKRaysRUVFRa02SXSnYaFNTUxpTFSoTmKTAAAA\r
+        AI8KOkSrrKysrKxErDullF6fVWhiVakLaVWbVZoAAAAAqK2sRKZEqyCsRKummKBZT0xPTHppZVMLqVN4\r
+        cQAAAAA6O6sYGKYYGKsYphgELjejY09KTTZNaWdMNpkAAAAA+zc6XFxcd3d3XASmXEw6PZZiZ6g2ZUw2\r
+        T2QLnwAAAAAdoTtcLcV3pndfLi2jraMtcmNkT05np0xnaXhUAAAAAAD5NKL87xgYd1+eLZ06+1wAVE6o\r
+        p2cKZ2WjjgAAAAAAAAAQo67EcuZuj5jkACue9gAAkTEKeJfbioptRgAAAAAAAACIr0dLVwBXmEeL5Qg4\r
+        AAAAAOnqwNbVb9O5AAAAAAAAAP38RmDae3tfkDqIX0UAAABq3W9v6+2BtssAAAAAAAD9q6v7AFl1dV9f\r
+        mpgIXwAAAABrtG9v7O2BagAAAACSF52fL/AAAAAAAHUAAAAAAAAAAACC1NS+3s/ZzAAAAJ03MjqjdJ0A\r
+        AAC3FIMUtwAAAAAAzr27goK5awAAAAAAWaNgGho3dAAAyr+/v4ODtQAAAMmAAM+2zxMTawAAAAAAAK6z\r
+        kZ1xAAC1un3HVwAAAAAAAAAAawB/ftAAAAAAAABCNUIAAAAAAAAAAF8AAAAAAAAAAEcAAGpGAAAAAAAA\r
+        AEKsEQAAAAAAAAAAlZUAAAAAAAAAAAAAAEgAAAAAAAAAAC3hAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAA\r
+        AAD///////////4BwH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAA\r
+        AAHgAAAB4AAAAeAAAAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9\r
+        /s/j/P/v8///7ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AFEl\r
+        swBJDW0ABEMwAAJHSQAFDwIAXl9ZAHJtagBwfYQAQVNqAAFtAAAAZgAAAz0CABQ/AQAXQwAAGkAAAA8g\r
+        AQAhSJQAM1SRABw6fgAFVk0ADE48AAplaQAgWgIAMYcMACl7CwAOJwMAAAMtABwPNwAhIQAABxACAA9S\r
+        UAAnQUgAAISfACRoDAAxmwQAK4MHABMpAAA8P1kATBMbACQSVwAKL1EADS5CADFMVQABIF4AJ3CGADB2\r
+        kAAzdlEAMnY1ABMnEwBARooAVVq5ABgATwAWBn0ABh56AAULaQBOeKYAT3WSACpNZwAucpgAMHifADFx\r
+        nwA1b5YAMF93AEBalgBvjecADCLAAAkPpQAbJr4AFiLGAAAJjgAzbIEANGh8AClhgAAzfKEAMHWWADJz\r
+        kwAsW3MAQ4mvADyY9AAtgf8AIpr/ACuk/wBdk9UAG0tkACladQAqbI4AK3GUAC5vjwArbpEALWJ7ACdl\r
+        aAAOaoQAJJ20ABx0gQAeTF8AJ116ACViggAgZosAJmeJAChvlAAhZIgAH1ZyAHVmYwAaPVMAJ19+ACto\r
+        hgAmaIwAKGB9ACFdfAAgY4YAGU5qAFtgYQAYQVgAIVx7ACtrjgAtZYIAJmKAACNhgQAmX3wAIUpdAHp6\r
+        ewARN0wAH1R0ACdXcgApXnoAJ2B+ACligQAdSmAAKiopAGZlZQCRkZEAbm9vAFFSUwAWO08AJFRuACFP\r
+        agAhUm0AHD9RAAMKDgA3NjUAWlpaADk5OQA3NzcAPDk3AAYSGQAVNUgAFjFAAA8jLwABAgQAVQAAAP//\r
+        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\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/win/C#/frmUpdater.Designer.cs b/win/C#/frmUpdater.Designer.cs
new file mode 100644 (file)
index 0000000..336b29b
--- /dev/null
@@ -0,0 +1,294 @@
+/*  frmUpdater.Designer.cs \r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace Handbrake\r
+{\r
+    partial class frmUpdater\r
+    {\r
+        /// <summary>\r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows Form Designer generated code\r
+\r
+        /// <summary>\r
+        /// Required method for Designer support - do not modify\r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmUpdater));\r
+            this.label1 = new System.Windows.Forms.Label();\r
+            this.label6 = new System.Windows.Forms.Label();\r
+            this.btn_skip = new System.Windows.Forms.Button();\r
+            this.btn_installUpdate = new System.Windows.Forms.Button();\r
+            this.btn_remindLater = new System.Windows.Forms.Button();\r
+            this.label3 = new System.Windows.Forms.Label();\r
+            this.PictureBox1 = new System.Windows.Forms.PictureBox();\r
+            this.lbl_update_text = new System.Windows.Forms.Label();\r
+            this.panel1 = new System.Windows.Forms.Panel();\r
+            this.statusStrip1 = new System.Windows.Forms.StatusStrip();\r
+            this.panel3 = new System.Windows.Forms.Panel();\r
+            this.panel5 = new System.Windows.Forms.Panel();\r
+            this.wBrowser = new System.Windows.Forms.WebBrowser();\r
+            this.splitContainer1 = new System.Windows.Forms.SplitContainer();\r
+            this.button_container = new System.Windows.Forms.SplitContainer();\r
+            ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();\r
+            this.panel1.SuspendLayout();\r
+            this.splitContainer1.Panel1.SuspendLayout();\r
+            this.splitContainer1.Panel2.SuspendLayout();\r
+            this.splitContainer1.SuspendLayout();\r
+            this.button_container.Panel1.SuspendLayout();\r
+            this.button_container.Panel2.SuspendLayout();\r
+            this.button_container.SuspendLayout();\r
+            this.SuspendLayout();\r
+            // \r
+            // label1\r
+            // \r
+            this.label1.AutoSize = true;\r
+            this.label1.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label1.Location = new System.Drawing.Point(82, 12);\r
+            this.label1.Name = "label1";\r
+            this.label1.Size = new System.Drawing.Size(305, 16);\r
+            this.label1.TabIndex = 25;\r
+            this.label1.Text = "A New Version of Handbrake is available!";\r
+            // \r
+            // label6\r
+            // \r
+            this.label6.AutoSize = true;\r
+            this.label6.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label6.Location = new System.Drawing.Point(82, 49);\r
+            this.label6.Name = "label6";\r
+            this.label6.Size = new System.Drawing.Size(208, 13);\r
+            this.label6.TabIndex = 30;\r
+            this.label6.Text = "Would you like to download it now?";\r
+            // \r
+            // btn_skip\r
+            // \r
+            this.btn_skip.AutoSize = true;\r
+            this.btn_skip.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\r
+            this.btn_skip.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_skip.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_skip.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_skip.Location = new System.Drawing.Point(0, 3);\r
+            this.btn_skip.Name = "btn_skip";\r
+            this.btn_skip.Size = new System.Drawing.Size(129, 23);\r
+            this.btn_skip.TabIndex = 54;\r
+            this.btn_skip.Text = "Skip This Version";\r
+            this.btn_skip.UseVisualStyleBackColor = false;\r
+            this.btn_skip.Click += new System.EventHandler(this.btn_skip_Click);\r
+            // \r
+            // btn_installUpdate\r
+            // \r
+            this.btn_installUpdate.AutoSize = true;\r
+            this.btn_installUpdate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\r
+            this.btn_installUpdate.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_installUpdate.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_installUpdate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_installUpdate.Location = new System.Drawing.Point(153, 3);\r
+            this.btn_installUpdate.Name = "btn_installUpdate";\r
+            this.btn_installUpdate.Size = new System.Drawing.Size(109, 23);\r
+            this.btn_installUpdate.TabIndex = 55;\r
+            this.btn_installUpdate.Text = "Install Update";\r
+            this.btn_installUpdate.UseVisualStyleBackColor = false;\r
+            this.btn_installUpdate.Click += new System.EventHandler(this.btn_installUpdate_Click);\r
+            // \r
+            // btn_remindLater\r
+            // \r
+            this.btn_remindLater.AutoSize = true;\r
+            this.btn_remindLater.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\r
+            this.btn_remindLater.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_remindLater.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_remindLater.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_remindLater.Location = new System.Drawing.Point(19, 3);\r
+            this.btn_remindLater.Name = "btn_remindLater";\r
+            this.btn_remindLater.Size = new System.Drawing.Size(127, 23);\r
+            this.btn_remindLater.TabIndex = 56;\r
+            this.btn_remindLater.Text = "Remind me Later";\r
+            this.btn_remindLater.UseVisualStyleBackColor = false;\r
+            this.btn_remindLater.Click += new System.EventHandler(this.btn_remindLater_Click);\r
+            // \r
+            // label3\r
+            // \r
+            this.label3.AutoSize = true;\r
+            this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label3.Location = new System.Drawing.Point(82, 84);\r
+            this.label3.Name = "label3";\r
+            this.label3.Size = new System.Drawing.Size(103, 13);\r
+            this.label3.TabIndex = 57;\r
+            this.label3.Text = "Release Notes:";\r
+            // \r
+            // PictureBox1\r
+            // \r
+            this.PictureBox1.Image = global::Handbrake.Properties.Resources.logo64;\r
+            this.PictureBox1.InitialImage = null;\r
+            this.PictureBox1.Location = new System.Drawing.Point(12, 12);\r
+            this.PictureBox1.Name = "PictureBox1";\r
+            this.PictureBox1.Size = new System.Drawing.Size(64, 64);\r
+            this.PictureBox1.TabIndex = 24;\r
+            this.PictureBox1.TabStop = false;\r
+            // \r
+            // lbl_update_text\r
+            // \r
+            this.lbl_update_text.AutoSize = true;\r
+            this.lbl_update_text.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_update_text.Location = new System.Drawing.Point(82, 34);\r
+            this.lbl_update_text.Name = "lbl_update_text";\r
+            this.lbl_update_text.Size = new System.Drawing.Size(489, 13);\r
+            this.lbl_update_text.TabIndex = 58;\r
+            this.lbl_update_text.Text = "HandBrake {0.0.0} (000000000) is now available. (You have: {0.0.0} (000000000))";\r
+            // \r
+            // panel1\r
+            // \r
+            this.panel1.Controls.Add(this.PictureBox1);\r
+            this.panel1.Controls.Add(this.label3);\r
+            this.panel1.Controls.Add(this.label1);\r
+            this.panel1.Controls.Add(this.lbl_update_text);\r
+            this.panel1.Controls.Add(this.label6);\r
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;\r
+            this.panel1.Location = new System.Drawing.Point(0, 0);\r
+            this.panel1.Name = "panel1";\r
+            this.panel1.Size = new System.Drawing.Size(712, 105);\r
+            this.panel1.TabIndex = 60;\r
+            // \r
+            // statusStrip1\r
+            // \r
+            this.statusStrip1.Location = new System.Drawing.Point(0, 419);\r
+            this.statusStrip1.Name = "statusStrip1";\r
+            this.statusStrip1.Size = new System.Drawing.Size(712, 22);\r
+            this.statusStrip1.TabIndex = 65;\r
+            this.statusStrip1.Text = "statusStrip1";\r
+            // \r
+            // panel3\r
+            // \r
+            this.panel3.Dock = System.Windows.Forms.DockStyle.Left;\r
+            this.panel3.Location = new System.Drawing.Point(0, 105);\r
+            this.panel3.Name = "panel3";\r
+            this.panel3.Size = new System.Drawing.Size(87, 314);\r
+            this.panel3.TabIndex = 67;\r
+            // \r
+            // panel5\r
+            // \r
+            this.panel5.Dock = System.Windows.Forms.DockStyle.Right;\r
+            this.panel5.Location = new System.Drawing.Point(683, 105);\r
+            this.panel5.Name = "panel5";\r
+            this.panel5.Size = new System.Drawing.Size(29, 314);\r
+            this.panel5.TabIndex = 68;\r
+            // \r
+            // wBrowser\r
+            // \r
+            this.wBrowser.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.wBrowser.Location = new System.Drawing.Point(0, 0);\r
+            this.wBrowser.MinimumSize = new System.Drawing.Size(20, 20);\r
+            this.wBrowser.Name = "wBrowser";\r
+            this.wBrowser.Size = new System.Drawing.Size(596, 264);\r
+            this.wBrowser.TabIndex = 31;\r
+            // \r
+            // splitContainer1\r
+            // \r
+            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;\r
+            this.splitContainer1.Location = new System.Drawing.Point(87, 105);\r
+            this.splitContainer1.Margin = new System.Windows.Forms.Padding(0);\r
+            this.splitContainer1.Name = "splitContainer1";\r
+            this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;\r
+            // \r
+            // splitContainer1.Panel1\r
+            // \r
+            this.splitContainer1.Panel1.Controls.Add(this.wBrowser);\r
+            // \r
+            // splitContainer1.Panel2\r
+            // \r
+            this.splitContainer1.Panel2.Controls.Add(this.button_container);\r
+            this.splitContainer1.Size = new System.Drawing.Size(596, 314);\r
+            this.splitContainer1.SplitterDistance = 264;\r
+            this.splitContainer1.TabIndex = 69;\r
+            // \r
+            // button_container\r
+            // \r
+            this.button_container.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.button_container.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;\r
+            this.button_container.Location = new System.Drawing.Point(0, 0);\r
+            this.button_container.Name = "button_container";\r
+            // \r
+            // button_container.Panel1\r
+            // \r
+            this.button_container.Panel1.Controls.Add(this.btn_skip);\r
+            // \r
+            // button_container.Panel2\r
+            // \r
+            this.button_container.Panel2.Controls.Add(this.btn_remindLater);\r
+            this.button_container.Panel2.Controls.Add(this.btn_installUpdate);\r
+            this.button_container.Size = new System.Drawing.Size(596, 46);\r
+            this.button_container.SplitterDistance = 330;\r
+            this.button_container.TabIndex = 0;\r
+            // \r
+            // frmUpdater\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.ClientSize = new System.Drawing.Size(712, 441);\r
+            this.Controls.Add(this.splitContainer1);\r
+            this.Controls.Add(this.panel5);\r
+            this.Controls.Add(this.panel3);\r
+            this.Controls.Add(this.statusStrip1);\r
+            this.Controls.Add(this.panel1);\r
+            this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MaximizeBox = false;\r
+            this.MinimumSize = new System.Drawing.Size(720, 470);\r
+            this.Name = "frmUpdater";\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
+            this.Text = "Update";\r
+            ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();\r
+            this.panel1.ResumeLayout(false);\r
+            this.panel1.PerformLayout();\r
+            this.splitContainer1.Panel1.ResumeLayout(false);\r
+            this.splitContainer1.Panel2.ResumeLayout(false);\r
+            this.splitContainer1.ResumeLayout(false);\r
+            this.button_container.Panel1.ResumeLayout(false);\r
+            this.button_container.Panel1.PerformLayout();\r
+            this.button_container.Panel2.ResumeLayout(false);\r
+            this.button_container.Panel2.PerformLayout();\r
+            this.button_container.ResumeLayout(false);\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        internal System.Windows.Forms.PictureBox PictureBox1;\r
+        private System.Windows.Forms.Label label1;\r
+        private System.Windows.Forms.Label label6;\r
+        internal System.Windows.Forms.Button btn_skip;\r
+        internal System.Windows.Forms.Button btn_installUpdate;\r
+        internal System.Windows.Forms.Button btn_remindLater;\r
+        private System.Windows.Forms.Label label3;\r
+        private System.Windows.Forms.Label lbl_update_text;\r
+        private System.Windows.Forms.Panel panel1;\r
+        private System.Windows.Forms.StatusStrip statusStrip1;\r
+        private System.Windows.Forms.Panel panel3;\r
+        private System.Windows.Forms.Panel panel5;\r
+        private System.Windows.Forms.WebBrowser wBrowser;\r
+        private System.Windows.Forms.SplitContainer splitContainer1;\r
+        private System.Windows.Forms.SplitContainer button_container;\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmUpdater.cs b/win/C#/frmUpdater.cs
new file mode 100644 (file)
index 0000000..271e17b
--- /dev/null
@@ -0,0 +1,60 @@
+/*  frmUpdater.cs $\r
+       \r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+using System;\r
+using System.Windows.Forms;\r
+using System.IO;\r
+using System.Xml;\r
+using System.Net;\r
+\r
+namespace Handbrake\r
+{\r
+    public partial class frmUpdater : Form\r
+    {\r
+        Functions.AppcastReader appcast = new Functions.AppcastReader();\r
+        public frmUpdater()\r
+        {\r
+            InitializeComponent();\r
+\r
+            appcast.getInfo(); // Initializes the appcast\r
+            getRss();\r
+            setVersions();\r
+        }\r
+\r
+        private void getRss()\r
+        {\r
+            wBrowser.DocumentText = "<font face=\"verdana\" size=\"1\">" + appcast.versionInfo() + "</font>";\r
+        }\r
+\r
+        private void setVersions()\r
+        {\r
+            string old = "(You have: " + Properties.Settings.Default.hb_version.Trim() + " / " + Properties.Settings.Default.hb_build.ToString().Trim() + ")";\r
+            string newBuild = appcast.version().Trim() + " (" + appcast.build() + ")";\r
+            lbl_update_text.Text = "HandBrake " + newBuild + " is now available. " + old;\r
+        }\r
+\r
+        private void btn_installUpdate_Click(object sender, EventArgs e)\r
+        {\r
+            frmDownload download = new frmDownload(appcast.downloadFile());\r
+            download.Show();\r
+            this.Close();\r
+        }\r
+\r
+        private void btn_remindLater_Click(object sender, EventArgs e)\r
+        {\r
+            this.Close();\r
+        }\r
+\r
+        private void btn_skip_Click(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.skipversion = int.Parse(appcast.build());\r
+            Properties.Settings.Default.Save();\r
+\r
+            this.Close();\r
+        }\r
+\r
+    }\r
+}
\ No newline at end of file
diff --git a/win/C#/frmUpdater.resx b/win/C#/frmUpdater.resx
new file mode 100644 (file)
index 0000000..99dc4ae
--- /dev/null
@@ -0,0 +1,503 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>17, 17</value>\r
+  </metadata>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
+        IACoJQAAHh0AACAgAAABACAAqBAAAMZCAAAQEAAAAQAgAGgEAABuUwAAKAAAADAAAABgAAAAAQAIAAAA\r
+        AACACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAD///8A/wAAAAD/AAAAAIAAgICAAICAAAAAgAAAAICAAIAA\r
+        AACAAIAAgP//ACAgIADg4OAAIAAAAAAgAABg4CAAQOBAAGBgYAAgYAAAQKDgAAAAIABAwCAAIEAAAECg\r
+        AABg4AAAIGCAAECAoABgoMAAYECgAGDAAABgICAAoKCgAOAAAAAgIAAAAGAAAEDgAABgAAAAIAAgAEAg\r
+        IAAgQGAAIIDAAADg4ABgAGAAgOD/ACCA/wCgAAAAQGAAACCAAAAAoAAAYCAAAAAgIAAgIEAAYGBAAEBg\r
+        YAAAIIAAAGCAAGCAgABAAKAAAICgAACgoACAoKAAIKDAAECgwAAAAOAAQADgAADA4ABgwOAAIODgAADg\r
+        AADA4AAAAEAgAKDgIAAA4EAAYABAAABAYACAAGAAgCBgAGAggABA4KAAAECgAGBAwADgIOAAIEDgAACA\r
+        4ADgoOAAYAD/ACBg/wAAoP8A4KD/AGD//wAICAgACAAAAAgIAAAAAJgACAAIAAAACAAACAAACBAQACA4\r
+        SAAgYIgAOHCIADhw+AAIGAAAEBAIACg4QAAwYHgAAACIACA4QAAoQFAAKFh4AHh4eAAwaIAAIGiQADh4\r
+        mAAACAgAEAgIABAYGAAgGBgASEhIABhIYAAoUGAAIFBoAChQaAAoWGgAMFhoAChoiAAweJgAKHioACiA\r
+        sAAIEAAACAgQAAgQGAAQGCAAGCAoABhAUAAoSFgAaGhoABhQcAAgWHAAKFhwADhgcAAYWIAAOGiAAIiI\r
+        iAAoaJAAKHCYACh4oAA4gKAAMICoAKioqAAwmNAAEDgAAChYAAAweAAAMIgQAAgYGAAYGBgACBggABAg\r
+        KAAgKCgAKCgoACAwOAA4ODgAKDhIADBQWABYWFgAGEhoADBYcAAYUHgAGFh4ACBYeAAoYHgAKGCAABhY\r
+        iAAgaJgAKICoACiIuAC4uLgAMJDIADiw6AAQCAAAABgAAAggAAAAOAAAMGgAABgQCAAwgAgAEAgQABgQ\r
+        EAAwmBgAGBggAAgYKAAAICgACCAoABgoMAAgKDAAGDBAABg4QAAYOFAAEEBYACBIWAAwSFgAOEhYACBI\r
+        YAAQSGgAOFhoABhIcAAoUHAAQFhwACBgeABAaIAAIGiIADBwiABAcIgAGGCQADhwkABYeJAACBCgAChw\r
+        oAAweKAAKIC4ACiQwAAwmMgAOKjgADBg6ABAsOgAELD4AAgoAAAIMAAAGDAAABhIAAAYUAAAKHgAAACY\r
+        AAAwmAAAAMgAABAACAAIEAgAEBgIABA4CAAYOAgAMHgIABAYEAAYGBAAIBgQACh4EAAwmBAAEBAYABgg\r
+        GAAoIBgAGCAgAAgIKAAgICgAGAgwAAggMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAn2KfdXV1XAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoo2+QIJCJb28Sd3em\r
+        nQAAAFuKqW0aqsd6Y5/DXAAAAAAAAAAAAAAAAAAAAAAAAAB3kAWQkG8SpqaJb28gsncAbIeSroyii21x\r
+        kczIwwAAAAAAAAAAAAAAAAAAAAAAAABoo4mJkLKylm9vb5BvdwwAcZO/fox7z2NjqsOss2MAWwAAAAAA\r
+        AAAAAAAAAAAAAAAAvaGmo5ANlgUFEiBvo1xjq3p6qMTJroBkxXt9cGzFnAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAL2ylgV3vQAAAGOvxMXXq41uh6yVjxqp1YhknwAAAAAAAAAAAAAAAAAAAAAAAAAAAABvsolbAAAA\r
+        +5KneouS2Kx4pZF9ndywsXuvkocAAAAAAAAAAAAAAAAAAAAAAAAAAAB3sncAAAAAdayHca95bH9+cKmv\r
+        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\r
+        eAAoaIgAMICoAChggAAACAgAEAgIABgYGAAoUGgAKFhwAChwkAAIGAgACBAQABAgKAAQKDgAIEhgACBQ\r
+        aAAAAHgAIFh4AChgeAAAeHgAeHh4AChogAAwaIAAIGCIADBoiAA4cIgAIGiQADhwkAAoeKgAKICwAAgQ\r
+        AAAIIAAACAAIABhICAAICBAAMIgQABAYGAAYICgAGCgwAEhISAAwSFgAGFBoAChYaAAICHgAOGiAACh4\r
+        oAAweKAAGAAAAAAIAAAAGAAACBgAABAoAAAYUAAAKGAAAChoAAAAeAAAAAAIAAgQCAAQEAgAGP8IACAY\r
+        EAAIEBgAMJAYABggIAAAACgACBAoACgwMAAAKDgAEDA4ADg4OAAoOEAAGDhIACA4SAAAQEgAMEBIAEhQ\r
+        UAAISFgAIEhYAChIWAAwUFgAIEhoAEhYaAAYUHAAMFhwABhYeAAoWHgAIFiAAEhwgACIiIgAGGCQAAAA\r
+        mAAgcJgAKHCYADB4mACYmJgAACjIAEBw+ACo//8ASAAAAFgAAABoAAAAeAAAABAIAABICAAAGCgAAAA4\r
+        AAAYOAAACEAAAAhIAAAoUAAAAFgAACBYAAAAaAAAIGgAADB4AAAAiAAAMIgAAGiIAACAmAAAGAAIADAI\r
+        CABgCAgAEBgIAAggCAAQIAgAECgIAAgwCAAQMAgAODAIABA4CAAYOAgAEEAIABhACAAgQAgAIFAIAChg\r
+        CAAwgAgAMJAIADCoCAAACBAAGBAQABggEAAoIBAAKGAQAChoEAAgeBAAKHgQAEh4EAAY+BAACAAYAAAI\r
+        GAAICBgAEAgYAAAQGAAQEBgAABgYAAgYGAAYMBgAKHgYADCYGAAwoBgAMKgYAGj/GABgCCAACBAgAAgY\r
+        IAAQGCAAGBggACggIABIcCAACAAoABAAKAAAECgAEBAoAAggKAAACDAASAgwAAgQMAAIKDAAECgwAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAARxBSUlJHAAAAAABYWFlY8kYAAAAAAAAAAAAAAAAAAJFgqqRLSzAwBXMAkKJbW1pdSVmE\r
+        AAAAAAAAAAAAAAAAEJdLqhpgYKQFkf9NmVRanHVJVZRQAAAAAAAAAAAAAAAAUY6RO6qXMHNYW5MxdFpm\r
+        TVtPSpAAAAAAAAAAAAAAAAAAAAAFpIYAAFSeW09PU15KU05MaEkAAAAAAAAAAAAAAAAAAEtgAAAAk55j\r
+        ml5Mp2haXUqpW3IAAAAAAAAAAAAAAAAAS0sAAEpJoE5PpZpMZVWnMZyZVQAAAAAAAAAAAAAAAABLMAAA\r
+        cqCeSnppZGZKWzFNaV2ecAAAAAAAAAAAAAAAAEtLAACLVF6iZHROp2eiW1paeWnxAAAAAAAAAAAAAABI\r
+        GmAAAElJSmh6SWNVSk5hZqJ1VXUAAAAAAAAAAAAAlpmjeJAAk12eZXZ5p3WndnZpaUlbZgAAAAAAAAAA\r
+        m2lFRTw8PDZeWV1OlE0xeWlNeVVdZmmZUAAAAAAAjzYKRaysRUVFRa02SXSnYaFNTUxpTFSoTmKTAAAA\r
+        AI8KOkSrrKysrKxErDullF6fVWhiVakLaVWbVZoAAAAAqK2sRKZEqyCsRKummKBZT0xPTHppZVMLqVN4\r
+        cQAAAAA6O6sYGKYYGKsYphgELjejY09KTTZNaWdMNpkAAAAA+zc6XFxcd3d3XASmXEw6PZZiZ6g2ZUw2\r
+        T2QLnwAAAAAdoTtcLcV3pndfLi2jraMtcmNkT05np0xnaXhUAAAAAAD5NKL87xgYd1+eLZ06+1wAVE6o\r
+        p2cKZ2WjjgAAAAAAAAAQo67EcuZuj5jkACue9gAAkTEKeJfbioptRgAAAAAAAACIr0dLVwBXmEeL5Qg4\r
+        AAAAAOnqwNbVb9O5AAAAAAAAAP38RmDae3tfkDqIX0UAAABq3W9v6+2BtssAAAAAAAD9q6v7AFl1dV9f\r
+        mpgIXwAAAABrtG9v7O2BagAAAACSF52fL/AAAAAAAHUAAAAAAAAAAACC1NS+3s/ZzAAAAJ03MjqjdJ0A\r
+        AAC3FIMUtwAAAAAAzr27goK5awAAAAAAWaNgGho3dAAAyr+/v4ODtQAAAMmAAM+2zxMTawAAAAAAAK6z\r
+        kZ1xAAC1un3HVwAAAAAAAAAAawB/ftAAAAAAAABCNUIAAAAAAAAAAF8AAAAAAAAAAEcAAGpGAAAAAAAA\r
+        AEKsEQAAAAAAAAAAlZUAAAAAAAAAAAAAAEgAAAAAAAAAAC3hAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAA\r
+        AAD///////////4BwH/8AAAf/AAAD/4AAA//xgAP/84AB//MAAf/zAAD/8wAA/+MAAP/BAAD/AAAAfAA\r
+        AAHgAAAB4AAAAeAAAAPAAAADwAAAA+AAIAfgADAD8AA8A/gAOAPwgDwDwPv+AcBwfAfAYDkD8GD/Q+P9\r
+        /s/j/P/v8///7ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AFEl\r
+        swBJDW0ABEMwAAJHSQAFDwIAXl9ZAHJtagBwfYQAQVNqAAFtAAAAZgAAAz0CABQ/AQAXQwAAGkAAAA8g\r
+        AQAhSJQAM1SRABw6fgAFVk0ADE48AAplaQAgWgIAMYcMACl7CwAOJwMAAAMtABwPNwAhIQAABxACAA9S\r
+        UAAnQUgAAISfACRoDAAxmwQAK4MHABMpAAA8P1kATBMbACQSVwAKL1EADS5CADFMVQABIF4AJ3CGADB2\r
+        kAAzdlEAMnY1ABMnEwBARooAVVq5ABgATwAWBn0ABh56AAULaQBOeKYAT3WSACpNZwAucpgAMHifADFx\r
+        nwA1b5YAMF93AEBalgBvjecADCLAAAkPpQAbJr4AFiLGAAAJjgAzbIEANGh8AClhgAAzfKEAMHWWADJz\r
+        kwAsW3MAQ4mvADyY9AAtgf8AIpr/ACuk/wBdk9UAG0tkACladQAqbI4AK3GUAC5vjwArbpEALWJ7ACdl\r
+        aAAOaoQAJJ20ABx0gQAeTF8AJ116ACViggAgZosAJmeJAChvlAAhZIgAH1ZyAHVmYwAaPVMAJ19+ACto\r
+        hgAmaIwAKGB9ACFdfAAgY4YAGU5qAFtgYQAYQVgAIVx7ACtrjgAtZYIAJmKAACNhgQAmX3wAIUpdAHp6\r
+        ewARN0wAH1R0ACdXcgApXnoAJ2B+ACligQAdSmAAKiopAGZlZQCRkZEAbm9vAFFSUwAWO08AJFRuACFP\r
+        agAhUm0AHD9RAAMKDgA3NjUAWlpaADk5OQA3NzcAPDk3AAYSGQAVNUgAFjFAAA8jLwABAgQAVQAAAP//\r
+        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\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/win/C#/handbrakepineapple.ico b/win/C#/handbrakepineapple.ico
new file mode 100644 (file)
index 0000000..57a0562
Binary files /dev/null and b/win/C#/handbrakepineapple.ico differ